MCPcopy
hub / github.com/colbymchenry/codegraph / constructor

Method constructor

src/resolution/index.ts:242–259  ·  view source on GitHub ↗
(projectRoot: string, queries: QueryBuilder)

Source from the content-addressed store, hash-verified

240 private workspacePackages: WorkspacePackages | null | undefined = undefined;
241
242 constructor(projectRoot: string, queries: QueryBuilder) {
243 this.projectRoot = projectRoot;
244 this.queries = queries;
245
246 const limit = resolveCacheLimit();
247 // The content cache is heavier (full file text), so we give it a
248 // smaller budget than the metadata caches.
249 const contentLimit = Math.max(64, Math.floor(limit / 5));
250 this.nodeCache = new LRUCache(limit);
251 this.fileCache = new LRUCache(contentLimit);
252 this.importMappingCache = new LRUCache(limit);
253 this.reExportCache = new LRUCache(limit);
254 this.nameCache = new LRUCache(limit);
255 this.lowerNameCache = new LRUCache(limit);
256 this.qualifiedNameCache = new LRUCache(limit);
257
258 this.context = this.createContext();
259 }
260
261 /**
262 * Initialize the resolver (detect frameworks, etc.)

Callers

nothing calls this directly

Calls 2

createContextMethod · 0.95
resolveCacheLimitFunction · 0.85

Tested by

no test coverage detected