( params: ResetEarlyReturnStateParams, )
| 57 | } |
| 58 | |
| 59 | export const resetEarlyReturnState = ( |
| 60 | params: ResetEarlyReturnStateParams, |
| 61 | ): void => { |
| 62 | const { |
| 63 | setCanProcessQueue, |
| 64 | updateChainInProgress, |
| 65 | isProcessingQueueRef, |
| 66 | isQueuePausedRef, |
| 67 | } = params |
| 68 | |
| 69 | updateChainInProgress(false) |
| 70 | setCanProcessQueue(!isQueuePausedRef?.current) |
| 71 | if (isProcessingQueueRef) { |
| 72 | isProcessingQueueRef.current = false |
| 73 | } |
| 74 | } |
| 75 | |
| 76 | /** Resets queue state after streaming completes, aborts, or errors. */ |
| 77 | export type FinalizeQueueStateParams = { |
no test coverage detected