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

Function siteText

src/ui-server/api/steps.ts:1704–1717  ·  view source on GitHub ↗

`push /capture`, `renders `, `via rn-event-channel`, `calls`.

(edge: Edge, meta: Record<string, unknown>, target: Node)

Source from the content-addressed store, hash-verified

1702
1703/** `push /capture`, `renders <Button>`, `via rn-event-channel`, `calls`. */
1704function siteText(edge: Edge, meta: Record<string, unknown>, target: Node): string {
1705 if (edge.kind === 'navigates') {
1706 const method = edge.provenance === 'heuristic' ? 'returns' : typeof meta.navMethod === 'string' ? meta.navMethod : 'push';
1707 return `${method} ${typeof meta.href === 'string' ? meta.href : target.name}`;
1708 }
1709 if (meta.synthesizedBy === 'jsx-render') return `renders <${target.name}>`;
1710 if (edge.kind === 'references') return `passes ${target.name}`;
1711 if (edge.kind === 'contains') return `defines ${target.name}`;
1712 if (edge.kind === 'instantiates') return `new ${target.name}`;
1713 if (meta.bridge === 'react-native') return `bridge ${typeof meta.module === 'string' ? meta.module + '.' : ''}${target.name}`;
1714 if (meta.channel === 'http') return `${typeof meta.method === 'string' ? meta.method : 'GET'} ${typeof meta.href === 'string' ? meta.href : target.name}`;
1715 if (typeof meta.synthesizedBy === 'string') return `via ${meta.synthesizedBy}`;
1716 return `calls ${target.name}`;
1717}
1718
1719/** The words on a hop that was not a plain call — the Flow strip's connector label, in short. */
1720function hopLabel(meta: Record<string, unknown>, synthesized: boolean): string {

Callers 1

buildStepsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected