Skip to content

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

Fix: New sessions will automatically carry over messages from the previous session by default. (#18078)

chanxf930b1c1bc2a
diff --git a/web/src/pages/next-chats/chat/index.tsx b/web/src/pages/next-chats/chat/index.tsx
index a1b3367df7..eb36f41d31 100644
--- a/web/src/pages/next-chats/chat/index.tsx
+++ b/web/src/pages/next-chats/chat/index.tsx
@@ -53,6 +53,9 @@ export default function Chat() {
if (!isEmpty(conversation)) {
setCurrentConversation(conversation);
}
+ } else {
+ // New session: clear previous session's messages so they don't leak in.
+ setCurrentConversation({} as IClientConversation);
}
},
[fetchSessionManually],