From 1af9fd81722e28a7cfdb90e7e17f411feb586296 Mon Sep 17 00:00:00 2001 From: Joyce Er Date: Wed, 6 Nov 2024 11:33:00 -0800 Subject: [PATCH] fix: clear response failed context key when chat editing session is disposed --- .../contrib/chat/browser/chatEditing/chatEditingService.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingService.ts b/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingService.ts index a6c7d4a1b0ceb..76273c4c91b8a 100644 --- a/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingService.ts +++ b/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingService.ts @@ -134,8 +134,8 @@ export class ChatEditingService extends Disposable implements IChatEditingServic return this._currentSessionObs.read(r)?.canRedo.read(r) || false; })); this._register(this._chatService.onDidDisposeSession((e) => { - this._applyingChatEditsFailedContextKey.set(false); if (e.reason === 'cleared' && this._currentSessionObs.get()?.chatSessionId === e.sessionId) { + this._applyingChatEditsFailedContextKey.set(false); void this._currentSessionObs.get()?.stop(); } }));