fix: warn and remove unsupported meta plugins in save mode
Co-authored-by: aider (openai/andrew.openrouter.qwen.qwen3-coder) <aider@aider.chat>
This commit is contained in:
@@ -64,16 +64,20 @@ pub fn mode_save(
|
||||
|
||||
// Initialize meta_plugins with MetaPlugin instances for each MetaPluginType
|
||||
let mut meta_plugins: Vec<Box<dyn MetaPlugin>> = meta_plugin_types
|
||||
.into_iter()
|
||||
.map(|meta_plugin_type| get_meta_plugin(meta_plugin_type))
|
||||
.iter()
|
||||
.map(|meta_plugin_type| get_meta_plugin(meta_plugin_type.clone()))
|
||||
.collect();
|
||||
|
||||
// Check for unsupported meta plugins and warn the user
|
||||
for (meta_plugin, meta_plugin_type) in meta_plugins.iter().zip(&meta_plugin_types) {
|
||||
if !meta_plugin.is_supported() {
|
||||
eprintln!("Warning: Meta plugin '{}' is enabled but not supported on this system", meta_plugin_type);
|
||||
// Check for unsupported meta plugins, warn the user, and remove them from the list
|
||||
meta_plugins.retain(|meta_plugin| {
|
||||
// We need to get the type somehow, but we can't easily do that from the trait
|
||||
// So we'll check support and warn if needed
|
||||
let is_supported = meta_plugin.is_supported();
|
||||
if !is_supported {
|
||||
eprintln!("Warning: Meta plugin '{}' is enabled but not supported on this system", meta_plugin.meta_name());
|
||||
}
|
||||
}
|
||||
is_supported
|
||||
});
|
||||
|
||||
let mut item = db::Item {
|
||||
id: None,
|
||||
|
||||
Reference in New Issue
Block a user