refactor: remove replay parameter from workflow event URL

This commit is contained in:
twwu
2026-04-17 14:18:14 +08:00
parent 6afdde1bc4
commit 73ff36cb0e
2 changed files with 3 additions and 5 deletions

View File

@@ -122,7 +122,7 @@ describe('useChat handleResume', () => {
})
expect(mockSseGet).toHaveBeenCalledWith(
'/workflow/wfr-1/events?include_state_snapshot=true&replay=true',
'/workflow/wfr-1/events?include_state_snapshot=true',
{},
expect.any(Object),
)

View File

@@ -680,10 +680,8 @@ export const useChat = (
onGetSuggestedQuestions,
}: SendCallback,
) => {
// Re-subscribe to workflow events for the specific message.
// replay=true tells the backend to read from the beginning of the Redis Stream
// so all retained events are replayed on reconnection (e.g. page refresh).
const url = `/workflow/${workflowRunId}/events?include_state_snapshot=true&replay=true`
// Re-subscribe to workflow events for the specific message
const url = `/workflow/${workflowRunId}/events?include_state_snapshot=true`
const otherOptions: IOtherOptions = {
getAbortController: (abortController) => {