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

Function callIsRecorded

graph-ui/src/traces/bug-paths.ts:455–470  ·  view source on GitHub ↗

* Whether the index records one named call. * * Asked rather than assumed, and asked with the same reading the chains are * built from, so the two cannot disagree. Answers `undefined` when there is * nothing to ask with, which a surface reports as "nobody could look" and never * as "no".

(
    index: BugPathIndex,
    project: string,
    from: BugPathNode,
    to: BugPathNode,
)

Source from the content-addressed store, hash-verified

453 * as "no".
454 */
455async function callIsRecorded(
456 index: BugPathIndex,
457 project: string,
458 from: BugPathNode,
459 to: BugPathNode,
460): Promise<boolean | undefined> {
461 if (to.qualifiedName === undefined) {
462 return undefined;
463 }
464 const callers = await callersOf(index, project, to.qualifiedName);
465 if (from.qualifiedName !== undefined) {
466 return callers.some((caller) => caller.qualifiedName === from.qualifiedName);
467 }
468 const key = nodeKey(from);
469 return callers.some((caller) => nodeKey(caller) === key);
470}
471
472/**
473 * The whole document: what the index expects, what a recording holds, and where

Callers 1

bugPathsFunction · 0.85

Calls 2

callersOfFunction · 0.85
nodeKeyFunction · 0.85

Tested by

no test coverage detected