From 9d2d734b37e06d2133c862e774c38e61280f8f56 Mon Sep 17 00:00:00 2001 From: Joyce Er Date: Fri, 6 Dec 2024 13:37:09 -0800 Subject: [PATCH] fix: validate chat session ID before trying to create an editing session from it (#235519) --- .../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 f1204bd40ed..1a71c26cb3e 100644 --- a/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingService.ts +++ b/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingService.ts @@ -162,7 +162,7 @@ export class ChatEditingService extends Disposable implements IChatEditingServic void this._editingSessionFileLimitPromise; const sessionIdToRestore = storageService.get(STORAGE_KEY_EDITING_SESSION, StorageScope.WORKSPACE); - if (isString(sessionIdToRestore)) { + if (isString(sessionIdToRestore) && this._chatService.getOrRestoreSession(sessionIdToRestore)) { this._restoringEditingSession = this.startOrContinueEditingSession(sessionIdToRestore); this._restoringEditingSession.finally(() => { this._restoringEditingSession = undefined;