Skip to content

chat: list prompts, open a turn by ID, and page by cursor - #620

Draft
Osvaldo Ortega (osortega) wants to merge 3 commits into
mainfrom
agents/chat-history-navigation
Draft

Osvaldo Ortega (osortega) wants to merge 3 commits into
mainfrom
agents/chat-history-navigation

Conversation

@osortega

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

Copy link
Copy Markdown

A client at turn 100 can show the full prompt list, open turn 45, and keep reading from there without downloading the gap.

  1. A chat snapshot advertises historyBrowsing: {}. Without it, existing subscription paging (fetchTurns) still works as before.
  2. listChatTurns returns stable IDs and short prompt previews in transcript order, without replies or file-change statistics.
  3. To open turn 45, call readChatTurns with fromTurnId: "t45" and, for example, limit: 5. The first page starts at 45 and can contain 45–49. To scroll, pass either its previousCursor or nextCursor back as cursor. A missing cursor marks that end. Reads are byte-bounded, private, and do not change the live subscription.

Start with the example in the chat spec. Host-side Find is in #623, stacked on this PR. Merge this PR first, then retarget #623 to main. The VS Code implementation is tracked in microsoft/vscode#349287; avoiding collapsed-gutter file-change subscriptions (microsoft/vscode#348141) requires a client change, not more fields in the outline.

Validation: npm run generate passed, npm test passed (676 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.

Let clients list prompt previews, read a contiguous window by turn ID, and locate matching text without extending the live subscription.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Make the prompt index and direct turn-window reads available on their own. Advertise the pair with a per-chat presence object; keep subscription paging unchanged.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@osortega Osvaldo Ortega (osortega) changed the title chat: add read-only history navigation and search chat: list prompts and read turn windows without loading the gap Nov 20, 2026
Start at the selected turn rather than centering a window. Return opaque continuations on each available side, leaving the live chat subscription unchanged.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@osortega Osvaldo Ortega (osortega) changed the title chat: list prompts and read turn windows without loading the gap chat: list prompts, open a turn by ID, and page by cursor Nov 20, 2026

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