mirror of
https://github.com/instructkr/claw-code.git
synced 2026-06-06 06:27:08 +08:00
fix: /config help returns structured section list (#344)
/config help now returns a list of available config sections in both text and JSON mode instead of treating 'help' as an unsupported section. Text mode shows available sections with descriptions. JSON mode returns available_sections array with loaded_keys count. Generated with https://github.com/Yeachan-Heo/gajae-code Co-authored-by: Gajae Code <dev@gajae-code.com>
This commit is contained in:
@@ -1572,7 +1572,10 @@ fn parse_clear_args(args: &[&str]) -> Result<bool, SlashCommandParseError> {
|
||||
fn parse_config_section(args: &[&str]) -> Result<Option<String>, SlashCommandParseError> {
|
||||
let section = optional_single_arg("config", args, "[env|hooks|model|plugins]")?;
|
||||
if let Some(section) = section {
|
||||
if matches!(section.as_str(), "env" | "hooks" | "model" | "plugins") {
|
||||
if matches!(
|
||||
section.as_str(),
|
||||
"env" | "hooks" | "model" | "plugins" | "help"
|
||||
) {
|
||||
return Ok(Some(section));
|
||||
}
|
||||
return Err(command_error(
|
||||
|
||||
Reference in New Issue
Block a user