From 815a818b3912b337dcc48ee2f912cdafe37db632 Mon Sep 17 00:00:00 2001 From: "Andrew Phillips (aider)" Date: Thu, 22 May 2025 13:28:59 -0300 Subject: [PATCH] feat: add meta_name column to meta plugin table --- src/modes/status.rs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/modes/status.rs b/src/modes/status.rs index 2ab717c..3ea011d 100644 --- a/src/modes/status.rs +++ b/src/modes/status.rs @@ -180,8 +180,12 @@ fn build_meta_plugin_table() -> Table { meta_plugin_table.set_titles(row!( b->"Type", b->"Found", + b->"Default", b->"Binary", - b->"Args")); + b->"Args", + b->"Meta Name")); + + let default_type = meta_plugin::default_meta_plugin_type(); for meta_plugin_type in MetaPluginType::iter() { let meta_plugin_program: MetaPluginProgram = match &META_PLUGIN_PROGRAMS[meta_plugin_type.clone()] { @@ -190,15 +194,22 @@ fn build_meta_plugin_table() -> Table { program: "".to_string(), args: Vec::new(), supported: true, + meta_name: "".to_string(), }, }; + 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 { 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"), + }, match meta_plugin_program.program.is_empty() { true => { Cell::new("").with_style(Attr::ForegroundColor(color::BRIGHT_BLACK)) @@ -206,6 +217,7 @@ fn build_meta_plugin_table() -> Table { false => Cell::new(&meta_plugin_program.program), }, Cell::new(&meta_plugin_program.args.join(" ")), + Cell::new(&meta_plugin_program.meta_name), ])); }