* Start file watching on the active CodeGraph instance. Idempotent — the * watcher is per-engine, not per-session, which is why the daemon path * collapses N inotify sets to one. The wording of the disabled-reason log * exactly matches the prior in-tree implementation so log-driven dashboar
()
| 450 | * keep working. |
| 451 | */ |
| 452 | private startWatching(): void { |
| 453 | if (this.opts.readOnly || !this.cg || this.watcherStarted || !this.opts.watch) return; |
| 454 | |
| 455 | const opened = this.cg; |
| 456 | this.defaultLease = acquireProject(opened.getProjectRoot(), () => opened, this.watchOptions()); |
| 457 | this.cg = this.defaultLease.cg; |
| 458 | if (this.cg !== opened) opened.close(); |
| 459 | this.toolHandler.setDefaultCodeGraph(this.cg); |
| 460 | this.watcherStarted = true; |
| 461 | } |
| 462 | |
| 463 | /** |
| 464 | * Reconcile the index with the current filesystem once, right after open — |
no test coverage detected