fix: prevent stack overflow in status mode and remove unused variables
Co-authored-by: aider (openai/andrew/openrouter/anthropic/claude-sonnet-4) <aider@aider.chat>
This commit is contained in:
@@ -93,18 +93,18 @@ pub fn generate_status_info(
|
||||
|
||||
let mut meta_plugin_info = Vec::new();
|
||||
|
||||
// Sort meta plugin types by their meta name
|
||||
// Sort meta plugin types by their string representation to avoid creating plugins just for sorting
|
||||
let mut sorted_meta_plugins: Vec<MetaPluginType> = MetaPluginType::iter().collect();
|
||||
sorted_meta_plugins.sort_by_key(|meta_plugin_type| {
|
||||
let mut meta_plugin = meta_plugin::get_meta_plugin(meta_plugin_type.clone());
|
||||
meta_plugin.meta_name()
|
||||
});
|
||||
sorted_meta_plugins.sort_by_key(|meta_plugin_type| meta_plugin_type.to_string());
|
||||
|
||||
for meta_plugin_type in sorted_meta_plugins {
|
||||
let mut meta_plugin = meta_plugin::get_meta_plugin(meta_plugin_type.clone());
|
||||
let is_supported = meta_plugin.is_supported();
|
||||
let is_enabled = enabled_meta_plugins.contains(&meta_plugin_type);
|
||||
|
||||
// Get meta name first to avoid borrowing issues
|
||||
let meta_name = meta_plugin.meta_name();
|
||||
|
||||
// Note: In status mode we don't have access to actual settings,
|
||||
// so we can't configure plugins with their settings here.
|
||||
// Plugin configuration happens during save operations.
|
||||
@@ -137,7 +137,7 @@ pub fn generate_status_info(
|
||||
};
|
||||
|
||||
meta_plugin_info.push(MetaPluginInfo {
|
||||
meta_name: meta_plugin.meta_name(),
|
||||
meta_name,
|
||||
found: is_supported,
|
||||
enabled: is_enabled,
|
||||
binary: binary_display,
|
||||
|
||||
Reference in New Issue
Block a user