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:
@@ -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());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user