Skip to content

Commit 6519f45

Browse files
Get page context (#1953)
* Only run in the sidebar * Add to the windows bundle * Add duck-ai-listener to windows * Add replaceState listener * Move to non-isolated so we can listen to URL changes * Detect duck.ai better * Ignore URL listeners for frames and duckai * Ignore duck:// urls for collection * Remove error * Move logging * lint fix * Add visibilitychange listener * Remove collect subscription * Clean up mutation listener to stop after cache is gone, simplify cache logic * Convert text content to simple markdown representation * Add remote config wrappers * Truncate page context at the node collection and add flag Add truncation in page warning. * Add prompt explict markers * Clean up * Ensure mutation observer is initialized correctly * Rename message bridge logger * Remove arg * Change prompt a little * Lint fixes * Fix unit test not to be hardcoded * Add explicit consent messaging * Split out messaging * Add context info pixel * Invalidate cache on collect * Dedupe invalidate * Move pixel send * Handle reset state better * Consume text box value on send * Add null handling for getPageContext * Remove context chip on null * Add togglePageContextTelemetry message * Handle content coming from either get or subscribe. Ensure toggle state reflects reality * Clean up * Add telemetry * Lint fix * Add hasContextBeenUsed back in * Add back in tooltip * Add prompt cleaner * Expand telemetry * Ensure hasContextBeenUsed is after input events * Change bucket sizes * Lint fix * Lower max limit * Make size categories remote configurable * Truncate long title
1 parent 830539c commit 6519f45

File tree

2 files changed

+710
-84
lines changed

2 files changed

+710
-84
lines changed

0 commit comments

Comments
 (0)