mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-10-11 03:38:15 +00:00
chore: move task history retention to app state
This commit is contained in:
parent
7c0ce3ef66
commit
0ba7cdac58
22 changed files with 50 additions and 82 deletions
|
|
@ -597,11 +597,8 @@ export const webviewMessageHandler = async (
|
|||
.getConfiguration(Package.name)
|
||||
.update("deniedCommands", newValue, vscode.ConfigurationTarget.Global)
|
||||
} else if (key === "taskHistoryRetention") {
|
||||
const val = ((value ?? "never") as string).toString()
|
||||
newValue = val
|
||||
await vscode.workspace
|
||||
.getConfiguration(Package.name)
|
||||
.update("taskHistoryRetention", val, vscode.ConfigurationTarget.Global)
|
||||
// taskHistoryRetention is stored in Roo application state, not VS Code settings
|
||||
newValue = ((value ?? "never") as string).toString()
|
||||
} else if (key === "ttsEnabled") {
|
||||
newValue = value ?? true
|
||||
setTtsEnabled(newValue as boolean)
|
||||
|
|
|
|||
|
|
@ -390,15 +390,27 @@ export async function activate(context: vscode.ExtensionContext) {
|
|||
|
||||
// Task history retention purge (runs in background after activation)
|
||||
// By this point, provider is fully initialized and ready to handle deletions
|
||||
startBackgroundRetentionPurge({
|
||||
globalStoragePath: contextProxy.globalStorageUri.fsPath,
|
||||
log: (m) => outputChannel.appendLine(m),
|
||||
deleteTaskById: async (taskId: 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)
|
||||
},
|
||||
})
|
||||
{
|
||||
const retentionValue = contextProxy.getValue("taskHistoryRetention")
|
||||
const retention =
|
||||
retentionValue === "90" ||
|
||||
retentionValue === "60" ||
|
||||
retentionValue === "30" ||
|
||||
retentionValue === "7" ||
|
||||
retentionValue === "3"
|
||||
? retentionValue
|
||||
: "never"
|
||||
startBackgroundRetentionPurge({
|
||||
globalStoragePath: contextProxy.globalStorageUri.fsPath,
|
||||
log: (m) => outputChannel.appendLine(m),
|
||||
deleteTaskById: async (taskId: 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)
|
||||
},
|
||||
retention,
|
||||
})
|
||||
}
|
||||
|
||||
// Implements the `RooCodeAPI` interface.
|
||||
const socketPath = process.env.ROO_CODE_IPC_SOCKET_PATH
|
||||
|
|
|
|||
|
|
@ -429,19 +429,6 @@
|
|||
"default": false,
|
||||
"description": "%settings.debugProxy.tlsInsecure.description%",
|
||||
"markdownDescription": "%settings.debugProxy.tlsInsecure.description%"
|
||||
},
|
||||
"roo-cline.taskHistoryRetention": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"never",
|
||||
"90",
|
||||
"60",
|
||||
"30",
|
||||
"7",
|
||||
"3"
|
||||
],
|
||||
"default": "never",
|
||||
"description": "%settings.taskHistoryRetention.description%"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
3
src/package.nls.ca.json
generated
3
src/package.nls.ca.json
generated
|
|
@ -45,6 +45,5 @@
|
|||
"settings.debug.description": "Activa el mode de depuració per mostrar botons addicionals per veure l'historial de conversa de l'API i els missatges de la interfície d'usuari com a JSON embellert en fitxers temporals.",
|
||||
"settings.debugProxy.enabled.description": "**Habilita el Debug Proxy** — Redirigeix totes les sol·licituds de xarxa sortints a través d'un proxy per a debugging MITM. Només està actiu quan s'executa en mode debug (F5).",
|
||||
"settings.debugProxy.serverUrl.description": "URL del proxy (p. ex., `http://127.0.0.1:8888`). Només s'utilitza quan el **Debug Proxy** està habilitat.",
|
||||
"settings.debugProxy.tlsInsecure.description": "Accepta certificats auto-signats del proxy. **Requerit per a la inspecció MITM.** ⚠️ Insegur — utilitza-ho només per a debugging local.",
|
||||
"settings.taskHistoryRetention.description": "Eliminar automàticament l'historial de tasques en recarregar l'extensió. Elimina les tasques més antigues que el període seleccionat. Opcions: Mai (per defecte), 90 dies, 60 dies, 30 dies, 7 dies o 3 dies. Advertència: Això no es pot desfer i només s'executa en recarregar l'extensió."
|
||||
"settings.debugProxy.tlsInsecure.description": "Accepta certificats auto-signats del proxy. **Requerit per a la inspecció MITM.** ⚠️ Insegur — utilitza-ho només per a debugging local."
|
||||
}
|
||||
|
|
|
|||
3
src/package.nls.de.json
generated
3
src/package.nls.de.json
generated
|
|
@ -45,6 +45,5 @@
|
|||
"settings.debug.description": "Aktiviere den Debug-Modus, um zusätzliche Schaltflächen zum Anzeigen des API-Konversationsverlaufs und der UI-Nachrichten als formatiertes JSON in temporären Dateien anzuzeigen.",
|
||||
"settings.debugProxy.enabled.description": "**Debug-Proxy aktivieren** — Leite alle ausgehenden Netzwerkanfragen über einen Proxy für MITM-Debugging. Nur aktiv, wenn du im Debug-Modus (F5) läufst.",
|
||||
"settings.debugProxy.serverUrl.description": "Proxy-URL (z. B. `http://127.0.0.1:8888`). Wird nur verwendet, wenn der **Debug-Proxy** aktiviert ist.",
|
||||
"settings.debugProxy.tlsInsecure.description": "Akzeptiere selbstsignierte Zertifikate vom Proxy. **Erforderlich für MITM-Inspektion.** ⚠️ Unsicher – verwende das nur für lokales Debugging.",
|
||||
"settings.taskHistoryRetention.description": "Aufgabenverlauf beim Neuladen der Erweiterung automatisch löschen. Löscht Aufgaben, die älter als der ausgewählte Zeitraum sind. Optionen: Niemals (Standard), 90 Tage, 60 Tage, 30 Tage, 7 Tage oder 3 Tage. Warnung: Dies kann nicht rückgängig gemacht werden und wird nur beim Neuladen der Erweiterung ausgeführt."
|
||||
"settings.debugProxy.tlsInsecure.description": "Akzeptiere selbstsignierte Zertifikate vom Proxy. **Erforderlich für MITM-Inspektion.** ⚠️ Unsicher – verwende das nur für lokales Debugging."
|
||||
}
|
||||
|
|
|
|||
3
src/package.nls.es.json
generated
3
src/package.nls.es.json
generated
|
|
@ -45,6 +45,5 @@
|
|||
"settings.debug.description": "Activa el modo de depuración para mostrar botones adicionales para ver el historial de conversación de API y los mensajes de la interfaz de usuario como JSON embellecido en archivos temporales.",
|
||||
"settings.debugProxy.enabled.description": "**Activar Debug Proxy** — Redirige todas las solicitudes de red salientes a través de un proxy para depuración MITM. Solo está activo cuando se ejecuta en modo depuración (F5).",
|
||||
"settings.debugProxy.serverUrl.description": "URL del proxy (p. ej., `http://127.0.0.1:8888`). Solo se usa cuando **Debug Proxy** está activado.",
|
||||
"settings.debugProxy.tlsInsecure.description": "Aceptar certificados autofirmados del proxy. **Necesario para la inspección MITM.** ⚠️ Inseguro: úsalo solo para depuración local.",
|
||||
"settings.taskHistoryRetention.description": "Eliminar automáticamente el historial de tareas al recargar la extensión. Elimina tareas más antiguas que el período seleccionado. Opciones: Nunca (predeterminado), 90 días, 60 días, 30 días, 7 días o 3 días. Advertencia: Esto no se puede deshacer y solo se ejecuta al recargar la extensión."
|
||||
"settings.debugProxy.tlsInsecure.description": "Aceptar certificados autofirmados del proxy. **Necesario para la inspección MITM.** ⚠️ Inseguro: úsalo solo para depuración local."
|
||||
}
|
||||
|
|
|
|||
3
src/package.nls.fr.json
generated
3
src/package.nls.fr.json
generated
|
|
@ -45,6 +45,5 @@
|
|||
"settings.debug.description": "Active le mode debug pour afficher des boutons supplémentaires permettant de visualiser l'historique de conversation de l'API et les messages de l'interface utilisateur sous forme de JSON formaté dans des fichiers temporaires.",
|
||||
"settings.debugProxy.enabled.description": "**Activer le Debug Proxy** — Redirige toutes les requêtes réseau sortantes via un proxy pour le debug MITM. Actif uniquement quand tu es en mode debug (F5).",
|
||||
"settings.debugProxy.serverUrl.description": "URL du proxy (par ex. `http://127.0.0.1:8888`). Utilisée uniquement quand le **Debug Proxy** est activé.",
|
||||
"settings.debugProxy.tlsInsecure.description": "Accepter les certificats auto-signés du proxy. **Requis pour l'inspection MITM.** ⚠️ Non sécurisé — à utiliser uniquement pour le debug local.",
|
||||
"settings.taskHistoryRetention.description": "Supprimer automatiquement l'historique des tâches lors du rechargement de l'extension. Supprime les tâches plus anciennes que la période sélectionnée. Options : Jamais (par défaut), 90 jours, 60 jours, 30 jours, 7 jours ou 3 jours. Attention : Cette action ne peut pas être annulée et ne s'exécute qu'au rechargement de l'extension."
|
||||
"settings.debugProxy.tlsInsecure.description": "Accepter les certificats auto-signés du proxy. **Requis pour l'inspection MITM.** ⚠️ Non sécurisé — à utiliser uniquement pour le debug local."
|
||||
}
|
||||
|
|
|
|||
3
src/package.nls.hi.json
generated
3
src/package.nls.hi.json
generated
|
|
@ -45,6 +45,5 @@
|
|||
"settings.debug.description": "API conversation history और UI messages को temporary files में prettified JSON के रूप में देखने के लिए अतिरिक्त बटन दिखाने के लिए debug mode सक्षम करें।",
|
||||
"settings.debugProxy.enabled.description": "**Debug Proxy सक्षम करो** — सभी आउटबाउंड network requests को MITM debugging के लिए proxy के ज़रिए route करो। सिर्फ तब active रहेगा जब तुम debug mode (F5) में चला रहे हो।",
|
||||
"settings.debugProxy.serverUrl.description": "Proxy URL (जैसे `http://127.0.0.1:8888`)। सिर्फ तब इस्तेमाल होती है जब **Debug Proxy** enabled हो।",
|
||||
"settings.debugProxy.tlsInsecure.description": "Proxy से आने वाले self-signed certificates accept करो। **MITM inspection के लिए ज़रूरी।** ⚠️ Insecure — सिर्फ local debugging के लिए इस्तेमाल करो।",
|
||||
"settings.taskHistoryRetention.description": "एक्सटेंशन रीलोड पर कार्य इतिहास को स्वचालित रूप से हटाएं। चयनित अवधि से पुराने कार्यों को हटाता है। विकल्प: कभी नहीं (डिफ़ॉल्ट), 90 दिन, 60 दिन, 30 दिन, 7 दिन, या 3 दिन। चेतावनी: इसे पूर्ववत नहीं किया जा सकता और यह केवल एक्सटेंशन रीलोड पर चलता है।"
|
||||
"settings.debugProxy.tlsInsecure.description": "Proxy से आने वाले self-signed certificates accept करो। **MITM inspection के लिए ज़रूरी।** ⚠️ Insecure — सिर्फ local debugging के लिए इस्तेमाल करो।"
|
||||
}
|
||||
|
|
|
|||
3
src/package.nls.id.json
generated
3
src/package.nls.id.json
generated
|
|
@ -45,6 +45,5 @@
|
|||
"settings.debug.description": "Aktifkan mode debug untuk menampilkan tombol tambahan untuk melihat riwayat percakapan API dan pesan UI sebagai JSON yang diformat dalam file sementara.",
|
||||
"settings.debugProxy.enabled.description": "**Aktifkan Debug Proxy** — Arahkan semua permintaan jaringan keluar lewat proxy untuk debugging MITM. Hanya aktif saat kamu berjalan dalam mode debug (F5).",
|
||||
"settings.debugProxy.serverUrl.description": "URL proxy (mis. `http://127.0.0.1:8888`). Hanya digunakan ketika **Debug Proxy** diaktifkan.",
|
||||
"settings.debugProxy.tlsInsecure.description": "Terima sertifikat self-signed dari proxy. **Diperlukan untuk inspeksi MITM.** ⚠️ Tidak aman — gunakan hanya untuk debugging lokal.",
|
||||
"settings.taskHistoryRetention.description": "Hapus otomatis riwayat tugas saat memuat ulang ekstensi. Menghapus tugas yang lebih lama dari periode yang dipilih. Opsi: Tidak Pernah (default), 90 hari, 60 hari, 30 hari, 7 hari, atau 3 hari. Peringatan: Ini tidak dapat dibatalkan dan hanya berjalan saat memuat ulang ekstensi."
|
||||
"settings.debugProxy.tlsInsecure.description": "Terima sertifikat self-signed dari proxy. **Diperlukan untuk inspeksi MITM.** ⚠️ Tidak aman — gunakan hanya untuk debugging lokal."
|
||||
}
|
||||
|
|
|
|||
3
src/package.nls.it.json
generated
3
src/package.nls.it.json
generated
|
|
@ -45,6 +45,5 @@
|
|||
"settings.debug.description": "Abilita la modalità debug per mostrare pulsanti aggiuntivi per visualizzare la cronologia delle conversazioni API e i messaggi dell'interfaccia utente come JSON formattato in file temporanei.",
|
||||
"settings.debugProxy.enabled.description": "**Abilita Debug Proxy** — Instrada tutte le richieste di rete in uscita tramite un proxy per il debugging MITM. Attivo solo quando esegui in modalità debug (F5).",
|
||||
"settings.debugProxy.serverUrl.description": "URL del proxy (ad es. `http://127.0.0.1:8888`). Usato solo quando **Debug Proxy** è abilitato.",
|
||||
"settings.debugProxy.tlsInsecure.description": "Accetta certificati autofirmati dal proxy. **Necessario per l'ispezione MITM.** ⚠️ Non sicuro — usalo solo per il debugging locale.",
|
||||
"settings.taskHistoryRetention.description": "Elimina automaticamente la cronologia delle attività al ricaricamento dell'estensione. Elimina le attività più vecchie del periodo selezionato. Opzioni: Mai (predefinito), 90 giorni, 60 giorni, 30 giorni, 7 giorni o 3 giorni. Attenzione: Questa operazione non può essere annullata e viene eseguita solo al ricaricamento dell'estensione."
|
||||
"settings.debugProxy.tlsInsecure.description": "Accetta certificati autofirmati dal proxy. **Necessario per l'ispezione MITM.** ⚠️ Non sicuro — usalo solo per il debugging locale."
|
||||
}
|
||||
|
|
|
|||
3
src/package.nls.ja.json
generated
3
src/package.nls.ja.json
generated
|
|
@ -45,6 +45,5 @@
|
|||
"settings.debug.description": "デバッグモードを有効にして、API会話履歴とUIメッセージをフォーマットされたJSONとして一時ファイルで表示するための追加ボタンを表示します。",
|
||||
"settings.debugProxy.enabled.description": "**Debug Proxy を有効化** — すべての送信ネットワーク要求を MITM デバッグのためにプロキシ経由でルーティングします。デバッグモード (F5) で実行しているときだけ有効です。",
|
||||
"settings.debugProxy.serverUrl.description": "プロキシ URL(例: `http://127.0.0.1:8888`)。**Debug Proxy** が有効なときにだけ使用されます。",
|
||||
"settings.debugProxy.tlsInsecure.description": "プロキシからの自己署名証明書を許可します。**MITM インスペクションに必須です。** ⚠️ 危険な設定なので、ローカルでのデバッグにだけ使用してください。",
|
||||
"settings.taskHistoryRetention.description": "拡張機能の再読み込み時にタスク履歴を自動削除します。選択した期間より古いタスクを削除します。オプション:なし(デフォルト)、90日、60日、30日、7日、または3日。警告:この操作は元に戻せず、拡張機能の再読み込み時にのみ実行されます。"
|
||||
"settings.debugProxy.tlsInsecure.description": "プロキシからの自己署名証明書を許可します。**MITM インスペクションに必須です。** ⚠️ 危険な設定なので、ローカルでのデバッグにだけ使用してください。"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,6 +45,5 @@
|
|||
"settings.debug.description": "Enable debug mode to show additional buttons for viewing API conversation history and UI messages as prettified JSON in temporary files.",
|
||||
"settings.debugProxy.enabled.description": "**Enable Debug Proxy** — Route all outbound network requests through a proxy for MITM debugging. Only active when running in debug mode (F5).",
|
||||
"settings.debugProxy.serverUrl.description": "Proxy URL (e.g., `http://127.0.0.1:8888`). Only used when **Debug Proxy** is enabled.",
|
||||
"settings.debugProxy.tlsInsecure.description": "Accept self-signed certificates from the proxy. **Required for MITM inspection.** ⚠️ Insecure — only use for local debugging.",
|
||||
"settings.taskHistoryRetention.description": "Auto-delete task history on extension reload. Deletes tasks older than the selected period. Options: Never (default), 90 days, 60 days, 30 days, 7 days, or 3 days. Warning: This cannot be undone and only runs on extension reload."
|
||||
"settings.debugProxy.tlsInsecure.description": "Accept self-signed certificates from the proxy. **Required for MITM inspection.** ⚠️ Insecure — only use for local debugging."
|
||||
}
|
||||
|
|
|
|||
3
src/package.nls.ko.json
generated
3
src/package.nls.ko.json
generated
|
|
@ -45,6 +45,5 @@
|
|||
"settings.debug.description": "디버그 모드를 활성화하여 API 대화 기록과 UI 메시지를 임시 파일에 포맷된 JSON으로 보기 위한 추가 버튼을 표시합니다.",
|
||||
"settings.debugProxy.enabled.description": "**Debug Proxy 활성화** — 모든 아웃바운드 네트워크 요청을 MITM 디버깅을 위해 프록시를 통해 라우팅합니다. 디버그 모드(F5)로 실행 중일 때만 활성화됩니다.",
|
||||
"settings.debugProxy.serverUrl.description": "프록시 URL(예: `http://127.0.0.1:8888`). **Debug Proxy** 가 활성화된 경우에만 사용됩니다.",
|
||||
"settings.debugProxy.tlsInsecure.description": "프록시의 self-signed 인증서를 허용합니다. **MITM 검사에 필요합니다.** ⚠️ 안전하지 않으므로 로컬 디버깅에만 사용하세요.",
|
||||
"settings.taskHistoryRetention.description": "확장 프로그램 재로드 시 작업 기록을 자동 삭제합니다. 선택한 기간보다 오래된 작업을 삭제합니다. 옵션: 안 함(기본값), 90일, 60일, 30일, 7일 또는 3일. 경고: 이 작업은 취소할 수 없으며 확장 프로그램 재로드 시에만 실행됩니다."
|
||||
"settings.debugProxy.tlsInsecure.description": "프록시의 self-signed 인증서를 허용합니다. **MITM 검사에 필요합니다.** ⚠️ 안전하지 않으므로 로컬 디버깅에만 사용하세요."
|
||||
}
|
||||
|
|
|
|||
3
src/package.nls.nl.json
generated
3
src/package.nls.nl.json
generated
|
|
@ -45,6 +45,5 @@
|
|||
"settings.debug.description": "Schakel debug-modus in om extra knoppen te tonen voor het bekijken van API-conversatiegeschiedenis en UI-berichten als opgemaakte JSON in tijdelijke bestanden.",
|
||||
"settings.debugProxy.enabled.description": "**Debug Proxy inschakelen** — Leid alle uitgaande netwerkverzoeken via een proxy voor MITM-debugging. Alleen actief wanneer je in debugmodus (F5) draait.",
|
||||
"settings.debugProxy.serverUrl.description": "Proxy-URL (bijv. `http://127.0.0.1:8888`). Wordt alleen gebruikt wanneer **Debug Proxy** is ingeschakeld.",
|
||||
"settings.debugProxy.tlsInsecure.description": "Accepteer zelfondertekende certificaten van de proxy. **Vereist voor MITM-inspectie.** ⚠️ Onveilig — gebruik dit alleen voor lokale debugging.",
|
||||
"settings.taskHistoryRetention.description": "Taakgeschiedenis automatisch verwijderen bij het herladen van de extensie. Verwijdert taken die ouder zijn dan de geselecteerde periode. Opties: Nooit (standaard), 90 dagen, 60 dagen, 30 dagen, 7 dagen of 3 dagen. Waarschuwing: Dit kan niet ongedaan worden gemaakt en wordt alleen uitgevoerd bij het herladen van de extensie."
|
||||
"settings.debugProxy.tlsInsecure.description": "Accepteer zelfondertekende certificaten van de proxy. **Vereist voor MITM-inspectie.** ⚠️ Onveilig — gebruik dit alleen voor lokale debugging."
|
||||
}
|
||||
|
|
|
|||
3
src/package.nls.pl.json
generated
3
src/package.nls.pl.json
generated
|
|
@ -45,6 +45,5 @@
|
|||
"settings.debug.description": "Włącz tryb debugowania, aby wyświetlić dodatkowe przyciski do przeglądania historii rozmów API i komunikatów interfejsu użytkownika jako sformatowany JSON w plikach tymczasowych.",
|
||||
"settings.debugProxy.enabled.description": "**Włącz Debug Proxy** — Kieruj wszystkie wychodzące żądania sieciowe przez proxy na potrzeby debugowania MITM. Aktywne tylko wtedy, gdy uruchamiasz w trybie debugowania (F5).",
|
||||
"settings.debugProxy.serverUrl.description": "URL proxy (np. `http://127.0.0.1:8888`). Używany tylko wtedy, gdy **Debug Proxy** jest włączony.",
|
||||
"settings.debugProxy.tlsInsecure.description": "Akceptuj certyfikaty self-signed z proxy. **Wymagane do inspekcji MITM.** ⚠️ Niezabezpieczone — używaj tylko do lokalnego debugowania.",
|
||||
"settings.taskHistoryRetention.description": "Automatyczne usuwanie historii zadań przy przeładowaniu rozszerzenia. Usuwa zadania starsze niż wybrany okres. Opcje: Nigdy (domyślnie), 90 dni, 60 dni, 30 dni, 7 dni lub 3 dni. Ostrzeżenie: Tej operacji nie można cofnąć i jest wykonywana tylko przy przeładowaniu rozszerzenia."
|
||||
"settings.debugProxy.tlsInsecure.description": "Akceptuj certyfikaty self-signed z proxy. **Wymagane do inspekcji MITM.** ⚠️ Niezabezpieczone — używaj tylko do lokalnego debugowania."
|
||||
}
|
||||
|
|
|
|||
3
src/package.nls.pt-BR.json
generated
3
src/package.nls.pt-BR.json
generated
|
|
@ -45,6 +45,5 @@
|
|||
"settings.debug.description": "Ativa o modo de depuração para mostrar botões adicionais para visualizar o histórico de conversas da API e mensagens da interface como JSON formatado em arquivos temporários.",
|
||||
"settings.debugProxy.enabled.description": "**Ativar Debug Proxy** — Redireciona todas as solicitações de rede de saída por meio de um proxy para depuração MITM. Só fica ativo quando você está executando em modo de depuração (F5).",
|
||||
"settings.debugProxy.serverUrl.description": "URL do proxy (por exemplo, `http://127.0.0.1:8888`). Só é usada quando o **Debug Proxy** está ativado.",
|
||||
"settings.debugProxy.tlsInsecure.description": "Aceitar certificados self-signed do proxy. **Necessário para inspeção MITM.** ⚠️ Inseguro — use apenas para depuração local.",
|
||||
"settings.taskHistoryRetention.description": "Excluir automaticamente o histórico de tarefas ao recarregar a extensão. Exclui tarefas mais antigas que o período selecionado. Opções: Nunca (padrão), 90 dias, 60 dias, 30 dias, 7 dias ou 3 dias. Aviso: Isso não pode ser desfeito e só é executado ao recarregar a extensão."
|
||||
"settings.debugProxy.tlsInsecure.description": "Aceitar certificados self-signed do proxy. **Necessário para inspeção MITM.** ⚠️ Inseguro — use apenas para depuração local."
|
||||
}
|
||||
|
|
|
|||
3
src/package.nls.ru.json
generated
3
src/package.nls.ru.json
generated
|
|
@ -45,6 +45,5 @@
|
|||
"settings.debug.description": "Включить режим отладки, чтобы отображать дополнительные кнопки для просмотра истории разговоров API и сообщений интерфейса в виде форматированного JSON во временных файлах.",
|
||||
"settings.debugProxy.enabled.description": "**Включить Debug Proxy** — направлять все исходящие сетевые запросы через прокси для MITM-отладки. Активен только когда ты запускаешь расширение в режиме отладки (F5).",
|
||||
"settings.debugProxy.serverUrl.description": "URL прокси (например, `http://127.0.0.1:8888`). Используется только если **Debug Proxy** включён.",
|
||||
"settings.debugProxy.tlsInsecure.description": "Принимать self-signed сертификаты от прокси. **Требуется для MITM-инспекции.** ⚠️ Небезопасно — используй только для локальной отладки.",
|
||||
"settings.taskHistoryRetention.description": "Автоматически удалять историю задач при перезагрузке расширения. Удаляет задачи старше выбранного периода. Варианты: Никогда (по умолчанию), 90 дней, 60 дней, 30 дней, 7 дней или 3 дня. Предупреждение: Это действие нельзя отменить, и оно выполняется только при перезагрузке расширения."
|
||||
"settings.debugProxy.tlsInsecure.description": "Принимать self-signed сертификаты от прокси. **Требуется для MITM-инспекции.** ⚠️ Небезопасно — используй только для локальной отладки."
|
||||
}
|
||||
|
|
|
|||
3
src/package.nls.tr.json
generated
3
src/package.nls.tr.json
generated
|
|
@ -45,6 +45,5 @@
|
|||
"settings.debug.description": "API konuşma geçmişini ve kullanıcı arayüzü mesajlarını geçici dosyalarda biçimlendirilmiş JSON olarak görüntülemek için ek düğmeler göstermek üzere hata ayıklama modunu etkinleştir.",
|
||||
"settings.debugProxy.enabled.description": "**Debug Proxy'yi etkinleştir** — Tüm giden ağ isteklerini MITM hata ayıklaması için bir proxy üzerinden yönlendir. Yalnızca debug modunda (F5) çalıştırırken aktiftir.",
|
||||
"settings.debugProxy.serverUrl.description": "Proxy URL'si (ör. `http://127.0.0.1:8888`). Yalnızca **Debug Proxy** etkin olduğunda kullanılır.",
|
||||
"settings.debugProxy.tlsInsecure.description": "Proxy'den gelen self-signed sertifikaları kabul et. **MITM incelemesi için gerekli.** ⚠️ Güvensiz — yalnızca lokal debugging için kullan.",
|
||||
"settings.taskHistoryRetention.description": "Uzantı yeniden yüklendiğinde görev geçmişini otomatik olarak sil. Seçilen süreden eski görevleri siler. Seçenekler: Asla (varsayılan), 90 gün, 60 gün, 30 gün, 7 gün veya 3 gün. Uyarı: Bu işlem geri alınamaz ve yalnızca uzantı yeniden yüklendiğinde çalışır."
|
||||
"settings.debugProxy.tlsInsecure.description": "Proxy'den gelen self-signed sertifikaları kabul et. **MITM incelemesi için gerekli.** ⚠️ Güvensiz — yalnızca lokal debugging için kullan."
|
||||
}
|
||||
|
|
|
|||
3
src/package.nls.vi.json
generated
3
src/package.nls.vi.json
generated
|
|
@ -45,6 +45,5 @@
|
|||
"settings.debug.description": "Bật chế độ gỡ lỗi để hiển thị các nút bổ sung để xem lịch sử hội thoại API và thông điệp giao diện người dùng dưới dạng JSON được định dạng trong các tệp tạm thời.",
|
||||
"settings.debugProxy.enabled.description": "**Bật Debug Proxy** — Chuyển hướng tất cả yêu cầu mạng đi ra qua một proxy để debug MITM. Chỉ hoạt động khi bạn chạy ở chế độ gỡ lỗi (F5).",
|
||||
"settings.debugProxy.serverUrl.description": "Proxy URL (vd: `http://127.0.0.1:8888`). Chỉ được dùng khi **Debug Proxy** được bật.",
|
||||
"settings.debugProxy.tlsInsecure.description": "Chấp nhận chứng chỉ self-signed từ proxy. **Bắt buộc cho việc kiểm tra MITM.** ⚠️ Không an toàn — chỉ dùng cho debug cục bộ.",
|
||||
"settings.taskHistoryRetention.description": "Tự động xóa lịch sử nhiệm vụ khi tải lại tiện ích mở rộng. Xóa các nhiệm vụ cũ hơn khoảng thời gian đã chọn. Tùy chọn: Không bao giờ (mặc định), 90 ngày, 60 ngày, 30 ngày, 7 ngày hoặc 3 ngày. Cảnh báo: Thao tác này không thể hoàn tác và chỉ chạy khi tải lại tiện ích mở rộng."
|
||||
"settings.debugProxy.tlsInsecure.description": "Chấp nhận chứng chỉ self-signed từ proxy. **Bắt buộc cho việc kiểm tra MITM.** ⚠️ Không an toàn — chỉ dùng cho debug cục bộ."
|
||||
}
|
||||
|
|
|
|||
3
src/package.nls.zh-CN.json
generated
3
src/package.nls.zh-CN.json
generated
|
|
@ -45,6 +45,5 @@
|
|||
"settings.debug.description": "启用调试模式以显示额外按钮,用于在临时文件中以格式化 JSON 查看 API 对话历史和 UI 消息。",
|
||||
"settings.debugProxy.enabled.description": "**启用 Debug Proxy** — 通过代理转发所有出站网络请求,用于 MITM 调试。只在调试模式 (F5) 运行时生效。",
|
||||
"settings.debugProxy.serverUrl.description": "代理 URL(例如 `http://127.0.0.1:8888`)。仅在启用 **Debug Proxy** 时使用。",
|
||||
"settings.debugProxy.tlsInsecure.description": "接受来自代理的 self-signed 证书。**MITM 检查所必需。** ⚠️ 不安全——只在本地调试时使用。",
|
||||
"settings.taskHistoryRetention.description": "扩展重新加载时自动删除任务历史。删除早于所选时间段的任务。选项:从不(默认)、90天、60天、30天、7天或3天。警告:此操作不可逆,仅在扩展重新加载时运行。"
|
||||
"settings.debugProxy.tlsInsecure.description": "接受来自代理的 self-signed 证书。**MITM 检查所必需。** ⚠️ 不安全——只在本地调试时使用。"
|
||||
}
|
||||
|
|
|
|||
3
src/package.nls.zh-TW.json
generated
3
src/package.nls.zh-TW.json
generated
|
|
@ -45,6 +45,5 @@
|
|||
"settings.debug.description": "啟用偵錯模式以顯示額外按鈕,用於在暫存檔案中以格式化 JSON 檢視 API 對話歷史紀錄和使用者介面訊息。",
|
||||
"settings.debugProxy.enabled.description": "**啟用 Debug Proxy** — 將所有出站網路要求透過代理進行路由,以進行 MITM 偵錯。只有在除錯模式 (F5) 執行時才會啟用。",
|
||||
"settings.debugProxy.serverUrl.description": "代理 URL(例如 `http://127.0.0.1:8888`)。只有在啟用 **Debug Proxy** 時才會使用。",
|
||||
"settings.debugProxy.tlsInsecure.description": "接受來自代理的 self-signed 憑證。**MITM 檢查所必需。** ⚠️ 不安全——只在本機偵錯時使用。",
|
||||
"settings.taskHistoryRetention.description": "擴充功能重新載入時自動刪除工作歷程記錄。刪除早於所選時間段的工作。選項:永不(預設)、90天、60天、30天、7天或3天。警告:此操作無法復原,且僅在擴充功能重新載入時執行。"
|
||||
"settings.debugProxy.tlsInsecure.description": "接受來自代理的 self-signed 憑證。**MITM 檢查所必需。** ⚠️ 不安全——只在本機偵錯時使用。"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ import type { Dirent } from "fs"
|
|||
|
||||
import { getStorageBasePath } from "./storage"
|
||||
import { GlobalFileNames } from "../shared/globalFileNames"
|
||||
import { Package } from "../shared/package"
|
||||
|
||||
/**
|
||||
* Allowed retention day values (as numbers).
|
||||
|
|
@ -294,6 +293,8 @@ export interface BackgroundPurgeOptions {
|
|||
log: (message: string) => void
|
||||
/** Function to delete a task by ID (should use ClineProvider.deleteTaskWithId for full cleanup) */
|
||||
deleteTaskById: (taskId: string, taskDirPath: string) => Promise<void>
|
||||
/** Retention setting value from Roo application state */
|
||||
retention: RetentionSetting
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -301,34 +302,25 @@ export interface BackgroundPurgeOptions {
|
|||
* This function is designed to be called after extension activation completes,
|
||||
* using a fire-and-forget pattern (void) to avoid blocking activation.
|
||||
*
|
||||
* It reads the retention setting from VS Code configuration, executes the purge,
|
||||
* It reads the retention setting from Roo application state, executes the purge,
|
||||
* and shows a notification if tasks were deleted.
|
||||
*
|
||||
* @param options Configuration options for the background purge
|
||||
*/
|
||||
export function startBackgroundRetentionPurge(options: BackgroundPurgeOptions): void {
|
||||
const { globalStoragePath, log, deleteTaskById } = options
|
||||
const { globalStoragePath, log, deleteTaskById, retention } = options
|
||||
|
||||
void (async () => {
|
||||
try {
|
||||
const config = vscode.workspace.getConfiguration(Package.name)
|
||||
const retention = config.get<string>("taskHistoryRetention", "never") ?? "never"
|
||||
|
||||
// Skip if retention is disabled
|
||||
if (retention === "never") {
|
||||
if (retention === "never" || retention === "0" || retention === 0) {
|
||||
log("[Retention] Background purge skipped: retention is set to 'never'")
|
||||
return
|
||||
}
|
||||
|
||||
log(`[Retention] Starting background purge: setting=${retention}`)
|
||||
|
||||
const result = await purgeOldTasks(
|
||||
retention as RetentionSetting,
|
||||
globalStoragePath,
|
||||
log,
|
||||
false,
|
||||
deleteTaskById,
|
||||
)
|
||||
const result = await purgeOldTasks(retention, globalStoragePath, log, false, deleteTaskById)
|
||||
|
||||
log(
|
||||
`[Retention] Background purge complete: purged=${result.purgedCount}, cutoff=${result.cutoff ?? "none"}`,
|
||||
|
|
@ -336,14 +328,12 @@ export function startBackgroundRetentionPurge(options: BackgroundPurgeOptions):
|
|||
|
||||
// Show user notification if tasks were deleted
|
||||
if (result.purgedCount > 0) {
|
||||
const message = `Roo Code deleted ${result.purgedCount} task${result.purgedCount === 1 ? "" : "s"} older than ${retention} day${retention === "1" ? "" : "s"}`
|
||||
const message = `Roo Code deleted ${result.purgedCount} task${result.purgedCount === 1 ? "" : "s"} older than ${retention} days`
|
||||
|
||||
vscode.window.showInformationMessage(message, "View Settings", "Dismiss").then((action) => {
|
||||
if (action === "View Settings") {
|
||||
vscode.commands.executeCommand(
|
||||
"workbench.action.openSettings",
|
||||
"roo-cline.taskHistoryRetention",
|
||||
)
|
||||
// Navigate to Roo Code settings About tab
|
||||
vscode.commands.executeCommand("roo-cline.settingsButtonClicked")
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue