From ca3f0f1abd07b2b487d7b3be8c7b1aa1bec44158 Mon Sep 17 00:00:00 2001 From: celestial-vault <58194240+celestial-vault@users.noreply.github.com> Date: Tue, 2 Sep 2025 11:21:53 -0700 Subject: [PATCH] don't delete old location of taskHistory in migration for now (#5931) --- src/core/storage/state-migrations.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/core/storage/state-migrations.ts b/src/core/storage/state-migrations.ts index 2d9b1fad..7604bab5 100644 --- a/src/core/storage/state-migrations.ts +++ b/src/core/storage/state-migrations.ts @@ -77,7 +77,9 @@ export async function migrateTaskHistoryToFile(context: vscode.ExtensionContext) console.log("[Storage Migration] taskHistory from vscode global state: ", vscodeGlobalStateTaskHistory) // Always create the file, even when empty await writeTaskHistoryToState(context, Array.isArray(vscodeGlobalStateTaskHistory) ? vscodeGlobalStateTaskHistory : []) - await context.globalState.update("taskHistory", undefined) + // Don't remove the old taskHistory yet, while this version is not in production, for better dev experience. + // This is because the old version of the code (still in prod) is still reading taskHistory from the vs code global state, so it will appear as if all the user's tasks have been deleted. + // await context.globalState.update("taskHistory", undefined) console.log("[Storage Migration] taskHistory file in new location: ", await readTaskHistoryFromState(context)) console.log("[Storage Migration] old vscode global state: ", await context.globalState.get("taskHistory")) } catch (error) {