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

Method inIndexOrder

src/mcp/tools.ts:8292–8293  ·  view source on GitHub ↗
(items: T[], nodeOf: (item: T) => Node)

Source from the content-addressed store, hash-verified

8290 const header = `**${matches.length} definitions named "${symbol}"**`;
8291 const indexOrder = new Map(matches.map((n, i) => [n, i] as const));
8292 const inIndexOrder = <T>(items: T[], nodeOf: (item: T) => Node): T[] =>
8293 [...items].sort((a, b) => indexOrder.get(nodeOf(a))! - indexOrder.get(nodeOf(b))!);
8294 const isGenerated = cg.generatedFilePredicate(matches.map((n) => n.filePath));
8295 // Generated stubs stay behind every hand-written definition (findSymbolMatches).
8296 const capOrderOf = (nodes: Node[]): Node[] => [

Callers

nothing calls this directly

Calls 2

getMethod · 0.65
nodeOfFunction · 0.50

Tested by

no test coverage detected