mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-10-11 03:38:15 +00:00
Update src/extension.ts
Co-authored-by: Seth Miller <sethmillerp@gmail.com>
This commit is contained in:
parent
d1bdbd56b8
commit
06df1ca068
1 changed files with 0 additions and 32 deletions
|
|
@ -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<string>("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[] = []
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue