MCPcopy Index your code
hub / github.com/garrytan/gstack / getActiveSession

Method getActiveSession

browse/src/browser-manager.ts:942–946  ·  view source on GitHub ↗

Get the TabSession for the active tab.

()

Source from the content-addressed store, hash-verified

940 // ─── Session Access ────────────────────────────────────────
941 /** Get the TabSession for the active tab. */
942 getActiveSession(): TabSession {
943 const session = this.tabSessions.get(this.activeTabId);
944 if (!session) throw new Error('No active page. Use "browse goto <url>" first.');
945 return session;
946 }
947
948 /** Get a TabSession by tab ID. Used by /batch for parallel tab execution. */
949 getSession(tabId: number): TabSession {

Callers 15

getRefMapMethod · 0.95
getPageMethod · 0.95
setRefMapMethod · 0.95
clearRefsMethod · 0.95
resolveRefMethod · 0.95
getRefRoleMethod · 0.95
getRefCountMethod · 0.95
setLastSnapshotMethod · 0.95
getLastSnapshotMethod · 0.95
setFrameMethod · 0.95
getFrameMethod · 0.95
getActiveFrameOrPageMethod · 0.95

Calls 1

getMethod · 0.45

Tested by 9

handleReadCommandFunction · 0.64
handleWriteCommandFunction · 0.64
handleReadCommandFunction · 0.64
handleWriteCommandFunction · 0.64
handleWriteCommandFunction · 0.64
handleReadCommandFunction · 0.64
handleWriteCommandFunction · 0.64
handleReadCommandFunction · 0.64
handleWriteCommandFunction · 0.64