refactor(devgen/cli): reorder config merge to preserve key order
Preserves insertion order and prevents accidental overwriting of existing keys
This commit is contained in:
1 file changed
+10
-7
+10
-7
@@ -86,13 +86,16 @@ def setup_config() -> None:
|
||||
ollama_host = ollama_host_input.strip() or ollama_host
|
||||
|
||||
# Save Config — merge with existing to preserve extra keys
|
||||
new_config = {**current_config, **{
|
||||
"provider": provider,
|
||||
"model": model,
|
||||
"api_key": api_key,
|
||||
"emoji": emoji,
|
||||
"ollama_host": ollama_host,
|
||||
}}
|
||||
new_config = {
|
||||
**current_config,
|
||||
**{
|
||||
"provider": provider,
|
||||
"model": model,
|
||||
"api_key": api_key,
|
||||
"emoji": emoji,
|
||||
"ollama_host": ollama_host,
|
||||
},
|
||||
}
|
||||
|
||||
try:
|
||||
with config_path.open("w", encoding="utf-8") as f:
|
||||
|
||||
Reference in new issue
Block a user