From e5eadbfc539368909ae92412a692d2cc434e9376 Mon Sep 17 00:00:00 2001 From: Andrew Phillips Date: Tue, 26 Aug 2025 14:51:30 -0300 Subject: [PATCH] feat: handle output name remapping and disabled outputs in plugin initialization Co-authored-by: aider (openai/andrew/openrouter/qwen/qwen3-coder) --- src/services/meta_service.rs | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/src/services/meta_service.rs b/src/services/meta_service.rs index bc82068..8b7a7d3 100644 --- a/src/services/meta_service.rs +++ b/src/services/meta_service.rs @@ -85,10 +85,21 @@ impl MetaService { for plugin in plugins.iter() { let plugin_name = plugin.meta_name(); - for output_name in plugin.outputs().keys() { - output_names.entry(output_name.clone()) - .or_insert_with(Vec::new) - .push(plugin_name.clone()); + // For each plugin, collect all the output names it might write to + for (internal_name, output_config) in plugin.outputs() { + let output_name = match output_config { + serde_yaml::Value::String(remapped_name) => remapped_name.clone(), + serde_yaml::Value::Bool(true) => internal_name.clone(), + serde_yaml::Value::Bool(false) => continue, // This output is disabled + _ => internal_name.clone(), // Default to internal name for other types + }; + + // Only track outputs that will actually be written + if !matches!(output_config, serde_yaml::Value::Bool(false)) { + output_names.entry(output_name) + .or_insert_with(Vec::new) + .push(plugin_name.clone()); + } } }