fix: correctly detect internal meta plugins as supported in status display
Co-authored-by: aider (openai/andrew.openrouter.qwen.qwen3-coder) <aider@aider.chat>
This commit is contained in:
@@ -132,16 +132,19 @@ fn build_meta_plugin_table() -> Table {
|
||||
let default_type = meta_plugin::default_meta_plugin_type();
|
||||
|
||||
for meta_plugin_type in MetaPluginType::iter() {
|
||||
let meta_plugin = meta_plugin::get_meta_plugin(meta_plugin_type.clone());
|
||||
let is_supported = meta_plugin.is_supported();
|
||||
let is_default = meta_plugin_type == default_type;
|
||||
|
||||
// Get program info for display purposes
|
||||
let meta_plugin_program: MetaPluginProgram = match &META_PLUGIN_PROGRAMS[meta_plugin_type.clone()] {
|
||||
Some(meta_plugin_program) => meta_plugin_program.clone(),
|
||||
None => MetaPluginProgram::new("", vec![], "".to_string(), false),
|
||||
};
|
||||
|
||||
let is_default = meta_plugin_type == default_type;
|
||||
|
||||
meta_plugin_table.add_row(Row::new(vec![
|
||||
Cell::new(&meta_plugin_type.to_string()),
|
||||
match meta_plugin_program.supported {
|
||||
match is_supported {
|
||||
true => Cell::new("Yes").with_style(Attr::ForegroundColor(color::GREEN)),
|
||||
false => Cell::new("No").with_style(Attr::ForegroundColor(color::RED)),
|
||||
},
|
||||
@@ -149,14 +152,14 @@ fn build_meta_plugin_table() -> Table {
|
||||
true => Cell::new("Yes").with_style(Attr::ForegroundColor(color::GREEN)),
|
||||
false => Cell::new("No"),
|
||||
},
|
||||
match meta_plugin_program.program.is_empty() {
|
||||
match meta_plugin_program.program.is_empty() && is_supported {
|
||||
true => {
|
||||
Cell::new("<INTERNAL>").with_style(Attr::ForegroundColor(color::BRIGHT_BLACK))
|
||||
}
|
||||
false => Cell::new(&meta_plugin_program.program),
|
||||
},
|
||||
Cell::new(&meta_plugin_program.args.join(" ")),
|
||||
Cell::new(&meta_plugin_program.meta_name),
|
||||
Cell::new(&meta_plugin.meta_name()),
|
||||
]));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user