feat: add AI model config template

This commit is contained in:
2026-06-22 16:57:11 +08:00
parent c59a348d67
commit 89ead379d2
6 changed files with 46 additions and 4 deletions
+3 -3
View File
@@ -3,7 +3,7 @@
Compiled to Launcher.exe (PyInstaller onefile) and run instead of launching
app/CMBot.exe directly. On each start it:
1. seeds default config/templates into ~/.cmbot on first run;
1. seeds default config/templates/model config into ~/.cmbot on first run;
2. applies a previously staged update if one is ready (fast local swap of
staging\\app.new into app\\, keeping app.old\\ for rollback);
3. launches app\\CMBot.exe.
@@ -26,13 +26,13 @@ from services import installer # noqa: E402
from services.file_service import get_data_dir # noqa: E402
APP_EXE = "CMBot.exe"
CONFIG_FILES = ("app_config.json", "templates.json")
CONFIG_FILES = ("app_config.json", "templates.json", "ai_models.json")
logger = logging.getLogger("launcher")
def seed_defaults(app_dir, data_dir):
"""First run: copy factory config/templates from app\\config into the data
"""First run: copy factory config/templates/models from app\\config into the data
root, without overwriting any existing user file."""
src = app_dir / "config"
if not src.is_dir():