fix: validate chat session ID before trying to create an editing session from it (#235519)

pull/235550/head
Joyce Er 2024-12-06 13:37:09 -08:00 committed by GitHub
parent 0b70bdaceb
commit 9d2d734b37
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -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;