fix: handle hostname false option properly
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat>
This commit is contained in:
@@ -23,6 +23,18 @@ impl HostnameMetaPlugin {
|
||||
// Override with provided options
|
||||
if let Some(opts) = options {
|
||||
for (key, value) in opts {
|
||||
// Handle "false" string values by converting them to Bool(false)
|
||||
if key == "hostname" || key == "hostname_full" || key == "hostname_short" {
|
||||
if let serde_yaml::Value::String(s) = &value {
|
||||
if s == "false" {
|
||||
final_options.insert(key, serde_yaml::Value::Bool(false));
|
||||
continue;
|
||||
} else if s == "true" {
|
||||
final_options.insert(key, serde_yaml::Value::Bool(true));
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
final_options.insert(key, value);
|
||||
}
|
||||
}
|
||||
@@ -195,6 +207,9 @@ impl MetaPlugin for HostnameMetaPlugin {
|
||||
_ => true,
|
||||
};
|
||||
|
||||
// Ensure that if hostname is explicitly set to false, it's disabled
|
||||
// This handles cases where it might be set to "false" string which we converted above
|
||||
|
||||
let hostname_full_enabled = self.options.get("hostname_full")
|
||||
.and_then(|v| v.as_bool())
|
||||
.unwrap_or(true);
|
||||
|
||||
Reference in New Issue
Block a user