Repository navigation
Read Continue and Copilot CLI sessions from their real storage formats - #3
Merged
Merged
Conversation
Both parsers were written against guessed formats and found nothing on a real install. - Continue: read ~/.continue/sessions/<id>.json (history[].message with string or text-part content) plus the sessions.json index for creation dates; honours CONTINUE_GLOBAL_DIR. The old parser queried a sessions.db SQLite file Continue never creates. - Copilot CLI: read ~/.copilot/session-state/<uuid>/events.jsonl (session.start, user.message, assistant.message → data.content) and workspace.yaml for the title/created date/cwd. model.* side-channel events and tool-only assistant messages are skipped. - Copilot CLI writer now produces that layout (stable UUIDs for non-UUID ids so re-imports overwrite) instead of ~/.copilot/sessions/*.json, which Copilot never read. README notes `/chronicle reindex`. - Remove the now-unused SqliteParser. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The Continue and Copilot CLI parsers were written against guessed formats and could never find sessions on a real install.
~/.continue/sessions.db(SQLite), which Continue never creates~/.continue/sessions/<id>.jsonwithhistory[].message.{role, content}, plus asessions.jsonindex. HonoursCONTINUE_GLOBAL_DIR.~/.copilot/sessions/*.json~/.copilot/session-state/<uuid>/events.jsonl(session.start,user.message/assistant.messagewithdata.content) plusworkspace.yamlfile://workspace URIs.model.*side-channel events (utility-model calls) and tool-only assistant messages, tolerates half-written lines, and reads the title, creation date and cwd fromworkspace.yaml.session-statelayout. Non-UUID source ids map to a stable UUID, so re-imports overwrite instead of duplicating. The README tells users to run/chronicle reindexif imported sessions don't show up.SqliteParser.Format references: Continue's
core/util/paths.tsandcore/index.d.ts; Copilot CLI'sevents.jsonlis undocumented upstream (github/copilot-cli#3551), so the parser follows community references and stays tolerant of variations.Test plan
cd movez && php vendor/bin/pest: 97 passed, 1 skipped. New fixtures cover both real formats, a Copilot write/read round-trip, and encrypted import into Copilot CLI.🤖 Generated with Claude Code