From 59c8bbbd6d6526e472d2a0b960caf71e9c752aae Mon Sep 17 00:00:00 2001 From: Chinesezjc Date: Thu, 24 Sep 2026 19:57:45 +0800 Subject: [PATCH] fix(web): name the subagent-session refusal in the schedule editor `subagent_session` joins the update-result error union, so the client's exhaustive mapping needs an entry: the timing switch returns a new `timing.subagentSession` key and both locale dictionaries carry the copy. The editor shows it when someone edits a task whose Session subagent routing owns. --- packages/client/ui-schedule/src/client/task-manager-locales.ts | 2 ++ packages/client/ui-schedule/src/client/task-timing.ts | 1 + 2 files changed, 3 insertions(+) diff --git a/packages/client/ui-schedule/src/client/task-manager-locales.ts b/packages/client/ui-schedule/src/client/task-manager-locales.ts index 6906e54fff..5b4165daa3 100644 --- a/packages/client/ui-schedule/src/client/task-manager-locales.ts +++ b/packages/client/ui-schedule/src/client/task-manager-locales.ts @@ -84,6 +84,7 @@ export const en = { 'timing.conflict': 'This task changed while you were editing. Your draft is retained. ' + 'Cancel and reopen after refresh to edit the latest rule.', 'timing.notFound': 'This task is no longer available. Your draft is retained; cancel to close the editor.', + 'timing.subagentSession': 'This session belongs to a sub-agent, which never receives delivered reminders.', 'timing.invalid': 'Enter a valid date and time, or check the timing fields.', 'timing.invalidZone': 'Enter a valid IANA time zone, for example Asia/Shanghai.', 'timing.notFuture': 'Choose a date and time in the future.', @@ -226,6 +227,7 @@ export const zh: Record = { 'timing.inactive': '已结束的任务为只读,无法修改时间', 'timing.conflict': '编辑期间任务已变化,草稿已保留。请在刷新后取消并重新打开编辑器,以修改最新规则', 'timing.notFound': '此任务当前不可用,草稿已保留。请取消以关闭编辑器', + 'timing.subagentSession': '此会话属于子 agent,永远不会收到投递的提醒', 'timing.invalid': '请输入有效的日期和时间,或检查时间字段', 'timing.invalidZone': '请输入有效的 IANA 时区,例如 Asia/Shanghai', 'timing.notFuture': '请选择未来的日期和时间', diff --git a/packages/client/ui-schedule/src/client/task-timing.ts b/packages/client/ui-schedule/src/client/task-timing.ts index debf4d76f6..a363cffa9e 100644 --- a/packages/client/ui-schedule/src/client/task-timing.ts +++ b/packages/client/ui-schedule/src/client/task-timing.ts @@ -189,6 +189,7 @@ export function timingError(code: Extract