* 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
()
| 480 | * keep working. |
| 481 | */ |
| 482 | private startWatching(): void { |
| 483 | if (this.opts.readOnly || !this.cg || this.watcherStarted || !this.opts.watch) return; |
| 484 | |
| 485 | const opened = this.cg; |
| 486 | this.defaultLease = acquireProject(opened.getProjectRoot(), () => opened, this.watchOptions()); |
| 487 | this.cg = this.defaultLease.cg; |
| 488 | if (this.cg !== opened) opened.close(); |
| 489 | this.toolHandler.setDefaultCodeGraph(this.cg); |
| 490 | this.watcherStarted = true; |
| 491 | } |
| 492 | |
| 493 | /** |
| 494 | * Reconcile the index with the current filesystem once, right after open — |
no test coverage detected