Runtime terminal panel
Terminal-tab content: shell output (via the sandbox Terminal), recent command history, and stop/retry controls. Reuses the existing Terminal component.
Included in the single kansho full pack. Components are not offered as separate installs.
Idle — Retry available
$ bun test src/audit✓ writer flushes in batches of 100 (12ms)✓ writer drops legacy single-row path (8ms)2 pass 0 fail 142 expect() callsRan 2 tests across 1 file. [1.84s]
Command history
3bun installbun test src/auditgit diff --statDemo state: idle
Running — Stop available
$ bun test src/audit✓ writer flushes in batches of 100 (12ms)~/agent-platform $
Command history
3bun installbun test src/auditgit diff --statDemo state: running
Empty
No terminal output
Shell commands run by the agent will stream here.
Usage
Guidance- Set running with onStop while a command is in flight — Stop appears only when that callback is supplied.
- When idle, wire onRetry so the operator can re-run the last command.
- Pass prompt with the cwd so the input row reads in context.
- Use it as a scrollback for finished builds — use the log table.
- When to use
- A live command surface inside a workspace's runtime panel.
- When not to
- Read-only log output — reach for the log table.
Accessibility
Keyboard & screen readerKeyboard
- Tab
- Move focus to Stop or Retry when its matching callback is supplied.
- EnterSpace
- Activate the available callback-gated action.
Announces
- With matching callbacks, the control swaps between Stop and Retry with the running state; otherwise no action is rendered.
Props
API reference| Prop | Type | Default | Description |
|---|---|---|---|
| lines | TerminalLine[] | — | Output lines to render. |
| prompt | string | — | When set, shows the prompt row with this cwd. |
| history | string[] | — | Recent commands, newest last. |
| running | boolean | false | Selects the matching callback action: Stop when running with onStop, or Retry when idle with onRetry; otherwise no action renders. |
| onStop | () => void | — | Fires from the Stop control while running. |
| onRetry | () => void | — | Fires from the Retry control while idle. |
Component documentation
Runtime Terminal Panel
components/workspace/runtime-terminal-panel.tsxPurpose
Combines terminal output, prompt, command history, and state-appropriate stop or retry actions.
Appropriate use
Use in a runtime terminal tab when the host owns command execution and recovery.
Example
components/workspace/runtime-terminal-panel.tsx has a representative live example in the "Running — Stop available" section on /components/runtime-terminal-panel.
States
Supports empty or populated output, optional prompt and history, running or idle mode, and independently optional stop/retry callbacks.
API and props
RuntimeTerminalPanel accepts lines, prompt, history, running, onStop, onRetry, and className.
Dependencies
Direct imports are React, Lucide icons, Terminal, EmptyState, RuntimeSection, and cn.
Accessibility
Stop and retry are visible native buttons when the matching callback is supplied; terminal line semantics come from Terminal and decorative status icons are hidden.
Limitations
It does not execute commands, stream lines, persist history, or show pending/error feedback after callbacks; unavailable state actions are omitted.
Source
Source: components/workspace/runtime-terminal-panel.tsx.
Full pack
components/workspace/runtime-terminal-panel.tsx is documented at /components/runtime-terminal-panel and installs only through the single Kansho full pack; no individual component install is offered.