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

Function callOrder

graph-ui/src/galaxy/scope-path.ts:54–60  ·  view source on GitHub ↗
(edges: readonly GraphEdge[], root: number)

Source from the content-addressed store, hash-verified

52/** The root's outgoing CALLS in source order: by call-site line, calls without
53 * a recorded line last, then by callee. Every call site is its own step. */
54export function callOrder(edges: readonly GraphEdge[], root: number): ScopePathStep[] {
55 return edges.map((edge, index) => ({ edge, index }))
56 .filter(({ edge }) => edge.type === 'CALLS' && edge.source === root && edge.target !== root)
57 .sort((a, b) => (a.edge.line ?? Number.MAX_SAFE_INTEGER) - (b.edge.line ?? Number.MAX_SAFE_INTEGER)
58 || a.edge.target - b.edge.target || a.index - b.index)
59 .map(({ edge }) => ({ edge, from: root, to: edge.target }));
60}
61
62/** Every node a path touches, roots included. */
63export function pathNodes(steps: readonly ScopePathStep[], roots: ReadonlySet<number>): Set<number> {

Callers 2

GalaxyPanelFunction · 0.90
scope-path.test.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected