feat: handle output name remapping and disabled outputs in plugin initialization

Co-authored-by: aider (openai/andrew/openrouter/qwen/qwen3-coder) <aider@aider.chat>
This commit is contained in:
Andrew Phillips
2025-08-26 14:51:30 -03:00
parent 902c2f9c17
commit e5eadbfc53

View File

@@ -85,10 +85,21 @@ impl MetaService {
for plugin in plugins.iter() { for plugin in plugins.iter() {
let plugin_name = plugin.meta_name(); let plugin_name = plugin.meta_name();
for output_name in plugin.outputs().keys() { // For each plugin, collect all the output names it might write to
output_names.entry(output_name.clone()) for (internal_name, output_config) in plugin.outputs() {
.or_insert_with(Vec::new) let output_name = match output_config {
.push(plugin_name.clone()); 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());
}
} }
} }