diff --git a/apps/web/app/components/agent/agent-conversation.tsx b/apps/web/app/components/agent/agent-conversation.tsx index 23d5fbf6..76b2ccca 100644 --- a/apps/web/app/components/agent/agent-conversation.tsx +++ b/apps/web/app/components/agent/agent-conversation.tsx @@ -86,7 +86,7 @@ export const BUDGET_LABEL: Record = { const COMPACT_STATUS: Record = { completed: "已完成", declined: "没有压缩", - aborted: "已中止", + aborted: "已停止", failed: "失败", }; @@ -108,7 +108,7 @@ export function contextLabel(context: string | null): string | null { const first = context.split(" · ")[0] ?? ""; // 前缀里第一段是界面给的名称(「作品:沙丘2」);没有名称时只剩 key=ID,不上屏 if (!first || first.includes("=")) return null; - return first.replace(/^(作品|资源|下载|整理记录|站点|任务|引擎任务)[::]\s*/, ""); + return first.replace(/^(作品|资源|下载|整理记录|站点|任务|引擎任务|后台任务)[::]\s*/, ""); } export function UserMessage({ @@ -289,7 +289,7 @@ export function StepSummary({ const thinking = activity.some((a) => a.kind === "thinking"); const head = current ? `${done ? `${done},` : ""}${runningText(current)}…` - : done || (running ? "思考中…" : thinking ? "想了一下" : "过程说明"); + : done || (running ? "思考中…" : thinking ? "思考过程" : "过程说明"); return (
) : null} @@ -336,7 +336,7 @@ export function InlineApproval({ view, stepTitle }: { view: ApprovalView; stepTi ...(s === "rejected" && reason.trim() ? { reason: reason.trim() } : {}), }, { - onSuccess: () => toast.success(s === "approved" ? "已批准,智能体继续执行" : "已拒绝,智能体按理由调整"), + onSuccess: () => toast.success(s === "approved" ? "已批准,智能体继续执行" : "已拒绝,智能体会调整做法"), onError: (e) => toast.error(errorMessage(e)), }, ); @@ -364,7 +364,7 @@ export function InlineApproval({ view, stepTitle }: { view: ApprovalView; stepTi value={reason} maxLength={2000} aria-label="拒绝理由" - placeholder="理由或建议(可选),智能体按它调整" + placeholder="理由或建议,可不填" onChange={(e) => setReason(e.target.value)} /> ) : null} diff --git a/apps/web/app/components/agent/agent-run-panel.tsx b/apps/web/app/components/agent/agent-run-panel.tsx index a980c690..5cc0937b 100644 --- a/apps/web/app/components/agent/agent-run-panel.tsx +++ b/apps/web/app/components/agent/agent-run-panel.tsx @@ -119,7 +119,7 @@ export function GoalComposer({ maxRows={10} maxLength={4000} aria-label="目标" - placeholder="例如:把沙丘:第二部的 4K 收进来" + placeholder="例如:下载沙丘 2 的 4K 版本" submitLabel={pending ? "提交中" : "开始"} commands={NEW_RUN_COMMANDS} context={context} @@ -491,7 +491,7 @@ export function AgentRunPanel({ maxRows={6} maxLength={8000} aria-label="发消息" - placeholder={ended ? "接着说,输入 / 看指令" : "补充或纠正"} + placeholder={ended ? "继续对话,输入 / 查看指令" : "补充或纠正"} commands={RUN_COMMANDS} /> @@ -499,13 +499,13 @@ export function AgentRunPanel({ abort.mutateAsync(r.id).then( - () => toast.success("已请求停止"), + () => toast.success("正在停止"), (e) => { toast.error(errorMessage(e)); throw e; diff --git a/apps/web/app/components/agent/agent-session-list.tsx b/apps/web/app/components/agent/agent-session-list.tsx index ea4e37ca..b0436f33 100644 --- a/apps/web/app/components/agent/agent-session-list.tsx +++ b/apps/web/app/components/agent/agent-session-list.tsx @@ -380,7 +380,7 @@ export function AgentSessionList({ ? "没有等你处理的会话" : "没有符合条件的会话" : f.group === "auto" - ? "还没有巡检会话,巡检到点后会出现在这里" + ? "还没有巡检会话" : "还没有会话,写一个目标开始" } /> diff --git a/apps/web/app/components/agent/agent-session-ui.test.ts b/apps/web/app/components/agent/agent-session-ui.test.ts index 18bac1ba..1572e344 100644 --- a/apps/web/app/components/agent/agent-session-ui.test.ts +++ b/apps/web/app/components/agent/agent-session-ui.test.ts @@ -245,7 +245,7 @@ describe("拒绝:缩成一行", () => { it("授权拒绝 → 需要你批准 + [批准并重试];白名单拦截没有按钮", () => { expect(deniedReason(denied)).toEqual({ text: "需要你批准", approvable: true }); expect(deniedReason(call({ status: "denied", reason: "不在白名单" }))).toEqual({ - text: "本次没有开放", + text: "这次会话没开放这个能力", approvable: false, }); const t = text( @@ -529,7 +529,7 @@ describe("实际结果行(FIX-9):只列系统核实的事实", () => { const html = render( createElement(ResultLine, { run: RUN, report: done, live: withText("提交了 2 个下载,整理了 1 个。") }), ); - expect(text(html).replace(/\s*、\s*/g, "、")).toContain("提交了 2 个下载、完成 1 次整理、1 个还在进行 · 41 秒"); + expect(text(html).replace(/\s*、\s*/g, "、")).toContain("提交了 2 个下载、完成 1 次整理、1 个进行中 · 41 秒"); expect(html).toContain(`href="/console/organize/${ID(3)}"`); expect(html).toContain('href="/console/downloads"'); expect(html).not.toContain("与汇报不一致"); diff --git a/apps/web/app/components/agent/agent-store.ts b/apps/web/app/components/agent/agent-store.ts index 3a21c58d..129d332f 100644 --- a/apps/web/app/components/agent/agent-store.ts +++ b/apps/web/app/components/agent/agent-store.ts @@ -180,7 +180,7 @@ export function contextFromPath(pathname: string): AgentContext | null { case "organize": return { label: `整理记录 ${short}`, recordId: id, fromPath: true }; case "engine": - return { label: `引擎任务 ${short}`, taskId: id, fromPath: true }; + return { label: `后台任务 ${short}`, taskId: id, fromPath: true }; default: return null; } diff --git a/apps/web/app/components/agent/agent-subagent-tree.tsx b/apps/web/app/components/agent/agent-subagent-tree.tsx index 746c5d96..0b8ffab9 100644 --- a/apps/web/app/components/agent/agent-subagent-tree.tsx +++ b/apps/web/app/components/agent/agent-subagent-tree.tsx @@ -46,9 +46,9 @@ function budgetText(b: Record) { const parts: string[] = []; if (b.maxToolCalls !== undefined) parts.push(`${b.maxToolCalls} 次调用`); if (b.maxTokens !== undefined) parts.push(`${tokens(b.maxTokens)} token`); - if (b.maxDurationSec !== undefined) parts.push(`${b.maxDurationSec}s`); + if (b.maxDurationSec !== undefined) parts.push(`${b.maxDurationSec} 秒`); if (b.maxCostUsd !== undefined) parts.push(`$${b.maxCostUsd}`); - return parts.length ? parts.join(" · ") : "沿用设置"; + return parts.length ? parts.join(" · ") : "沿用默认"; } function Node({ node, byParent, depth }: { node: AgentRunNode; byParent: Map; depth: number }) { @@ -119,7 +119,7 @@ export function SubagentTree({ snapshot, className }: { snapshot: RunSnapshot; c

{shortGoalTitle(parent.goal)}

- 第 {run.depth} 层子会话 · 继承父会话的发起人与授权上限 · 能力 {caps} 项(⊆ 父会话)· 划拨预算{" "} + 第 {run.depth} 层子会话 · 权限不超过父会话 · 可用能力 {caps} 项 · 预算{" "} {budgetText(run.budget as Record)} {run.spawnReason ? ` · 理由:${run.spawnReason}` : ""}

@@ -129,7 +129,7 @@ export function SubagentTree({ snapshot, className }: { snapshot: RunSnapshot; c

- 子会话 {children.length} 个{familyUsage ? : null} + {children.length} 个子会话{familyUsage ? : null}

    {direct.map((c) => ( @@ -143,5 +143,5 @@ export function SubagentTree({ snapshot, className }: { snapshot: RunSnapshot; c } function FamilyUsage({ usage }: { usage: AgentFamilyUsage }) { - return 会话树合计 {usageLine(usage)}; + return 合计 {usageLine(usage)}; } diff --git a/apps/web/app/components/agent/conversation-model.ts b/apps/web/app/components/agent/conversation-model.ts index 73e47080..9e30c96b 100644 --- a/apps/web/app/components/agent/conversation-model.ts +++ b/apps/web/app/components/agent/conversation-model.ts @@ -29,7 +29,7 @@ export function authDenial(call: Pick) /** 被服务端拒绝(白名单拦截或授权校验失败) */ export const isDenied = (call: ToolCallView) => call.status === "denied" || authDenial(call) !== null; -/** 拒绝的一行说明:需要批准 / 本次没有开放 / 次数用完 */ +/** 拒绝的一行说明:需要批准 / 这次会话没开放 / 次数用完 */ export function deniedReason(call: ToolCallView): { text: string; approvable: boolean } { const auth = authDenial(call); if (auth) { @@ -37,8 +37,8 @@ export function deniedReason(call: ToolCallView): { text: string; approvable: bo if (/自动化总开关|只读对账/.test(auth)) return { text: "自动执行已关闭", approvable: false }; return { text: "需要你批准", approvable: true }; } - if (call.reason && /预算|次数/.test(call.reason)) return { text: "调用次数用完了", approvable: false }; - return { text: "本次没有开放", approvable: false }; + if (call.reason && /预算|次数/.test(call.reason)) return { text: "工具调用次数已用完", approvable: false }; + return { text: "这次会话没开放这个能力", approvable: false }; } // ── 进度行的人话计数 ── diff --git a/apps/web/app/components/agent/quick-goals.ts b/apps/web/app/components/agent/quick-goals.ts index 381b5577..611f12aa 100644 --- a/apps/web/app/components/agent/quick-goals.ts +++ b/apps/web/app/components/agent/quick-goals.ts @@ -30,7 +30,7 @@ const RULES: Rule[] = [ }, { match: /^\/console\/organize/, - goals: ["识别需要处理的整理记录里的作品", "这次整理为什么有文件失败", "把失败的文件重新整理一遍"], + goals: ["识别整理记录里没识别出的作品", "这次整理为什么有文件失败", "把失败的文件重新整理一遍"], }, { match: /^\/console\/files/, diff --git a/apps/web/app/components/agent/tool-call-card-io.tsx b/apps/web/app/components/agent/tool-call-card-io.tsx index ac98244c..8c04c96e 100644 --- a/apps/web/app/components/agent/tool-call-card-io.tsx +++ b/apps/web/app/components/agent/tool-call-card-io.tsx @@ -66,7 +66,7 @@ function ToolCallIoSheet({ call, onClose }: { call: ToolCallView; onClose: () => {input.truncated || output.truncated ? ( -

    事件流只保存 500 字符以内的摘要,超出部分已截断。

    +

    只保存前 500 个字符,其余已截断。

    ) : null} {tools.isPending ? ( @@ -76,7 +76,7 @@ function ToolCallIoSheet({ call, onClose }: { call: ToolCallView; onClose: () => ) : tool ? ( ) : ( -

    这个能力没有注册,没有 schema。

    +

    这个能力未注册,没有 schema。

    )}
    {tool ? ( diff --git a/apps/web/app/components/agentui/approval-card.tsx b/apps/web/app/components/agentui/approval-card.tsx index 3adcecfa..259c83b7 100644 --- a/apps/web/app/components/agentui/approval-card.tsx +++ b/apps/web/app/components/agentui/approval-card.tsx @@ -20,7 +20,7 @@ export type ApprovalCardStatus = | "consumed"; const LABEL: Record = { - pending: "待批准", + pending: "等你批准", submitting: "提交中", approved: "已批准", rejected: "已拒绝", diff --git a/apps/web/app/components/agentui/code-block.tsx b/apps/web/app/components/agentui/code-block.tsx index 3e1c388d..c6be4bb3 100644 --- a/apps/web/app/components/agentui/code-block.tsx +++ b/apps/web/app/components/agentui/code-block.tsx @@ -101,7 +101,7 @@ export function CodeBlock({ ) : ( )} - {streaming ? "输出中" : "完整"} + {streaming ? "输出中" : "已完成"} {copyable ? (