MCPcopy Create free account
hub / github.com/garrytan/gstack / pushTabState

Function pushTabState

extension/background.js:543–551  ·  view source on GitHub ↗
(reason)

Source from the content-addressed store, hash-verified

541}
542
543async function pushTabState(reason) {
544 const snapshot = await snapshotTabs();
545 if (!snapshot) return;
546 chrome.runtime.sendMessage({
547 type: 'browserTabState',
548 reason,
549 ...snapshot,
550 }).catch(() => {}); // expected: sidepanel may not be open
551}
552
553chrome.tabs.onActivated.addListener((activeInfo) => {
554 // Keep the legacy event for any consumer still listening to it (the chat

Callers 1

background.jsFile · 0.85

Calls 1

snapshotTabsFunction · 0.85

Tested by

no test coverage detected