Skip to content

Commit f476729

Browse files
roomotehannesrudolph
authored andcommitted
fix: address review comments - translate Catalan error message and add debug logging
1 parent 0e1b23d commit f476729

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
@@ -1511,8 +1511,19 @@ export class ClineProvider
15111511
async showTaskWithId(id: string) {
15121512
if (id !== this.getCurrentTask()?.taskId) {
15131513
// Non-current task.
1514-
const { historyItem } = await this.getTaskWithId(id)
1515-
await this.createTaskWithHistoryItem(historyItem) // Clears existing task.
1514+
try {
1515+
const { historyItem } = await this.getTaskWithId(id)
1516+
await this.createTaskWithHistoryItem(historyItem) // Clears existing task.
1517+
} catch (error) {
1518+
// Log the error for debugging purposes
1519+
this.log(`Failed to load task ${id}: ${error instanceof Error ? error.message : String(error)}`)
1520+
1521+
// Task not found or corrupt - it has already been deleted from state by getTaskWithId
1522+
vscode.window.showErrorMessage(t("common:errors.task_corrupt_deleted"))
1523+
// Refresh the webview to update the task list
1524+
await this.postStateToWebview()
1525+
return
1526+
}
15161527
}
15171528

15181529
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)