From ce8d2fbe70292205a253d2f851822e5e2b0f1f08 Mon Sep 17 00:00:00 2001 From: l0ng-ai <24760907+l0ng-ai@users.noreply.github.com> Date: Thu, 1 Oct 2026 10:45:09 +0800 Subject: [PATCH] fix(terminal): offer Pi's, Oh My Pi's, Prime Agent's and Grok Build's commands MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit All four take typed slash commands, but the composer knew none of them: `/` opened no menu and the placeholder offered only `@` files. List each one's everyday commands as its installed version names them — Pi 0.99, Oh My Pi 18.4 (`/exit`, `/retry`, `/todo`), Prime Agent 0.9 (`/effort` rather than Pi's `/thinking`) and Grok Build 1.0 (`/mcps`, `/recap`). --- src/terminal/composer.rs | 64 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/src/terminal/composer.rs b/src/terminal/composer.rs index 9126a2c7..2c7b4a9b 100644 --- a/src/terminal/composer.rs +++ b/src/terminal/composer.rs @@ -731,6 +731,70 @@ fn builtin_commands(agent: CLIAgent) -> &'static [(&'static str, &'static str)] ("/mcp", "Show MCP server status"), ("/help", "Show available commands and shortcuts"), ], + CLIAgent::Pi => &[ + ("/model", "Select model"), + ("/thinking", "Set thinking level"), + ("/compact", "Compact the session context"), + ("/new", "Start a new session"), + ("/resume", "Resume a different session"), + ("/tree", "Navigate the session tree"), + ("/fork", "Fork from a previous message"), + ("/session", "Show session info and stats"), + ("/copy", "Copy the last agent message"), + ("/export", "Export the session"), + ("/settings", "Open settings"), + ("/reload", "Reload extensions, skills and prompts"), + ("/hotkeys", "Show keyboard shortcuts"), + ("/quit", "Quit Pi"), + ], + CLIAgent::OhMyPi => &[ + ("/model", "Switch model"), + ("/plan", "Toggle plan mode"), + ("/compact", "Compact the session context"), + ("/new", "Start a new session"), + ("/resume", "Resume a different session"), + ("/retry", "Retry the last failed turn"), + ("/tree", "Navigate the session tree"), + ("/fork", "Fork from a previous message"), + ("/context", "Show context usage"), + ("/usage", "Show provider usage and limits"), + ("/todo", "View or change the todo list"), + ("/copy", "Copy text from the conversation"), + ("/settings", "Open settings"), + ("/exit", "Exit Oh My Pi"), + ], + CLIAgent::PrimeAgent => &[ + ("/model", "Switch model"), + ("/effort", "Set reasoning effort"), + ("/compact", "Compact the session context"), + ("/new", "Start a new session"), + ("/resume", "Resume a session"), + ("/tree", "Jump to any point in the session"), + ("/fork", "Fork from a previous message"), + ("/usage", "Show token, cost and context usage"), + ("/btw", "Ask a side question"), + ("/copy", "Copy the last assistant message"), + ("/export", "Export the session to HTML"), + ("/settings", "Open settings"), + ("/reload", "Reload extensions, skills and prompts"), + ("/quit", "Quit Prime Agent"), + ], + CLIAgent::Grok => &[ + ("/model", "Switch the active model"), + ("/effort", "Set reasoning effort"), + ("/plan", "Enter plan mode"), + ("/compact", "Compact conversation history"), + ("/new", "Start a new session"), + ("/resume", "Resume a previous session"), + ("/context", "View context usage"), + ("/usage", "View usage"), + ("/btw", "Ask a side question"), + ("/recap", "Summarize the session so far"), + ("/copy", "Copy the last response"), + ("/mcps", "Show MCP server status"), + ("/settings", "Open settings"), + ("/quit", "Quit Grok Build"), + ], // Amp has no typed commands: `/` on an empty input opens its command // palette, which a message cannot drive. _ => &[],