custom models

This commit is contained in:
2026-06-10 12:09:44 +10:00
parent 264d28a965
commit 5a42ad9e37
3 changed files with 29 additions and 11 deletions

View File

@@ -57,7 +57,7 @@ export function registerIpcHandlers(): void {
ipcMain.handle('config:read', async () => readGlobalConfig())
ipcMain.handle('config:write', async (_e, updates: Partial<GlobalConfig>) => {
writeGlobalConfig(updates)
if (updates.apiKey !== undefined) resetClient()
resetClient() // always reset — baseURL or model may have changed
})
ipcMain.handle('config:pickFolder', async (event): Promise<string | null> => {
const win = BrowserWindow.fromWebContents(event.sender)