Skip to content

Commit 7382ddc

Browse files
committed
fix: address review comments - translate Catalan error message and add debug logging
1 parent 4fdbcb5 commit 7382ddc

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

src/core/webview/ClineProvider.ts

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1464,8 +1464,19 @@ export class ClineProvider
14641464
async showTaskWithId(id: string) {
14651465
if (id !== this.getCurrentTask()?.taskId) {
14661466
// Non-current task.
1467-
const { historyItem } = await this.getTaskWithId(id)
1468-
await this.createTaskWithHistoryItem(historyItem) // Clears existing task.
1467+
try {
1468+
const { historyItem } = await this.getTaskWithId(id)
1469+
await this.createTaskWithHistoryItem(historyItem) // Clears existing task.
1470+
} catch (error) {
1471+
// Log the error for debugging purposes
1472+
this.log(`Failed to load task ${id}: ${error instanceof Error ? error.message : String(error)}`)
1473+
1474+
// Task not found or corrupt - it has already been deleted from state by getTaskWithId
1475+
vscode.window.showErrorMessage(t("common:errors.task_corrupt_deleted"))
1476+
// Refresh the webview to update the task list
1477+
await this.postStateToWebview()
1478+
return
1479+
}
14691480
}
14701481

14711482
await this.postMessageToWebview({ type: "action", action: "chatButtonClicked" })

src/i18n/locales/ca/common.json

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)