新增: 无人值守P0任务边界全链
- 任务级授权边界判定与审批旁路单点插桩 - boundary_json 随会话落库(V45 可逆迁移) - 六路非正常终局统一安全停靠与托盘通知 - 每五轮进度事件与会话头部进度条 - 前端边界配置卡侧栏徽标及 UX 校验补齐
This commit is contained in:
@@ -49,6 +49,8 @@ export default {
|
||||
// conversation load/switch failure feedback (network jitter/IPC down → empty list/blank, was silent)
|
||||
loadConvFail: 'Failed to load conversations. Please check your network or backend connection.',
|
||||
switchConvFail: 'Failed to switch conversation. Please retry.',
|
||||
// UX走查 P3-7/P1-1: linked-conversation jump hit a deleted conversation (was silently creating a blank one / dead click in detached window)
|
||||
convDeleted: 'Conversation deleted',
|
||||
// M30: rename/archive/pin IPC failure feedback (was no try/catch, exceptions leaked to unhandledrejection)
|
||||
renameConvFail: 'Failed to rename. Please retry.',
|
||||
archiveConvFail: 'Failed to {action}. Please retry.',
|
||||
@@ -87,11 +89,23 @@ export default {
|
||||
title: 'Sub-agent',
|
||||
completed: 'completed',
|
||||
truncated: 'truncated',
|
||||
cancelled: 'cancelled',
|
||||
failed: 'failed',
|
||||
// stop_kind structured stop reasons (replaces summary heuristics; truncation sub-kinds surfaced)
|
||||
truncMaxRounds: 'max rounds reached',
|
||||
truncWallClock: 'timed out',
|
||||
truncTokenBudget: 'token budget reached',
|
||||
noReport: 'no report produced',
|
||||
// Rejected-tools chip ({tools} = "tool×count" items, first 2 shown then +N)
|
||||
rejected: 'rejected {tools}',
|
||||
// Startup-failed sub-agents have no persisted trace; card is click-disabled
|
||||
noTrace: 'No trace (failed to start)',
|
||||
meta: '{rounds} rounds · {tokens} tokens',
|
||||
// S3: finished card is clickable to open the read-only trace (hover hint)
|
||||
viewHint: 'Click to view execution trace',
|
||||
},
|
||||
// P3-6 background-conversation sub-agent finished light toast ({status} reuses agentFinished status words above, {summary} truncated to 40 chars)
|
||||
agentFinishedToast: 'Sub-agent {status}: {summary}',
|
||||
// S3 sub-agent trace overlay (opened from the finished card, read-only simple render,
|
||||
// discarded on close)
|
||||
agentTrace: {
|
||||
@@ -102,6 +116,71 @@ export default {
|
||||
roleAssistant: 'Assistant',
|
||||
roleTool: 'Tool result',
|
||||
roleSystem: 'System',
|
||||
deniedTool: 'Denied: {tool}',
|
||||
riskLow: 'low risk',
|
||||
riskMedium: 'medium risk',
|
||||
riskHigh: 'high risk',
|
||||
},
|
||||
// Unattended task parked card (AiTaskParked, terminal of the pending family):
|
||||
// Continue re-authorizes the loop, Stop archives without resuming
|
||||
taskParked: {
|
||||
title: 'Task parked',
|
||||
// stop_kind structured stop reason (vocabulary pinned by backend contract; unknown values fall back to unknownKind)
|
||||
stopKind: {
|
||||
approval_timeout: 'Approval timed out',
|
||||
cancelled: 'Cancelled',
|
||||
circuit_breaker: 'Circuit breaker',
|
||||
stall_breaker: 'Stall breaker',
|
||||
max_rounds: 'Max rounds reached',
|
||||
fatal: 'Repeated failures (retry budget exhausted)',
|
||||
midstream: 'Stream interrupted',
|
||||
},
|
||||
unknownKind: 'Parked',
|
||||
stopArchive: 'Stop & Archive',
|
||||
stoppedToast: 'Task stopped, will not resume',
|
||||
archiveFailed: 'Stop failed: {msg}',
|
||||
},
|
||||
// Unattended task progress (AiTaskProgress, design §4.3): TopBar lightweight progress,
|
||||
// visible as "still working" during silent periods
|
||||
taskProgress: {
|
||||
running: 'Running · round {round}/{max} · {tokens} tokens',
|
||||
unlimited: 'Running · round {round} · {tokens} tokens',
|
||||
barHint: 'Round {round}/{max}',
|
||||
},
|
||||
// Unattended boundary config card (authorized once at kickoff, effective for the task
|
||||
// lifetime, dies with the conversation)
|
||||
taskBoundary: {
|
||||
toggle: 'Unattended',
|
||||
badge: 'Unattended boundary authorized',
|
||||
riskCeiling: 'Risk ceiling',
|
||||
riskLow: 'Low',
|
||||
riskMedium: 'Medium',
|
||||
dirs: 'Directory allowlist',
|
||||
dirPlaceholder: 'Enter absolute directory path',
|
||||
dirAdd: 'Add',
|
||||
dirEmpty: 'No directories added',
|
||||
forbidDestructive: 'Destructive commands always blocked',
|
||||
budgetToggle: 'Budget (advanced)',
|
||||
budgetRounds: 'Max rounds',
|
||||
budgetTokens: 'Max tokens',
|
||||
budgetWallSecs: 'Wall-clock seconds',
|
||||
budgetHint: 'Leave empty for unlimited',
|
||||
budgetInvalid: 'Budget values must be positive integers',
|
||||
confirmSet: 'Authorize once, no interruptions for the whole task',
|
||||
clearBoundary: 'Clear boundary',
|
||||
setOk: 'Unattended boundary authorized',
|
||||
clearOk: 'Boundary cleared, back to per-action approval',
|
||||
setFail: 'Failed to set boundary: {msg}',
|
||||
lockedGenerating: 'Task is running: only clearing (revoke) is allowed, fields are locked',
|
||||
loadFailed: 'Failed to load boundary; the form below is not trustworthy',
|
||||
retryLoad: 'Retry',
|
||||
dirErrIllegal: 'Path contains illegal characters < > : " | ? *',
|
||||
dirErrRelative: 'Enter an absolute path (e.g. D:\\projects or /home/user)',
|
||||
clearConfirm: 'Clearing the boundary revokes unattended authorization immediately; tool calls in the running task will fall back to per-action approval. Clear?',
|
||||
echoRisk: 'risk ceiling {risk}',
|
||||
echoDirs: '{n} dirs',
|
||||
echoBudget: 'budget {rounds} rounds / {tokens} tokens / {secs}s',
|
||||
echoNoBudget: 'no budget limit',
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -110,6 +110,7 @@ export default {
|
||||
|
||||
// ── Skill ──
|
||||
clearSkill: 'Clear skill',
|
||||
skillBadgeTip: 'Injected full skill playbook: {name}',
|
||||
placeholderWithSkill: 'Skill selected. Type arguments and press Enter',
|
||||
placeholderDefault: "Type a message... (/ for skills, {'@'} to mention)",
|
||||
skillNoMatch: 'No matching skill',
|
||||
@@ -141,6 +142,8 @@ export default {
|
||||
imageTooLarge: 'Image too large (max 10MB), skipped',
|
||||
imageLimit: 'Up to {n} images, extras ignored',
|
||||
imageReadFailed: 'Failed to read image',
|
||||
imageIgnoredWarn: 'Current model does not support images; they will be ignored on send',
|
||||
imageOnlyBlocked: 'Current model does not support images; switch to a vision model or add some text',
|
||||
|
||||
// ── Confirm dialog ──
|
||||
confirmDeleteConversation: 'Delete chat "{title}"? This cannot be undone.',
|
||||
|
||||
@@ -49,6 +49,8 @@ export default {
|
||||
// 对话加载/切换失败反馈(网络抖动/IPC 断开 → 列表空/切换空白,原静默无反馈)
|
||||
loadConvFail: '对话列表加载失败,请检查网络或后端连接',
|
||||
switchConvFail: '对话切换失败,请重试',
|
||||
// UX走查 P3-7/P1-1: 关联会话跳转命中已删会话(原静默新建空会话/分离窗死点击)
|
||||
convDeleted: '会话已删除',
|
||||
// M30:重命名/归档/置顶 IPC 失败反馈(原无 try/catch 异常进 unhandledrejection,用户无感)
|
||||
renameConvFail: '重命名失败,请重试',
|
||||
archiveConvFail: '{action}失败,请重试',
|
||||
@@ -86,11 +88,23 @@ export default {
|
||||
title: '子代理',
|
||||
completed: '已完成',
|
||||
truncated: '已截断',
|
||||
cancelled: '已取消',
|
||||
failed: '失败',
|
||||
// stop_kind 结构化终止原因细分(根治 summary 启发式;截断三态各自透出)
|
||||
truncMaxRounds: '已达轮次上限',
|
||||
truncWallClock: '超时截断',
|
||||
truncTokenBudget: 'token 预算截断',
|
||||
noReport: '未产出报告',
|
||||
// 被拒工具 chip({tools} 为「工具名×次数」枚举,多枚前 2 枚 + N)
|
||||
rejected: '被拒 {tools}',
|
||||
// 启动失败型子代理未落库无轨迹,卡禁点(hover 说明替代 viewHint)
|
||||
noTrace: '无轨迹(启动失败)',
|
||||
meta: '{rounds} 轮 · {tokens} tokens',
|
||||
// S3:完成卡可点击查看只读轨迹(hover 提示)
|
||||
viewHint: '点击查看执行轨迹',
|
||||
},
|
||||
// P3-6 后台会话子代理完成轻提醒({status} 复用上方 agentFinished 状态词,{summary} 截前 40 字)
|
||||
agentFinishedToast: '子代理{status}: {summary}',
|
||||
// S3 子代理轨迹浮层(完成卡点击展开,只读简版渲染,关即弃)
|
||||
agentTrace: {
|
||||
title: '子代理执行轨迹',
|
||||
@@ -100,6 +114,68 @@ export default {
|
||||
roleAssistant: '助手',
|
||||
roleTool: '工具结果',
|
||||
roleSystem: '系统',
|
||||
deniedTool: '被拒:{tool}',
|
||||
riskLow: '低风险',
|
||||
riskMedium: '中风险',
|
||||
riskHigh: '高风险',
|
||||
},
|
||||
// 无人值守安全停靠卡(AiTaskParked,挂起家族终局):继续=重新授权续跑,停止归档=不再续跑
|
||||
taskParked: {
|
||||
title: '任务已停靠',
|
||||
// stop_kind 结构化停止原因(词表后端契约钉死,未知值走 unknownKind 中性兜底)
|
||||
stopKind: {
|
||||
approval_timeout: '审批超时',
|
||||
cancelled: '已取消',
|
||||
circuit_breaker: '熔断保护',
|
||||
stall_breaker: '停滞保护',
|
||||
max_rounds: '已达轮次上限',
|
||||
fatal: '连续失败(重入预算耗尽)',
|
||||
midstream: '响应流中断',
|
||||
},
|
||||
unknownKind: '任务停靠',
|
||||
stopArchive: '停止归档',
|
||||
stoppedToast: '任务已停止,不再续跑',
|
||||
archiveFailed: '停止失败:{msg}',
|
||||
},
|
||||
// 无人值守任务进度(AiTaskProgress,设计 §4.3):TopBar 轻量进度条,静默期可见「在干活」
|
||||
taskProgress: {
|
||||
running: '进行中 · 第 {round}/{max} 轮 · {tokens} tokens',
|
||||
unlimited: '进行中 · 第 {round} 轮 · {tokens} tokens',
|
||||
barHint: '第 {round}/{max} 轮',
|
||||
},
|
||||
// 无人值守边界配置卡(发起时一次授权,存续期生效,随会话同亡)
|
||||
taskBoundary: {
|
||||
toggle: '无人值守',
|
||||
badge: '无人值守边界已授权',
|
||||
riskCeiling: '风险上限',
|
||||
riskLow: '低',
|
||||
riskMedium: '中',
|
||||
dirs: '目录白名单',
|
||||
dirPlaceholder: '输入目录绝对路径',
|
||||
dirAdd: '添加',
|
||||
dirEmpty: '尚未添加目录',
|
||||
forbidDestructive: '破坏性命令恒禁止',
|
||||
budgetToggle: '预算(高级)',
|
||||
budgetRounds: '最大轮次',
|
||||
budgetTokens: '最大 tokens',
|
||||
budgetWallSecs: '挂钟秒数',
|
||||
budgetHint: '留空表示不限',
|
||||
budgetInvalid: '预算需为正整数',
|
||||
confirmSet: '一次授权,任务期内不再打扰',
|
||||
clearBoundary: '清除边界',
|
||||
setOk: '已授权无人值守边界',
|
||||
clearOk: '已清除边界,回到逐次审批',
|
||||
setFail: '边界设置失败:{msg}',
|
||||
lockedGenerating: '任务运行中,仅支持清除边界(收权),字段不可修改',
|
||||
loadFailed: '边界读取失败,当前表单不可信',
|
||||
retryLoad: '重试',
|
||||
dirErrIllegal: '路径含非法字符 < > : " | ? *',
|
||||
dirErrRelative: '请输入绝对路径(如 D:\\projects 或 /home/user)',
|
||||
clearConfirm: '清除边界将立即收回无人值守授权,运行中的任务后续工具调用回到逐次审批。确定清除?',
|
||||
echoRisk: '风险上限 {risk}',
|
||||
echoDirs: '{n} 个目录',
|
||||
echoBudget: '预算 {rounds} 轮 / {tokens} tokens / {secs}s',
|
||||
echoNoBudget: '预算不限',
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -110,6 +110,7 @@ export default {
|
||||
|
||||
// ── 技能 ──
|
||||
clearSkill: '取消技能',
|
||||
skillBadgeTip: '已注入技能「{name}」的完整规程',
|
||||
placeholderWithSkill: '已选技能,输入参数后回车',
|
||||
placeholderDefault: "输入消息...(/ 触发技能,{'@'} 引用实体)",
|
||||
skillNoMatch: '无匹配技能',
|
||||
@@ -142,6 +143,8 @@ export default {
|
||||
imageTooLarge: '图片过大(上限 10MB),已跳过',
|
||||
imageLimit: '最多 {n} 张图片,已忽略多余的',
|
||||
imageReadFailed: '图片读取失败',
|
||||
imageIgnoredWarn: '当前模型不支持图片,发送时图片将被忽略',
|
||||
imageOnlyBlocked: '当前模型不支持图片,请改用视觉模型或补充文字说明',
|
||||
|
||||
// ── 确认弹层 ──
|
||||
confirmDeleteConversation: '确定删除对话「{title}」?该操作不可恢复。',
|
||||
|
||||
Reference in New Issue
Block a user