From 5e361f6748f92bdb3261097576c6ed8c38dd034f Mon Sep 17 00:00:00 2001 From: imldy Date: Mon, 10 Jul 2023 18:56:22 +0800 Subject: [PATCH] =?UTF-8?q?dev:=20=E5=A2=9E=E5=8A=A0=E6=A8=A1=E5=9E=8B?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E9=A1=B9=EF=BC=9A=E6=98=AF=E5=90=A6=E5=90=AF?= =?UTF-8?q?=E7=94=A8=E6=B3=A8=E5=85=A5=E5=85=A8=E5=B1=80=20System=20Prompt?= =?UTF-8?q?=20=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/components/model-config.tsx | 16 ++++++++++++++++ app/locales/cn.ts | 5 ++++- app/store/config.ts | 7 ++++++- 3 files changed, 26 insertions(+), 2 deletions(-) diff --git a/app/components/model-config.tsx b/app/components/model-config.tsx index 9603eea..7686612 100644 --- a/app/components/model-config.tsx +++ b/app/components/model-config.tsx @@ -130,6 +130,22 @@ export function ModelConfigList(props: { > + + + props.updateConfig( + (config) => + (config.enableInjectSystemPrompts = e.currentTarget.checked), + ) + } + > + + ()( }), { name: StoreKey.Config, - version: 3.5, + version: 3.6, migrate(persistedState, version) { const state = persistedState as ChatConfig; @@ -165,6 +166,10 @@ export const useAppConfig = create()( state.customModels = "claude,claude-100k"; } + if (version < 3.6) { + state.modelConfig.enableInjectSystemPrompts = true; + } + return state as any; }, },