Block-based command output
Each command and its output is rendered as a visual "block" — a left-edge accent bar in the terminal gutter plus a hover-only action toolbar.
Why blocks
When you scroll back through 200 lines of tail -f you don't want to find the command boundary by eye. Blocks make it obvious: every command starts a new shaded gutter region, every output flows underneath it.
Actions
Hover over any block to surface the toolbar (top-left of the block):
- copy — Copies the entire block text (command + output, ANSI-stripped) to
the system clipboard.
- ask AI — Pre-fills the AI sidebar composer with "Help me understand…"
followed by the command and output. One click to start a conversation about what just happened.
- rerun — Sends the command text back through the PTY (followed by CR).
Useful for retries after a fix.
The header also shows the command (truncated to 60 chars) and total duration.
How prompt detection works
The parser runs client-side after every PTY chunk. The default prompt regex is:
/^(?:[\w][\w.~/:_-]*[@:~][\w.~/:_-]*\s*)?[$#❯➜>]\s+\S?/uIt matches:
- A typical bash/zsh prompt:
user@host:/path$ cmd - A starship/oh-my-zsh prompt:
❯ cmd - A custom prompt with
@,:, or~in the prefix
Lines that don't match are appended to the open block as output.
Limitations
- Exit codes aren't shown — would require shell-side instrumentation (Phase 2)
- The "command" is extracted heuristically (text after the prompt sigil) — exotic
PS1s may need a custom regex (planned: user-overridable in settings)
- OSC 133 (semantic prompt escapes) support coming in Phase 2 — will replace the
regex for shells that emit it