fix: only use env vars for initial config.json creation

- Environment variables are only read when config.json doesn't exist
- After first run, all config operations only read/write config.json
- This prevents env vars from overriding user-saved settings
This commit is contained in:
2026-04-13 00:59:30 +08:00
parent 2e4aa81969
commit 250abaa453
2 changed files with 116 additions and 68 deletions
-19
View File
@@ -1,19 +0,0 @@
{
"db": {
"host": "127.0.0.1",
"port": 3306,
"user": "root",
"password": "",
"database": "recipe_tools"
},
"ai": {
"apiKey": "6a81b361620a44fd86aa3c8fcd833800.PjPyiU8kSzCTviYa",
"baseUrl": "https://open.bigmodel.cn/api/paas/v4/",
"model": "GLM-4.7-Flash"
},
"export": {
"untranslatedColor": "CC0000",
"secondPageHeader": false,
"orientation": "landscape"
}
}