feat(backend): persistent settings store + settingsFile config

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-28 16:01:22 +02:00
co-authored by Claude Opus 4.8
parent 0cd14b5b55
commit 6b2883a467
4 changed files with 79 additions and 0 deletions
+2
View File
@@ -3,6 +3,7 @@ export interface AppConfig {
authMode: "none" | "mock" | "oidc";
defaults: { provider?: string; model?: string; thinking?: string };
maxPiProcesses: number;
settingsFile: string;
}
export function loadConfig(env: Record<string, string | undefined>): AppConfig {
return {
@@ -13,5 +14,6 @@ export function loadConfig(env: Record<string, string | undefined>): AppConfig {
authMode: (env.AUTH_MODE as AppConfig["authMode"]) ?? "none",
defaults: { provider: env.PI_PROVIDER, model: env.PI_MODEL, thinking: env.PI_THINKING },
maxPiProcesses: Number(env.MAX_PI_PROCESSES ?? 4),
settingsFile: env.SETTINGS_FILE ?? "data/settings.json",
};
}