From db3f5cbafbf7478d2a2aa6039dc5b2a9c06c923e Mon Sep 17 00:00:00 2001 From: StreetLamb Date: Sat, 20 Jul 2024 14:12:35 +0800 Subject: [PATCH] Ensure streaming connection remains open even when page is hidden --- frontend/src/components/Teams/ChatTeam.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/src/components/Teams/ChatTeam.tsx b/frontend/src/components/Teams/ChatTeam.tsx index 9523b217..1db4cce7 100644 --- a/frontend/src/components/Teams/ChatTeam.tsx +++ b/frontend/src/components/Teams/ChatTeam.tsx @@ -298,6 +298,7 @@ const ChatTeam = () => { const headers = await getHeaders(OpenAPI, requestOptions) await fetchEventSource(url, { + openWhenHidden: true, method: requestOptions.method, headers, body: JSON.stringify(body),