Skip to content

Open-source AI browser agent for Chrome and Firefox (monorepo) 🧠

fix: match source-inspection regexes in chrome background.js

azghr556f82a6dd79
diff --git a/src/chrome/src/background.js b/src/chrome/src/background.js
index bdf834e8e..328320ead 100644
--- a/src/chrome/src/background.js
+++ b/src/chrome/src/background.js
@@ -142,7 +142,7 @@ const VISION_OFFSCREEN_URL = chrome.runtime.getURL('src/offscreen/offscreen.html
// eviction registers its in-memory state first; the Traces page can also
// request an immediate scan via WB_TRACE_REPAIR_STALE_RUNS.
const TRACE_REPAIR_STARTUP_DELAY_MS = 15_000;
-setTimeout(() => { void workflowTrace.repairStaleRuns().catch(() => { }); }, TRACE_REPAIR_STARTUP_DELAY_MS);
+setTimeout(() => { void workflowTrace.repairStaleRuns().catch(() => {}); }, TRACE_REPAIR_STARTUP_DELAY_MS);
function normalizeVisionDownloadState(state) {
return {
@@ -574,7 +574,7 @@ async function loadScreenshotRedaction() {
const stored = await chrome.storage.local.get('screenshotRedaction');
if (stored.screenshotRedaction != null) agent.screenshotRedaction = !!stored.screenshotRedaction;
}
-const screenshotRedactionReady = loadScreenshotRedaction().catch(() => { });
+const screenshotRedactionReady = loadScreenshotRedaction().catch(() => {});
// Image budget (issue #311): screenshot quality + how many screenshots the
// agent may capture per turn, and the max image dimension. Defaults preserve
@@ -628,7 +628,7 @@ async function syncAgentUserMemoryFromStorage() {
});
return store;
}
-const userMemoryReady = syncAgentUserMemoryFromStorage().catch(() => { });
+const userMemoryReady = syncAgentUserMemoryFromStorage().catch(() => {});
const USER_MEMORY_EXTRACTION_MAX_QUEUE = 10;
const USER_MEMORY_EXTRACTION_DELAY_MS = 1200;
@@ -1650,7 +1650,7 @@ async function handleContextMenuAsk(info, tab) {
}
chrome.contextMenus?.onClicked?.addListener?.((info, tab) => {
- handleContextMenuAsk(info, tab).catch(() => { });
+ handleContextMenuAsk(info, tab).catch(() => {});
});
// Only this instance knows which runs are live in memory, so it owns the
@@ -2128,7 +2128,7 @@ async function stopActiveRunBeforeConversationClear(tabId) {
// first leaves the per-tab run guard active while the UI already looks like
// a fresh chat, so the next send fails with "run already in progress".
if (activeStart?.promise) {
- await activeStart.promise.catch(() => { });
+ await activeStart.promise.catch(() => {});
}
// Direct chat/chat_stream callers do not have a detached-start promise.
// Do not clear their conversation until processMessage's finally block has
@@ -3957,7 +3957,7 @@ async function handleMessage(msg, sender) {
await providerManager.load();
} catch (error) {
if (previousEnabled !== msg.enabled) {
- await chrome.storage.local.set({ helpImproveWebBrain: previousEnabled }).catch(() => { });
+ await chrome.storage.local.set({ helpImproveWebBrain: previousEnabled }).catch(() => {});
}
throw error;
}