feat: 支持 ChatSession 级别插件功能开关

This commit is contained in:
Hk-Gosuto
2023-08-12 00:53:15 +08:00
parent 6b28bcd9b5
commit fb1b92e9cc
6 changed files with 27 additions and 54 deletions

View File

@@ -18,6 +18,7 @@ export type Mask = {
modelConfig: ModelConfig;
lang: Lang;
builtin: boolean;
usePlugins?: boolean;
};
export const DEFAULT_MASK_STATE = {
@@ -46,6 +47,7 @@ export const createEmptyMask = () =>
lang: getLang(),
builtin: false,
createdAt: Date.now(),
usePlugins: useAppConfig.getState().modelConfig.model.endsWith("0613"),
} as Mask);
export const useMaskStore = create<MaskStore>()(