From 86dbf0c568e3d59dcce0931021a46383b52b7820 Mon Sep 17 00:00:00 2001 From: Andrew Phillips Date: Fri, 29 Aug 2025 12:54:14 -0300 Subject: [PATCH] fix: convert metadata to use MetaData type Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) --- src/meta_plugin/hostname.rs | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/src/meta_plugin/hostname.rs b/src/meta_plugin/hostname.rs index 3555044..2f24986 100644 --- a/src/meta_plugin/hostname.rs +++ b/src/meta_plugin/hostname.rs @@ -264,15 +264,33 @@ impl MetaPlugin for HostnameMetaPlugin { // Prepare metadata to return let mut metadata = Vec::new(); - // Add enabled metadata to the response + // Add enabled metadata to the response using process_metadata_outputs if hostname_enabled { - metadata.push(("hostname".to_string(), serde_yaml::Value::String(hostname_value.clone()))); + if let Some(meta_data) = crate::meta_plugin::process_metadata_outputs( + "hostname", + serde_yaml::Value::String(hostname_value.clone()), + &self.outputs + ) { + metadata.push(meta_data); + } } if hostname_full_enabled { - metadata.push(("hostname_full".to_string(), serde_yaml::Value::String(full_hostname.clone()))); + if let Some(meta_data) = crate::meta_plugin::process_metadata_outputs( + "hostname_full", + serde_yaml::Value::String(full_hostname.clone()), + &self.outputs + ) { + metadata.push(meta_data); + } } if hostname_short_enabled { - metadata.push(("hostname_short".to_string(), serde_yaml::Value::String(short_hostname.clone()))); + if let Some(meta_data) = crate::meta_plugin::process_metadata_outputs( + "hostname_short", + serde_yaml::Value::String(short_hostname.clone()), + &self.outputs + ) { + metadata.push(meta_data); + } } // Update outputs based on enabled status