mirror of
https://github.com/Yidadaa/ChatGPT-Next-Web.git
synced 2025-08-09 21:22:30 +08:00
refactor: #2256 hide builtin masks
This commit is contained in:
@@ -32,7 +32,7 @@ export const DEFAULT_CONFIG = {
|
||||
disablePromptHint: false,
|
||||
|
||||
dontShowMaskSplashScreen: false, // dont show splash screen when create chat
|
||||
dontAddBuiltinMasks: false, // dont add builtin masks
|
||||
hideBuiltinMasks: false, // dont add builtin masks
|
||||
|
||||
models: DEFAULT_MODELS as any as LLMModel[],
|
||||
|
||||
@@ -137,9 +137,9 @@ export const useAppConfig = create<ChatConfigStore>()(
|
||||
}),
|
||||
{
|
||||
name: StoreKey.Config,
|
||||
version: 3.3,
|
||||
version: 3.4,
|
||||
migrate(persistedState, version) {
|
||||
if (version === 3.3) return persistedState as any;
|
||||
if (version === 3.4) return persistedState as any;
|
||||
|
||||
const state = persistedState as ChatConfig;
|
||||
state.modelConfig.sendMemory = true;
|
||||
@@ -149,6 +149,7 @@ export const useAppConfig = create<ChatConfigStore>()(
|
||||
state.modelConfig.top_p = 1;
|
||||
state.modelConfig.template = DEFAULT_INPUT_TEMPLATE;
|
||||
state.dontShowMaskSplashScreen = false;
|
||||
state.hideBuiltinMasks = false;
|
||||
|
||||
return state;
|
||||
},
|
||||
|
@@ -90,7 +90,7 @@ export const useMaskStore = create<MaskStore>()(
|
||||
(a, b) => b.id - a.id,
|
||||
);
|
||||
const config = useAppConfig.getState();
|
||||
if (config.dontAddBuiltinMasks) return userMasks;
|
||||
if (config.hideBuiltinMasks) return userMasks;
|
||||
const buildinMasks = BUILTIN_MASKS.map(
|
||||
(m) =>
|
||||
({
|
||||
|
Reference in New Issue
Block a user