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

Function locationOf

ui/src/lib/search-model.ts:105–109  ·  view source on GitHub ↗
(node: WireNodeRef)

Source from the content-addressed store, hash-verified

103 * past the panel's width on any deeply-nested file.
104 */
105export function locationOf(node: WireNodeRef): string {
106 if (node.kind !== 'file') return `${basename(node.file)}:${node.line}`;
107 const cut = node.file.lastIndexOf('/');
108 return cut < 0 ? 'project root' : node.file.slice(0, cut);
109}
110
111function symbolItem(node: WireNodeRef, meta = ''): PaletteItem {
112 return {

Callers 2

symbolItemFunction · 0.85

Calls 1

basenameFunction · 0.90

Tested by

no test coverage detected