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

Function program

__tests__/ui-steps-program.test.ts:41–50  ·  view source on GitHub ↗
(sites: Record<string, ProgramSite[]>, replies: string[] = [], into: Record<string, string> = {})

Source from the content-addressed store, hash-verified

39}
40
41function program(sites: Record<string, ProgramSite[]>, replies: string[] = [], into: Record<string, string> = {}) {
42 nextLine = 1;
43 const input: ProgramInput = {
44 sites: new Map(Object.entries(sites)),
45 root: 'root',
46 node: (id) => ({ id, kind: 'function', name: id, qualifiedName: id, file: 'a.ts', line: 1, endLine: 2, language: 'typescript', test: false }),
47 step: (id) => ({ reply: replies.includes(id), into: into[id] ?? null }),
48 };
49 return buildProgram(input);
50}
51
52/** The shape of a block, one line per item, indented — what a reader would see. */
53function shape(block: WireBlock, indent = ''): string[] {

Callers 1

Calls 1

buildProgramFunction · 0.90

Tested by

no test coverage detected