MCPcopy Index your code
hub / github.com/simstudioai/sim / useOperationQueue

Function useOperationQueue

apps/sim/stores/operation-queue/store.ts:655–679  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

653 * Only subscribes to the specific state values needed.
654 */
655export function useOperationQueue() {
656 const hasOperationError = useOperationQueueStore((state) => state.hasOperationError)
657
658 const actions = useOperationQueueStore.getState()
659
660 return {
661 get queue() {
662 return useOperationQueueStore.getState().operations
663 },
664 get isProcessing() {
665 return useOperationQueueStore.getState().isProcessing
666 },
667 hasOperationError,
668 addToQueue: actions.addToQueue,
669 confirmOperation: actions.confirmOperation,
670 failOperation: actions.failOperation,
671 processNextOperation: actions.processNextOperation,
672 hasPendingOperations: actions.hasPendingOperations,
673 waitForWorkflowOperations: actions.waitForWorkflowOperations,
674 cancelOperationsForBlock: actions.cancelOperationsForBlock,
675 cancelOperationsForVariable: actions.cancelOperationsForVariable,
676 triggerOfflineMode: actions.triggerOfflineMode,
677 clearError: actions.clearError,
678 }
679}

Callers 3

ChatFunction · 0.90
useUndoRedoFunction · 0.90
useCollaborativeWorkflowFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected