Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

fix(web): hide Agent-related content in chat channel connect dialog (#22015)

chanx6b5fad434f1a
diff --git a/web/src/locales/en.ts b/web/src/locales/en.ts
index dfb858fb70..1b15138c70 100644
--- a/web/src/locales/en.ts
+++ b/web/src/locales/en.ts
@@ -2111,10 +2111,10 @@ Example: Virtual Hosted Style`,
deleteChannelModalContent:
'Are you sure you want to delete this chat channel bot? This action cannot be undone.',
connectDialog: 'Connect assistant or Agent',
- connectDialogTitle: 'Connect {{name}} to an assistant or Agent',
- selectDialog: 'Select an assistant or Agent',
+ connectDialogTitle: 'Connect {{name}} to an assistant',
+ selectDialog: 'Select an assistant',
connectDialogTip:
- 'Messages received by this channel will be answered by the connected assistant or Agent. Clear the selection to disconnect.',
+ 'Messages received by this channel will be answered by the connected assistant. Clear the selection to disconnect.',
notConnected: 'No assistant or Agent connected',
chatChannelAssistant: 'Chat assistant',
chatChannelAgent: 'Agent',
diff --git a/web/src/locales/zh.ts b/web/src/locales/zh.ts
index 7cb498c852..4a9dacba0e 100644
--- a/web/src/locales/zh.ts
+++ b/web/src/locales/zh.ts
@@ -1734,10 +1734,10 @@ NER:使用 spaCy NER 和基于规则的关键词提取来抽取 Entities 和 R
deleteChannelModalContent:
'确定要删除此聊天渠道机器人吗?此操作无法撤销。',
connectDialog: '关联助手或智能体',
- connectDialogTitle: '将 {{name}} 关联到助手或智能体',
- selectDialog: '选择助手或智能体',
+ connectDialogTitle: '将 {{name}} 关联到助手',
+ selectDialog: '选择助手',
connectDialogTip:
- '该渠道收到的消息将由关联的助手或智能体回复。清空选择即可解除关联。',
+ '该渠道收到的消息将由关联的助手回复。清空选择即可解除关联。',
notConnected: '未关联助手或智能体',
chatChannelAssistant: '聊天助手',
chatChannelAgent: '智能体',
diff --git a/web/src/pages/user-setting/chat-channel/component/connect-dialog-modal.tsx b/web/src/pages/user-setting/chat-channel/component/connect-dialog-modal.tsx
index bd0296580e..0a60ced29d 100644
--- a/web/src/pages/user-setting/chat-channel/component/connect-dialog-modal.tsx
+++ b/web/src/pages/user-setting/chat-channel/component/connect-dialog-modal.tsx
@@ -17,7 +17,6 @@
import { Button } from '@/components/ui/button';
import { Modal } from '@/components/ui/modal/modal';
import { SelectWithSearch } from '@/components/originui/select-with-search';
-import { useFetchAllAgentList } from '@/hooks/use-agent-request';
import { useEffect, useMemo, useState } from 'react';
import { useTranslation } from 'react-i18next';
import {
@@ -38,7 +37,6 @@ const ConnectDialogModal = ({
}) => {
const { t } = useTranslation();
const { dialogs } = useChatChannelDialogList();
- const { data: agents } = useFetchAllAgentList();
const { connect, connecting } = useConnectChatChannelDialog();
const [targetValue, setTargetValue] = useState<string | undefined>(
channel?.agent_id
@@ -55,19 +53,12 @@ const ConnectDialogModal = ({
}, [channel?.id, channel?.chat_id, channel?.agent_id]);
const options = useMemo(
- () => [
- ...(dialogs || []).map((d) => ({
+ () =>
+ (dialogs || []).map((d) => ({
label: `[${t('setting.chatChannelAssistant')}] ${d.name}`,
value: toChatChannelTargetValue('chat', d.id)!,
})),
- ...(agents || [])
- .filter((agent) => 'title' in agent)
- .map((agent) => ({
- label: `[${t('setting.chatChannelAgent')}] ${agent.title}`,
- value: toChatChannelTargetValue('agent', agent.id)!,
- })),
- ],
- [agents, dialogs, t],
+ [dialogs, t],
);
const handleConfirm = async () => {