grok-build-upstream-mirror/crates/codegen/xai-grok-pager
Repository files (latest commit first)
Filename Latest commit message Latest commit date
grokkybara[bot] dd04f397b1 Synced from monorepo
Synced from monorepo

Changes:
- Temporarily disable session share link creation in the TUI
- Do not approve plan on empty Enter from the revise prompt
- Expose chat product Skills via ACP available_commands_update
- Return immediately from a blocking wait on an already-completed ACP task
- Split headless pager module for clearer structure
- Stop git worktree prune from removing user registrations on resume
- Use compaction sampler tokenizer for item token counts
- Opt-in extra root CAs via GROK_EXTRA_CA_BUNDLE
- Cancel all session subagents when the user stops
- Let the session persistence actor exit when its session ends
- Make fullscreen terminal resize much cheaper on long sessions
- Report honestly from kill_task when an ACP task does not exist
- Hide /usage for external-auth deployments
- Forward the history-load trailer’s computer_reason to the client
- Remove ineffective no-op tool reminder
- Declare slash-command screen-mode support in one place
- Keep settings enum picker on the committed value until Enter
- Reap a PTY’s full process tree
- Stream tool calls from headless mode over ACP
- Bridge gateway task lifecycle to ACP for chat session background tasks
- Don’t warn about truncated history on a suppressed replay
- Fit full-replace summarizer input and recover on context-length errors
- Stop dropping agents over an unrecognized frontmatter color
- Add /undo as a slash alias for /rewind
- Harden sleep/wake token-refresh paths against forced re-login
- Add session/list ACP method
- Give each sampling backend its own conversion module
- Treat an unenrolled child process as a lint error
- Suppress the cancelled marker on send-now wake turns
- Stop tearing down Roslyn on every edit, and read C# diagnostics

Source-Revision: 2a28b4a86cfc4a4c133c35b7fc2a6a9964387c39
2026-07-30 19:07:40 +00:00
..
assets/logo Publish harness and TUI open-source 2026-07-16 06:46:02 +01:00
benches Synced from monorepo 2026-07-30 19:07:40 +00:00
docs Synced from monorepo 2026-07-30 19:07:40 +00:00
examples Publish harness and TUI open-source 2026-07-16 06:46:02 +01:00
npm Synced from monorepo 2026-07-22 19:22:27 +01:00
scripts Publish harness and TUI open-source 2026-07-16 06:46:02 +01:00
src Synced from monorepo 2026-07-30 19:07:40 +00:00
tests Synced from monorepo 2026-07-30 19:07:40 +00:00
.gitignore Publish harness and TUI open-source 2026-07-16 06:46:02 +01:00
build.rs Publish harness and TUI open-source 2026-07-16 06:46:02 +01:00
Cargo.toml Synced from monorepo 2026-07-30 19:07:40 +00:00
README.md Synced from monorepo 2026-07-22 19:22:27 +01:00

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 (nonVS 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