Skip to main content

TUI Reference

Layout

┌─ Toporic v0.2.0  [AUTO]  ⣾ Thinking…  █████░░░░░ 53%  $0.0123 ─┐  ← title bar
│ ┌ Chat ────────────────────────────┐ ┌ Sidebar ──────┐ │
│ │ You: hello                        │ │ ~/proj:main    │ │
│ │                                   │ │ ────────────  │ │
│ │ Assistant: Hi! How can I help?    │ │ ▼ Tasks        │ │
│ │                                   │ │   ✓ Add l…     │ │
│ │ ── Reasoning ────────────────╯    │ │   • Refact…    │ │
│ │  Let me think through the appr…   │ │   [ ] Write…   │ │
│ │                                   │ │ ▼ Files        │ │
│ │ ▸ run_command(cargo test)  ✓  1.2s│ │  +12 -3 src/…  │ │
│ │                                   │ │  +5  -0 test…  │ │
│ │                                   │ │                │ │
│ │                                   │ │                │ │
├─┴───────────────────────────────────┴────────────────┴──────────┤
│ ┌ Input ─────────────────────────────────────────────────────┐ │  ← input box
│ │ ❯ tell me about the project                                │ │
│ └────────────────────────────────────────────────────────────┘ │
├─ new │ enter:send  tab:mode  ctrl+p:palette  ctrl+b:sidebar ───┤  ← footer
└─────────────────────────────────────────────────────────────────┘

The layout adapts automatically:

  • Title bar — app name, version, mode ([PLAN] / [AUTO] / [BUILD]), spinner, status, token gauge with percentage and cost, git branch
  • Sidebar — toggled with Ctrl+B, appears to the right of the chat area (shown only when terminal >= 100 columns wide); 35 columns wide with collapsible sections
  • Chat area — messages, reasoning blocks, tool calls, streaming content
  • Input box — multiline text entry with history (up to 5 visible lines)
  • Footer — session status, keyboard hints, workspace:branch
  • Diagnostics panel — toggle with Ctrl+L (8-line panel at bottom)

Title bar

The title bar shows real-time session information:

ElementDescription
Toporic v0.2.0App name and version
[PLAN] / [AUTO] / [BUILD]Current permission mode
⣾ Thinking…Braille spinner during LLM generation
⣾ run_command…Tool name during tool execution
█████░░░░░ 53%Token usage gauge (green < 50%, yellow 50–80%, red > 80%)
$0.0123Estimated API cost (4 decimal places for < $0.01)
mainCurrent git branch

During context compaction, the title bar shows a pulsating “Compacting…” indicator.

Input box

  • Type normally to compose a message
  • Enter — submit
  • Shift+Enter, Ctrl+J, or Alt+Enter — insert a newline (multiline, up to 5 visible lines)
  • Up/Down (when input is empty) — navigate 50-entry command history
  • Up/Down (when multiline) — move cursor between input lines
  • Left/Right — move cursor within the current line
  • Home/End — jump to line start/end
  • Ctrl+A / Ctrl+E — jump to line start/end
  • Ctrl+W — delete word backward
  • Ctrl+V — paste from clipboard
  • Ctrl+C — copy input text
  • Esc — clear input / close popup / cancel

During streaming, character keys are buffered (type-ahead) and replayed into the input box when the agent finishes.

Keybindings

Global (always available)

KeyAction
Ctrl+BToggle sidebar visibility
Ctrl+LToggle diagnostics panel
Ctrl+NStart a new session
Ctrl+POpen command palette
Ctrl+,Open config overlay (provider/model/theme/language)
TabCycle permission mode: PLAN → AUTO → BUILD
Ctrl+CQuit (idle) / Cancel current stream (streaming)
Ctrl+EndForce scroll to bottom, resume auto-follow
PageUpScroll chat up 10 lines (pauses auto-scroll)
PageDownScroll chat down 10 lines

Input focus

KeyAction
EnterSubmit input
Shift+Enter / Ctrl+J / Alt+EnterInsert newline
Ctrl+WDelete word backward
Ctrl+AJump to line start
Ctrl+EJump to line end
Ctrl+VPaste from clipboard
Ctrl+CCopy input text to clipboard
EscClear input
Up / DownInput history (when empty) or navigate lines (when multiline)
Left / RightMove cursor
Home / EndJump to line start/end
BackspaceDelete char before cursor
DeleteDelete char after cursor

Message focus (press Tab to cycle from Input)

KeyAction
Up / kScroll up 1 line
Down / jScroll down 1 line
PageUp / PgUpScroll up 10 lines
PageDown / PgDnScroll down 10 lines
Enter / SpaceExpand/collapse focused tool call
End / GJump to bottom, resume auto-scroll
Home / gJump to top
EscReturn focus to input
KeyAction
Up / DownScroll 1 line
PageUp / PgUpScroll 30 lines
PageDown / PgDnScroll 30 lines
j / kScroll 1 line
EscReturn focus to input

Overlays (Help, Popups, Confirm)

KeyAction
/ Navigate items / scroll
PgUp / PgDnScroll faster (10 lines)
EnterConfirm selection
EscGo back / close overlay
Y / yConfirm dialog: accept
N / n / Enter / EscConfirm dialog: reject

Command palette (Ctrl+P)

Press Ctrl+P to open a fuzzy-searchable list of all available actions. Start typing to filter. Available actions include:

  • Change provider, model, theme, or language
  • Start a new session
  • Toggle sidebar
  • Toggle diagnostics panel
  • Open help overlay
  • Resume a past session

Config overlay (Ctrl+,)

Press Ctrl+, to open the config overlay showing the current provider, model, theme, and language. Use / to select a field and Enter to open the corresponding picker popup. Press Esc to close.

Slash commands

Type / as the first character in the input box to open the slash command dropdown. The dropdown filters commands as you type. Press Tab to autocomplete the selected command or Enter to execute it directly.

CategoryCommands
Help/help, /?, /exit
Modes/plan, /auto, /build
Session/session --new, /session list, /session <id>
Config/provider, /provider <name>, /model, /model <name>, /theme <name>, /language <code>
Skills/skill list, /skill <name>, /mcp
Workspace/init
Stats/usage, /tokens

Tool calls

Tool calls appear in the message list as collapsible units:

  • Collapsed (default): ▸ command_name ✓ 1.2s (green check with elapsed time) or ▸ command_name ✗ (red cross)
  • Expanded: Shows the full tool arguments, a ─── Result ─── separator, and the full result content
  • Streaming: Last 5 active tool calls shown with spinner/checkmark/error icons and elapsed time

To expand: press Tab to focus the message list, then j/k to navigate to the tool call, and Enter or Space to toggle expansion. Press Esc to return focus to the input.

Reasoning display

When the LLM emits chain-of-thought / reasoning tokens (e.g. from DeepSeek R1 or Anthropic extended thinking), they appear as dim italic text in the chat area with a collapsible header:

── Reasoning ╰╯
Let me think through the approach...
(click to collapse)
── Reasoning ╰╮

Previous reasoning blocks are auto-collapsed when a new response starts.

  • Toggle: Ctrl+B (requires terminal >= 100 columns wide to appear)
  • Width: 35 columns
  • Auto-show: Opens automatically when tasks (todo items) are added
  • Sections (collapsible, toggle with Enter or click):
    • Tasks — Todo list with status markers:
      • / — in progress
      • — completed
      • — cancelled
      • [ ] — pending
    • Files — Files modified in the current session with git diff stats (+additions -deletions)
  • Header: Workspace path (home shown as ~) and git branch (e.g. ~/proj:main)
  • Focus: Tab cycles through Input → Chat → Sidebar → Input; focused sidebar has accent-colored border

Diagnostics panel

Toggle with Ctrl+L. Shows a scrollable 8-line panel at the bottom with log output and diagnostic messages. Retains up to 1000 lines. Use / to scroll when focused.

Spinner and status

The title bar shows a braille spinner and status text:

StateDisplay
LLM is generating⣾ Thinking…
Tool is executing⣾ tool_name…
At auto-scroll positionStable spinner (end of chat)
Custom status⣾ status message (set by agent)
CompactingPulsating Compacting…

Auto-scroll

  • Enabled by default — new content scrolls into view automatically
  • Pause: scroll up manually (PageUp, Up, k)
  • Resume: press End or G (in message focus) or Ctrl+End
  • Type-ahead characters are buffered during streaming and replayed into the input box when the agent finishes

Help overlay

Press ? at any time (or type /?) to open the full keybinding and command reference. The overlay title reads Help ↓ ↑ as a reminder that you can scroll its contents. Press Esc to close.

Confirm dialog

Before executing mutating tools (run_command, write_file, edit_file, delete_file), Toporic shows a centered confirmation popup in Build mode:

╔══════════════════════════════════════╗
║  Allow tool execution?               ║
║                                      ║
║  run_command: cargo test             ║
║                                      ║
║  [Y] Yes    [N] No (default)         ║
║                    Esc=cancel        ║
╚══════════════════════════════════════╝
  • Y / y → accept
  • N / n / Enter / Esc / Ctrl+C → reject (default)

Themes

Three color themes are available, switchable via Ctrl+, or command palette:

ThemeAccent colorStyle
Amber (default)#F59E0BWarm orange/yellow
Purple#7C6AF7Cool blue-purple
Green#34D399Emerald green

Themes apply to accents, borders, status markers, and role colors.

Welcome screen

When a new session starts with no message history, the TUI shows an ASCII art “TOPORIC” logo with quick-start tips: available commands, keybindings, and how to get started.

Internationalization

The TUI supports 8 languages, configurable via /language <code> or Ctrl+,:

CodeLanguage
enEnglish (default)
zh-CNSimplified Chinese
zh-TWTraditional Chinese
jaJapanese
koKorean
esSpanish
frFrench
deGerman
ptPortuguese

Translations cover footer hints, input placeholder, message bubbles, sidebar sections, popup dialogs, help text, and config labels.

Notifications (toasts)

Error, warning, and info toasts appear below the input area and auto-expire after 4 seconds. Up to 3 toasts are visible at once. Errors also trigger a red flash animation. Color-coded:

  • Info — blue
  • Warning — yellow
  • Error — red

Animations

The TUI uses subtle animations for transitions:

  • Message fade-in when appearing
  • Tool call slide-in from left
  • Sidebar slide-in from right / slide-out to right
  • Config overlay slide from top
  • Error flash (red sweep effect)
  • Token gauge fade-in