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

Method wireLayers

src/index.ts:173–190  ·  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

171 * The path-based `fileLock` is independent of the DB handle, so it stays put.
172 */
173 private wireLayers(): void {
174 // Down-weight the project name as a query term in search ranking — it names
175 // the whole repo, not a symbol, so it has no discriminative value (#720).
176 try {
177 this.queries.setProjectNameTokens(deriveProjectNameTokens(this.projectRoot));
178 } catch {
179 // Best-effort: ranking still works without it.
180 }
181 this.orchestrator = new ExtractionOrchestrator(this.projectRoot, this.queries);
182 this.resolver = createResolver(this.projectRoot, this.queries);
183 this.graphManager = new GraphQueryManager(this.queries);
184 this.traverser = new GraphTraverser(this.queries);
185 this.contextBuilder = createContextBuilder(
186 this.projectRoot,
187 this.queries,
188 this.traverser
189 );
190 }
191
192 /**
193 * 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