Skip to content

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

Fix: Start a new conversation; an additional conversation entry will appear once the chat ends. (#17964)

balibabu5c8c4346a9b4
diff --git a/web/src/pages/next-chats/hooks/use-select-conversation-list.ts b/web/src/pages/next-chats/hooks/use-select-conversation-list.ts
index e1fa8f2b1f..624deeacc2 100644
--- a/web/src/pages/next-chats/hooks/use-select-conversation-list.ts
+++ b/web/src/pages/next-chats/hooks/use-select-conversation-list.ts
@@ -84,15 +84,19 @@ export const useSelectDerivedConversationList = () => {
// When you first enter the page, select the top conversation card
+ // useEffect(() => {
+ // setList((prevList) => {
+ // const tempItems = prevList.filter((item) => item.is_new);
+ // const existingTempIds = new Set(tempItems.map((t) => t.id));
+ // const newItems = conversationList.filter(
+ // (item) => !existingTempIds.has(item.id),
+ // );
+ // return [...tempItems, ...newItems];
+ // });
+ // }, [conversationList]);
+
useEffect(() => {
- setList((prevList) => {
- const tempItems = prevList.filter((item) => item.is_new);
- const existingTempIds = new Set(tempItems.map((t) => t.id));
- const newItems = conversationList.filter(
- (item) => !existingTempIds.has(item.id),
- );
- return [...tempItems, ...newItems];
- });
+ setList([...conversationList]);
}, [conversationList]);
return {