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
..
2026-07-25 01:58:42 +08:00
2026-07-24 23:43:10 +08:00
2026-07-25 01:58:42 +08:00
2026-07-27 14:01:15 +08:00
2026-07-27 14:01:15 +08:00
2026-07-27 14:01:15 +08:00
2026-07-23 19:48:00 +08:00
2026-07-23 19:33:30 +08:00
2026-07-23 19:48:00 +08:00
2026-07-27 21:17:49 +08:00
2026-07-27 21:17:49 +08:00
2026-07-27 21:17:49 +08:00
2026-07-24 16:36:34 +08:00
2026-07-23 00:10:53 +08:00
2026-07-24 16:36:34 +08:00
2026-07-24 13:57:16 +08:00
2026-07-22 23:07:14 +08:00
2026-07-24 13:57:16 +08:00
2026-07-27 18:27:39 +08:00
2026-07-27 18:27:39 +08:00
2026-07-27 18:27:39 +08:00
2026-07-26 03:33:57 +08:00
2026-07-26 03:33:57 +08:00
2026-07-26 03:33:57 +08:00
2026-07-27 17:38:42 +08:00
2026-07-27 17:38:42 +08:00
2026-07-27 17:38:42 +08:00
2026-07-24 13:57:16 +08:00
2026-07-22 23:07:14 +08:00
2026-07-24 13:57:16 +08:00
2026-07-27 17:38:42 +08:00
2026-07-27 17:38:42 +08:00
2026-07-27 17:38:42 +08:00
2026-07-25 01:58:42 +08:00
2026-07-24 23:43:10 +08:00
2026-07-25 01:58:42 +08:00
2026-07-25 01:58:42 +08:00
2026-07-24 23:43:10 +08:00
2026-07-25 01:58:42 +08:00
2026-07-28 00:42:33 +08:00
2026-07-28 00:58:33 +08:00
2026-07-28 00:58:33 +08:00
2026-07-25 16:43:07 +08:00
2026-07-25 16:43:07 +08:00
2026-07-25 16:43:07 +08:00
2026-07-24 13:57:16 +08:00
2026-07-22 23:07:14 +08:00
2026-07-24 13:57:16 +08:00
2026-07-27 18:12:38 +08:00
2026-07-27 18:12:38 +08:00
2026-07-27 18:12:38 +08:00
2026-07-25 01:58:42 +08:00
2026-07-24 23:43:10 +08:00
2026-07-25 01:58:42 +08:00
2026-07-26 02:33:29 +08:00
2026-07-26 02:33:29 +08:00
2026-07-26 02:33:29 +08:00
2026-07-27 21:20:06 +08:00
2026-07-27 21:20:06 +08:00
2026-07-27 21:20:06 +08:00
2026-07-27 04:14:51 +08:00
2026-07-27 04:14:51 +08:00
2026-07-27 04:14:51 +08:00
2026-07-26 02:33:29 +08:00
2026-07-26 02:33:29 +08:00
2026-07-26 02:33:29 +08:00
2026-07-26 23:06:00 +08:00
2026-07-26 23:06:00 +08:00
2026-07-26 23:06:00 +08:00
2026-07-24 17:39:22 +08:00
2026-07-22 23:07:14 +08:00
2026-07-24 17:39:22 +08:00
2026-07-26 02:33:29 +08:00
2026-07-26 02:33:29 +08:00
2026-07-26 02:33:29 +08:00
2026-07-22 21:37:30 +08:00
2026-07-22 21:37:30 +08:00
2026-07-22 21:37:30 +08:00
2026-07-25 16:43:07 +08:00
2026-07-25 16:43:07 +08:00
2026-07-25 16:43:07 +08:00
2026-07-24 01:40:25 +08:00
2026-07-24 01:40:25 +08:00
2026-07-24 01:40:25 +08:00
2026-07-27 20:20:28 +08:00
2026-07-27 20:20:28 +08:00
2026-07-27 20:20:28 +08:00
2026-07-27 18:55:13 +08:00
2026-07-27 18:55:13 +08:00
2026-07-27 18:55:13 +08:00
2026-07-24 01:40:25 +08:00
2026-07-24 01:40:25 +08:00
2026-07-24 01:40:25 +08:00
2026-07-24 01:40:25 +08:00
2026-07-24 01:40:25 +08:00
2026-07-24 01:40:25 +08:00
2026-07-26 14:29:30 +08:00
2026-07-26 14:05:33 +08:00
2026-07-26 14:05:33 +08:00
2026-07-20 20:35:15 +08:00
2026-07-20 20:35:15 +08:00
2026-07-20 20:35:15 +08:00
2026-07-24 22:12:23 +08:00
2026-07-24 22:12:23 +08:00
2026-07-24 22:12:23 +08:00
2026-07-26 14:29:30 +08:00
2026-07-26 14:05:33 +08:00
2026-07-26 14:05:33 +08:00
2026-07-27 21:20:06 +08:00
2026-07-27 21:20:06 +08:00
2026-07-27 21:20:06 +08:00
2026-07-23 20:35:09 +08:00
2026-07-23 20:35:09 +08:00
2026-07-23 20:35:09 +08:00
2026-07-20 21:16:40 +08:00
2026-07-20 21:16:40 +08:00
2026-07-20 21:16:40 +08:00
2026-07-27 18:07:51 +08:00
2026-07-27 18:07:51 +08:00
2026-07-27 18:07:51 +08:00
2026-07-22 14:29:52 +08:00
2026-07-22 14:29:52 +08:00
2026-07-22 14:29:52 +08:00
2026-07-22 14:29:52 +08:00
2026-07-22 14:29:52 +08:00
2026-07-22 14:29:52 +08:00
2026-07-22 14:29:52 +08:00
2026-07-22 14:29:52 +08:00
2026-07-22 14:29:52 +08:00
2026-07-24 01:40:25 +08:00
2026-07-24 01:40:25 +08:00
2026-07-24 01:40:25 +08:00
2026-07-24 01:29:35 -07:00
2026-07-24 01:29:35 -07:00
2026-07-24 01:29:35 -07:00
2026-07-27 18:55:13 +08:00
2026-07-27 18:55:13 +08:00
2026-07-27 18:55:13 +08:00
2026-07-22 20:35:38 +08:00
2026-07-22 20:35:38 +08:00
2026-07-22 20:35:38 +08:00
2026-07-27 21:30:28 +08:00
2026-07-27 21:30:28 +08:00
2026-07-27 21:30:28 +08:00
2026-07-23 17:39:30 +08:00
2026-07-23 17:39:30 +08:00
2026-07-23 17:39:30 +08:00
2026-07-27 18:55:13 +08:00
2026-07-27 18:55:13 +08:00
2026-07-27 18:55:13 +08:00
2026-07-27 18:55:13 +08:00
2026-07-27 18:55:13 +08:00
2026-07-27 18:55:13 +08:00
2026-07-27 12:04:12 +08:00
2026-07-27 12:04:12 +08:00
2026-07-27 12:04:12 +08:00
2026-07-27 16:24:30 +08:00
2026-07-27 16:24:30 +08:00
2026-07-27 16:24:30 +08:00
2026-07-27 18:55:13 +08:00
2026-07-27 18:55:13 +08:00
2026-07-27 18:55:13 +08:00
2026-07-25 18:27:39 +08:00
2026-07-25 18:27:39 +08:00
2026-07-25 18:27:39 +08:00
2026-07-26 01:16:41 +08:00
2026-07-26 01:16:41 +08:00
2026-07-26 01:16:41 +08:00
2026-07-27 18:55:13 +08:00
2026-07-27 18:55:13 +08:00
2026-07-27 18:55:13 +08:00
2026-07-27 18:55:13 +08:00
2026-07-27 18:55:13 +08:00
2026-07-27 18:55:13 +08:00
2026-07-27 18:55:13 +08:00
2026-07-27 18:55:13 +08:00
2026-07-27 18:55:13 +08:00
2026-07-27 18:55:13 +08:00
2026-07-27 18:55:13 +08:00
2026-07-27 18:55:13 +08:00
2026-07-27 18:55:13 +08:00
2026-07-27 18:55:13 +08:00
2026-07-27 18:55:13 +08:00
2026-07-27 18:55:13 +08:00
2026-07-27 18:55:13 +08:00
2026-07-27 18:55:13 +08:00
2026-07-27 16:12:40 +08:00
2026-07-27 16:12:40 +08:00
2026-07-27 16:12:40 +08:00
2026-07-26 01:30:14 +08:00
2026-07-26 01:30:14 +08:00
2026-07-26 01:30:14 +08:00
2026-07-27 12:38:11 +08:00
2026-07-27 12:38:11 +08:00
2026-07-27 12:38:11 +08:00
2026-07-26 22:53:47 +08:00
2026-07-26 22:53:47 +08:00
2026-07-26 22:53:47 +08:00
2026-07-26 03:29:22 +08:00
2026-07-26 02:43:34 +08:00
2026-07-26 03:29:22 +08:00
2026-07-26 04:24:13 +08:00
2026-07-26 04:02:38 +08:00
2026-07-26 04:24:13 +08:00
2026-07-26 15:26:52 +08:00
2026-07-26 15:26:52 +08:00
2026-07-26 15:26:52 +08:00
2026-07-27 18:55:13 +08:00
2026-07-27 18:55:13 +08:00
2026-07-27 18:55:13 +08:00
2026-07-27 03:50:22 -07:00
2026-07-27 03:50:22 -07:00
2026-07-27 03:50:22 -07:00
2026-07-27 18:55:13 +08:00
2026-07-27 18:55:13 +08:00
2026-07-27 18:55:13 +08:00
2026-07-27 18:55:13 +08:00
2026-07-27 18:55:13 +08:00
2026-07-27 18:55:13 +08:00
2026-07-27 22:17:10 +08:00
2026-07-27 22:17:10 +08:00
2026-07-27 22:17:10 +08:00
2026-07-27 15:52:35 +08:00
2026-07-27 15:52:35 +08:00
2026-07-27 15:52:35 +08:00
2026-07-28 14:58:06 +08:00
2026-07-28 14:58:06 +08:00
2026-07-28 14:58:06 +08:00