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:
YeonGyu-Kim
2026-05-25 21:08:14 +09:00
parent 36b36267ec
commit b8eca2a68e
2 changed files with 5 additions and 6 deletions

View File

@@ -2301,12 +2301,9 @@ pub fn handle_plugins_slash_command(
reload_runtime: true,
})
}
Some(other) => Ok(PluginsCommandResult {
message: format!(
"Unknown /plugins action '{other}'. Use list, install, enable, disable, uninstall, or update."
),
reload_runtime: false,
}),
Some(other) => Err(PluginError::CommandFailed(format!(
"unknown_plugins_action: '{other}' is not a supported /plugins action. Use list, install, enable, disable, uninstall, or update."
))),
}
}

View File

@@ -308,6 +308,8 @@ fn classify_error_kind(message: &str) -> &'static str {
"skill_not_found"
} else if message.contains("Unsupported config section") {
"unsupported_config_section"
} else if message.contains("unknown_plugins_action") {
"unknown_plugins_action"
} else {
"unknown"
}