* (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
()
| 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 |
no test coverage detected