Commit graph

2 commits

Author SHA1 Message Date
Teo Delis
e7633d932b fix: address PR review feedback on Copilot provider
- init currentModel to '' and skip assistant messages before first
  session.model_change to avoid silent misattribution
- add comment documenting why inputTokens is always 0
- fix delete_file tool mapping ('Edit' -> 'Delete')
- add schema doc comment to ToolRequest optional fields
- remove catch-all from CopilotEvent union for proper TS narrowing
- add tests: pre-model-change skip, workspace.yaml quote/comment strip,
  longest-prefix model display name match
2026-04-16 19:30:08 +03:00
Teo Delis
a8517d3235 feat: add GitHub Copilot provider
- Parse ~/.copilot/session-state/*/events.jsonl
- Track model via session.model_change events
- Extract tools from assistant.message toolRequests
- Add fallback pricing for gpt-4.1, gpt-4.1-mini, gpt-4.1-nano, gpt-5-mini, o3, o4-mini
- Factory function createCopilotProvider(sessionStateDir?) for testability
- Typed event variants (ModelChangeData, UserMessageData, AssistantMessageData)
- bashCommands: [] in yield (Copilot does not log bash commands)
- 13 tests covering parsing, model tracking, tool extraction, dedup, discoverSessions
- Note: only outputTokens available (Copilot does not log input tokens)
2026-04-16 15:40:22 +03:00