From 2aabd661e32f0ed688ef893431f8fd438ad50b96 Mon Sep 17 00:00:00 2001 From: William Date: Fri, 6 Sep 2024 11:43:54 +0800 Subject: [PATCH 1/2] add summarize model setting --- app/components/settings.tsx | 29 +++++++++++++++++++++++++++++ app/locales/ar.ts | 1 + app/locales/bn.ts | 1 + app/locales/cn.ts | 1 + app/locales/cs.ts | 1 + app/locales/de.ts | 1 + app/locales/en.ts | 1 + app/locales/es.ts | 1 + app/locales/fr.ts | 1 + app/locales/id.ts | 1 + app/locales/it.ts | 1 + app/locales/jp.ts | 1 + app/locales/ko.ts | 1 + app/locales/no.ts | 1 + app/locales/pt.ts | 1 + app/locales/sk.ts | 1 + app/locales/tr.ts | 1 + app/locales/tw.ts | 1 + app/locales/vi.ts | 1 + app/store/chat.ts | 5 +++++ app/store/config.ts | 1 + 21 files changed, 53 insertions(+) diff --git a/app/components/settings.tsx b/app/components/settings.tsx index ca0a5a18796..26f8fcdaed7 100644 --- a/app/components/settings.tsx +++ b/app/components/settings.tsx @@ -81,6 +81,8 @@ import { nanoid } from "nanoid"; import { useMaskStore } from "../store/mask"; import { ProviderType } from "../utils/cloud"; +import { useAllModels } from "../utils/hooks"; + function EditPromptModal(props: { id: string; onClose: () => void }) { const promptStore = usePromptStore(); const prompt = promptStore.get(props.id); @@ -578,6 +580,8 @@ export function Settings() { const config = useAppConfig(); const updateConfig = config.update; + const allModels = useAllModels(); + const updateStore = useUpdateStore(); const [checkingUpdate, setCheckingUpdate] = useState(false); const currentVersion = updateStore.formatVersion(updateStore.version); @@ -1448,6 +1452,31 @@ export function Settings() { > + {config.enableAutoGenerateTitle && ( + + + + )} + Date: Fri, 6 Sep 2024 11:56:04 +0800 Subject: [PATCH 2/2] remove console.log --- app/components/settings.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/app/components/settings.tsx b/app/components/settings.tsx index 26f8fcdaed7..ee45dc044e7 100644 --- a/app/components/settings.tsx +++ b/app/components/settings.tsx @@ -1461,7 +1461,6 @@ export function Settings() { const [model, _providerName] = e.currentTarget.value.split("@"); updateConfig((config) => { - console.log("config", config); config.summarizeModel = model; }); }}