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

Function trailTitle

ui/src/lib/trails-model.ts:117–123  ·  view source on GitHub ↗
(trail: WireTrail)

Source from the content-addressed store, hash-verified

115
116/** Hover text: the whole walk, in order, with its arrows. */
117export function trailTitle(trail: WireTrail): string {
118 const path = trail.hops
119 .map((hop, index) => (index === 0 ? hop.name : `${arrow(hop)} ${hop.name}`))
120 .join(' ');
121 const when = trail.updatedAt ? ` — saved ${trail.updatedAt.slice(0, 10)}` : '';
122 return `${path}${when}`;
123}
124
125function arrow(hop: WireTrailHop): string {
126 return hop.dir === 'up' ? '←' : hop.dir === 'down' ? '→' : '·';

Callers 1

Calls 3

mapMethod · 0.80
arrowFunction · 0.70
joinMethod · 0.45

Tested by

no test coverage detected