Merge remote-tracking branch 'connectai/main' into feature/plugin

This commit is contained in:
lloydzhou
2024-09-03 19:02:40 +08:00
7 changed files with 53 additions and 3 deletions

View File

@@ -27,6 +27,7 @@ import { createPersistStore } from "../utils/store";
import { collectModelsWithDefaultModel } from "../utils/model";
import { useAccessStore } from "./access";
import { isDalle3 } from "../utils";
import { indexedDBStorage } from "@/app/utils/indexedDB-storage";
export type ChatMessageTool = {
id: string;
@@ -695,7 +696,8 @@ export const useChatStore = createPersistStore(
set(() => ({ sessions }));
},
clearAllData() {
async clearAllData() {
await indexedDBStorage.clear();
localStorage.clear();
location.reload();
},