MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / parseLines

Function parseLines

scripts/agent-eval/parse-session.mjs:107–111  ·  view source on GitHub ↗
(file, parentToolUseId)

Source from the content-addressed store, hash-verified

105// which is exactly the `parent_tool_use_id` the classifier keys threads on.
106// Without that, a delegated search would score as "the agent moved on".
107const parseLines = (file, parentToolUseId) => readFileSync(file, 'utf8').split('\n')
108 .filter(Boolean)
109 .map((l) => { try { return JSON.parse(l); } catch { return null; } })
110 .filter(Boolean)
111 .map((ev) => (parentToolUseId ? { ...ev, parent_tool_use_id: parentToolUseId } : ev));
112
113const events = parseLines(join(projDir, sessionId + '.jsonl'));
114if (existsSync(subDir)) {

Callers 1

parse-session.mjsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected