Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions internal/parser/copilot.go
Original file line number Diff line number Diff line change
Expand Up @@ -333,10 +333,12 @@ func readCopilotWorkspaceName(eventsPath string) string {
return ""
}

// ParseCopilotSession parses a Copilot JSONL session file.
// Returns (nil, nil, nil, nil) if the file doesn't exist or
// contains no user/assistant messages.
func ParseCopilotSession(
// parseSession parses a Copilot JSONL session file into the session, messages,
// and usage events the provider consumes. Returns (nil, nil, nil, nil) if the
// file doesn't exist or contains no user/assistant messages. This is the
// provider-owned parse entrypoint; the package-level free function was folded
// onto the provider.
func (p *copilotProvider) parseSession(
path, machine string,
) (*ParsedSession, []ParsedMessage, []ParsedUsageEvent, error) {
info, err := os.Stat(path)
Expand Down
Loading