Add a
/command palette to the home prompt. All in thetuifeature; no new deps. Commit once at the end.
Spec: TUI Slash Commands Spec
-
tui/config.rs:RunOptions(max_iters, implementer, reviewers, designer, include_design, verify_command, dry_run) withDefault,summary() -> String,config(requirement) -> LoopConfig, andmake_invoker(). -
tui/command.rs:Commandenum;SPECS(name, args, help);parse(&str) -> Result<Command, String>;matches(prefix) -> Vec<&Spec>; unit tests.
-
App: addoptions: RunOptions, palette state (palette: Vec<usize>,palette_selected), andmessage: Option<String>. -
App::command_mode()(input starts with/),refresh_palette(),palette_up/down,complete_palette()(Tab),run_command()(parse + apply + set message). Settings commands mutateoptions;/browse//quit//helpact;/applydefers to the event loop (needs the runs dir) via an intent like submit. -
Session::starttakes&RunOptions; the home launch builds fromoptions.
-
handle_key(Home): in command mode,↑/↓move the palette,Tabcompletes,Enterruns the command,Escclears to requirement mode; otherwise unchanged. -
/apply: apply the selected run'schanged-files.txtinto the cwd (shared helper), report the count in the status message.
-
view/home.rs: a status line (options summary) above the input; when in command mode, render the palette (matching commands + descriptions, selection highlighted) above the input; show the transientmessage(red on error) in the footer.
- Tests: command parsing/aliases/errors, palette filtering, each settings command
mutating
RunOptions,config()reflecting them, a render snapshot in command mode. - Docs:
docs/guide/usage.md(a "Slash commands" subsection under Interactive TUI) and README.cargo clippy+ tests green with and without--features tui. Commit.