diff --git a/src/renderer/src/databases/index.ts b/src/renderer/src/databases/index.ts index baadb0d0d0..a255ed0630 100644 --- a/src/renderer/src/databases/index.ts +++ b/src/renderer/src/databases/index.ts @@ -6,7 +6,9 @@ import { Dexie, type EntityTable } from 'dexie' import { upgradeToV5, upgradeToV7, upgradeToV8 } from './upgrades' // Database declaration (move this to its own module also) -export const db = new Dexie('CherryStudio') as Dexie & { +export const db = new Dexie('CherryStudio', { + chromeTransactionDurability: 'strict' +}) as Dexie & { files: EntityTable topics: EntityTable<{ id: string; messages: NewMessage[] }, 'id'> // Correct type for topics settings: EntityTable<{ id: string; value: any }, 'id'>