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

Function runWords

ui/src/lib/program-model.ts:55–67  ·  view source on GitHub ↗
(item: Extract<WireItem, { kind: 'block' }>)

Source from the content-addressed store, hash-verified

53
54/** The words on a run that is not plain sequence — said on the line into it. */
55export function runWords(item: Extract<WireItem, { kind: 'block' }>): string {
56 switch (item.block) {
57 case 'inline':
58 return item.via ? `via ${item.via.name}` : 'via a helper';
59 case 'loop':
60 if (!item.by) return item.loop === 'while' ? 'again and again' : 'for each item';
61 return item.loop === 'while' ? `again while ${item.by}` : `for each ${item.by}`;
62 case 'later':
63 return item.by ? `later · ${item.by}` : 'later';
64 default:
65 return item.by ? `together · ${item.by}` : 'together';
66 }
67}
68
69/* ----------------------------------------------------------------- graph -- */
70

Callers 2

blockFunction · 0.90
flowFunction · 0.85

Calls

no outgoing calls

Tested by 1

blockFunction · 0.72