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

Function callSite

src/ui-server/api/when.ts:228–235  ·  view source on GitHub ↗
(caller, site)

Source from the content-addressed store, hash-verified

226 return (await triggersForFile(file.abs, file.language, [key])).get(siteKey(key)) ?? null;
227 },
228 async callSite(caller, site) {
229 if (!site.line || sites >= maxSites || !supportsBranchGuards(caller.language)) return null;
230 const file = resolve(caller);
231 if (!file) return null;
232 sites++;
233 const key = { line: site.line, column: typeof site.column === 'number' ? site.column : null, ...(site.callee ? { callee: site.callee } : {}) };
234 return (await callSitesForFile(file.abs, file.language, [key])).get(siteKey(key)) ?? null;
235 },
236 async decorators(definition) {
237 // Not counted: one lookup per step, on a tree the walk has parsed anyway.
238 if (!definition.startLine || !supportsBranchGuards(definition.language)) return null;

Callers

nothing calls this directly

Calls 5

supportsBranchGuardsFunction · 0.90
callSitesForFileFunction · 0.90
siteKeyFunction · 0.90
resolveFunction · 0.70
getMethod · 0.65

Tested by

no test coverage detected