Skip to content

feat(codegraff): wire Tier 1-7 commands into TUI dispatcher#25

Merged
justrach merged 2 commits into
mainfrom
feat/codegraff-all-tiers-rebased
May 5, 2026
Merged

feat(codegraff): wire Tier 1-7 commands into TUI dispatcher#25
justrach merged 2 commits into
mainfrom
feat/codegraff-all-tiers-rebased

Conversation

@justrach

@justrach justrach commented May 5, 2026

Copy link
Copy Markdown
Owner

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_enter plus matching PALETTE_COMMANDS entries:

Tier 1/new, /info, /help
Tier 2/act, /plan, /sage, /agent
Tier 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_commands requires every dispatched name to be in PALETTE_COMMANDS, catching drift.

Commits

  • Tier 1 (/new /info /help)
  • All other tiers (32 commands)

🤖 Generated with Claude Code

justrach and others added 2 commits May 5, 2026 11:53
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>
@github-actions github-actions Bot added type: feature Brand new functionality, features, pages, workflows, endpoints, etc. type: fix Iterations on existing features or infrastructure. labels May 5, 2026
@justrach justrach merged commit 0f33584 into main May 5, 2026
6 of 7 checks passed
@justrach justrach deleted the feat/codegraff-all-tiers-rebased branch May 5, 2026 03:54
justrach added a commit that referenced this pull request May 5, 2026
Captures the slash-palette + tier 1-7 dispatcher work merged in #21,
#23 (via #25), and #25, plus the rebrand and image-paste work from
#19. All forge_* and codegraff crates inherit via
\`version.workspace = true\`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: feature Brand new functionality, features, pages, workflows, endpoints, etc. type: fix Iterations on existing features or infrastructure.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant