refactor: extract model flag and simplify config return type

This commit is contained in:
mitchell 2026-04-18 19:10:07 -04:00
parent 6dc55bc3f3
commit d327ed614a
2 changed files with 9 additions and 8 deletions

View file

@ -8,16 +8,14 @@ export interface AppConfig {
model?: string;
}
export async function loadConfig(): Promise<{
config: AppConfig;
}> {
export async function loadConfig(): Promise<AppConfig> {
let config: AppConfig;
try {
config = await configFile.json();
} catch {
config = {};
}
return { config };
return config;
}
export async function saveConfig(config: AppConfig): Promise<void> {