mirror of
https://github.com/cline/cline.git
synced 2026-09-19 02:05:44 +08:00
Update src/core/storage/state-migrations.ts
Co-authored-by: Bee <68532117+abeatrix@users.noreply.github.com>
This commit is contained in:
@@ -99,9 +99,7 @@ export async function migrateTaskHistoryToFile(context: vscode.ExtensionContext)
|
||||
else if (oldLocationData.length > 0) {
|
||||
// Append old location data (more recent) to new location data - follows same appending pattern as updateTaskHistory
|
||||
const mergedData = [...newLocationData, ...oldLocationData]
|
||||
await writeTaskHistoryToState(context, mergedData)
|
||||
// Clear old location
|
||||
await context.globalState.update("taskHistory", undefined)
|
||||
await Promise.all([writeTaskHistoryToState(context, finalData), context.globalState.update("taskHistory", undefined)])
|
||||
console.log("[Storage Migration] Merged task history from old and new locations")
|
||||
} else {
|
||||
console.log("[Storage Migration] New location has data, old location is empty - no migration needed")
|
||||
|
||||
Reference in New Issue
Block a user