Manage tabs
surfsky_tabManage browser tabs in a cloud session: list all open tabs, open a new tab at a URL, switch active tab, or close a tab. Use list before switching to handle popups or target=_blank links.
Instructions
Manage the tabs of a session: list (index, id, url, title, active), new (opens a tab, optionally at url, and makes it active), switch (makes a tab active), close (a tab, default the active one). Use list then switch when a click opened a popup or a target=_blank link: the new page is another tab. Refs belong to a tab: take surfsky_snapshot after switching. The session's first tab cannot be closed; navigate it instead. The cloud allows five tabs per session.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tab | No | Which tab for switch or close: the zero-based index from the last list, or its 8-character id (a prefix is enough). | |
| url | No | For new: URL to open in the new tab; https:// is added when the scheme is missing. | |
| action | Yes | list; new (optionally at url); switch (tab); close (tab, default the active one). | |
| session_id | No | Session from surfsky_session_start. Omit for the shared default session, started on first use. |