Source of truth:
crates/tui/src/app.rscrates/tui/src/input.rscrates/tui/src/completion.rscrates/tui/src/workspace_data.rscrates/tui/src/components/chat.rs
The TUI no longer rebuilds one broad workspace snapshot on every refresh tick.
WorkspaceDataProviderloads lane-specific snapshot slices from a sharedStateStoreRuntimeChangeSetmarks dirty surfaces so timed refreshes can skip unchanged lanes- Control renders typed runtime perf facts from SQLite instead of ad hoc counters
Current typed perf facts surfaced in Control include:
workspace_snapshot_msreplay_load_msmcp_connect_ms
Work uses segmented transcript caching:
- per-item
TimelineEntrycaches rendered lines and fingerprints - trailing thinking/streaming output is cached separately
- cache invalidation now respects theme preset and accent changes
- large sessions avoid full transcript re-render when only the tail changes
The TUI tracks explicit interaction modes:
InputStreamingAwaitingApprovalAwaitingUserQuestion
These modes drive keyboard routing, prompt dispatch, and UI panels.
- single-line input by default
- multiline insert with:
Alt+EnterShift+Enter(kitty protocol path)
!<shell command>runs shell command and injects output& <prompt>dispatches background task@pathinjects file/directory context references/editoropens$VISUALor$EDITOR(fallbackvi)
Completion contexts (CompletionContext):
SlashCommandAtMentionFilePath
Behavior:
Tabopens/cycles completionShift+Tabcycles backwardEsccloses completion@uses fuzzy file search/image <path>uses file path completion
Core keys:
Enter: submit or accept completionTab/Shift+Tab: completion forward/backwardEsc: dismiss completion / clear search / clear inputUp/Down: input history or selector navigationCtrl+R: reverse history searchCtrl+K: command paletteCtrl+T: theme selectorCtrl+,: settings panelCtrl+L: clear sessionCtrl+U: clear to line startCtrl+W: delete previous wordCtrl+A/Ctrl+E: line start/endCtrl+B: move current streaming task to backgroundCtrl+F(double press): kill all background tasksCtrl+N/Ctrl+P: search next/previous match when session search is activeCtrl+C: exit
Built-in panels include:
- plan panel
- todo panel
- settings panel
- model/provider/theme/accent selectors
- session picker
- command palette
Slash commands are declared in SLASH_COMMANDS and dispatched in input.rs.
/help/clear/clear queue/quit/exit/status/commands/settings
/model/connect/login/trust/thinking/thinking toggle/think/voice
/sessions/resume/session delete/session rename/context/compact/retry/search/export/handoff
/index/index status/index off/mcp/hooks/memory/memory toggle/memory clear/docs/docs add/docs get/docs clear/verify/style/notify
/theme/accent/bg/background
/autopilot/deep/qa/review/refactor/walkthrough/quick/map/profile/init-project
/team/teams-config/teams-config show/teams-config set/teams-config member/teams-config reset/subagent-config/subagent-config set/subagent-config reset
/worktree/worktree create/worktree list/worktree merge/worktree remove/undo/undo all/undo git
/agents/analytics/bug/changes/diff/doctor/editor/enable_exa/image/init/init-deep/learn/notepad/persist/plan/stop/todo/todo enforce on/todo enforce off/todo clear/resume-work
Full list with one-line descriptions: docs/reference/slash-commands.md.
Commands are classified into kinds:
Instant: local handling without model turnStreamingSafe: allowed while streamingPrompt: turns into agent prompt dispatch
- foreground turns can be moved to background (
Ctrl+B) - background queue is tracked by task id/label/start time
- message queue supports prompt buffering while runtime is busy
/team <N> <task>creates a runtime-backed lead/specialist run graph, worker assignments, and delegation traces/subagent-configcontrols session-scoped role->model overrides/teams-configinspects/updates team defaults and member overrides
--teammate-modeis parsed by CLI, but currently TUI/runtime behavior is effectively in-process.- Some slash commands are aliases (
/background->/bg,/quit-> exit path).