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

Function labelLinesFor

ui/src/lib/flow-model.ts:320–328  ·  view source on GitHub ↗
(edge: WireFlowEdge)

Source from the content-addressed store, hash-verified

318 * carries the untruncated text.
319 */
320export function labelLinesFor(edge: WireFlowEdge): string[] {
321 return shortenSites(edge.label)
322 .split(' \u00b7 ')
323 .map((part) => part.trim())
324 .filter(Boolean)
325 .map((part) =>
326 part.length > LABEL_MAX_CHARS ? `${part.slice(0, LABEL_MAX_CHARS - 1)}\u2026` : part
327 );
328}
329
330/** `line 2029`, or null when the edge carries no line. */
331export function lineLabelFor(edge: WireFlowEdge): string | null {

Callers 2

buildFlowLayoutFunction · 0.85

Calls 2

shortenSitesFunction · 0.85
mapMethod · 0.80

Tested by

no test coverage detected