MCPcopy Create free account
hub / github.com/CreminiAI/skillpack / waitForQueuedAgentEvents

Method waitForQueuedAgentEvents

src/runtime/agent.ts:678–693  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

676 const runId = randomUUID();
677 let unsubscribe = () => undefined;
678 const waitForQueuedAgentEvents = async (): Promise<void> => {
679 const maybeQueue = (cs.session as { _agentEventQueue?: unknown })
680 ._agentEventQueue;
681 if (
682 !maybeQueue ||
683 typeof (maybeQueue as Promise<unknown>).then !== "function"
684 ) {
685 return;
686 }
687
688 try {
689 await maybeQueue;
690 } catch (error) {
691 log("[PackAgent] Waiting for queued agent events failed:", error);
692 }
693 };
694
695 try {
696 if (this.pendingAbortChannels.delete(channelId)) {

Callers

nothing calls this directly

Calls 1

logFunction · 0.85

Tested by

no test coverage detected