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"); }