fix(api): prevent browser from coalescing concurrent stream requests
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Add cache-busting query parameter to the stream fetch URL so each tab gets a unique request and the browser cannot reuse an in-flight response. Remove redundant Transfer-Encoding header that Go sets automatically.
This commit is contained in:
@@ -120,7 +120,7 @@ export async function streamChatUpdates(
|
||||
chatId: string,
|
||||
onChunk: (chunk: MessageChunk) => void,
|
||||
) {
|
||||
const response = await fetch(`/api/chats/${chatId}/stream`);
|
||||
const response = await fetch(`/api/chats/${chatId}/stream?_t=${Date.now()}`);
|
||||
return streamMessage(response, onChunk);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user