mirror of
https://github.com/Yidadaa/ChatGPT-Next-Web.git
synced 2025-08-09 03:11:47 +08:00
feat: #close 1789 add user input template
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { create } from "zustand";
|
||||
import { persist } from "zustand/middleware";
|
||||
import { getClientConfig } from "../config/client";
|
||||
import { StoreKey } from "../constant";
|
||||
import { DEFAULT_INPUT_TEMPLATE, StoreKey } from "../constant";
|
||||
|
||||
export enum SubmitKey {
|
||||
Enter = "Enter",
|
||||
@@ -39,6 +39,7 @@ export const DEFAULT_CONFIG = {
|
||||
sendMemory: true,
|
||||
historyMessageCount: 4,
|
||||
compressMessageLengthThreshold: 1000,
|
||||
template: DEFAULT_INPUT_TEMPLATE,
|
||||
},
|
||||
};
|
||||
|
||||
@@ -176,15 +177,16 @@ export const useAppConfig = create<ChatConfigStore>()(
|
||||
}),
|
||||
{
|
||||
name: StoreKey.Config,
|
||||
version: 3,
|
||||
version: 3.1,
|
||||
migrate(persistedState, version) {
|
||||
if (version === 3) return persistedState as any;
|
||||
if (version === 3.1) return persistedState as any;
|
||||
|
||||
const state = persistedState as ChatConfig;
|
||||
state.modelConfig.sendMemory = true;
|
||||
state.modelConfig.historyMessageCount = 4;
|
||||
state.modelConfig.compressMessageLengthThreshold = 1000;
|
||||
state.modelConfig.frequency_penalty = 0;
|
||||
state.modelConfig.template = DEFAULT_INPUT_TEMPLATE;
|
||||
state.dontShowMaskSplashScreen = false;
|
||||
|
||||
return state;
|
||||
|
Reference in New Issue
Block a user