MCPcopy Create free account
hub / github.com/GoogleCloudPlatform/nodejs-docs-samples / waitMessage

Function waitMessage

genai/live/live-with-txt.js:39–44  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

37 const responseQueue = [];
38
39 async function waitMessage() {
40 while (responseQueue.length === 0) {
41 await new Promise(resolve => setTimeout(resolve, 100));
42 }
43 return responseQueue.shift();
44 }
45
46 async function handleTurn() {
47 const turns = [];

Callers 1

handleTurnFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected