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

Function sourceOfIr

graph-ui/src/compiler/card-compiler.ts:215–225  ·  view source on GitHub ↗

The declaration of a symbol, as a card source.

(ir: SemanticIR)

Source from the content-addressed store, hash-verified

213
214/** The declaration of a symbol, as a card source. */
215function sourceOfIr(ir: SemanticIR): CardSource {
216 const source: CardSource = {
217 name: ir.symbol.name,
218 filePath: workspacePathOf(ir.symbol.uri),
219 line: toGraphLine((ir.symbol.selectionRange ?? ir.symbol.range).start.line),
220 };
221 if (ir.symbol.qualifiedName !== undefined) {
222 source.qualifiedName = ir.symbol.qualifiedName;
223 }
224 return source;
225}
226
227function sourceOfNeighbour(entry: NeighbourFact): CardSource {
228 const source: CardSource = { name: entry.name };

Callers 2

subjectDraftsFunction · 0.85
compareDraftsFunction · 0.85

Calls 2

workspacePathOfFunction · 0.90
toGraphLineFunction · 0.90

Tested by

no test coverage detected