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

Function check

scripts/agent-eval/probe-named-symbol.mjs:82–93  ·  view source on GitHub ↗

* A symbol counts as rendered only when its DECLARATION line is among the lines * the response actually sent — not when its name merely appears somewhere (it * shows up in the section header symbol list and in call sites regardless, which * is precisely how this defect hid for a whole epic).

(cg, response, names)

Source from the content-addressed store, hash-verified

80 * is precisely how this defect hid for a whole epic).
81 */
82function check(cg, response, names) {
83 const lines = renderedLines(response);
84 return names.map((name) => {
85 const node = (cg.getNodesByName?.(name) ?? []).find((n) => n.startLine > 0);
86 return {
87 name,
88 file: node?.filePath ?? '(not indexed)',
89 line: node?.startLine ?? 0,
90 rendered: !!node && lines.has(node.startLine),
91 };
92 });
93}
94
95async function runCase(root, { query, symbols }) {
96 const cg = CodeGraph.openSync(root);

Callers 1

runCaseFunction · 0.70

Calls 4

mapMethod · 0.80
hasMethod · 0.80
renderedLinesFunction · 0.70
getNodesByNameMethod · 0.65

Tested by

no test coverage detected