From e19eddf976912d651a5ef98ff8ee7364daaf7653 Mon Sep 17 00:00:00 2001
From: Archer <545436317@qq.com>
Date: Wed, 20 Aug 2025 21:58:13 +0800
Subject: [PATCH] fix: model selector overlay (#5511)
---
document/content/docs/toc.mdx | 1 +
document/content/docs/upgrading/4-12/4122.mdx | 23 +++++++++
document/data/doc-last-modified.json | 4 +-
packages/web/i18n/en/common.json | 4 +-
.../src/components/Select/AIModelSelector.tsx | 50 +++++++------------
.../ChatContainer/ChatBox/Input/ChatInput.tsx | 2 +-
.../chat/ChatWindow/HomeChatWindow.tsx | 2 +-
7 files changed, 49 insertions(+), 37 deletions(-)
create mode 100644 document/content/docs/upgrading/4-12/4122.mdx
diff --git a/document/content/docs/toc.mdx b/document/content/docs/toc.mdx
index 3a5a7beed..5f6e4505d 100644
--- a/document/content/docs/toc.mdx
+++ b/document/content/docs/toc.mdx
@@ -100,6 +100,7 @@ description: FastGPT 文档目录
- [/docs/upgrading/4-11/4111](/docs/upgrading/4-11/4111)
- [/docs/upgrading/4-12/4120](/docs/upgrading/4-12/4120)
- [/docs/upgrading/4-12/4121](/docs/upgrading/4-12/4121)
+- [/docs/upgrading/4-12/4122](/docs/upgrading/4-12/4122)
- [/docs/upgrading/4-8/40](/docs/upgrading/4-8/40)
- [/docs/upgrading/4-8/41](/docs/upgrading/4-8/41)
- [/docs/upgrading/4-8/42](/docs/upgrading/4-8/42)
diff --git a/document/content/docs/upgrading/4-12/4122.mdx b/document/content/docs/upgrading/4-12/4122.mdx
new file mode 100644
index 000000000..784be4cb1
--- /dev/null
+++ b/document/content/docs/upgrading/4-12/4122.mdx
@@ -0,0 +1,23 @@
+---
+title: 'V4.12.2(进行中)'
+description: 'FastGPT V4.12.2 更新说明'
+---
+
+
+## 🚀 新增内容
+
+
+## ⚙️ 优化
+
+
+## 🐛 修复
+
+1. 独立对话页部分 UI 异常。
+2. 多选选择器导致的页面崩溃。
+3. 移动端,分享链接,异常加载了登录态对话页的导航。
+4. 用户同步可能出现写冲突问题。
+5. 无法完全关闭系统套餐,会存在空对象默认值,导致鉴权异常。
+
+## 🔨 工具更新
+
+1. Doc2x 工具响应值异常。
\ No newline at end of file
diff --git a/document/data/doc-last-modified.json b/document/data/doc-last-modified.json
index 857afec21..d234268a4 100644
--- a/document/data/doc-last-modified.json
+++ b/document/data/doc-last-modified.json
@@ -19,7 +19,7 @@
"document/content/docs/introduction/development/custom-models/ollama.mdx": "2025-08-05T23:20:39+08:00",
"document/content/docs/introduction/development/custom-models/xinference.mdx": "2025-08-05T23:20:39+08:00",
"document/content/docs/introduction/development/design/dataset.mdx": "2025-07-23T21:35:03+08:00",
- "document/content/docs/introduction/development/design/design_plugin.mdx": "2025-07-24T13:00:27+08:00",
+ "document/content/docs/introduction/development/design/design_plugin.mdx": "2025-08-20T19:00:48+08:00",
"document/content/docs/introduction/development/docker.mdx": "2025-08-05T23:20:39+08:00",
"document/content/docs/introduction/development/faq.mdx": "2025-08-12T22:22:18+08:00",
"document/content/docs/introduction/development/intro.mdx": "2025-08-05T23:20:39+08:00",
@@ -81,7 +81,7 @@
"document/content/docs/introduction/guide/knowledge_base/websync.mdx": "2025-08-05T23:20:39+08:00",
"document/content/docs/introduction/guide/knowledge_base/yuque_dataset.mdx": "2025-07-23T21:35:03+08:00",
"document/content/docs/introduction/guide/plugins/bing_search_plugin.mdx": "2025-07-23T21:35:03+08:00",
- "document/content/docs/introduction/guide/plugins/dev_system_tool.mdx": "2025-08-18T14:59:46+08:00",
+ "document/content/docs/introduction/guide/plugins/dev_system_tool.mdx": "2025-08-20T19:00:48+08:00",
"document/content/docs/introduction/guide/plugins/doc2x_plugin_guide.mdx": "2025-07-23T21:35:03+08:00",
"document/content/docs/introduction/guide/plugins/google_search_plugin_guide.mdx": "2025-07-23T21:35:03+08:00",
"document/content/docs/introduction/guide/plugins/searxng_plugin_guide.mdx": "2025-07-23T21:35:03+08:00",
diff --git a/packages/web/i18n/en/common.json b/packages/web/i18n/en/common.json
index 8921d3747..4a4a4a6db 100644
--- a/packages/web/i18n/en/common.json
+++ b/packages/web/i18n/en/common.json
@@ -347,7 +347,7 @@
"core.chat.Mark": "Mark Expected Answer",
"core.chat.Mark Description": "The current marking function is in beta.\n\nAfter clicking to add a mark, you need to select a Dataset to store the marked data. You can quickly mark questions and expected answers through this function to guide the model's next answer.\n\nCurrently, the marking function is the same as other data in the Dataset and is affected by the model, which does not mean that it will 100% meet expectations after marking.\n\nMarking data is only synchronized with the Dataset in one direction. If the Dataset modifies the marked data, the marked data displayed in the log cannot be synchronized.",
"core.chat.Mark Description Title": "Marking Function Introduction",
- "core.chat.New Chat": "New Chat",
+ "core.chat.New Chat": "New",
"core.chat.Pin": "Pin",
"core.chat.Question Guide": "Guess What You Want to Ask",
"core.chat.Quote": "Quote",
@@ -355,7 +355,7 @@
"core.chat.Read Mark Description": "View Marking Function Introduction",
"core.chat.Recent use": "Recently Used",
"core.chat.Record": "Voice Input",
- "core.chat.Restart": "Restart Chat",
+ "core.chat.Restart": "Restart",
"core.chat.Run test": "Run Preview",
"core.chat.Select dataset": "Select Dataset",
"core.chat.Select dataset Desc": "Select a Dataset to store the expected answer",
diff --git a/projects/app/src/components/Select/AIModelSelector.tsx b/projects/app/src/components/Select/AIModelSelector.tsx
index 23bb4075f..6e120d459 100644
--- a/projects/app/src/components/Select/AIModelSelector.tsx
+++ b/projects/app/src/components/Select/AIModelSelector.tsx
@@ -4,18 +4,13 @@ import { useTranslation } from 'next-i18next';
import { useSystemStore } from '@/web/common/system/useSystemStore';
import MySelect, { type SelectProps } from '@fastgpt/web/components/common/MySelect';
import { HUGGING_FACE_ICON } from '@fastgpt/global/common/system/constants';
-import { Box, Flex, HStack } from '@chakra-ui/react';
+import { Box, Flex } from '@chakra-ui/react';
import Avatar from '@fastgpt/web/components/common/Avatar';
import MyTooltip from '@fastgpt/web/components/common/MyTooltip';
-import dynamic from 'next/dynamic';
import { ModelProviderList } from '@fastgpt/global/core/ai/provider';
import MultipleRowSelect from '@fastgpt/web/components/common/MySelect/MultipleRowSelect';
import { getModelFromList } from '@fastgpt/global/core/ai/model';
-const ModelPriceModal = dynamic(() =>
- import('@/components/core/ai/ModelTable').then((mod) => mod.ModelPriceModal)
-);
-
type Props = SelectProps & {
disableTip?: string;
};
@@ -88,29 +83,22 @@ const OneRowSelector = ({ list, onChange, disableTip, ...props }: Props) => {
}}
>
-
- {({ onOpen }) => (
- {
- if (e === 'price') {
- onOpen();
- return;
- }
- return onChange?.(e);
- }}
- />
- )}
-
+ {
+ return onChange?.(e);
+ }}
+ />
);
};
+
const MultipleRowSelector = ({ list, onChange, disableTip, placeholder, ...props }: Props) => {
const { t } = useTranslation();
const { llmModelList, embeddingModelList, ttsModelList, sttModelList, reRankModelList } =
@@ -184,7 +172,7 @@ const MultipleRowSelector = ({ list, onChange, disableTip, placeholder, ...props
[onChange]
);
- const SelectedModel = useMemo(() => {
+ const SelectedLabel = useMemo(() => {
if (!props.value) return <>{t('common:not_model_config')}>;
const modelData = getModelFromList(modelList, props.value);
@@ -193,7 +181,7 @@ const MultipleRowSelector = ({ list, onChange, disableTip, placeholder, ...props
setValue([modelData.provider, props.value]);
return (
-
+
- {modelData?.name}
-
+ {modelData?.name}
+
);
}, [modelList, props.value, t, avatarSize]);
@@ -216,7 +204,7 @@ const MultipleRowSelector = ({ list, onChange, disableTip, placeholder, ...props
>
{
- return props.list.length > 10 ? (
+ return props.list.length > 100 ? (
) : (
diff --git a/projects/app/src/components/core/chat/ChatContainer/ChatBox/Input/ChatInput.tsx b/projects/app/src/components/core/chat/ChatContainer/ChatBox/Input/ChatInput.tsx
index e76183674..0b16db697 100644
--- a/projects/app/src/components/core/chat/ChatContainer/ChatBox/Input/ChatInput.tsx
+++ b/projects/app/src/components/core/chat/ChatContainer/ChatBox/Input/ChatInput.tsx
@@ -256,7 +256,7 @@ const ChatInput = ({
gap={[0, 1]}
>
{/* 左侧自定义按钮组 */}
-
+
{InputLeftComponent}
diff --git a/projects/app/src/pageComponents/chat/ChatWindow/HomeChatWindow.tsx b/projects/app/src/pageComponents/chat/ChatWindow/HomeChatWindow.tsx
index 50157997b..95d917189 100644
--- a/projects/app/src/pageComponents/chat/ChatWindow/HomeChatWindow.tsx
+++ b/projects/app/src/pageComponents/chat/ChatWindow/HomeChatWindow.tsx
@@ -241,7 +241,7 @@ const HomeChatWindow = ({ myApps }: Props) => {
<>
{/* 模型选择 */}
{availableModels.length > 0 && (
-
+