MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / chainEdges

Function chainEdges

graph-ui/src/traces/bug-paths.ts:327–340  ·  view source on GitHub ↗
(chains: readonly BugPathNode[][])

Source from the content-addressed store, hash-verified

325
326/** Every call one set of chains draws, keyed by its ordered pair. */
327export function chainEdges(chains: readonly BugPathNode[][]): Map<string, BugPathEdge> {
328 const edges = new Map<string, BugPathEdge>();
329 for (const chain of chains) {
330 for (let at = 1; at < chain.length; at++) {
331 const from = chain[at - 1];
332 const to = chain[at];
333 const key = edgeKey(from, to);
334 if (!edges.has(key)) {
335 edges.set(key, { from, to });
336 }
337 }
338 }
339 return edges;
340}
341
342/**
343 * The runs of consecutive observed calls inside one trace answer.

Callers 2

bug-paths.test.tsFile · 0.90
bugPathsFunction · 0.85

Calls 1

edgeKeyFunction · 0.70

Tested by

no test coverage detected