suiss/ui · AI
Terminal
A shell command an agent runs, such as a lint, a test run or a build, with its output underneath.
Terminal is a shell command the agent runs, such as a lint, a test run or a build. The row shows the command, and its output sits underneath in a Code Block.
Terminal is built with Trace, with a TraceCollapsible for each command.
Installation
Terminal is built with the Trace and Code Block components.
Or use the suiss/ui CLI:
Usage
Examples
Exit code
A command that exits with any code other than 0 failed. Set status="error" and open the row so the output is visible.
| Command | status | Title |
|---|---|---|
| Running | "running" | Running pnpm build |
Exited with 0 | — | Ran pnpm build |
| Exited with another code | "error" | pnpm lint exited with code 1 |
Open while running
Open the row once the first output arrives, so the output is visible while the command runs, and let the reader's choice win after that. See Trace.
AI SDK
A tool result arrives only once the command exits. To stream the output while it runs, write it from the tool as a data part with the tool call's id. The AI SDK replaces a data part that has the same id, so the output grows in place.
On the client, find the data part that matches each tool part.
API Reference
See Trace and Code Block.
Accessibility
- Say the result in the title, not only with color: "Ran pnpm build" or "pnpm lint exited with code 1".
- Each row is a button with
aria-expanded, and the output is reachable by keyboard so long lines can be scrolled.
Terminal on mobile is built from the same parts as on the web: Trace, Code Block, Message, Bubble. The example above is a static demo; connect it to your agent by rendering the same parts from your messages.
Installation
API Reference
See Trace, Code Block, Message, Bubble.