Compare commits

..

4 Commits

Author SHA1 Message Date
YeonGyu-Kim
bac47d91bd style: cargo fmt after conflict resolution 2026-05-05 04:53:55 +09:00
YeonGyu-Kim
c956e46751 fix: block /plugins update in resume mode, fix comment
Address REQUEST_CHANGES from OMX review:
1. Add 'update' to the blocked mutation actions in resume mode
   (previously only install/uninstall/enable/disable were blocked)
2. Fix comment: 'Only list is supported' instead of 'Only list/help'
   since /plugins help doesn't actually parse as a valid action
2026-05-05 04:51:55 +09:00
YeonGyu-Kim
08fc38f51b style: cargo fmt line wrap in run_resume_command plugins handler 2026-05-05 04:51:55 +09:00
YeonGyu-Kim
4fc63e338d fix: support /plugins slash command in resume mode
Move SlashCommand::Plugins out of the 'unsupported resumed slash
command' catch-all and add a handler arm in run_resume_command that
calls handle_plugins_slash_command for list/help actions.

Mutation actions (install/uninstall/enable/disable) are rejected with
a clear error since there is no runtime to reload in resume mode.

Add /plugins coverage to resumed_inventory_commands test in
output_format_contract.rs: kind, action, reload_runtime, target.

Before: claw --resume session.jsonl /plugins --output-format json
-> {error: 'unsupported resumed slash command', type: 'error'}, exit 1

After: claw --resume session.jsonl /plugins --output-format json
-> {kind: 'plugin', action: 'list', ...}, exit 0
2026-05-05 04:51:55 +09:00

View File

@@ -926,14 +926,6 @@ fn parse_args(args: &[String]) -> Result<CliAction, String> {
} }
Ok(CliAction::Diff { output_format }) Ok(CliAction::Diff { output_format })
} }
// `claw permissions <mode>` falls through to the LLM when called
// with a subcommand argument because parse_single_word_command_alias
// only intercepts the bare single-word form. Catch all multi-word
// forms here and return a structured guidance error so no network
// call or session is created.
"permissions" => Err(format!(
"`claw permissions` is a slash command. Start `claw` and run `/permissions` inside the REPL.\n Usage /permissions [read-only|workspace-write|danger-full-access]"
)),
"skills" => { "skills" => {
let args = join_optional_args(&rest[1..]); let args = join_optional_args(&rest[1..]);
match classify_skills_slash_command(args.as_deref()) { match classify_skills_slash_command(args.as_deref()) {