move artifacts into mask settings

This commit is contained in:
lloydzhou
2024-09-05 14:46:16 +08:00
parent b590d0857c
commit caf50b6e6c
7 changed files with 40 additions and 39 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, ArtifactsPlugin } from "../constant";
import { StoreKey } from "../constant";
import { nanoid } from "nanoid";
import { createPersistStore } from "../utils/store";
@@ -18,6 +18,7 @@ export type Mask = {
lang: Lang;
builtin: boolean;
plugin?: string[];
enableArtifacts?: boolean;
};
export const DEFAULT_MASK_STATE = {
@@ -38,7 +39,7 @@ export const createEmptyMask = () =>
lang: getLang(),
builtin: false,
createdAt: Date.now(),
plugin: [ArtifactsPlugin.Artifacts as string],
plugin: [],
}) as Mask;
export const useMaskStore = createPersistStore(