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

Function summarizeMessageResultForDebug

background/tab-runtime.js:325–337  ·  view source on GitHub ↗
(result)

Source from the content-addressed store, hash-verified

323 }
324
325 function summarizeMessageResultForDebug(result) {
326 if (result === undefined) return 'undefined';
327 if (result === null) return 'null';
328 if (typeof result !== 'object') return JSON.stringify(result);
329 const summary = {};
330 for (const key of ['ok', 'error', 'stopped', 'source', 'step']) {
331 if (key in result) summary[key] = result[key];
332 }
333 if (result.payload && typeof result.payload === 'object') {
334 summary.payloadKeys = Object.keys(result.payload);
335 }
336 return JSON.stringify(summary);
337 }
338
339 function sendTabMessageWithTimeout(tabId, source, message, responseTimeoutMs = getContentScriptResponseTimeoutMs(message)) {
340 return new Promise((resolve, reject) => {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected