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,12 +85,23 @@ 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() {
|
||||||
|
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)
|
.or_insert_with(Vec::new)
|
||||||
.push(plugin_name.clone());
|
.push(plugin_name.clone());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Print warnings for duplicate output names
|
// Print warnings for duplicate output names
|
||||||
for (output_name, plugin_names) in &output_names {
|
for (output_name, plugin_names) in &output_names {
|
||||||
|
|||||||
Reference in New Issue
Block a user