From 0338037a96c6755caf524c94a91cb06b4787ec37 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 7 Oct 2026 01:49:33 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E6=96=87=E6=A1=88(=E9=A6=96=E9=A1=B5):?= =?UTF-8?q?=E5=88=86=E8=8A=82=E6=A0=87=E9=A2=98=E6=94=B9=E3=80=8C=E8=BF=9B?= =?UTF-8?q?=E8=A1=8C=E4=B8=AD=20/=20=E9=9C=80=E8=A6=81=E4=BD=A0=E5=A4=84?= =?UTF-8?q?=E7=90=86=E3=80=8D,=E4=B8=8B=E8=BD=BD=E5=99=A8=E5=8D=A1?= =?UTF-8?q?=E7=89=87=E8=AF=B4=E6=98=8E=E6=8C=89=E5=AE=9E=E9=99=85=E5=8F=A3?= =?UTF-8?q?=E5=BE=84=E9=87=8D=E5=86=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01Cxwgnn2pbzQ7rXv3rq7fei --- .../app/components/dashboard/home-runtime.tsx | 12 ++++++------ apps/web/app/routes/console/home.tsx | 16 ++++++++-------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/apps/web/app/components/dashboard/home-runtime.tsx b/apps/web/app/components/dashboard/home-runtime.tsx index 304a5576..d486df44 100644 --- a/apps/web/app/components/dashboard/home-runtime.tsx +++ b/apps/web/app/components/dashboard/home-runtime.tsx @@ -171,7 +171,7 @@ function RuntimeOverview({ downloaders }: { downloaders?: Dashboard["sources"]["

) : ( - + )} ); @@ -192,18 +192,18 @@ function DownloaderOverview({ downloaders }: { downloaders?: Dashboard["sources" downloaders ?? instances.map((d) => ({ id: d.instanceId, name: d.name, enabled: true, health: "unknown", lastSeenAt: null })); return ( - + {q.isPending ? ( ) : q.isError ? ( q.refetch()} className="py-6" /> ) : !sources.length ? ( - + ) : ( <>

{board?.counts.active} - 项进行中 + 个下载进行中

    {sources.map((d) => { @@ -245,10 +245,10 @@ function DownloaderOverview({ downloaders }: { downloaders?: Dashboard["sources" })}

- 进行中含等待计划、暂停和异常任务 · 速度含下载器全部任务 + 进行中包括还没提交、已暂停和出错的下载 · 速度是下载器里全部任务的合计

{board?.liveAt ? ( -

速度采样于 {formatRelative(board.liveAt)}

+

速度更新于 {formatRelative(board.liveAt)}

) : null} )} diff --git a/apps/web/app/routes/console/home.tsx b/apps/web/app/routes/console/home.tsx index ec0d0e35..4bf2d276 100644 --- a/apps/web/app/routes/console/home.tsx +++ b/apps/web/app/routes/console/home.tsx @@ -121,7 +121,7 @@ function StatusLine({ d }: { d: Dashboard }) { await update.mutateAsync({ automation: { enabled } }); toast.success(enabled ? "自动化已恢复" : "自动化已暂停"); } catch (err) { - toast.error(errorMessage(err, "切换失败")); + toast.error(errorMessage(err, enabled ? "恢复失败" : "暂停失败")); throw err; } }; @@ -217,11 +217,11 @@ function Busy({ w }: { w: Dashboard["currentWork"] }) { ]); const empty = !downloads.length && !agents.length && !runs.length; return ( -
+
{running.isPending && !downloads.length ? ( ) : empty ? ( - + ) : (
    {downloads.map((t) => ( @@ -263,11 +263,11 @@ function NeedsMe() { const q = useAttention(); const rows = attentionRows(q.data); return ( -
    +
    {q.isPending ? ( ) : rows.length === 0 ? ( - + ) : ( )} @@ -282,7 +282,7 @@ function RecentImports({ d }: { d: Dashboard }) { return (
    {rows.length === 0 ? ( - + ) : (
      {rows.map((r) => ( @@ -294,7 +294,7 @@ function RecentImports({ d }: { d: Dashboard }) { {r.title ?? r.targetPath?.split("/").pop() ?? "未关联作品"} {r.status === "partial" ? ( - {r.counts.succeeded}/{r.counts.total} 个文件已整理 + 已整理 {r.counts.succeeded}/{r.counts.total} 个文件 ) : null} @@ -303,7 +303,7 @@ function RecentImports({ d }: { d: Dashboard }) { ))}
    )} - {today ?

    今天整理 {today} 个文件

    : null} + {today ?

    今天已整理 {today} 个文件

    : null}
    ); } From 775d1589e44e9e4f33c60439af35758d7d998fda Mon Sep 17 00:00:00 2001 From: root Date: Wed, 7 Oct 2026 01:49:33 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E6=96=87=E6=A1=88(=E6=99=BA=E8=83=BD?= =?UTF-8?q?=E4=BD=93):=E5=81=9C=E6=AD=A2=20/=20=E6=96=B9=E6=A1=88=20/=20?= =?UTF-8?q?=E5=AD=90=E4=BC=9A=E8=AF=9D=20/=20=E5=8E=8B=E7=BC=A9=E4=B8=8A?= =?UTF-8?q?=E4=B8=8B=E6=96=87=E7=AD=89=E6=8C=89=E6=9C=AF=E8=AF=AD=E8=A1=A8?= =?UTF-8?q?=E4=B8=8E=20human-copy=20=E9=87=8D=E5=86=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01Cxwgnn2pbzQ7rXv3rq7fei --- .../components/agent/agent-conversation.tsx | 22 +++++++++---------- .../web/app/components/agent/agent-drawer.tsx | 10 ++++----- .../components/agent/agent-interaction.tsx | 10 ++++----- .../app/components/agent/agent-run-panel.tsx | 12 +++++----- .../components/agent/agent-session-list.tsx | 2 +- .../components/agent/agent-session-ui.test.ts | 4 ++-- apps/web/app/components/agent/agent-store.ts | 2 +- .../components/agent/agent-subagent-tree.tsx | 10 ++++----- .../components/agent/conversation-model.ts | 6 ++--- apps/web/app/components/agent/quick-goals.ts | 2 +- .../components/agent/tool-call-card-io.tsx | 4 ++-- .../app/components/agentui/approval-card.tsx | 2 +- .../web/app/components/agentui/code-block.tsx | 2 +- apps/web/app/components/agentui/todo-list.tsx | 4 ++-- .../app/components/agentui/tool-approval.tsx | 4 ++-- apps/web/app/routes/console/agent.$runId.tsx | 2 +- 16 files changed, 49 insertions(+), 49 deletions(-) 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 ? (