mirror of
https://github.com/ThearchyHelios/AgentLab.git
synced 2026-11-23 14:11:58 +00:00
界面文案整改:口语改书面、术语统一、不再露出实现细节;修掉几处说错的提示;新增文案检查防回潮
一、文案(前端约 1600 处,后端传到界面的约 880 处) - 术语统一:工作流层面用「运行」(继续运行、重新运行、试运行),节点和工具层面用「执行」,不再用「跑」; 总时长 / 执行时长 / 等待审批;服务端;助手;Agent;token;工作流;固定版本;模型接入;系统提示;批准 / 驳回;受管级别 - 口语改书面:取不到、没取回来、读不懂、连不上、多半、照样、兜底、揉成这类说法改成「无法 / 未能 / 失败 / 请」;去掉拟人写法 - 不再露出实现细节:界面上不写 checkpoint、同一拍、哈希(凭证处除外),不写改版历史(「以前…」「老数据」); 报错、校验、门禁、自动修复里裸写的配置键名和枚举值换成界面上的中文标签,由新的 backend/app/engine/labels.py 统一提供; 发布弹窗里结论句的选项不再是 off / require_citation - 同一件事只留一种说法:生成阶段文案、出具档位说明、画布锁定提示各合成一份 - 去掉界面上的工业场景示例(MES、ERP、「张工」「王工」)和真实产品名,换成通用示例 二、说错的提示(都有测试证明) - 数据库测连接失败时的专用提示以前从不出现(按报错文字全等比较,永远比不上):改为按错误类型判断,不再拼出重复的前缀 - 「设置 → 供应商」改指「设置 → 模型接入」;「在设置里建数据源」改指「数据」页 - 缺少 API Key、模型接入已停用的报错不再夹英文,写明去哪里填 - 两处原因说错(「这种引用在后续版本支持」「这一版还不支持」)改成真实原因 - 节点说明里不准确的说法改正:代码节点在 microVM 或系统沙箱中执行;报告撰写、口径卡的说明不再说过头 - 导出的证据 CSV 里两列同名,第三列改为「片段编号」 三、前后端对齐 - 前端按后端原文识别日志、报错的地方,新旧两种写法都认得(历史运行里存的是旧文字),逐条补了新旧原文的核对 - 后端交回模型的原指令放进单独的 for_model 字段,前端在解析响应时去掉,不会显示到界面上 四、检查 - 检查脚本里按原文匹配的断言改成新文案;改完会变成永远成立的反向断言逐条修正,并做了变异验证 - 新增 check-copy(静态扫描前端界面字符串和后端上界面的文案):再出现「跑」「后端」「多半」「令牌」、 界面上的 Copilot、裸写的配置键名、半角标点等就报错;确需保留的写进 scripts/copy-allow.json 并注明理由
This commit is contained in:
@@ -134,7 +134,7 @@ const REVIEW_BROKEN_TURN: StreamTurn = {
|
||||
signals: [
|
||||
{ kind: "tool_error", severity: "broken",
|
||||
detail: "工具 db_query__shop 调用失败:no such table: merchant_account" },
|
||||
{ kind: "step_limit", severity: "broken", detail: "agent 用满了 8 步还没给出结论" },
|
||||
{ kind: "step_limit", severity: "broken", detail: "Agent 已用完 8 步上限,仍未给出结论" },
|
||||
],
|
||||
},
|
||||
output: { answer: "大约 5 个左右。" },
|
||||
@@ -150,7 +150,7 @@ const REVIEW_DEGRADED_TURN: StreamTurn = {
|
||||
answer: null,
|
||||
signals: [
|
||||
{ kind: "retrieve_degraded", severity: "degraded",
|
||||
detail: "重排结果解析不出来,按初筛顺序返回" },
|
||||
detail: "重排失败,已按初筛顺序返回" },
|
||||
],
|
||||
},
|
||||
output: { answer: "只有平台管理员可以修改他人权限,且需要走角色变更流程。" },
|
||||
@@ -339,7 +339,7 @@ function synthetic(name: string): StreamTurn[] {
|
||||
}
|
||||
case 'copilot':
|
||||
return [{ id: 'copilot', question: '做一个每天的出勤日报', phase: 'done',
|
||||
status: '已放到画布,但还有 2 处问题要你处理',
|
||||
status: '已应用到画布,仍有 2 处问题待处理',
|
||||
steps: decodeCopilot(COPILOT_STUCK, { context: 'canvas' }) }]
|
||||
case 'codes':
|
||||
// 编号、分组长得像数:'1063'、'001'。它们不该右对齐,也不该出「按 attribute_group 从高到低排」
|
||||
@@ -368,7 +368,7 @@ function synthetic(name: string): StreamTurn[] {
|
||||
output: { 结论: ev[ev.length - 1].data.output.结论, _issuance: {
|
||||
tier: 'degraded', calibers: [], metrics_checked: 0, matched_numbers: 0, unmatched_numbers: [],
|
||||
missing_required: [], missing_expected: [],
|
||||
gaps: ['协作团队「销售分析团队」用完 2 轮仍未完成,交来的是成员最后的原话'] } },
|
||||
gaps: ['协作团队「销售分析团队」用完 2 轮仍未完成,交付的是成员最后的回复'] } },
|
||||
runId: 'syn-exhausted-degrade', runClass: 'exploratory' }]
|
||||
}
|
||||
case 'exhausted-closing': {
|
||||
@@ -384,14 +384,14 @@ function synthetic(name: string): StreamTurn[] {
|
||||
}
|
||||
case 'timeout':
|
||||
return [{ id: 'timeout', question: '把订单明细全拉出来', phase: 'error', steps: decodeRun(timeoutRun('done')),
|
||||
runId: 'syn-timeout', error: { error: '查询超过 30s 没有返回,已放弃等待(数据库那边可能还在跑,连接会在后台收回)。加上 WHERE 条件或 LIMIT 缩小范围再查' } }]
|
||||
runId: 'syn-timeout', error: { error: '查询超过 30 秒没有返回,已停止等待(数据库可能仍在执行,连接会在后台回收)。请添加 WHERE 条件或 LIMIT 缩小范围后重试' } }]
|
||||
case 'abandoned':
|
||||
return [{ id: 'abandoned', question: '把这份报表发出去', phase: 'done', statusCode: 'cancelled',
|
||||
steps: decodeRun(abandonedRun()), runId: 'syn-abandoned' }]
|
||||
case 'structured':
|
||||
// 页面已经把报错拆好了(问数据页的 Failure):照原样画,不再翻译一遍
|
||||
return [{ id: 'structured', question: '上周各区域订单数', phase: 'error', steps: [],
|
||||
error: { title: '操作超时', reason: '查询超时:数据库 90 秒没有返回', hint: '缩小时间范围后点「重试这一轮」',
|
||||
error: { title: '操作超时', reason: '查询超时:数据库 90 秒没有返回', hint: '缩小时间范围后点击「重试本轮」',
|
||||
detail: 'OperationalError: (3024) maximum statement execution time exceeded' } }]
|
||||
case 'restored':
|
||||
// 从库里恢复的一轮:没有事件,查询次数由页面从落库的 meta 带过来
|
||||
@@ -488,8 +488,8 @@ function Preview() {
|
||||
const empty = (
|
||||
<StreamEmpty
|
||||
icon={<MessageSquare size={22} />}
|
||||
title="问点什么"
|
||||
hint="它会自己接数据源、写查询、跑完给结论——你不用碰画布"
|
||||
title="问你的数据"
|
||||
hint="用一句话描述需求,助手会自动连接数据源、编写查询并给出结论,无需操作画布"
|
||||
/>
|
||||
)
|
||||
|
||||
@@ -514,7 +514,7 @@ function Preview() {
|
||||
onStepHover={params.get('link') === '1' ? (id) => { (window as any).__hovered = id } : undefined}
|
||||
onStepFocus={params.get('link') === '1' ? (id) => { linked.push(id) } : undefined}
|
||||
renderTurnActions={(t) => (t.phase === 'error'
|
||||
? <button type="button" className="btn btn-xs"><RotateCw size={11} aria-hidden /> 重试这一轮</button>
|
||||
? <button type="button" className="btn btn-xs"><RotateCw size={11} aria-hidden /> 重试本轮</button>
|
||||
: null)}
|
||||
onFollowUp={(q) => { (window as any).__followUp = q }}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user