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

Function addLog

background.js:3476–3487  ·  view source on GitHub ↗
(message, level = 'info')

Source from the content-addressed store, hash-verified

3474// ============================================================
3475
3476async function addLog(message, level = 'info') {
3477 if (typeof loggingStatus !== 'undefined' && loggingStatus?.addLog) {
3478 return loggingStatus.addLog(message, level);
3479 }
3480 const state = await getState();
3481 const logs = state.logs || [];
3482 const entry = { message, level, timestamp: Date.now() };
3483 logs.push(entry);
3484 if (logs.length > 500) logs.splice(0, logs.length - 500);
3485 await setState({ logs });
3486 chrome.runtime.sendMessage({ type: 'LOG_ENTRY', payload: entry }).catch(() => { });
3487}
3488
3489function getStep8CallbackUrlFromNavigation(details, signupTabId) {
3490 if (typeof navigationUtils !== 'undefined' && navigationUtils?.getStep8CallbackUrlFromNavigation) {

Calls 2

getStateFunction · 0.85
setStateFunction · 0.85

Tested by

no test coverage detected