Docs
中文 EN

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
Fullscreen Workbench (Alternate Screen) DEFAULT TRANSCRIPT (Virtualized) USER: Refactor config merge ASST · Thinking + Markdown ● read config.rs [Done] Word-diff · pi-emphasis cues ASST: Updated config merge Ctrl+O toggle thinking blocks Ctrl+T open /trace profiler ▲ ▼ Rail 2col > @src/app.rs#L12-18 ... Tab: effort · /: cmd · !/!!: Bash ~/mizar (main*) · Ctrl+O · ? help ├ ├ ⇄ Ctx File Tool Stat Context 38% TTFT: 280 ms TPS : 68.4 t/s Drag resize (^B) 42 cols def · min 30 Shown at ≥ 96 cols Auto-hide if narrow TimelineRail Rules w ≥ 60 & ≥ 2 turns Click jumps to turn mouse_capture=true · in-app drag selection & double-click copy F3 /view Hot Switch F2 /mouse Text Select Inline Mode (--inline) SCROLLBACK Native Terminal Scrollback Turn #1 [Flushed to scrollback] Native scrollbar, Cmd+F & free selection Turn #2 [Flushed to scrollback] ! / !! local bash outputs persist in scrollback Auto-archives turns when idle Flush & Keep History Inline Viewport (7..14 adaptive rows) ⠋ Streaming output / active tool card > Enter prompt or !cmd ... ~/mizar (main*) · Ctrl+O · ? help mouse_capture=false · no AltScreen overlay F3 · /view [fullscreen|inline] Hot-swap viewport mode at runtime preserving context & scroll history F2 · /mouse [on|off] Pause mouse capture in Fullscreen for native selection; press again Ctrl+B · /panel (≥ 96 cols) Toggle & drag-resize right side panel TimelineRail needs ≥60 cols & ≥2 turns
FIG 01: Fullscreen dual workbench (left) vs Inline native scrollback viewport (right) with runtime F3 / F2 switching.

Dual Viewports & Side Panel

  • Fullscreen (default): Owns the alternate screen with virtualized Markdown, word-level diffs, a 2-column TimelineRail (appears when width >= 60 cols and >= 2 turns; click nodes to jump), and the Ctrl+B split 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 /settings shows tiered detail per tool kind — bash keeps tail output, read/grep preview head lines, edit/write prioritize colored diffs and suppress redundant confirmation text, and each expanded card closes with ╰. Unfinished drafts transition to red on truncation or Esc cancellation.
  • Bottom 4-Quadrant Status Layout: The composer top border shows live status & throughput on the left and active model [effort] + ctx percentage 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 / fd Installer: Interactive TUI concurrently ensures rg and fd under ~/.mizar/bin (with ghfast.top mirror fallback on slow/stalled transfers), sharing the single-flight install with grep; you can also pre-install via mizar 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 with mouse_capture=false).
  • Right Side Panel (Ctrl+B / /panel): Shown when terminal width >= 96 cols (default 42 cols, min 30, draggable divider) with Ctx (context bar + TTFT/TPS), File, Tool, and Stat tabs.
  • 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 from WorkspaceFileCache; submitted mentions are expanded by FileMentionsPlugin as ContextNotice items before the step runs.
  • Multiline & Queue Controls: Shift+Enter, Alt+Enter, or Ctrl+J inserts newlines; submitting while streaming pushes follow-ups into PromptQueue. When the draft is empty, press ↑ to open the queue selector (Enter to edit, Ctrl+Enter to steer immediately, Delete/Ctrl+X to discard), or press Alt+↑ to pull the tail queued prompt back into the editor directly.
  • Clipboard Images (Ctrl+V): Pastes text or sniffs/normalizes clipboard images via mizar-client for 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 by derive_messages().

Global Keybindings

KeyActionNotes
EnterSubmit input (or queue while streaming)/ prefix invokes built-in commands or skills
Ctrl+EnterImmediate priority / steer submissionInterrupts active turn and sends immediately
Shift+Enter / Alt+Enter / Ctrl+JInsert newlineAlt+Enter on an empty draft with queued items steers the queue head (Kitty fallback)
TabCycle reasoningEffort (off..max)Constrained by active model capabilities
Ctrl+CCopy selection / close modal / clear draft / cancel / double-press quitOrdered by active UI context
Ctrl+DExit workbench when composer is empty & idleEquivalent to /exit
Ctrl+TToggle /trace 3-lane trajectory profilerEquivalent to /trace
Ctrl+OExpand/collapse thinking blocks onlyEquivalent to /thinking; tool details live in /settings
Ctrl+BToggle right split side panelEquivalent to /panel (>= 96 cols)
Ctrl+LOpen model & provider pickerEquivalent to /model
F2Toggle mouse capture for native text copyEquivalent to /mouse
F3Hot-swap Fullscreen / Inline viewportEquivalent to /view
Ctrl+W / Ctrl+KDelete word backward / kill to end of line—
Ctrl+Z / Ctrl+YWord-level undo / KillRing yank—
Ctrl+R / Ctrl+E / Ctrl+GFuzzy history search / expand collapsed pastes / $EDITORHonors VISUAL / EDITOR
Ctrl+VPaste clipboard text, paths, or imagesConverts images to vision blocks
Alt+←/→ / Ctrl+←/→Move cursor by word—
Alt+↑ / ↑ (empty draft)Pull tail queued prompt / open queue selectorSupports Enter, Ctrl+Enter, Delete/Ctrl+X
PageUp / PageDown / Ctrl+U / Ctrl+Home / Ctrl+EndPage transcript / scroll up / jump to top or bottomEsc clears selection, closes modals, cancels, or clears input
? (empty input)Open keybindings & command help modalEquivalent 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>:

CommandAliasesArgsDescription
/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 terminal COLORFGBG dark/light detection), mist-dark, mist-light, sakura-dark, system, and ansi16. Ensure COLORTERM=truecolor in non-TTY test harnesses to enable 24-bit color.
  • pi-emphasis Grammar: 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 globally
    • MIZAR_TUI_ROUND_CAPS=0 (or PI_EMPHASIS_ROUND_CAPS=0): Disable rounded pill borders
    • MIZAR_TUI_PILL_ICONS=0 (or PI_EMPHASIS_PILL_ICONS=0): Hide Nerd Font pill icons
    • MIZAR_TUI_EMPHASIS_GUIDANCE=0 (or PI_EMPHASIS_GUIDANCE=0): Do not append emphasis reply guidance to system prompt
    • MIZAR_TUI_PROGRAM_STATUS=0: Disable terminal title/progress reporting

Search Mizar Docs