Skip to content
5 changes: 5 additions & 0 deletions apps/sim/hooks/use-execution-stream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,11 @@ function reconnectStreamKey(workflowId: string, executionId: string): string {
return `${workflowId}:reconnect:${executionId}`
}

/** Whether a reconnect stream for this execution is currently open in this tab. */
export function isReconnectStreamOpen(workflowId: string, executionId: string): boolean {
return sharedAbortControllers.has(reconnectStreamKey(workflowId, executionId))
}

function abortStream(key: string): void {
const controller = sharedAbortControllers.get(key)
if (!controller) return
Expand Down
Loading
Loading