MCPcopy Create free account
hub / github.com/github/gh-aw / realFormatEventsLine

Function realFormatEventsLine

pkg/cli/copilot_events_jsonl_test.go:78–80  ·  view source on GitHub ↗

realFormatEventsLine builds an events.jsonl line using the actual Copilot CLI format: each event has a top-level type, a nested data object, an id, and a timestamp.

(eventType string, dataJSON string)

Source from the content-addressed store, hash-verified

76// realFormatEventsLine builds an events.jsonl line using the actual Copilot CLI format:
77// each event has a top-level type, a nested data object, an id, and a timestamp.
78func realFormatEventsLine(eventType string, dataJSON string) string {
79 return `{"type":"` + eventType + `","data":` + dataJSON + `,"id":"test-id","timestamp":"2026-04-02T04:00:00.000Z"}`
80}
81
82// TestParseEventsJSONLFile verifies that parseEventsJSONLMetrics correctly extracts
83// turns, tool calls, tool sequences, and token counts from events.jsonl using

Calls

no outgoing calls

Tested by

no test coverage detected