MCPcopy
hub / github.com/garrytan/gstack / getSession

Method getSession

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

Get a TabSession by tab ID. Used by /batch for parallel tab execution.

(tabId: number)

Source from the content-addressed store, hash-verified

947
948 /** Get a TabSession by tab ID. Used by /batch for parallel tab execution. */
949 getSession(tabId: number): TabSession {
950 const session = this.tabSessions.get(tabId);
951 if (!session) throw new Error(`Tab ${tabId} not found`);
952 return session;
953 }
954
955 /** Get the underlying Page for a tab id. Returns null if the tab doesn't exist.
956 * Used by the CDP bridge (cdp-bridge.ts) to mint per-tab CDPSessions. */

Callers 1

batch.test.tsFile · 0.80

Calls 1

getMethod · 0.45

Tested by

no test coverage detected