refactor: remove default column from meta plugin status table and simplify default logic

Co-authored-by: aider (openai/andrew.openrouter.qwen.qwen3-coder) <aider@aider.chat>
This commit is contained in:
Andrew Phillips
2025-07-29 11:46:02 -03:00
parent 632184221b
commit 05af560399
2 changed files with 3 additions and 17 deletions

View File

@@ -70,13 +70,7 @@ pub fn get_meta_plugin(meta_plugin_type: MetaPluginType) -> Box<dyn MetaPlugin>
}
pub fn default_meta_plugin_type() -> MetaPluginType {
let mut default = MetaPluginType::FileMagic;
for meta_plugin_type in MetaPluginType::iter() {
let meta_plugin = get_meta_plugin(meta_plugin_type.clone());
if meta_plugin.is_supported() {
default = meta_plugin_type;
break;
}
}
default
// Default meta plugin functionality has been removed
// This function returns a placeholder value
MetaPluginType::FileMagic
}

View File

@@ -124,17 +124,13 @@ fn build_meta_plugin_table() -> Table {
meta_plugin_table.set_titles(row!(
b->"Type",
b->"Found",
b->"Default",
b->"Binary",
b->"Args",
b->"Meta Name"));
let default_type = meta_plugin::default_meta_plugin_type();
for meta_plugin_type in MetaPluginType::iter() {
let mut 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: Option<MetaPluginProgram> = META_PLUGIN_PROGRAMS[meta_plugin_type.clone()].clone();
@@ -166,10 +162,6 @@ fn build_meta_plugin_table() -> Table {
true => Cell::new("Yes").with_style(Attr::ForegroundColor(color::GREEN)),
false => Cell::new("No").with_style(Attr::ForegroundColor(color::RED)),
},
match is_default {
true => Cell::new("Yes").with_style(Attr::ForegroundColor(color::GREEN)),
false => Cell::new("No"),
},
Cell::new(&binary_display),
Cell::new(&args_display),
Cell::new(&meta_plugin.meta_name()),