diff --git a/packages/client/ui-tool/README.i18n.yaml b/packages/client/ui-tool/README.i18n.yaml index bd11e79708..433db2d7b9 100644 --- a/packages/client/ui-tool/README.i18n.yaml +++ b/packages/client/ui-tool/README.i18n.yaml @@ -2,5 +2,5 @@ # side as of the last confirmed-consistent state. Both languages carry equal authority; # after editing either side, bring the other along and re-record with: # pnpm run verify-translation-pairing --write packages/client/ui-tool/README.md -README.md: 4964828126d426fe6f8491a2526de09aa1fbef5d -README.zh.md: 5c8f9b0ac53ec1e1180010a1f63333001b2a0d39 +README.md: 38cee0071c41178199604819608e32c0e846cc41 +README.zh.md: f2ef384b8fe5e5948a74dd9796fcae3077ac2094 diff --git a/packages/client/ui-tool/README.md b/packages/client/ui-tool/README.md index 4964828126..38cee0071c 100644 --- a/packages/client/ui-tool/README.md +++ b/packages/client/ui-tool/README.md @@ -66,7 +66,7 @@ Every card is read in place in the call tree; there is no second, full-height pr The Details view covers the 36 registered tools: goal and schedule tools, Cordis inspection, workflow and Ralph reports, Session event/search/trace queries, agent and teammate controls, background jobs, persistent terminals, and LSP navigation. These expanded bodies read successful logged results, preserve generic input/output for failures or unsupported data, and keep Inspect available. Dates include the viewer's time zone, and statuses reflect the call result rather than current session state. The browser adapter consumes recorded producer text and JSON; Host service objects and presenter callbacks do not cross into the Client. [Compact tool details](../../../.agents/notes/implemented/architecture/2026-09-10-compact-tool-details.md) records the presentation trade-offs. -Expanded status dots and labels use static semantic colors. An interruption receipt confirms only that interruption was requested. +Expanded status dots and labels use static semantic colors. Receipt and job-output headers keep neutral text and omit the status while expanded. An interruption receipt confirms only that interruption was requested. The terminal model uses `hasSpillNotice` from the browser-safe `@deepseek-ai/dsh-spill-policy/notice` entry, not an independent UI pattern. The [spill-policy README](../../spill/spill-policy/README.md#shared-notice-ownership) owns notice formatting and recognition. This check conservatively selects generic output; matching text cannot authenticate its source, and replay leaves recorded result bytes untouched. diff --git a/packages/client/ui-tool/README.zh.md b/packages/client/ui-tool/README.zh.md index 5c8f9b0ac5..f2ef384b8f 100644 --- a/packages/client/ui-tool/README.zh.md +++ b/packages/client/ui-tool/README.zh.md @@ -66,7 +66,7 @@ owner 载荷为 `ToolCallOwnerProps`:`callId`、`toolName`、冻结的 `block` Details 视图覆盖已注册的 36 个工具:目标和定时任务工具、Cordis 检查、workflow 与 Ralph 报告、Session 事件/搜索/轨迹查询、Agent 与 teammate 控制、后台作业、持久终端以及 LSP 导航。展开内容读取成功的记录结果,为失败或不支持的数据保留通用输入/输出,并保留 Inspect。日期包含查看者的时区,状态反映调用结果而非当前会话状态。浏览器适配器消费已记录的 producer 文本与 JSON;Host service 对象和 presenter 回调不会进入 Client。[紧凑工具详情](../../../.agents/notes/implemented/architecture/2026-09-10-compact-tool-details.zh.md)记录了呈现取舍。 -展开后的状态圆点和文字使用静态语义色。中断回执仅确认已发出中断请求。 +展开后的状态圆点和文字使用静态语义色。操作回执和任务输出的标题保持中性色,展开时省略标题中的状态。中断回执仅确认已发出中断请求。 terminal model 使用浏览器安全入口 `@deepseek-ai/dsh-spill-policy/notice` 的 `hasSpillNotice`,而非独立的 UI 匹配规则。[spill-policy README](../../spill/spill-policy/README.zh.md#shared-notice-ownership) 负责提示文本的格式化与识别。该检查保守地选择通用输出;匹配的文本无法证明其来源,回放也不改变已记录的结果字节。 diff --git a/packages/client/ui-tool/src/client/tool/components/ToolDetails.tsx b/packages/client/ui-tool/src/client/tool/components/ToolDetails.tsx index 64b593a9b6..b6bac6af4a 100644 --- a/packages/client/ui-tool/src/client/tool/components/ToolDetails.tsx +++ b/packages/client/ui-tool/src/client/tool/components/ToolDetails.tsx @@ -26,6 +26,8 @@ export interface ToolDetailItem { export interface ToolDetailsModel { items: readonly ToolDetailItem[] summary?: string + /** Header text while expanded, omitting a receipt status shown in the body. */ + expandedSummary?: string empty?: string caption?: string unchanged?: { label: string; items: ToolDetailsModel['items'] } diff --git a/packages/client/ui-tool/src/client/tool/components/ToolRow.tsx b/packages/client/ui-tool/src/client/tool/components/ToolRow.tsx index 9a67b36ff6..d86f730e0f 100644 --- a/packages/client/ui-tool/src/client/tool/components/ToolRow.tsx +++ b/packages/client/ui-tool/src/client/tool/components/ToolRow.tsx @@ -167,7 +167,7 @@ export function ToolRow({ const status = stateStatus(state, t) // A failure must replace, not supplement, the normal summary. const failureLine = state === 'error' ? errorSummary ?? null : null - const summaryText = failureLine ?? terminalBody?.description ?? summary + const summaryText = failureLine ?? terminalBody?.description ?? (open ? detailsBody?.expandedSummary ?? summary : summary) // A diff row's collapsed line carries the card's +/- totals (the same // numbers the expanded footer prints) so the change size reads without // expanding; an explicit summarySuffix (none today on diff rows) wins. diff --git a/packages/client/ui-tool/src/client/tool/models/control-details-model.ts b/packages/client/ui-tool/src/client/tool/models/control-details-model.ts index d869070431..830d16be36 100644 --- a/packages/client/ui-tool/src/client/tool/models/control-details-model.ts +++ b/packages/client/ui-tool/src/client/tool/models/control-details-model.ts @@ -13,7 +13,10 @@ function arg(args: Record, key: string): string { } function receipt(title: string, badge: NonNullable, t: DetailTranslate, fields: DetailItem['fields'] = [], description?: string): ToolDetailsModel { - return detailList([{ title, badge, fields, ...(description === undefined ? {} : { description }) }], `${title} · ${badge.label}`, t) + return { + ...detailList([{ title, badge, fields, ...(description === undefined ? {} : { description }) }], `${title} · ${badge.label}`, t), + expandedSummary: title, + } } function agentList(text: string, t: DetailTranslate): ToolDetailsModel | null { @@ -161,7 +164,10 @@ export function controlDetails(name: string, args: Record, text const code = truncated ? output.slice(0, -OUTPUT_TRUNCATED.length) : output const description = [match[2], truncated ? t('detail.output.truncated') : undefined] .filter((value): value is string => value !== undefined).join(' · ') - return detailList([{ title: target, badge: detailBadge(match[1], t), fields: [], ...(description === '' ? {} : { description }), code: { text: code } }], `${target} · ${detailBadge(match[1], t).label}`, t) + return { + ...detailList([{ title: target, badge: detailBadge(match[1], t), fields: [], ...(description === '' ? {} : { description }), code: { text: code } }], `${target} · ${detailBadge(match[1], t).label}`, t), + expandedSummary: target, + } } case 'job_kill': if (text === `requested cancellation of job ${target}`) return receipt(target, { label: t('detail.receipt.cancel'), tone: 'warning' }, t, [], arg(args, 'reason')) diff --git a/snapshots/web/tool-details/ui.expected.md b/snapshots/web/tool-details/ui.expected.md index e1cb9d408e..c65a66730e 100644 --- a/snapshots/web/tool-details/ui.expected.md +++ b/snapshots/web/tool-details/ui.expected.md @@ -408,9 +408,9 @@ - text: deepseek/deepseek-reasoner - paragraph: DeepSeek Reasoner - button "Inspect" -- button "Delegate task 检查工具卡片布局,并列出三个最值得改进的地方。 · Started" [expanded]: +- button "Delegate task 检查工具卡片布局,并列出三个最值得改进的地方。" [expanded]: - img - - text: Delegate task 检查工具卡片布局,并列出三个最值得改进的地方。 · Started + - text: Delegate task 检查工具卡片布局,并列出三个最值得改进的地方。 - text: Recorded result - list: - listitem: @@ -442,18 +442,18 @@ - term: Depth - definition: "2" - button "Inspect" -- button "Send message agent-demo-review · Message delivered" [expanded]: +- button "Send message agent-demo-review" [expanded]: - img - - text: Send message agent-demo-review · Message delivered + - text: Send message agent-demo-review - text: Recorded result - list: - listitem: - text: agent-demo-review Message delivered - paragraph: 请优先检查窄屏下的任务差异列表。 - button "Inspect" -- button "Interrupt agent agent-demo-review · Interrupt requested" [expanded]: +- button "Interrupt agent agent-demo-review" [expanded]: - img - - text: Interrupt agent agent-demo-review · Interrupt requested + - text: Interrupt agent agent-demo-review - text: Recorded result - list: - listitem: agent-demo-review Interrupt requested @@ -476,9 +476,9 @@ - term: Type - definition: terminal - button "Inspect" -- button "Read job output job-demo-build · Running" [expanded]: +- button "Read job output job-demo-build" [expanded]: - img - - text: Read job output job-demo-build · Running + - text: Read job output job-demo-build - text: Recorded result - list: - listitem: @@ -486,9 +486,9 @@ - button "Copy" - code: Building client assets… ✓ 184 modules transformed. dist/index.js 92.4 kB - button "Inspect" -- button "Cancel background job job-demo-preview · Cancellation requested" [expanded]: +- button "Cancel background job job-demo-preview" [expanded]: - img - - text: Cancel background job job-demo-preview · Cancellation requested + - text: Cancel background job job-demo-preview - text: Recorded result - list: - listitem: @@ -543,9 +543,9 @@ - term: Exit code - definition: "0" - button "Inspect" -- button "Signal terminal terminal-demo-1 · Signal delivered" [expanded]: +- button "Signal terminal terminal-demo-1" [expanded]: - img - - text: Signal terminal terminal-demo-1 · Signal delivered + - text: Signal terminal terminal-demo-1 - text: Recorded result - list: - listitem: @@ -555,9 +555,9 @@ - term: Process group - definition: "43120" - button "Inspect" -- button "Close terminal terminal-demo-1 · Closed" [expanded]: +- button "Close terminal terminal-demo-1" [expanded]: - img - - text: Close terminal terminal-demo-1 · Closed + - text: Close terminal terminal-demo-1 - text: Recorded result - list: - listitem: terminal-demo-1 Closed @@ -661,9 +661,9 @@ - term: Context - definition: fresh - button "Inspect" -- button "Send message ui-review · Message delivered" [expanded]: +- button "Send message ui-review" [expanded]: - img - - text: Send message ui-review · Message delivered + - text: Send message ui-review - text: Recorded result - list: - listitem: @@ -773,16 +773,16 @@ - listitem: - paragraph: task-demo-1 - button "Inspect" -- button "Wait for teammates Teammate activity · Change detected" [expanded]: +- button "Wait for teammates Teammate activity" [expanded]: - img - - text: Wait for teammates Teammate activity · Change detected + - text: Wait for teammates Teammate activity - text: Recorded result - list: - listitem: Teammate activity Change detected - button "Inspect" -- button "Interrupt agent ui-review · Interrupt requested" [expanded]: +- button "Interrupt agent ui-review" [expanded]: - img - - text: Interrupt agent ui-review · Interrupt requested + - text: Interrupt agent ui-review - text: Recorded result - list: - listitem: