From 66e69b66009c955bffa3f7f3b3ca9226a332a5cb Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Thu, 17 Sep 2026 06:45:54 +0000 Subject: [PATCH] Fix Chat dock tasks i18n call that broke tsc apiErrorMessage expects a fallback string then optional t; passing t as the second argument failed dashboard typecheck and blocked Windows packaging. Co-authored-by: XYAI Labs --- dashboard/src/locales/en.json | 1 + dashboard/src/locales/zh.json | 1 + .../src/pages/Chat/components/ChatDockTasksContent.tsx | 9 ++++++++- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/dashboard/src/locales/en.json b/dashboard/src/locales/en.json index 8108f7b4..a704ceab 100644 --- a/dashboard/src/locales/en.json +++ b/dashboard/src/locales/en.json @@ -1413,6 +1413,7 @@ "reviewNeedSession": "Pick a conversation to see the review trail.", "tasksEmpty": "No background tasks yet", "tasksEmptyHint": "Scheduled jobs and running work will appear here.", + "tasksLoadFailed": "Failed to load background tasks", "tasksOpenPage": "Manage scheduled tasks", "taskOn": "On", "taskOff": "Off", diff --git a/dashboard/src/locales/zh.json b/dashboard/src/locales/zh.json index f2cf451a..da0b018c 100644 --- a/dashboard/src/locales/zh.json +++ b/dashboard/src/locales/zh.json @@ -1413,6 +1413,7 @@ "reviewNeedSession": "先选一段对话,才能查看审查记录。", "tasksEmpty": "当前没有后台任务", "tasksEmptyHint": "定时任务和正在运行的工作会显示在这里。", + "tasksLoadFailed": "加载任务失败", "tasksOpenPage": "管理定时任务", "taskOn": "已启用", "taskOff": "已停用", diff --git a/dashboard/src/pages/Chat/components/ChatDockTasksContent.tsx b/dashboard/src/pages/Chat/components/ChatDockTasksContent.tsx index 4971c1db..740c746f 100644 --- a/dashboard/src/pages/Chat/components/ChatDockTasksContent.tsx +++ b/dashboard/src/pages/Chat/components/ChatDockTasksContent.tsx @@ -37,7 +37,14 @@ export default function ChatDockTasksContent({ if (!cancelled) setJobs(rows); }) .catch((err: unknown) => { - if (!cancelled) setError(apiErrorMessage(err, t)); + if (!cancelled) + setError( + apiErrorMessage( + err, + t("chat.rightRail.tasksLoadFailed", "加载任务失败"), + t, + ), + ); }) .finally(() => { if (!cancelled) setLoading(false);