MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / refAt

Function refAt

graph-ui/src/ir/checklist-generator.ts:164–184  ·  view source on GitHub ↗

* A navigable reference to one line of one file. * * Deliberately carries no `nodeId`: this is a place in a file, not a resolved * graph node, and claiming otherwise would make the focus pipeline report an * index-backed focus for something the index never resolved.

(
    root: string,
    file: string | undefined,
    oneBasedLine: number | undefined,
    name: string,
    qualifiedName?: string
)

Source from the content-addressed store, hash-verified

162 * index-backed focus for something the index never resolved.
163 */
164function refAt(
165 root: string,
166 file: string | undefined,
167 oneBasedLine: number | undefined,
168 name: string,
169 qualifiedName?: string
170): SymbolRef | undefined {
171 const uri = toFileUri(root, file);
172 if (uri === undefined) {
173 return undefined;
174 }
175 const range = toEditorRange(oneBasedLine ?? 1, oneBasedLine ?? 1);
176 return {
177 name,
178 qualifiedName,
179 kind: 'unknown',
180 uri,
181 range,
182 selectionRange: { start: range.start, end: range.start }
183 };
184}
185
186/**
187 * Where a call leads: the declaration of its target, never its call site.

Callers 2

calleeTargetFunction · 0.70
generateChecklistFunction · 0.70

Calls 2

toFileUriFunction · 0.90
toEditorRangeFunction · 0.90

Tested by

no test coverage detected