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

Function repliesLast

src/ui-server/api/program.ts:411–417  ·  view source on GitHub ↗

Whether the last thing a block does is answer the request.

(input: ProgramInput, block: WireBlock)

Source from the content-addressed store, hash-verified

409
410/** Whether the last thing a block does is answer the request. */
411function repliesLast(input: ProgramInput, block: WireBlock): boolean {
412 const last = block[block.length - 1];
413 if (!last) return false;
414 if (last.kind === 'step') return input.step(last.step)?.reply === true;
415 if (last.kind === 'block') return repliesLast(input, last.body);
416 return false;
417}
418
419/** Source order: a call written inside another's arguments runs first; then by position. */
420function compareSites(a: ProgramSite, b: ProgramSite): number {

Callers 1

sealFunction · 0.85

Calls 1

stepMethod · 0.80

Tested by

no test coverage detected