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

Method wantedFrom

src/mcp/tools.ts:6374–6384  ·  view source on GitHub ↗
(nodes: readonly Node[])

Source from the content-addressed store, hash-verified

6372 // The file node is not one of them: no section delivers "the file" as a
6373 // symbol, and it spans trailing lines no render prints.
6374 const wantedFrom = (nodes: readonly Node[]): ExploreWantedSpan[] => nodes
6375 .filter((n) => isListedSymbol(n) && n.kind !== 'file' && n.startLine > 0)
6376 .map((n) => ({
6377 name: n.name,
6378 kind: n.kind,
6379 start: n.startLine,
6380 end: n.endLine,
6381 importance: entryNodeIds.has(n.id) ? 10 : flow.namedNodeIds.has(n.id) ? 9 : 1,
6382 spine: flow.pathNodeIds.has(n.id),
6383 qualifiedName: n.qualifiedName,
6384 }));
6385 const spareNamed = group.nodes.some(n => flow.uniqueNamedNodeIds.has(n.id));
6386 const fileDefinesSuper = definesPolymorphicSupertype(group.nodes);
6387 const spared = spareNamed && !fileDefinesSuper;

Callers

nothing calls this directly

Calls 2

mapMethod · 0.80
hasMethod · 0.80

Tested by

no test coverage detected