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:
@@ -70,13 +70,7 @@ pub fn get_meta_plugin(meta_plugin_type: MetaPluginType) -> Box<dyn MetaPlugin>
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn default_meta_plugin_type() -> MetaPluginType {
|
pub fn default_meta_plugin_type() -> MetaPluginType {
|
||||||
let mut default = MetaPluginType::FileMagic;
|
// Default meta plugin functionality has been removed
|
||||||
for meta_plugin_type in MetaPluginType::iter() {
|
// This function returns a placeholder value
|
||||||
let meta_plugin = get_meta_plugin(meta_plugin_type.clone());
|
MetaPluginType::FileMagic
|
||||||
if meta_plugin.is_supported() {
|
|
||||||
default = meta_plugin_type;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
default
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -124,17 +124,13 @@ fn build_meta_plugin_table() -> Table {
|
|||||||
meta_plugin_table.set_titles(row!(
|
meta_plugin_table.set_titles(row!(
|
||||||
b->"Type",
|
b->"Type",
|
||||||
b->"Found",
|
b->"Found",
|
||||||
b->"Default",
|
|
||||||
b->"Binary",
|
b->"Binary",
|
||||||
b->"Args",
|
b->"Args",
|
||||||
b->"Meta Name"));
|
b->"Meta Name"));
|
||||||
|
|
||||||
let default_type = meta_plugin::default_meta_plugin_type();
|
|
||||||
|
|
||||||
for meta_plugin_type in MetaPluginType::iter() {
|
for meta_plugin_type in MetaPluginType::iter() {
|
||||||
let mut meta_plugin = meta_plugin::get_meta_plugin(meta_plugin_type.clone());
|
let mut meta_plugin = meta_plugin::get_meta_plugin(meta_plugin_type.clone());
|
||||||
let is_supported = meta_plugin.is_supported();
|
let is_supported = meta_plugin.is_supported();
|
||||||
let is_default = meta_plugin_type == default_type;
|
|
||||||
|
|
||||||
// Get program info for display purposes
|
// Get program info for display purposes
|
||||||
let meta_plugin_program: Option<MetaPluginProgram> = META_PLUGIN_PROGRAMS[meta_plugin_type.clone()].clone();
|
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)),
|
true => Cell::new("Yes").with_style(Attr::ForegroundColor(color::GREEN)),
|
||||||
false => Cell::new("No").with_style(Attr::ForegroundColor(color::RED)),
|
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(&binary_display),
|
||||||
Cell::new(&args_display),
|
Cell::new(&args_display),
|
||||||
Cell::new(&meta_plugin.meta_name()),
|
Cell::new(&meta_plugin.meta_name()),
|
||||||
|
|||||||
Reference in New Issue
Block a user