Changes: - Non-blocking coding-data sharing upsell banner - Consolidate remediation in Doctor - Auto mode defers fail-closed gate asks to the classifier - Coalesce marketplace list fetches - Allow removing a marketplace source by name - Contain hung git marketplace sources (timeouts, non-blocking refresh, unbrick modal) - Label failed workspace RPCs with error_kind - Drop redundant explicit tonic/prost deps from xai-grok-shell - Report real exit codes for completed background shells - Narrow the date-rollover reminder to date-bearing templates - Wire toolOverrides through the session and agent - Security: Bash(git:*) allowlist matches whole command chain by prefix - Split prompt-trigger telemetry and record classifier provenance - Raise connectors-manager timeout to 60s - Auto classifier honors recorded approvals for repeat actions - Apply doctor fixes in the TUI - Auto-mode classifier timeouts prompt instead of silently denying - Scope subagent completion drains to the owning session - Add the toolOverrides wire types - Set client_identifier=grok-agent-sdk - Accept both spellings of the workspace-teleport kill switch - Persist one-shot occurrence journal - Stop turns that poll the exact same tool call 16x in a row - Copy compaction checkpoint files when forking sessions - Auto-focus permission prompt from scrollback - Esc cancels the running turn in non-vim and minimal modes - List Ctrl+Z undo and redo in keyboard shortcuts - Out-of-process macOS mic capture - Show active auth mode on session-info - Install the npm binary under $GROK_HOME - Remove hover/click dead zones between dashboard items - Route startup warnings to doctor - Document [feedback.user] author identity config - Extend bang command timeout - Close combine-queued edit-hold race - Integrate relocation recovery - Expose privacy notice rollout flag - Break harness discovery ref cycle so connections can idle-evict - Shift/Alt+Enter inserts newline when editing a queued prompt - Gate project Claude permissions on folder trust - Echo response.create.event_id on response.created - Toast when session creation fails from disk full - Add shared test process lifecycle - Enable dynamic workflows by default - Add relocation transaction state machine - Add shared test sandbox - Surface auth failures on model-switch compact - Persist durable scheduler expiry - Confirm before removing extensions-modal items - Re-run compact and prompt after login when compact hit expired auth - Recap sends hosted tools under backend search
66 lines
3.9 KiB
Markdown
66 lines
3.9 KiB
Markdown
# xai-grok-pager
|
||
|
||
Terminal UI (TUI) for Grok Build. Provides the interactive full-screen interface
|
||
including the scrollback view, prompt input, session management, and all modal
|
||
dialogs.
|
||
|
||
## Architecture
|
||
|
||
```
|
||
src/
|
||
├── app/ # Application state and event handling
|
||
│ ├── app_view.rs # Top-level state (welcome screen, agents, config)
|
||
│ ├── agent_view/ # Per-session agent view (struct in mod.rs + per-domain impl modules)
|
||
│ ├── dispatch/ # Action → Effect dispatcher (router + per-domain modules)
|
||
│ ├── effects.rs # Async side effects (ACP calls, file I/O)
|
||
│ └── event_loop.rs # Main event loop (input, ticks, ACP messages)
|
||
├── views/ # UI components
|
||
│ ├── prompt_widget.rs # Text editor with file search, slash, history
|
||
│ ├── welcome/ # Welcome screen (logo, menu, prompt)
|
||
│ ├── extensions_modal.rs # Extensions modal (hooks, plugins, marketplace, skills, MCP servers)
|
||
│ ├── file_search/ # @-completion dropdown and line viewer
|
||
│ ├── slash_dropdown.rs# /command completion dropdown
|
||
│ └── ... # Scrollback, status bar, panes, etc.
|
||
├── scrollback/ # Message history rendering
|
||
├── slash/ # Slash command registry and built-in commands
|
||
├── appearance/ # Theme and pager.toml config
|
||
├── acp/ # Agent Communication Protocol client state
|
||
└── render/ # Low-level rendering helpers (color, wrapping, etc.)
|
||
```
|
||
|
||
## Key Concepts
|
||
|
||
- **AppView** — owns the welcome screen, agent sessions, and global config
|
||
- **AgentView** — one per session; owns the prompt, scrollback, tool panes, and modals
|
||
- **PromptWidget** — text editor component with file search (`@`), slash commands (`/`), history search, and paste elements
|
||
- **Action/Effect** — Elm-style architecture: input → Action → dispatch → Effect → state update
|
||
|
||
## Keyboard Shortcuts
|
||
|
||
| Key | Context | Action |
|
||
|-----|---------|--------|
|
||
| `Ctrl+P` or `?` | Agent screen | Open command palette |
|
||
| `Ctrl+L` | Any (non–VS Code family) | Open plugins/hooks modal; on VS Code / Cursor / Windsurf / Zed use `/plugins` or `/hooks` (`Ctrl+L` is mid-turn interject) |
|
||
| `Tab` | Prompt | Switch to scrollback |
|
||
| `Esc` | Turn running | Cancel — in minimal mode or with vim scrollback mode off (the default). Fullscreen vim mode: no-op (use `Ctrl+C`) |
|
||
| `Esc` `Esc` | Idle, non-empty prompt | Clear prompt (within 800ms; first press shows hint) |
|
||
| `Esc` `Esc` | Idle, empty prompt + messages | Open rewind picker (silent first press) |
|
||
| `Ctrl+M` | Prompt | Toggle multiline mode |
|
||
| `Shift+Enter` | Prompt | Insert newline |
|
||
| `/` | Prompt | Start slash command |
|
||
| `@` | Prompt | Start file search |
|
||
| `!` | Prompt (empty) | Enter bash mode |
|
||
| `Ctrl+C` | Prompt (with text) | Clear prompt (even while turn running) |
|
||
| `Ctrl+C` | Prompt (empty) + turn running | Cancel running turn |
|
||
| `Ctrl+B` | Agent screen + foreground command running | Send the command to the background |
|
||
| `Ctrl+G` | Agent screen (full TUI) | Toggle the tasks pane |
|
||
| `Ctrl+G` | Ordinary composer (minimal mode) | Edit the draft externally; use the command-palette entry if the chord is reserved |
|
||
|
||
## Docs
|
||
|
||
- [Terminal Support & Troubleshooting](docs/user-guide/21-terminal-support.md) — tmux/SSH truecolor, clipboard, mouse, diagnostics, `/doctor`
|
||
- [Hooks & Plugins Guide](docs/hooks-and-plugins.md) — managing hooks, plugins, and marketplace sources
|
||
- [Custom Hooks Guide](docs/custom-hooks.md) — creating, configuring, and writing your own hooks
|
||
- [Hook Examples](../xai-grok-hooks/examples/README.md) — sample hooks for common workflows
|
||
- [Hooks Crate (`xai-grok-hooks`)](../xai-grok-hooks/) — hook runtime, event types, and execution engine
|
||
- [Plugin Marketplace Crate (`xai-grok-plugin-marketplace`)](../xai-grok-plugin-marketplace/) — marketplace source loading, scanning, and install
|