/chronicle: ingest VS Code Copilot Chat history alongside CLI sessions for a unified history
- Dominant language
- Shell
- Stars
- 11.2k
- Forks
- 1.9k
- Avg merge
- 14h 16m
- Merged PRs (30d)
- 6
Description
## Summary
Today `/chronicle` (and the underlying `session_store_sql`, `/resume`, `/research`, `/search`) only index sessions produced by the Copilot CLI itself — the local `~/.copilot/session-state/` store plus the cloud session store. Conversations conducted in **VS Code Copilot Chat** are invisible to `/chronicle`, even when they happen on the same machine, same user, and same repository.
Meanwhile the inverse direction already works: VS Code Copilot Chat enumerates Copilot CLI sessions via `CopilotCLIChatSessionContentProvider.listSessions` and surfaces them in the Chat Sessions view (see #3652, microsoft/vscode#318126, #311405, #310933, and #3740). Closing the loop would give users a single, unified history across both surfaces.
## Use case
I move fluidly between `copilot` in the terminal and Copilot Chat in VS Code on the same repo throughout the day. When I later ask `/chronicle` "what was I working on this week in repo X?" or use `session_store_sql` / `/research` to retrieve prior approaches, half of my actual history is missing because it lived in VS Code Chat.
## Proposal
Extend the `/chronicle` indexer (and the `session_store_sql` backend) to optionally ingest VS Code Copilot Chat transcripts in addition to the CLI's own sessions:
- Discover VS Code Copilot Chat session storage on disk (workspaceStorage / globalStorage chat transcript files; exact path/schema owned by `microsoft/vscode-copilot-release` — companion issue may be needed there to stabilize/document it).
- Normalize each VS Code chat session into the same row shape currently used in the session store (`sessions`, `turns`, `events`, `session_files`, `session_refs`, etc.), with a `source` column distinguishing `cli` vs `vscode-chat`.
- Make ingestion opt-in via a setting (e.g. `chronicle.sources = ["cli", "vscode-chat"]`) and respect any existing local-only / cloud sync preferences.
- Surface the new source in `/chronicle` insights, `/resume` pickers, `/research`, and `session_store_sql` query results.
## Why the CLI repo
`/chronicle`, the session-store schema, and the indexer all live in `github/copilot-cli`. The `@github/copilot` SDK doesn't own these surfaces, and VS Code Copilot Chat already reads CLI sessions — so the missing half of the integration is naturally a CLI-side change. A companion issue in `microsoft/vscode-copilot-release` to expose a stable on-disk transcript location may be useful but is secondary.
## Related issues
- #3652 — VS Code Copilot Chat already calls into CLI sessions via `CopilotCLIChatSessionContentProvider.listSessions`
- #1791 — Global session history registry / persistent cross-session stats
- #3811, #3777, #3775 — existing `/chronicle` indexer issues
- microsoft/vscode#318126, #311405, #310933 — VS Code-side handling of CLI sessions
- #3740 — Opening CLI chat from the VS Code Copilot Session pane
## Acceptance criteria
- A VS Code Copilot Chat session conducted on repo X appears in `/chronicle` insights for repo X.
- `session_store_sql` can `SELECT ... WHERE source = 'vscode-chat'` and join VS Code turns alongside CLI turns.
- Ingestion is opt-in and documented.
- No regression in CLI-only session performance (cf. #3652).
Contributor guide
Assessment
This issue has not been assessed yet.