feat: sort meta plugins by name in status tables
Co-authored-by: aider (openai/andrew/openrouter/mistralai/mistral-medium-3.1) <aider@aider.chat>
This commit is contained in:
@@ -134,6 +134,10 @@ fn build_meta_plugins_configured_table(settings: &config::Settings) -> Option<Ta
|
|||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Sort meta plugins by name
|
||||||
|
let mut sorted_meta_plugins = meta_plugins.clone();
|
||||||
|
sorted_meta_plugins.sort_by(|a, b| a.name.cmp(&b.name));
|
||||||
|
|
||||||
let mut table = Table::new();
|
let mut table = Table::new();
|
||||||
if std::io::stdout().is_terminal() {
|
if std::io::stdout().is_terminal() {
|
||||||
//table.set_format(get_format_box_chars_no_border_line_separator());
|
//table.set_format(get_format_box_chars_no_border_line_separator());
|
||||||
@@ -148,7 +152,7 @@ fn build_meta_plugins_configured_table(settings: &config::Settings) -> Option<Ta
|
|||||||
Cell::new("Outputs").with_style(Attr::Bold),
|
Cell::new("Outputs").with_style(Attr::Bold),
|
||||||
]));
|
]));
|
||||||
|
|
||||||
for plugin_config in meta_plugins {
|
for plugin_config in sorted_meta_plugins {
|
||||||
// Create the plugin to get its default options
|
// Create the plugin to get its default options
|
||||||
let meta_plugin_type = match MetaPluginType::from_str(&plugin_config.name) {
|
let meta_plugin_type = match MetaPluginType::from_str(&plugin_config.name) {
|
||||||
Ok(plugin_type) => plugin_type,
|
Ok(plugin_type) => plugin_type,
|
||||||
@@ -282,7 +286,11 @@ fn build_meta_plugin_table(meta_plugin_info: &Vec<MetaPluginInfo>) -> Table {
|
|||||||
b->"Options",
|
b->"Options",
|
||||||
b->"Outputs"));
|
b->"Outputs"));
|
||||||
|
|
||||||
for info in meta_plugin_info {
|
// Sort meta plugin info by plugin name
|
||||||
|
let mut sorted_meta_plugin_info = meta_plugin_info.clone();
|
||||||
|
sorted_meta_plugin_info.sort_by(|a, b| a.meta_name.cmp(&b.meta_name));
|
||||||
|
|
||||||
|
for info in sorted_meta_plugin_info {
|
||||||
// Get default options for the meta plugin
|
// Get default options for the meta plugin
|
||||||
let meta_plugin_type = match MetaPluginType::from_str(&info.meta_name) {
|
let meta_plugin_type = match MetaPluginType::from_str(&info.meta_name) {
|
||||||
Ok(plugin_type) => plugin_type,
|
Ok(plugin_type) => plugin_type,
|
||||||
|
|||||||
Reference in New Issue
Block a user