diff --git a/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.ts b/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.ts index 5f5d69c44dbdf..8bff1b50d81a2 100644 --- a/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.ts +++ b/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.ts @@ -1159,7 +1159,7 @@ class ChatEditingSessionStorage { this._logService.debug(`chatEditingSession: Restoring editing session at ${stateFilePath.toString()}`); const stateFileContent = await this._fileService.readFile(stateFilePath); const data = JSON.parse(stateFileContent.value.toString()) as IChatEditingSessionDTO; - if (data.version !== STORAGE_VERSION) { + if (!COMPATIBLE_STORAGE_VERSIONS.includes(data.version)) { return undefined; } @@ -1356,7 +1356,8 @@ interface IModifiedEntryTelemetryInfoDTO { type ResourceMapDTO = [string, T][]; -const STORAGE_VERSION = 1; +const COMPATIBLE_STORAGE_VERSIONS = [1, 2]; +const STORAGE_VERSION = 2; /** Old history uses IChatEditingSessionSnapshotDTO, new history uses IChatEditingSessionSnapshotDTO. */ interface IChatEditingSessionDTO {