-
Notifications
You must be signed in to change notification settings - Fork 5
Wire remaining REPL commands into codegraff TUI handle_enter #22
Copy link
Copy link
Open
Labels
state: inactiveNo current action needed/possible; issue fixed, out of scope, or superseded.No current action needed/possible; issue fixed, out of scope, or superseded.type: featureBrand new functionality, features, pages, workflows, endpoints, etc.Brand new functionality, features, pages, workflows, endpoints, etc.work: complexThe situation is complex, emergent practices used.The situation is complex, emergent practices used.
Description
Metadata
Metadata
Assignees
Labels
state: inactiveNo current action needed/possible; issue fixed, out of scope, or superseded.No current action needed/possible; issue fixed, out of scope, or superseded.type: featureBrand new functionality, features, pages, workflows, endpoints, etc.Brand new functionality, features, pages, workflows, endpoints, etc.work: complexThe situation is complex, emergent practices used.The situation is complex, emergent practices used.
Why
The graff REPL (
crates/forge_main/) recognises 25+ slash commands viaForgeCommandManager::parse(crates/forge_main/src/model.rs:285). The codegraff TUI dispatcher (handle_enterincrates/codegraff-tui/src/main.rs) currently routes only 8 of them locally (/connect,/image,/login,/logs,/model,/models,/usage,/workflow). Everything else falls through tospawn_chat, which sends the literal slash text to the LLM as a user message — broken UX.This came up during pre-merge review of #21 (slash command palette). The palette was originally going to expose the full command catalogue, but cross-referencing with
handle_entershowed ~30 ghost commands. The palette has since been restricted to the 8 working commands; this issue tracks closing the parity gap.What
For each command below, add a branch in
handle_enterthat:forge_app/forge_apiAPICommands to wire (priority order)
Tier 1 — most-used, smallest dispatch:
/new— start a new conversation (preserve history)/info— system information/help— help mode/exit— quit codegraff (today users use Ctrl+C; consider whether/exitshould be a slash form too)Tier 2 — agent switching:
/act(forge agent) — implementation mode/plan(muse agent) — planning mode/sage— research mode/agent— interactive agent selectionTier 3 — conversation management:
/conversation(alias/conversations) — list conversations/conversation-rename/clone— clone current/selected/rename/dump— save conversation as JSON/HTML/copy— copy last response to clipboard/compact— compact contextTier 4 — config:
/config— display effective config/config-edit— open config file in editor/config-model,/config-commit-model,/config-suggest-model/config-reasoning-effort,/reasoning-effort/config-reload/fast— toggle Priority ProcessingTier 5 — workspace + tools:
/workspace-sync(alias/sync)/workspace-status/workspace-info/workspace-init/index/skill— list skills/tools— list tools/suggest— generate shell command from natural languageTier 6 — git:
/commit-preview/commitTier 7 — admin:
/logout/updateAs each tier lands
For each command wired in
handle_enter, also add it toPALETTE_COMMANDSin the same PR. The palette has a sanity test (palette_includes_locally_handled_commands) that will need updating to keep the two in sync.Acceptance per tier
/palette executes the documented behaviour locally (no chat-message fallthrough).handle_enter's test module where dispatch logic is non-trivial (e.g. agent switch, dump, fast toggle).palette_includes_locally_handled_commandsto match.Out of scope
forge_appalready and just needs UI plumbing.main.rsinto a module tree (separate concern, tracked in codegraff TUI: feature parity with graff REPL + rendering polish #18).Related
/) palette + autocomplete to codegraff TUI #17 — slash palette UX (where this gap was discovered)