File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff 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 }
Original file line number Diff line number Diff 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}
You can’t perform that action at this time.
0 commit comments