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

Function calls

__tests__/cpp-member-receiver.test.ts:49–55  ·  view source on GitHub ↗

`calls` callees of a function or method, as `qualifiedName @confidence`, one per call site.

(cg: CodeGraph, caller: string)

Source from the content-addressed store, hash-verified

47
48/** `calls` callees of a function or method, as `qualifiedName @confidence`, one per call site. */
49function calls(cg: CodeGraph, caller: string): string[] {
50 return cg
51 .getCallees(callable(cg, caller).id)
52 .filter((r) => r.edge.kind === 'calls')
53 .map((r) => `${r.node.qualifiedName} @${(r.edge.metadata as { confidence?: number } | undefined)?.confidence}`)
54 .sort();
55}
56
57const lines = (...text: string[]): string => [...text, ''].join('\n');
58

Callers 1

Calls 3

mapMethod · 0.80
callableFunction · 0.70
getCalleesMethod · 0.45

Tested by

no test coverage detected