feat(codegraff): wire Tier 1-7 commands into TUI dispatcher#25
Merged
Conversation
Adds local handlers for the three highest-traffic Tier 1 commands from the parity tracker (#22), plus the corresponding palette entries: - `/new` — calls `Conversation::generate()` + `upsert_conversation`, then resets transcript, image attachments, pending pastes, usage, and any in-flight workflow. Active model is preserved. - `/info` — pushes status entries for active agent, model label, conversation id, and log path. TUI equivalent of the REPL `:info` Info widget. - `/help` — opens the command palette (the discovery surface). Cheap alias so `/help` does the natural thing in a TUI. The `palette_includes_locally_handled_commands` test is updated to require these three names. This keeps PALETTE_COMMANDS in lockstep with handle_enter — no ghost commands. Remaining tiers (agent switching, conversation management, config, workspace, git) tracked in #22. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Closes Tiers 2-7 of #22. Adds 32 new slash commands to the codegraff TUI dispatcher with full PALETTE_COMMANDS coverage and matching test entries. Rough split: - Tier 2 (agent switching): /act, /plan, /sage, /agent. /agent without args lists available agents; with arg switches. - Tier 3 (conversation): /conversation(s), /rename, /conversation-rename, /dump (json or --html), /compact. /clone and /copy are deferred with helpful status messages. - Tier 4 (config): /config, /config-edit (opens $EDITOR on ~/forge/.forge.toml), /fast (toggle), /reasoning-effort and /config-reasoning-effort (arg form), /config-model, /config-commit-model, /config-suggest-model (provider resolved from current session). /config-reload deferred. - Tier 5 (workspace + tools): /workspace-sync, /sync, /index, /workspace-status, /workspace-info, /workspace-init, /skill, /tools, /suggest. - Tier 6 (git): /commit, /commit-preview. - Tier 7 (admin): /logout (removes default provider creds), /update (runs the install script). Adds chrono, dirs, serde_json to the codegraff-tui Cargo.toml; all are already in workspace deps. New code shares the same pattern as the existing /usage / /new / /info handlers. Note: most workspace + tools handlers print debug-formatted results (using {:?}) for now; richer rendering can land as follow-ups under the parity tracker. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Combined Tier 1 (#23, was orphaned by squash-merge) + Tiers 2-7 (#24, now superseded) cherry-picked onto current main.
Closes Tier 1-7 of #22 in one shot. Adds 35 commands wired into codegraff TUI's
handle_enterplus matching PALETTE_COMMANDS entries:Tier 1 —
/new,/info,/helpTier 2 —
/act,/plan,/sage,/agentTier 3 —
/conversation(s),/rename,/conversation-rename,/dump(with--html),/compact. Deferred:/clone,/copy.Tier 4 —
/config,/config-edit,/fast,/reasoning-effort,/config-reasoning-effort,/config-model,/config-commit-model,/config-suggest-model. Deferred:/config-reload.Tier 5 —
/workspace-sync(alias/sync),/index,/workspace-status,/workspace-info,/workspace-init,/skill(s),/tools,/suggest.Tier 6 —
/commit-preview,/commit.Tier 7 —
/logout,/update.8 deferred commands print helpful status messages routing users to the graff REPL or noting follow-ups in #22.
Tests
cargo test -p codegraff --bin codegraff palette— 8 tests pass.palette_includes_locally_handled_commandsrequires every dispatched name to be in PALETTE_COMMANDS, catching drift.Commits
/new/info/help)🤖 Generated with Claude Code