3538
3539
async shutdown(): Promise<void> {
3540
>
this._logService.info('AgentService: shutting down all providers...');
agentService.ts
3541
>
const promises: Promise<void>[] = [];
3542
>
for (const provider of this._providers.values()) {
3543
>
promises.push(provider.shutdown());
3544
>
}
3545
>
await Promise.all(promises);
3546
>
// Drain any worktrees this process created so none leak on shutdown.
3547
>
await this._worktree?.removeAllCreatedWorktrees();
3548
>
this._sessionToProvider.clear();
3549
>
this._downloadProgressInterest.clear();
3550
>
}
3551
3552
/**