-
Notifications
You must be signed in to change notification settings - Fork 9
Description
Problem
Currently, \ctx recall\ only discovers and parses Claude Code (JSONL) session files. Users who also use GitHub Copilot Chat in VS Code have no way to surface those conversations through ctx's recall system. This creates a blind spot — ctx positions itself as a universal context persistence tool, but it only remembers one AI tool's sessions.
Motivation
VS Code Copilot Chat stores conversations as JSONL files under platform-specific directories:
- Linux/macOS: ~/.config/Code/User/workspaceStorage//GitHub.copilot-chat/chat-session-resources//\
- Windows: %APPDATA%/Code/User/workspaceStorage//GitHub.copilot-chat/chat-session-resources//\
These files use a snapshot+patch model (kind 0 = full snapshot, kind 1/2 = incremental patches) and contain rich conversation data including user messages, assistant responses, model identifiers, and token counts. Parsing these files would allow developers who use both Claude Code and Copilot to get a unified view of their AI-assisted work.
Proposed Solution
Add a \CopilotParser\ that implements the existing \Parser\ interface:
- *\copilot.go* — \CopilotParser\ struct with \Matches()\ and \ParseFile()\ methods, plus \CopilotSessionDirs()\ for platform-aware directory discovery
- *\copilot_raw.go* — Typed Go structs for the Copilot Chat JSONL format (\copilotRawSession, \copilotRawLine, \copilotRawMessage, etc.)
- Registration — Add \NewCopilotParser()\ to
egisteredParsers\ in \parser.go\ - Query scanning — Add \CopilotSessionDirs()\ to the scan loop in \query.go\
- Config — Add \ToolCopilot = "copilot"" constant to \internal/config/file.go`