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

Function regionOf

src/ui-server/api/steps.ts:1070–1076  ·  view source on GitHub ↗
(from: StepRecord, chain: readonly Node[])

Source from the content-addressed store, hash-verified

1068 // function reads in the code's order and carries none of this.
1069 const regions = first.kind === 'screen' && !first.screen?.endpoint;
1070 const regionOf = (from: StepRecord, chain: readonly Node[]): WireStep['region'] => {
1071 if (!regions) return undefined;
1072 if (!from.anchor) return from.region;
1073 const head = chain[0];
1074 if (head) return { id: head.id, label: head.name };
1075 return { id: from.root?.id ?? from.id, label: from.root?.name ?? from.label };
1076 };
1077 const queue: StepRecord[] = [first];
1078 /** Steps whose exploration has been queued — each is explored once, from the first row it appears on. */
1079 const explored = new Set<string>([first.id]);

Callers 2

effectLinkFunction · 0.85
buildStepsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected