Skip to content

Fix Copilot provider to read VS Code workspace transcripts#165

Merged
iamtoruk merged 1 commit intomainfrom
fix/copilot-vscode-transcripts
Apr 28, 2026
Merged

Fix Copilot provider to read VS Code workspace transcripts#165
iamtoruk merged 1 commit intomainfrom
fix/copilot-vscode-transcripts

Conversation

@iamtoruk
Copy link
Copy Markdown
Member

Summary

  • The Copilot provider only read from ~/.copilot/session-state/ (older CLI tool). VS Code Copilot agent stores transcripts in workspaceStorage/*/GitHub.copilot-chat/transcripts/.
  • The VS Code transcript format has no outputTokens or session.model_change events. Tokens are now estimated from content/reasoning text length, and the model is inferred from tool call ID prefixes (toolu_bdrk_ = Claude, call_ = GPT).
  • Both legacy and VS Code paths are scanned in parallel.
  • Added new tool name mappings for VS Code Copilot tools (run_in_terminal, replace_string_in_file, file_search, list_dir, memory, kill_terminal).
  • Project name is read from workspace.json in the VS Code workspace storage directory.

Fixes #161

Test plan

  • All 370 tests pass (17 Copilot-specific, including new VS Code transcript discovery test)
  • Verified with real Copilot agent session on macOS: picks up 24 calls, correct model/tools/project

The Copilot provider only looked in ~/.copilot/session-state/ which is
from an older CLI tool. VS Code Copilot agent stores transcripts in
~/Library/Application Support/Code/User/workspaceStorage/*/GitHub.copilot-chat/transcripts/.

The new transcript format has no outputTokens or model_change events,
so tokens are estimated from content length and the model is inferred
from tool call ID prefixes. Both legacy and VS Code paths are now
scanned in parallel.

Fixes #161
@iamtoruk iamtoruk merged commit 5d1b335 into main Apr 28, 2026
3 checks passed
@iamtoruk iamtoruk deleted the fix/copilot-vscode-transcripts branch April 28, 2026 02:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Issue: No Copilot stats for "today" dispite usage

1 participant