From cf340a15bfa4a95e6adc44f2c1defbcfc1edbd0b Mon Sep 17 00:00:00 2001 From: sijinhui Date: Sun, 6 Oct 2024 11:46:29 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=9D=9E=E6=B5=81=E5=BC=8F?= =?UTF-8?q?=E5=93=8D=E5=BA=94=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/components/chat.tsx | 7 ++++++- app/locales/cn.ts | 1 + app/locales/en.ts | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/app/components/chat.tsx b/app/components/chat.tsx index 601a184cb..432e1d486 100644 --- a/app/components/chat.tsx +++ b/app/components/chat.tsx @@ -1547,6 +1547,7 @@ function _Chat() { } // 加载状态结束,获取token const [loadingChange, setLoadingChange] = useState(false); + const currentModel = chatStore.currentSession().mask.modelConfig.model; useEffect(() => { if (!isLoading && loadingChange) { try { @@ -1568,10 +1569,14 @@ function _Chat() { }); } catch {} } + // 插入判断,展示非流式响应的提示 + if (currentModel.startsWith("o1") && isLoading) { + showToast(Locale.StreamTIp, undefined, 5000); + } return () => { setLoadingChange(isLoading); }; - }, [isLoading, loadingChange]); + }, [currentModel, isLoading, loadingChange]); // 快捷键 shortcut keys const [showShortcutKeyModal, setShowShortcutKeyModal] = useState(false); diff --git a/app/locales/cn.ts b/app/locales/cn.ts index cee6bdfb7..4acc470e3 100644 --- a/app/locales/cn.ts +++ b/app/locales/cn.ts @@ -6,6 +6,7 @@ const isApp = !!getClientConfig()?.isApp; const cn = { WIP: "该功能仍在开发中……", + StreamTIp: "当前非流式响应,请稍候……", Error: { Unauthorized: isApp ? `😆 对话遇到了一些问题,不用慌: diff --git a/app/locales/en.ts b/app/locales/en.ts index 1b01e06a7..751687e5f 100644 --- a/app/locales/en.ts +++ b/app/locales/en.ts @@ -7,6 +7,7 @@ import { SAAS_CHAT_UTM_URL } from "@/app/constant"; const isApp = !!getClientConfig()?.isApp; const en: LocaleType = { WIP: "Coming Soon...", + StreamTIp: "Currently generating a non-streaming response, please wait...", Error: { Unauthorized: isApp ? `😆 Oops, there's an issue. No worries: