fix: convert metadata to use MetaData type
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat>
This commit is contained in:
@@ -264,15 +264,33 @@ impl MetaPlugin for HostnameMetaPlugin {
|
|||||||
// Prepare metadata to return
|
// Prepare metadata to return
|
||||||
let mut metadata = Vec::new();
|
let mut metadata = Vec::new();
|
||||||
|
|
||||||
// Add enabled metadata to the response
|
// Add enabled metadata to the response using process_metadata_outputs
|
||||||
if hostname_enabled {
|
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 {
|
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 {
|
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
|
// Update outputs based on enabled status
|
||||||
|
|||||||
Reference in New Issue
Block a user