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.
This commit is contained in:
Chinesezjc committed 2026-09-24 19:57:45 +08:00
1 parent 96c421d985
commit 59c8bbbd6d
2 files changed
+3

No files matched your search

@@ -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<TaskManagerKey, string> = {
'timing.inactive': '已结束的任务为只读,无法修改时间',
'timing.conflict': '编辑期间任务已变化,草稿已保留。请在刷新后取消并重新打开编辑器,以修改最新规则',
'timing.notFound': '此任务当前不可用,草稿已保留。请取消以关闭编辑器',
'timing.subagentSession': '此会话属于子 agent,永远不会收到投递的提醒',
'timing.invalid': '请输入有效的日期和时间,或检查时间字段',
'timing.invalidZone': '请输入有效的 IANA 时区,例如 Asia/Shanghai',
'timing.notFuture': '请选择未来的日期和时间',
@@ -189,6 +189,7 @@ export function timingError(code: Extract<ScheduleUpdateResult, { code: string }
case 'schedule_conflict': return 'timing.conflict'
case 'schedule_ended': return 'timing.inactive'
case 'schedule_not_found': return 'timing.notFound'
case 'subagent_session': return 'timing.subagentSession'
case 'invalid_time_zone': return 'timing.invalidZone'
case 'not_future': return 'timing.notFuture'
case 'frequency_too_high': return 'timing.invalidInterval'