deepseek-harness/packages/client
Chinesezjc 5081697aaf feat(web): render bash tool output as a terminal card
The bash tool already declares the `card: 'terminal'` render intent for
both its call and its result, and host/connection/runtime already deliver
it to the browser as callView/resultView. The Web client ignored it:
rows derived from raw args, and the details panel flattened every tool's
content into one soft-wrapping `<pre>`. Column-aligned output folded into
a paragraph and a long listing stretched the panel without bound.

`TerminalBlock` (ui-primitives) renders a command as a terminal surface:
a shortened-cwd prompt line, output at `white-space: pre` in a
horizontally scrolling box, a head/tail height cap with an expand
control, an exit-code/signal status pill, and a copy control for the raw
output. ANSI SGR runs are parsed with `anser` and resolved onto `--dsw-*`
theme tokens, with literal rgb kept for values the design system has no
token for. Geometry and fonts mirror CodeBlock; the clipboard write both
need moved into a package-internal `clipboard.ts`.

Both Web render sites for a bash call consume the intent through one
derivation (`terminal-card-model.ts`), so they cannot disagree about a
command, its cwd, or its exit status: the keyed BashRow carries the card
resident below its summary row, and the render-site fallback row keeps it
behind its existing expand control. Rows cap at 8 lines against the
panel's 16.

Inline output in the chat row reverses this package's stated
no-inline-output convention, on the owner's explicit decision; the Agent
Note records the reversal and its bound.

Tests: TerminalBlock/ansi/clipboard unit specs, ui-conversation wiring
specs at every render site, a built-client-graph snapshot covering both
chat-row shapes, and a real-browser e2e asserting the no-wrap layout and
the page's own Clipboard API.
2026-07-28 14:58:06 +08:00
..
connection feat(web): render bash tool output as a terminal card 2026-07-28 14:58:06 +08:00
hmr Merge remote-tracking branch 'origin/master' into worktree/web-session-model-selector 2026-07-27 12:17:38 +08:00
locale feat: slash system / input service / agent scope 2026-07-27 03:28:39 +08:00
modules docs: translate remaining READMEs 2026-07-26 05:06:39 +08:00
runtime Merge remote-tracking branch 'origin/master' into worktree/web-session-model-selector 2026-07-28 00:39:24 +08:00
ui-command chore(lint): apply eslint auto-fixes across the .tsx backlog 2026-07-27 21:49:40 +08:00
ui-conversation feat(web): render bash tool output as a terminal card 2026-07-28 14:58:06 +08:00
ui-layout chore(lint): clear the semantic .tsx backlog 2026-07-27 22:23:41 +08:00
ui-model fix: lint 2026-07-28 00:56:37 +08:00
ui-models Merge remote-tracking branch 'origin/master' into worktree/i18n-complete-non-readme 2026-07-26 14:37:46 +08:00
ui-primitives feat(web): render bash tool output as a terminal card 2026-07-28 14:58:06 +08:00
ui-question chore(lint): clear the semantic .tsx backlog 2026-07-27 22:23:41 +08:00
ui-settings chore(lint): apply eslint auto-fixes across the .tsx backlog 2026-07-27 21:49:40 +08:00
ui-settings-general chore(lint): clear the semantic .tsx backlog 2026-07-27 22:23:41 +08:00
ui-sidebar chore(lint): apply eslint auto-fixes across the .tsx backlog 2026-07-27 21:49:40 +08:00
ui-skill feat(web): wire startup Workspace selection and sync docs 2026-07-27 06:24:09 +08:00
ui-slash chore(lint): declare contract callbacks property-style 2026-07-27 22:23:10 +08:00
ui-slots chore(lint): clear the semantic .tsx backlog 2026-07-27 22:23:41 +08:00
ui-subagent fix(apiproxy): derive queued steering on the client, drop it from the wire 2026-07-27 10:22:28 +08:00
ui-theme Merge branch 'master' into feat/todo-tool-ui 2026-07-27 16:54:34 +08:00
ui-trajectory chore(lint): clear the semantic .tsx backlog 2026-07-27 22:23:41 +08:00
ui-workspace chore(lint): clear the semantic .tsx backlog 2026-07-27 22:23:41 +08:00
web chore(lint): clear the semantic .tsx backlog 2026-07-27 22:23:41 +08:00
web-react chore(lint): clear the semantic .tsx backlog 2026-07-27 22:23:41 +08:00
AGENTS.md Merge remote-tracking branch 'origin/master' into worktree/web-session-model-selector 2026-07-26 13:13:53 +08:00
tsdown.client.ts feat(gui): settings panel with locale and theme preferences 2026-07-26 00:28:43 +08:00