diff --git a/src/extension.ts b/src/extension.ts index b37db5123a..07636d2fb6 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -166,38 +166,6 @@ export async function activate(context: vscode.ExtensionContext) { // Initialize the provider *before* the Roo Code Cloud service so we can reuse its task deletion logic. const provider = new ClineProvider(context, outputChannel, "sidebar", contextProxy, mdmService) - - // Task history retention purge (runs only on activation) - try { - const config = vscode.workspace.getConfiguration(Package.name) - const retention = config.get("taskHistoryRetention", "never") ?? "never" - - outputChannel.appendLine(`[Retention] Startup purge: setting=${retention}`) - - const result = await purgeOldTasks( - retention as RetentionSetting, - contextProxy.globalStorageUri.fsPath, - (m) => { - outputChannel.appendLine(m) - console.log(m) - }, - false, - async (taskId: string, _taskDirPath: string) => { - // Reuse the same internal deletion logic as the History view so that - // checkpoints, shadow repositories, and task state are cleaned up consistently. - await provider.deleteTaskWithId(taskId) - }, - ) - - outputChannel.appendLine( - `[Retention] Startup purge complete: purged=${result.purgedCount}, cutoff=${result.cutoff ?? "none"}`, - ) - } catch (error) { - outputChannel.appendLine( - `[Retention] Failed during startup purge: ${error instanceof Error ? error.message : String(error)}`, - ) - } - // Initialize code index managers for all workspace folders. const codeIndexManagers: CodeIndexManager[] = []