Skip to content

feat: Add Copilot Chat session parser for recall #28

@bilersan

Description

@bilersan

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:

  1. *\copilot.go* — \CopilotParser\ struct with \Matches()\ and \ParseFile()\ methods, plus \CopilotSessionDirs()\ for platform-aware directory discovery
  2. *\copilot_raw.go* — Typed Go structs for the Copilot Chat JSONL format (\copilotRawSession, \copilotRawLine, \copilotRawMessage, etc.)
  3. Registration — Add \NewCopilotParser()\ to
    egisteredParsers\ in \parser.go\
  4. Query scanning — Add \CopilotSessionDirs()\ to the scan loop in \query.go\
  5. Config — Add \ToolCopilot = "copilot"" constant to \internal/config/file.go`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions