This commit is contained in:
lloydzhou
2024-08-30 23:39:08 +08:00
parent 271f58d9cf
commit 9326ff9d08
10 changed files with 47 additions and 28 deletions

View File

@@ -2,7 +2,7 @@ import { BUILTIN_MASKS } from "../masks";
import { getLang, Lang } from "../locales";
import { DEFAULT_TOPIC, ChatMessage } from "./chat";
import { ModelConfig, useAppConfig } from "./config";
import { StoreKey, Plugin } from "../constant";
import { StoreKey, ArtifactsPlugin } from "../constant";
import { nanoid } from "nanoid";
import { createPersistStore } from "../utils/store";
@@ -17,7 +17,7 @@ export type Mask = {
modelConfig: ModelConfig;
lang: Lang;
builtin: boolean;
plugin?: Plugin[];
plugin?: string[];
};
export const DEFAULT_MASK_STATE = {
@@ -38,7 +38,7 @@ export const createEmptyMask = () =>
lang: getLang(),
builtin: false,
createdAt: Date.now(),
plugin: [Plugin.Artifacts],
plugin: [ArtifactsPlugin.Artifacts as string],
}) as Mask;
export const useMaskStore = createPersistStore(