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

Function stepLabel

ui/src/lib/steps-model.ts:249–261  ·  view source on GitHub ↗
(step: WireStep)

Source from the content-addressed store, hash-verified

247
248/** The first line of a step's box. Boundary crossings carry an arrow for which way the code goes. */
249export function stepLabel(step: WireStep): string {
250 switch (step.kind) {
251 case 'bridge':
252 return `⇢ ${step.label}`;
253 case 'event': {
254 const events = step.events ?? (step.event ? [step.event] : []);
255 if (events.length === 0) return `⇠ ${step.label}`;
256 return events.length === 1 ? `⇠ ${events[0]}` : `⇠ ${events[0]} +${events.length - 1}`;
257 }
258 default:
259 return step.label;
260 }
261}
262
263/** The second line: what the step is, then where it is. */
264export function stepSub(step: WireStep, project: ProjectKind = 'app'): string {

Callers 3

buildOrderModelFunction · 0.90
buildStepsModelFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected