MCPcopy Create free account
hub / github.com/microsoft/AI-Engineering-Coach / parseCLIEventLine

Function parseCLIEventLine

src/core/parser-vscode-cli.ts:111–124  ·  view source on GitHub ↗
(line: string)

Source from the content-addressed store, hash-verified

109}
110
111function parseCLIEventLine(line: string): CLIEvent | null {
112 try {
113 const parsed: unknown = JSON.parse(line);
114 if (!isRecord(parsed) || typeof parsed.type !== 'string') return null;
115 return {
116 type: parsed.type,
117 data: recordValue(parsed.data),
118 timestamp: typeof parsed.timestamp === 'string' ? parsed.timestamp : undefined,
119 id: typeof parsed.id === 'string' ? parsed.id : undefined,
120 };
121 } catch {
122 return null;
123 }
124}
125
126function getTurnEndState(turn: TurnState): 'errored' | undefined {
127 const noResponseRecorded = turn.responseChunks.length === 0

Callers 2

parseCLIEventsFileFunction · 0.85
parseCLIEventsFileAsyncFunction · 0.85

Calls 2

isRecordFunction · 0.70
recordValueFunction · 0.70

Tested by

no test coverage detected