fix: always display options and outputs sections for meta plugins

Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat>
This commit is contained in:
Andrew Phillips
2025-08-27 15:49:28 -03:00
parent 55ac1758f3
commit 5a0c8777b2

View File

@@ -159,29 +159,33 @@ fn build_config_table(settings: &config::Settings) -> Table {
all_options.insert(key.clone(), value.clone());
}
// Add options
if !all_options.is_empty() {
let options_str = serde_yaml::to_string(&all_options)
// Always add options section
let options_str = if all_options.is_empty() {
"{}".to_string()
} else {
serde_yaml::to_string(&all_options)
.unwrap_or_else(|_| "Unable to serialize options".to_string())
.trim()
.to_string();
config_table.add_row(Row::new(vec![
Cell::new(" Options"),
Cell::new(&options_str),
]));
}
.to_string()
};
config_table.add_row(Row::new(vec![
Cell::new(" Options"),
Cell::new(&options_str),
]));
// Add outputs if they exist
if !plugin_config.outputs.is_empty() {
let outputs_str = serde_yaml::to_string(&plugin_config.outputs)
// Always add outputs section
let outputs_str = if plugin_config.outputs.is_empty() {
"{}".to_string()
} else {
serde_yaml::to_string(&plugin_config.outputs)
.unwrap_or_else(|_| "Unable to serialize outputs".to_string())
.trim()
.to_string();
config_table.add_row(Row::new(vec![
Cell::new(" Outputs"),
Cell::new(&outputs_str),
]));
}
.to_string()
};
config_table.add_row(Row::new(vec![
Cell::new(" Outputs"),
Cell::new(&outputs_str),
]));
}
}