Skip to content

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

Fix: On the multi-model comparison chat page, if there is more than one window, each window can be deleted. (#17523)

balibabu9c8f4f5fe3e4
diff --git a/web/src/constants/agent.tsx b/web/src/constants/agent.tsx
index e5e5d16e5a..5a2b3f9565 100644
--- a/web/src/constants/agent.tsx
+++ b/web/src/constants/agent.tsx
@@ -1,4 +1,3 @@
-import React from 'react';
import { setInitialChatVariableEnabledFieldValue } from '@/utils/chat';
import {
Circle,
diff --git a/web/src/pages/next-chats/chat/chat-box/next-multiple-chat-box.tsx b/web/src/pages/next-chats/chat/chat-box/next-multiple-chat-box.tsx
index 0d73c8bda0..083897008f 100644
--- a/web/src/pages/next-chats/chat/chat-box/next-multiple-chat-box.tsx
+++ b/web/src/pages/next-chats/chat/chat-box/next-multiple-chat-box.tsx
@@ -226,7 +226,7 @@ const ChatCard = forwardRef(function ChatCard(
<p>{t('chat.applyModelConfigs')}</p>
</TooltipContent>
</Tooltip>
- {!isLatestChat || chatBoxIds.length === 3 ? (
+ {chatBoxIds.length > 1 && (
<Button
variant="ghost"
size="icon-sm"
@@ -236,7 +236,8 @@ const ChatCard = forwardRef(function ChatCard(
>
<Trash2 />
</Button>
- ) : (
+ )}
+ {isLatestChat && idx < 2 && (
<Button
variant="ghost"
size="icon-sm"