Workbench, Keybindings & Slash Commands
CONTENTS
Mizar’s terminal workbench pairs the pure UI state machine mizar-tui-ui with the cross-end host runtime mizar-client. It opens in a full-screen dual-pane workspace by default and can hot-swap into an inline mode that flushes completed turns back to native terminal scrollback.
FIG 01 TUI Dual Workbench: Fullscreen vs Inline
Dual Viewports & Side Panel
- Fullscreen (default): Owns the alternate screen with virtualized Markdown, word-level diffs, a 2-column
TimelineRail(appears when width>= 60cols and>= 2turns; click nodes to jump), and theCtrl+Bsplit side panel. - 4-State Circular Tool Lights & Tiered Tool Expansion: Each tool call shows a 4-state circular indicator: muted hollow
○while arguments stream (Drafting), solid yellow●while executing (Running), solid green●on success (Done), and solid red●on failure or denial (Error/Blocked). By default, collapsed cards render strictly as 1 single header line with zero preview lines; enabling “Expand tool details” (ui.verboseExpanded) in/settingsshows tiered detail per tool kind —bashkeeps tail output,read/greppreview head lines,edit/writeprioritize colored diffs and suppress redundant confirmation text, and each expanded card closes with╰. Unfinished drafts transition to red on truncation orEsccancellation. - Bottom 4-Quadrant Status Layout: The composer top border shows live status & throughput on the left and active model
[effort]+ctxpercentage on the right; the bottom bar shows workspace path, Git branch/dirty marker*, mode badges ([Inline],[原生选区],[回看中], without any approval badge) or flash toasts on the left, and right-aligned global shortcuts (Ctrl+O/Ctrl+B/?) on the right. - Background
rg/fdInstaller: Interactive TUI concurrently ensuresrgandfdunder~/.mizar/bin(withghfast.topmirror fallback on slow/stalled transfers), sharing the single-flight install withgrep; you can also pre-install viamizar install-tools. - Inline (
--inline//view inline): Keeps a compact 7–14 row composer at the bottom while flushing finished turns to native terminal scrollback (Cmd+F, native scrollbar, and drag selection work naturally withmouse_capture=false). - Right Side Panel (
Ctrl+B//panel): Shown when terminal width>= 96cols (default 42 cols, min 30, draggable divider) withCtx(context bar + TTFT/TPS),File,Tool, andStattabs. - Native Selection Escape (
F2//mouse): Temporarily pauses in-app mouse capture in Fullscreen so your terminal emulator handles text selection directly.
Input Ergonomics & Local Bash (! / !!)
@Fuzzy File Mentions: Typing@triggers background.gitignore-aware suggestions fromWorkspaceFileCache; submitted mentions are expanded byFileMentionsPluginasContextNoticeitems before the step runs.- Multiline & Queue Controls:
Shift+Enter,Alt+Enter, orCtrl+Jinserts newlines; submitting while streaming pushes follow-ups intoPromptQueue. When the draft is empty, press↑to open the queue selector (Enterto edit,Ctrl+Enterto steer immediately,Delete/Ctrl+Xto discard), or pressAlt+↑to pull the tail queued prompt back into the editor directly. - Clipboard Images (
Ctrl+V): Pastes text or sniffs/normalizes clipboard images viamizar-clientfor vision-capable models. - Local Bash Prefixes:
! <command>: Runs locally and feeds stdout/stderr into the next model turn (ideal after fixing tests).!! <command>: Runs locally at zero token cost — skipped automatically byderive_messages().
Global Keybindings
| Key | Action | Notes |
|---|---|---|
Enter | Submit input (or queue while streaming) | / prefix invokes built-in commands or skills |
Ctrl+Enter | Immediate priority / steer submission | Interrupts active turn and sends immediately |
Shift+Enter / Alt+Enter / Ctrl+J | Insert newline | Alt+Enter on an empty draft with queued items steers the queue head (Kitty fallback) |
Tab | Cycle reasoningEffort (off..max) | Constrained by active model capabilities |
Ctrl+C | Copy selection / close modal / clear draft / cancel / double-press quit | Ordered by active UI context |
Ctrl+D | Exit workbench when composer is empty & idle | Equivalent to /exit |
Ctrl+T | Toggle /trace 3-lane trajectory profiler | Equivalent to /trace |
Ctrl+O | Expand/collapse thinking blocks only | Equivalent to /thinking; tool details live in /settings |
Ctrl+B | Toggle right split side panel | Equivalent to /panel (>= 96 cols) |
Ctrl+L | Open model & provider picker | Equivalent to /model |
F2 | Toggle mouse capture for native text copy | Equivalent to /mouse |
F3 | Hot-swap Fullscreen / Inline viewport | Equivalent to /view |
Ctrl+W / Ctrl+K | Delete word backward / kill to end of line | — |
Ctrl+Z / Ctrl+Y | Word-level undo / KillRing yank | — |
Ctrl+R / Ctrl+E / Ctrl+G | Fuzzy history search / expand collapsed pastes / $EDITOR | Honors VISUAL / EDITOR |
Ctrl+V | Paste clipboard text, paths, or images | Converts images to vision blocks |
Alt+←/→ / Ctrl+←/→ | Move cursor by word | — |
Alt+↑ / ↑ (empty draft) | Pull tail queued prompt / open queue selector | Supports Enter, Ctrl+Enter, Delete/Ctrl+X |
PageUp / PageDown / Ctrl+U / Ctrl+Home / Ctrl+End | Page transcript / scroll up / jump to top or bottom | Esc clears selection, closes modals, cancels, or clears input |
? (empty input) | Open keybindings & command help modal | Equivalent to /help |
Built-in Slash Commands (All 24)
Typing / opens interactive completion. Alongside these 24 built-in commands, any loaded skill can be triggered via /<skill-name>:
| Command | Aliases | Args | Description |
|---|---|---|---|
/help | /h | — | Open keybindings & slash command reference modal |
/resume | — | [id] | Resume a previous session (interactive picker if id is omitted) |
/rename | — | [title] | Rename current session, or regenerate title via LLM when empty |
/settings | /config | — | Open live settings modal (settings.json + Cordis module toggles) |
/model | — | [spec] | Open interactive model/provider selector (Ctrl+L) or switch directly |
/effort | — | [level] | Set reasoning effort (off / minimal / low / medium / high / xhigh / max) |
/compact | — | [focus] | Manually compact conversation context with optional focus instructions |
/session | — | — | Inspect session ID, JSONL path, effective context window, event breakdown, and compaction boundary |
/theme | — | [name] | Switch theme (auto / mist-dark / mist-light / sakura-dark / system / ansi16) |
/trace | — | — | Open full-screen 3-lane trajectory profiler (Ctrl+T) |
/panel | — | — | Toggle right split panel (Ctrl+B) |
/approval | — | [auto|ask] | Switch mutating tool approval gate at runtime |
/thinking | — | — | Toggle thinking block rendering (Ctrl+O) |
/tools | — | — | Inspect registered tools and active ToolExposure tiers |
/mcp | — | — | Inspect mcp.json server connection status and exposed tools |
/skills | — | — | Open interactive skill browser / picker |
/instructions | — | — | Inspect startup-loaded AGENTS.md / CLAUDE.md files and byte budget |
/tree | — | — | Browse timeline and fork a new session branch from any past seq |
/view | — | [fullscreen|inline] | Hot-swap dual viewports (F3) |
/mouse | — | — | Toggle mouse capture (F2) |
/stats | — | — | Show token counts, throughput (TPS), and turn latency summary |
/export | — | [path] | Export session trajectory as JSONL |
/clear | /new | — | Start a fresh empty session |
/exit | /quit, /q | — | Exit TUI and print mizar --resume <id> to stderr |
Themes & pi-emphasis Visual Grammar
- 6 Built-in Themes:
auto(adapts to terminalCOLORFGBGdark/light detection),mist-dark,mist-light,sakura-dark,system, andansi16. EnsureCOLORTERM=truecolorin non-TTY test harnesses to enable 24-bit color. pi-emphasisGrammar: Interactive TUI renders markers like[[Done]],[[Failed]], and[[Needs you]]as semantic status pills while preserving clean raw Markdown in JSONL storage, clipboard copy, and/export. Disable individual layers via environment variables:MIZAR_TUI_EMPHASIS=0: Disable emphasis rendering globallyMIZAR_TUI_ROUND_CAPS=0(orPI_EMPHASIS_ROUND_CAPS=0): Disable rounded pill bordersMIZAR_TUI_PILL_ICONS=0(orPI_EMPHASIS_PILL_ICONS=0): Hide Nerd Font pill iconsMIZAR_TUI_EMPHASIS_GUIDANCE=0(orPI_EMPHASIS_GUIDANCE=0): Do not append emphasis reply guidance to system promptMIZAR_TUI_PROGRAM_STATUS=0: Disable terminal title/progress reporting