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

Function seed

__tests__/graph.test.ts:844–849  ·  view source on GitHub ↗
(ids: string[], edges: Edge[])

Source from the content-addressed store, hash-verified

842 });
843
844 function seed(ids: string[], edges: Edge[]) {
845 for (const id of ids) {
846 cg['queries'].insertNode({ ...tNode(id), filePath: 'graph.ts' });
847 }
848 edges.forEach((edge, i) => cg['queries'].insertEdge({ ...edge, line: i + 1 }));
849 }
850
851 it('enqueues each dense fan-in target once while preserving the shortest path', () => {
852 const layerA = Array.from({ length: 16 }, (_, i) => `a${i}`);

Callers 1

graph.test.tsFile · 0.70

Calls 3

tNodeFunction · 0.85
insertNodeMethod · 0.80
insertEdgeMethod · 0.80

Tested by

no test coverage detected