diff --git a/app/store/chat.ts b/app/store/chat.ts index 653926d1b02..ffaf8c9966f 100644 --- a/app/store/chat.ts +++ b/app/store/chat.ts @@ -27,6 +27,7 @@ import { createPersistStore } from "../utils/store"; import { collectModelsWithDefaultModel } from "../utils/model"; import { useAccessStore } from "./access"; import { isDalle3 } from "../utils"; +import { clear } from "idb-keyval"; export type ChatMessage = RequestMessage & { date: string; @@ -665,7 +666,8 @@ export const useChatStore = createPersistStore( set(() => ({ sessions })); }, - clearAllData() { + async clearAllData() { + await clear(); localStorage.clear(); location.reload(); },