fix: address review comments - translate Catalan error message and add debug logging

This commit is contained in:
Roo Code 2025-08-04 19:00:34 +00:00 committed by Hannes Rudolph
parent 0e1b23d09c
commit f476729914
2 changed files with 15 additions and 3 deletions

View file

@ -1511,8 +1511,19 @@ export class ClineProvider
async showTaskWithId(id: string) {
if (id !== this.getCurrentTask()?.taskId) {
// Non-current task.
const { historyItem } = await this.getTaskWithId(id)
await this.createTaskWithHistoryItem(historyItem) // Clears existing task.
try {
const { historyItem } = await this.getTaskWithId(id)
await this.createTaskWithHistoryItem(historyItem) // Clears existing task.
} catch (error) {
// Log the error for debugging purposes
this.log(`Failed to load task ${id}: ${error instanceof Error ? error.message : String(error)}`)
// Task not found or corrupt - it has already been deleted from state by getTaskWithId
vscode.window.showErrorMessage(t("common:errors.task_corrupt_deleted"))
// Refresh the webview to update the task list
await this.postStateToWebview()
return
}
}
await this.postMessageToWebview({ type: "action", action: "chatButtonClicked" })

View file

@ -125,7 +125,8 @@
"manual_url_missing_params": "URL de callback no vàlida: falten paràmetres requerits (code i state)",
"manual_url_auth_failed": "Autenticació manual per URL ha fallat",
"manual_url_auth_error": "Autenticació fallida",
"mode_import_failed": "Ha fallat la importació del mode: {{error}}"
"mode_import_failed": "Ha fallat la importació del mode: {{error}}",
"task_corrupt_deleted": "La tasca seleccionada no s'ha pogut carregar i s'ha eliminat de l'historial. Això sol passar quan els fitxers de la tasca estan corruptes o falten."
},
"warnings": {
"no_terminal_content": "No s'ha seleccionat contingut de terminal",