github / github/copilot-cli

/chronicle: ingest VS Code Copilot Chat history alongside CLI sessions for a unified history

Offen
#3,816 0 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen
area:sessions
Vorherrschende Sprache
Shell
Sterne
11.2k
Forks
1.9k
Ø Merge
14 Std. 16 Min.
Gemergte PRs (30 T.)
6

Beschreibung

## 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).

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne mit dem Indexer für /chronicle und dem session_store_sql-Backend und verfolge dann, wie /resume, /research, /search und CopilotCLIChatSessionContentProvider.listSessions Sitzungen konsumieren. Bestätige den Speicherort und das Schema der VS Code-Transkripte anhand der verlinkten VS Code-Arbeit. Als erledigt gilt die opt-in-Aufnahme von vscode-chat, quellenbewusste Abfragen und Oberflächen, Dokumentation sowie keine CLI-only-Leistungsregression.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
sql, vscode
Bereich
backend, cli, database
Issue-Typ
Feature
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Ruhig
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.