custom models

This commit is contained in:
2026-06-10 21:05:04 +10:00
parent fadcc460e2
commit 6a731c7a75
5 changed files with 138 additions and 42 deletions

View File

@@ -138,7 +138,10 @@ export function registerIpcHandlers(): void {
flush()
if (!event.sender.isDestroyed()) event.sender.send('ai:done')
} catch (err) {
const message = err instanceof Error ? err.message : String(err)
console.error('[ai:streamMessage] error:', err)
const message = err instanceof Error
? `${err.message}${(err as NodeJS.ErrnoException & { status?: number; url?: string }).status ? ` (HTTP ${(err as NodeJS.ErrnoException & { status?: number }).status})` : ''}`
: String(err)
if (!event.sender.isDestroyed()) event.sender.send('ai:error', message)
}
})