mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-05-19 20:20:16 +09:00
feat: add indexDB
This commit is contained in:
parent
4060e367ad
commit
492b55c893
@ -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();
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user