MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / createQueueCtrlCHandler

Function createQueueCtrlCHandler

cli/src/hooks/use-queue-controls.ts:16–30  ·  view source on GitHub ↗
({
  queuePaused,
  queuedCount,
  clearQueue,
  resumeQueue,
  inputHasText,
  baseHandleCtrlC,
}: QueueCtrlCHandlerOptions)

Source from the content-addressed store, hash-verified

14type QueueCtrlCHandlerOptions = UseQueueControlsParams
15
16export const createQueueCtrlCHandler = ({
17 queuePaused,
18 queuedCount,
19 clearQueue,
20 resumeQueue,
21 inputHasText,
22 baseHandleCtrlC,
23}: QueueCtrlCHandlerOptions) => () => {
24 if (queuePaused && queuedCount > 0 && !inputHasText) {
25 clearQueue()
26 resumeQueue()
27 return true
28 }
29 return baseHandleCtrlC()
30}
31
32export const useQueueControls = ({
33 queuePaused,

Callers 2

setupHandlerFunction · 0.90
useQueueControlsFunction · 0.85

Calls

no outgoing calls

Tested by 1

setupHandlerFunction · 0.72