MCPcopy Create free account
hub / github.com/Zoo-Code-Org/Zoo-Code / processQueuedMessages

Method processQueuedMessages

src/core/task/Task.ts:4722–4737  ·  view source on GitHub ↗

* Process any queued messages by dequeuing and submitting them. * This ensures that queued user messages are sent when appropriate, * preventing them from getting stuck in the queue. * * @param context - Context string for logging (e.g., the calling tool name)

()

Source from the content-addressed store, hash-verified

4720 * @param context - Context string for logging (e.g., the calling tool name)
4721 */
4722 public processQueuedMessages(): void {
4723 try {
4724 if (!this.messageQueueService.isEmpty()) {
4725 const queued = this.messageQueueService.dequeueMessage()
4726 if (queued) {
4727 setTimeout(() => {
4728 this.submitUserMessage(queued.text, queued.images).catch((err) =>
4729 console.error(`[Task] Failed to submit queued message:`, err),
4730 )
4731 }, 0)
4732 }
4733 }
4734 } catch (e) {
4735 console.error(`[Task] Queue processing error:`, e)
4736 }
4737 }
4738}

Callers 9

condenseContextMethod · 0.95
executeMethod · 0.80
executeMethod · 0.80
executeMethod · 0.80
handleAddFileMethod · 0.80
handleDeleteFileMethod · 0.80
handleUpdateFileMethod · 0.80
executeMethod · 0.80
executeMethod · 0.80

Calls 4

submitUserMessageMethod · 0.95
dequeueMessageMethod · 0.80
errorMethod · 0.65
isEmptyMethod · 0.45

Tested by

no test coverage detected