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:
@@ -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> {
|
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
|
// Check if this output is disabled
|
||||||
if let Some(mapping) = outputs.get(internal_name) {
|
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 let Some(false_val) = mapping.as_bool() {
|
||||||
if !false_val {
|
if !false_val {
|
||||||
debug!("META: Skipping disabled output: {}", internal_name);
|
debug!("META: Skipping disabled output: {}", internal_name);
|
||||||
|
|||||||
Reference in New Issue
Block a user