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

Function collectExploreTexts

scripts/agent-eval/parse-run.mjs:658–671  ·  view source on GitHub ↗
(events)

Source from the content-addressed store, hash-verified

656 * for callers that only have the raw events (parse-session.mjs).
657 */
658export function collectExploreTexts(events) {
659 const nameById = new Map();
660 const texts = [];
661 for (const ev of events) {
662 const content = ev?.message?.content;
663 if (!Array.isArray(content)) continue;
664 for (const b of content) {
665 if (b.type === 'tool_use') nameById.set(b.id, b.name);
666 else if (b.type === 'tool_result' && !b.is_error
667 && /codegraph_explore/.test(nameById.get(b.tool_use_id) || '')) texts.push(textOf(b.content));
668 }
669 }
670 return texts;
671}
672
673/**
674 * The final answer a session produced. Headless stream-json carries it on the

Callers 1

parse-session.mjsFile · 0.90

Calls 4

pushMethod · 0.80
textOfFunction · 0.70
getMethod · 0.65
setMethod · 0.45

Tested by

no test coverage detected