Skip to main content

Module copilot

Module copilot 

Source
Expand description

Parser for GitHub Copilot CLI session events (~/.copilot/session-state/<sessionId>/events.jsonl).

One CopilotEvent per line, dispatched on event_type. Token usage is taken from the authoritative session.shutdown record when present, with streamed assistant.message.outputTokens as a partial fallback for sessions that never shut down cleanly. File operations are paired across tool.execution_start / tool.execution_complete by toolCallId and only counted on success. See the table below for the full event map.

Functionsยง

parse_copilot_events
Parse Copilot CLI session events from the JSONL event stream.