refactor: update meta plugin to use output mappings
Co-authored-by: aider (openai/andrew/openrouter/anthropic/claude-sonnet-4) <aider@aider.chat>
This commit is contained in:
@@ -42,11 +42,19 @@ fn setup_compression_and_plugins(
|
||||
.map(|meta_plugin_type| crate::meta_plugin::get_meta_plugin(meta_plugin_type.clone()))
|
||||
.collect();
|
||||
|
||||
// Configure meta plugins with their options from settings
|
||||
// Configure meta plugins with their options and outputs from settings
|
||||
if let Some(meta_plugin_configs) = &settings.meta_plugins {
|
||||
for meta_plugin in meta_plugins.iter_mut() {
|
||||
let plugin_name = meta_plugin.meta_name();
|
||||
if let Some(config) = meta_plugin_configs.iter().find(|c| c.name == plugin_name) {
|
||||
// Set outputs first
|
||||
let mut outputs = std::collections::HashMap::new();
|
||||
for (key, value) in &config.outputs {
|
||||
outputs.insert(key.clone(), serde_yaml::Value::String(value.clone()));
|
||||
}
|
||||
meta_plugin.set_outputs(outputs);
|
||||
|
||||
// Then configure with options
|
||||
if let Err(e) = meta_plugin.configure(&config.options) {
|
||||
eprintln!("Warning: Failed to configure meta plugin '{}': {}", plugin_name, e);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user