feat: add MetaPlugin outputs to status display
Co-authored-by: aider (openai/andrew/openrouter/anthropic/claude-sonnet-4) <aider@aider.chat>
This commit is contained in:
@@ -40,6 +40,7 @@ pub struct MetaPluginInfo {
|
|||||||
pub enabled: bool,
|
pub enabled: bool,
|
||||||
pub binary: String,
|
pub binary: String,
|
||||||
pub args: String,
|
pub args: String,
|
||||||
|
pub outputs: std::collections::HashMap<String, serde_yaml::Value>,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn generate_status_info(
|
pub fn generate_status_info(
|
||||||
@@ -124,6 +125,7 @@ pub fn generate_status_info(
|
|||||||
enabled: is_enabled,
|
enabled: is_enabled,
|
||||||
binary: binary_display,
|
binary: binary_display,
|
||||||
args: args_display,
|
args: args_display,
|
||||||
|
outputs: meta_plugin.outputs().clone(),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -95,9 +95,16 @@ fn build_meta_plugin_table(meta_plugin_info: &Vec<MetaPluginInfo>) -> Table {
|
|||||||
b->"Found",
|
b->"Found",
|
||||||
b->"Enabled",
|
b->"Enabled",
|
||||||
b->"Binary",
|
b->"Binary",
|
||||||
b->"Args"));
|
b->"Args",
|
||||||
|
b->"Outputs"));
|
||||||
|
|
||||||
for info in meta_plugin_info {
|
for info in meta_plugin_info {
|
||||||
|
let outputs_display = if info.outputs.is_empty() {
|
||||||
|
"{}".to_string()
|
||||||
|
} else {
|
||||||
|
serde_yaml::to_string(&info.outputs).unwrap_or_else(|_| "{}".to_string()).trim().to_string()
|
||||||
|
};
|
||||||
|
|
||||||
meta_plugin_table.add_row(Row::new(vec![
|
meta_plugin_table.add_row(Row::new(vec![
|
||||||
Cell::new(&info.meta_name),
|
Cell::new(&info.meta_name),
|
||||||
match info.found {
|
match info.found {
|
||||||
@@ -114,6 +121,7 @@ fn build_meta_plugin_table(meta_plugin_info: &Vec<MetaPluginInfo>) -> Table {
|
|||||||
_ => Cell::new(&info.binary),
|
_ => Cell::new(&info.binary),
|
||||||
},
|
},
|
||||||
Cell::new(&info.args),
|
Cell::new(&info.args),
|
||||||
|
Cell::new(&outputs_display),
|
||||||
]));
|
]));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user