Skip to content

Adaptive Research#78

Merged
EdgeTypE merged 18 commits into
EdgeTypE:mainfrom
WhiteLicorice:feat/improve-search-results
Jun 19, 2026
Merged

Adaptive Research#78
EdgeTypE merged 18 commits into
EdgeTypE:mainfrom
WhiteLicorice:feat/improve-search-results

Conversation

@WhiteLicorice

@WhiteLicorice WhiteLicorice commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

With respect to Deep Research: PR introduces significant improvements to the automatic search, file sending, and chat input handling logic in src/content/auto.js, as well as enhancements to context budget tracking in src/content/bridge.js. The changes focus on making search deduplication more robust, improving the reliability and intelligence of sending chat messages (including file uploads), and accurately tracking context usage for budget enforcement. This allows Deep Research to dynamically add micro-steps (adaptive research) to the plan on the fly, similar to Claude, ChatGPT, and Gemini, allowing for longer research runs and better results, while handling edge cases such as overflowing message length and chat context length.

Other changes:

Search Deduplication and Options Handling

  • Added normalizeSearchKeyPart and getSearchDedupeKey functions to ensure search queries are deduplicated based on normalized query, purpose, and source type, making deduplication more accurate and context-aware. Updated handleAutoSearch and handleAutoSearchForRun to use these keys and to accept and propagate additional options such as purpose and sourceType. [1] [2] [3]

Enhanced File and Message Sending

  • Refactored file and message sending logic to handle chat input limits more gracefully. Introduced sendFileWithMessage and sendTextWithOverLimitFallbacks to try multiple fallback texts if the initial message exceeds input limits, and improved file reading robustness with a new readFileText helper. [1] [2] [3]

Robust Send Button Detection and Sending Logic

  • Overhauled the logic for finding and interacting with the chat send button. Improved detection of send buttons using icon paths, labels, and DOM structure; added checks for over-limit indicators; and made the send operation more resilient with retries, timeouts, and fallback to pressing Enter if needed.

Context Budget Tracking

  • Added logic in src/content/bridge.js to record both outgoing context (hidden prompt injections) and server-reported token usage for conversations when context guard is enabled, improving the accuracy of budget enforcement. [1] [2] [3]

EDIT: I used 128K context because this is what several online sources say the chat length limit is on the website. Models have 1M context, supposedly, but I run into chat length limits too soon for this to be actually true for what's in the backend of the website. Feel free to change the numbers in the code, though.

Copilot AI and others added 18 commits June 15, 2026 23:48
…-search-results

Narrow auto-search queries and rank DDG/Bing fallback results
- Suppress AUTO tags during managed Deep Research runs to prevent disruption of BDS logic.
- Implement report synthesis for managed runs when no report tag is present in the latest assistant message.
- Introduce step completion handling with new DEEP_RESEARCH_STEP_DONE tag, allowing for detailed step analysis and error handling.
- Update DeepResearchStatusCard to reflect managed execution state, including progress and current step details.
- Modify payload mutator to clarify Deep Research toggle intent in user prompts.
- Enhance tests for parsing and handling of new deep research features, including step completion and reporting.
…cked transitions

feat(message-processor): defer Deep Research step-done side effects until generation is complete
…f icon-only buttons and file-backed transitions
…ath checks and add integration tests for send controls
…t fallbacks for over-limit scenarios and improve evidence digest handling
Add per-conversation context budget tracking to prevent DeepSeek
web-chat context window overflow during managed Deep Research runs.

- context-budget.js: token estimation, recording, server calibration
- Enforce budget before sending step results; skip remaining steps
  and request compact final report when threshold would be crossed
- Mark skipped steps as skipped_budget; block adaptive steps after stop
- Budget-aware final report prompt names completed/skipped steps
- Advanced Settings: toggle, limit tokens, stop percent (50-95%)
- Clear budget on cancel/complete/disable
- 41 new regression tests (context guard + SettingsPanel UI)
- All 751 tests pass, CI green
@EdgeTypE EdgeTypE merged commit 00aa492 into EdgeTypE:main Jun 19, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants