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

Method linkLine

src/mcp/tools.ts:3797–3802  ·  view source on GitHub ↗
(edge: Edge, src: Node, tgt: Node)

Source from the content-addressed store, hash-verified

3795 }
3796 links.sort((a, b) => Number(a.lowValue) - Number(b.lowValue) || b.weight - a.weight || a.turn - b.turn);
3797 const linkLine = (edge: Edge, src: Node, tgt: Node): string => {
3798 // `TrySet → TrySet` says neither which interface nor which implementation:
3799 // a same-name link names each end by its owner, as the agent would write it.
3800 const same = src.name === tgt.name;
3801 return `- ${same ? followUpName(src) : src.name} → ${same ? followUpName(tgt) : tgt.name} [${this.synthEdgeNote(edge) ?? edge.kind}]`;
3802 };
3803 // Distinct links can still read the same, and one line says it: gin declares
3804 // `Binding` once per build tag, so both declarations' `Bind` link to formBinding's,
3805 // and when the Flow runs through one of them, the other's link reads as its hop.

Callers

nothing calls this directly

Calls 2

synthEdgeNoteMethod · 0.95
followUpNameFunction · 0.85

Tested by

no test coverage detected