MCPcopy
hub / github.com/CodebuffAI/codebuff / resetEarlyReturnState

Function resetEarlyReturnState

cli/src/hooks/helpers/send-message.ts:59–74  ·  view source on GitHub ↗
(
  params: ResetEarlyReturnStateParams,
)

Source from the content-addressed store, hash-verified

57}
58
59export 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. */
77export type FinalizeQueueStateParams = {

Callers 2

useSendMessageFunction · 0.90

Calls 2

updateChainInProgressFunction · 0.85
setCanProcessQueueFunction · 0.85

Tested by

no test coverage detected