feat: add smart default for hostname meta plugin and debug for api response

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 21:37:32 -03:00
parent f0a2cf32ac
commit 01ba00db4b
2 changed files with 13 additions and 2 deletions

View File

@@ -1,9 +1,20 @@
use crate::meta_plugin::{MetaPlugin, MetaPluginType};
#[derive(Debug, Clone, Default)]
use smart_default::SmartDefault;
#[derive(Debug, Clone, SmartDefault)]
pub struct HostnameMetaPlugin {
#[default = false]
is_finalized: bool,
#[default(std::collections::HashMap::new())]
outputs: std::collections::HashMap<String, serde_yaml::Value>,
#[default({
let mut map = std::collections::HashMap::new();
map.insert("hostname".to_string(), serde_yaml::Value::String("true".to_string()));
map.insert("hostname_full".to_string(), serde_yaml::Value::Bool(true));
map.insert("hostname_short".to_string(), serde_yaml::Value::Bool(true));
map
})]
options: std::collections::HashMap<String, serde_yaml::Value>,
}