We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1e44c1a commit 053c1c0Copy full SHA for 053c1c0
chat/src/components/ChatInterface.tsx
@@ -50,7 +50,10 @@ export default function ChatInterface() {
50
if (eventSourceRef.current) {
51
eventSourceRef.current.close();
52
}
53
-
+
54
+ // Reset messages when establishing a new connection
55
+ setMessages([]);
56
57
const eventSource = new EventSource(`${AgentAPIUrl}/events`);
58
eventSourceRef.current = eventSource;
59
@@ -95,6 +98,7 @@ export default function ChatInterface() {
95
98
eventSource.onopen = () => {
96
99
// Connection is established, but we'll wait for status_change event
97
100
// for the actual server status
101
+ console.log("EventSource connection established - messages reset");
102
};
103
104
// Handle connection errors
0 commit comments