MCPcopy Create free account
hub / github.com/modelcontextprotocol/ext-apps / dequeueCommands

Function dequeueCommands

examples/pdf-server/server.ts:438–447  ·  view source on GitHub ↗
(viewUUID: string)

Source from the content-addressed store, hash-verified

436}
437
438function dequeueCommands(viewUUID: string): PdfCommand[] {
439 // Poll is activity — keep the view alive even when the queue is empty
440 // (the common case: viewer polls every ~30s with nothing to receive).
441 touchView(viewUUID);
442 const entry = commandQueues.get(viewUUID);
443 if (!entry) return [];
444 const commands = entry.commands;
445 commandQueues.delete(viewUUID);
446 return commands;
447}
448
449// =============================================================================
450// File Watching (local files, stdio only)

Callers 1

createServerFunction · 0.85

Calls 1

touchViewFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…