We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b75f5d8 commit e73ff76Copy full SHA for e73ff76
src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalTool.ts
@@ -153,6 +153,13 @@ export class RunInTerminalTool extends Disposable implements IToolImpl {
153
154
// Restore terminal associations from storage
155
this._restoreTerminalAssociations();
156
+ this._register(this._terminalService.onDidDisposeInstance(e => {
157
+ for (const [sessionId, toolTerminal] of this._sessionTerminalAssociations.entries()) {
158
+ if (e === toolTerminal.instance) {
159
+ this._sessionTerminalAssociations.delete(sessionId);
160
+ }
161
162
+ }));
163
}
164
165
async prepareToolInvocation(context: IToolInvocationPreparationContext, token: CancellationToken): Promise<IPreparedToolInvocation | undefined> {
0 commit comments