Skip to content

chat: search retained turns without loading their replies - #623

Draft
Osvaldo Ortega (osortega) wants to merge 2 commits into
agents/chat-history-navigationfrom
agents/chat-history-search
Draft

Osvaldo Ortega (osortega) wants to merge 2 commits into
agents/chat-history-navigationfrom
agents/chat-history-search

Conversation

@osortega

@osortega Osvaldo Ortega (osortega) commented Nov 20, 2026 •

Copy link
Copy Markdown

Stacked on #620. Review and merge browsing first, then retarget this PR to main. Relative to #620, this adds one optional command: searchChatTurns. Browsing-only hosts do not need to implement it.

For example, Find can locate the second map in the reply to turn 45 while the client is showing turn 100. The host returns { turnId, kind, occurrence }. The client passes the match’s turnId as fromTurnId to readChatTurns from #620. Turn 45 is first in the returned page; scrolling uses that page’s previousCursor or nextCursor, not the search cursor. Neither operation loads the gap or changes the live subscription.

  • A chat advertises historyBrowsing: { search: {} }. historyBrowsing: {} still means list/read only.
  • Only visible prompt and reply text is searched. A bounded scan may return an empty page with a continuation; only a missing cursor means done.

Start with the search contract. The VS Code implementation is tracked in microsoft/vscode#349287.

Validation: npm run generate passed, npm test passed (683 tests), and the shared wire fixtures passed locally in TypeScript, Go, Rust, Swift, Kotlin (JDK 17), and .NET. No live host interoperability or VS Code UI run was performed. The repository’s main CI workflow targets PRs against main and will run after retargeting.

Return stable match locations in visible prompts and replies. Require browsing so clients can reveal a result without loading the gap or changing another client’s view.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Integrate the browsing base without rewriting the published search branch. Match turn IDs open the first turn of a read page; search cursors remain independent.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

This branch has not been deployed

No deployments
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.

1 participant