MCPcopy Index your code
hub / github.com/QLHazyCoder/FlowPilot / queueCommand

Function queueCommand

background/tab-runtime.js:375–384  ·  view source on GitHub ↗
(source, message, timeout = 15000)

Source from the content-addressed store, hash-verified

373 }
374
375 function queueCommand(source, message, timeout = 15000) {
376 return new Promise((resolve, reject) => {
377 const timer = setTimeout(() => {
378 pendingCommands.delete(source);
379 reject(new Error(`Content script on ${source} did not respond in ${timeout / 1000}s. Try refreshing the tab and retry.`));
380 }, timeout);
381 pendingCommands.set(source, { message, resolve, reject, timer });
382 console.log(LOG_PREFIX, `Command queued for ${source} (waiting for ready)`);
383 });
384 }
385
386 function flushCommand(source, tabId) {
387 const pending = pendingCommands.get(source);

Callers 1

sendToContentScriptFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected