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

Function buildProgram

src/ui-server/api/program.ts:153–158  ·  view source on GitHub ↗
(input: ProgramInput)

Source from the content-addressed store, hash-verified

151}
152
153export function buildProgram(input: ProgramInput): WireProgram | null {
154 if (input.root === null) return null;
155 const state: Reading = { truncated: 0, items: 0, read: new Set([input.root]) };
156 const root = blockFor(input, input.root, [input.root], state);
157 return root.length === 0 ? null : { root, truncated: state.truncated };
158}
159
160/** One function's body, in the code's order. */
161function blockFor(input: ProgramInput, fn: string, path: readonly string[], state: Reading): WireBlock {

Callers 3

buildStepsFunction · 0.90
programFunction · 0.90

Calls 1

blockForFunction · 0.85

Tested by 1

programFunction · 0.72