Skip to content

πŸ™Œ OpenHands: AI-Driven Development

fix latest event id (#5789)

Robert Brennand4e670a3e727
diff --git a/frontend/src/context/ws-client-provider.tsx b/frontend/src/context/ws-client-provider.tsx
index 954932d1fc..d08b0cc5e1 100644
--- a/frontend/src/context/ws-client-provider.tsx
+++ b/frontend/src/context/ws-client-provider.tsx
@@ -79,6 +79,12 @@ export function WsClientProvider({
function handleDisconnect() {
setStatus(WsClientProviderStatus.DISCONNECTED);
+ const sio = sioRef.current;
+ if (!sio) {
+ return;
+ }
+ sio.io.opts.query = sio.io.opts.query || {};
+ sio.io.opts.query.latest_event_id = lastEventRef.current?.id;
}
function handleError() {