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

Method wireLayers

src/index.ts:181–198  ·  view source on GitHub ↗

* (Re)build the query/extraction/graph layers over the current `this.queries` * (which wraps `this.db`). Factored out of the constructor so `reopenIfReplaced` * can rebuild them against a fresh connection without duplicating the wiring. * The path-based `fileLock` is independent of the DB h

()

Source from the content-addressed store, hash-verified

179 * The path-based `fileLock` is independent of the DB handle, so it stays put.
180 */
181 private wireLayers(): void {
182 // Down-weight the project name as a query term in search ranking — it names
183 // the whole repo, not a symbol, so it has no discriminative value (#720).
184 try {
185 this.queries.setProjectNameTokens(deriveProjectNameTokens(this.projectRoot));
186 } catch {
187 // Best-effort: ranking still works without it.
188 }
189 this.orchestrator = new ExtractionOrchestrator(this.projectRoot, this.queries);
190 this.resolver = createResolver(this.projectRoot, this.queries);
191 this.graphManager = new GraphQueryManager(this.queries);
192 this.traverser = new GraphTraverser(this.queries);
193 this.contextBuilder = createContextBuilder(
194 this.projectRoot,
195 this.queries,
196 this.traverser
197 );
198 }
199
200 /**
201 * Heal a stale database handle in place. If `.codegraph/` was removed and

Callers 2

constructorMethod · 0.95
reopenIfReplacedMethod · 0.95

Calls 4

deriveProjectNameTokensFunction · 0.90
createResolverFunction · 0.90
createContextBuilderFunction · 0.90
setProjectNameTokensMethod · 0.80

Tested by

no test coverage detected