feat: add Copilot Chat session parser for recall#29
Open
bilersan wants to merge 1 commit intoActiveMemory:mainfrom
Open
feat: add Copilot Chat session parser for recall#29bilersan wants to merge 1 commit intoActiveMemory:mainfrom
bilersan wants to merge 1 commit intoActiveMemory:mainfrom
Conversation
Add a JSONL parser that discovers and parses VS Code Copilot Chat session files, enabling ctx recall to surface conversations from GitHub Copilot alongside existing Claude Code sessions. Implementation: - CopilotParser with Matches/ParseFile conforming to Parser interface - copilot_raw.go: typed structs for Copilot Chat JSONL format - CopilotSessionDirs() discovers platform-specific session paths - Parser registered in registeredParsers and query scan loop - ToolCopilot constant added to config The parser handles Copilot's snapshot+patch model (kind 0/1/2), reconstructs conversation turns, and builds Session objects with proper metadata (tool, model, timestamp, token counts). Signed-off-by: ersan bilik <ersanbilik@gmail.com>
c5db887 to
f0a15aa
Compare
This was referenced Mar 7, 2026
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
Add a JSONL parser that discovers and parses VS Code Copilot Chat session files, enabling
ctx recallto surface conversations from GitHub Copilot alongside existing Claude Code sessions.Closes #28
Merge Order
Changes
New files
internal/recall/parser/copilot.go(522 lines) - CopilotParser implementing the Parser interface withMatches(),ParseFile(), andCopilotSessionDirs()for platform-aware directory discoveryinternal/recall/parser/copilot_raw.go(95 lines) - Typed Go structs for Copilot Chat JSONL formatModified files
internal/config/file.go(+2 lines) - AddedToolCopilot = "copilot"constantinternal/recall/parser/parser.go(+1 line) - RegisteredNewCopilotParser()inregisteredParsersinternal/recall/parser/query.go(+5 lines) - AddedCopilotSessionDirs()to the directory scan loopHow it works
Copilot Chat stores conversations as JSONL files using a snapshot+patch model:
The parser reads the JSONL file, applies patches in order to reconstruct the final conversation state, then builds Session objects with proper metadata (tool, model, timestamp, token counts).
Testing
go build ./...passesNotes
TestGetPathRelativeToHomefailure on Windows (hardcoded/separator) is NOT introduced by this PR; it exists on upstream/main already