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:
sankalp committed 2026-06-06 21:36:37 +05:45
1 parent 70e9068082
commit cb3a1662d9
1 file changed
+10 -7
+10 -7
View File
@@ -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: