fix: Improve --status-plugins output for various formats
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat>
This commit is contained in:
@@ -360,11 +360,15 @@ pub fn mode_status(
|
||||
build_meta_plugin_table(&status_info.meta_plugins).printstd();
|
||||
println!();
|
||||
|
||||
// Print META PLUGINS CONFIGURED if they exist
|
||||
// Always try to print META PLUGINS CONFIGURED section
|
||||
if let Some(meta_plugins_table) = build_meta_plugins_configured_table(settings) {
|
||||
println!("META PLUGINS CONFIGURED:");
|
||||
meta_plugins_table.printstd();
|
||||
println!();
|
||||
} else {
|
||||
println!("META PLUGINS CONFIGURED:");
|
||||
println!("No plugins configured");
|
||||
println!();
|
||||
}
|
||||
} else {
|
||||
println!("CONFIG:");
|
||||
@@ -386,7 +390,7 @@ pub fn mode_status(
|
||||
// Create a subset for plugins only
|
||||
let plugins_info = serde_json::json!({
|
||||
"meta_plugins_available": status_info.meta_plugins,
|
||||
"meta_plugins_configured": settings.meta_plugins.as_ref().map(|plugins| plugins)
|
||||
"meta_plugins_configured": settings.meta_plugins
|
||||
});
|
||||
println!("{}", serde_json::to_string_pretty(&plugins_info)?);
|
||||
} else {
|
||||
@@ -396,14 +400,25 @@ pub fn mode_status(
|
||||
},
|
||||
OutputFormat::Yaml => {
|
||||
if plugins_only {
|
||||
// Create a subset for plugins only
|
||||
let plugins_info = serde_yaml::to_string(&serde_yaml::Value::Mapping(serde_yaml::Mapping::new()))?;
|
||||
// This needs to be more precise, but for now, just print the original
|
||||
println!("{}", serde_yaml::to_string(&status_info.meta_plugins)?);
|
||||
// Create a proper structure for plugins info
|
||||
use serde_yaml::Mapping;
|
||||
let mut plugins_mapping = Mapping::new();
|
||||
|
||||
// Add available plugins
|
||||
plugins_mapping.insert(
|
||||
serde_yaml::Value::String("meta_plugins_available".to_string()),
|
||||
serde_yaml::to_value(&status_info.meta_plugins)?,
|
||||
);
|
||||
|
||||
// Add configured plugins if they exist
|
||||
if let Some(configured_plugins) = &settings.meta_plugins {
|
||||
println!("---");
|
||||
println!("{}", serde_yaml::to_string(&configured_plugins)?);
|
||||
plugins_mapping.insert(
|
||||
serde_yaml::Value::String("meta_plugins_configured".to_string()),
|
||||
serde_yaml::to_value(configured_plugins)?,
|
||||
);
|
||||
}
|
||||
|
||||
println!("{}", serde_yaml::to_string(&plugins_mapping)?);
|
||||
} else {
|
||||
println!("{}", serde_yaml::to_string(&status_info)?);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user