Skip to content

Commit 81106ab

Browse files
committed
fix: save session settings to sqlite storage to fix exceed quota error
1 parent d3f3c18 commit 81106ab

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/renderer/stores/atoms/settingsAtoms.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ export const pasteLongTextAsAFileAtom = focusAtom(settingsAtom, (optic) => optic
6666
// Related UI state, moved here for proximity to settings
6767
export const openSettingDialogAtom = atom<SettingWindowTab | null>(null)
6868

69-
// 存储新创建SessionSettings的默认值 缓存在 localStorage
70-
export const chatSessionSettingsAtom = atomWithStorage<SessionSettings>(StorageKey.ChatSessionSettings, {})
71-
export const pictureSessionSettingsAtom = atomWithStorage<SessionSettings>(StorageKey.PictureSessionSettings, {})
69+
// 存储新创建SessionSettings的默认值 缓存在 localStorage (有用户出现 exceed quota 错误,改到 storage 中)
70+
export const chatSessionSettingsAtom = atomWithStorage<SessionSettings>(StorageKey.ChatSessionSettings, {}, storage)
71+
export const pictureSessionSettingsAtom = atomWithStorage<SessionSettings>(
72+
StorageKey.PictureSessionSettings,
73+
{},
74+
storage
75+
)

0 commit comments

Comments
 (0)