fix: handle null values to disable outputs

Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat>
This commit is contained in:
Andrew Phillips
2025-08-27 22:53:51 -03:00
parent 940dc2efd7
commit 3cc0fd3b22

View File

@@ -141,6 +141,12 @@ pub enum MetaPluginType {
pub fn process_metadata_outputs(internal_name: &str, value: serde_yaml::Value, outputs: &std::collections::HashMap<String, serde_yaml::Value>) -> Option<MetaData> {
// Check if this output is disabled
if let Some(mapping) = outputs.get(internal_name) {
// Check for null to disable the output
if mapping.is_null() {
debug!("META: Skipping disabled output (null): {}", internal_name);
return None;
}
// Check for boolean false to disable the output
if let Some(false_val) = mapping.as_bool() {
if !false_val {
debug!("META: Skipping disabled output: {}", internal_name);