From 7305c8fb3169a686b3b343e40306c78185e37732 Mon Sep 17 00:00:00 2001 From: "sp.wack" <83104063+amanape@users.noreply.github.com> Date: Wed, 21 May 2025 19:12:04 +0400 Subject: [PATCH] hotfix(frontend): Prevent merging conversation events when switching between conversations (#8614) --- frontend/src/context/ws-client-provider.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/frontend/src/context/ws-client-provider.tsx b/frontend/src/context/ws-client-provider.tsx index 99215b9224..1ba87763d3 100644 --- a/frontend/src/context/ws-client-provider.tsx +++ b/frontend/src/context/ws-client-provider.tsx @@ -261,6 +261,11 @@ export function WsClientProvider({ }, [conversationId]); React.useEffect(() => { + // reset events when conversationId changes + setEvents([]); + setParsedEvents([]); + setStatus(WsClientProviderStatus.DISCONNECTED); + if (!conversationId) { throw new Error("No conversation ID provided"); }