mirror of
https://github.com/instructkr/claude-code.git
synced 2026-05-29 08:56:44 +00:00
fix(#349): plugins unknown action emits status:error + error_kind:unknown_plugins_action + exit 1 instead of status:ok with prose
This commit is contained in:
@@ -2301,12 +2301,9 @@ pub fn handle_plugins_slash_command(
|
|||||||
reload_runtime: true,
|
reload_runtime: true,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
Some(other) => Ok(PluginsCommandResult {
|
Some(other) => Err(PluginError::CommandFailed(format!(
|
||||||
message: format!(
|
"unknown_plugins_action: '{other}' is not a supported /plugins action. Use list, install, enable, disable, uninstall, or update."
|
||||||
"Unknown /plugins action '{other}'. Use list, install, enable, disable, uninstall, or update."
|
))),
|
||||||
),
|
|
||||||
reload_runtime: false,
|
|
||||||
}),
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -308,6 +308,8 @@ fn classify_error_kind(message: &str) -> &'static str {
|
|||||||
"skill_not_found"
|
"skill_not_found"
|
||||||
} else if message.contains("Unsupported config section") {
|
} else if message.contains("Unsupported config section") {
|
||||||
"unsupported_config_section"
|
"unsupported_config_section"
|
||||||
|
} else if message.contains("unknown_plugins_action") {
|
||||||
|
"unknown_plugins_action"
|
||||||
} else {
|
} else {
|
||||||
"unknown"
|
"unknown"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user