Skip to content

Commit 5014270

Browse files
committed
fix: auto patch for file-watcher_93
1 parent c673569 commit 5014270

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

src/services/code-index/manager.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,11 @@ export class CodeIndexManager {
216216
*/
217217
public dispose(): void {
218218
if (this._orchestrator) {
219-
this.stopWatcher()
219+
this.stopWatcher() // This calls _orchestrator.stopWatcher()
220+
// Ensure orchestrator is fully cleaned up if it has a dispose method
221+
if (typeof (this._orchestrator as any).dispose === "function") {
222+
;(this._orchestrator as any).dispose()
223+
}
220224
}
221225
this._stateManager.dispose()
222226
}

src/services/code-index/orchestrator.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,4 +219,13 @@ export class CodeIndexOrchestrator {
219219
public get state(): IndexingState {
220220
return this.stateManager.state
221221
}
222+
223+
/**
224+
* Disposes of resources held by the orchestrator.
225+
*/
226+
public dispose(): void {
227+
this.stopWatcher()
228+
// Dispose other resources if any (e.g., if scanner or vectorStore had disposables not managed elsewhere)
229+
// For now, stopWatcher handles the primary disposable (fileWatcher).
230+
}
222231
}

0 commit comments

Comments
 (0)