Skip to content

WorkspacesAPI

Defined in: namespaces.ts:1272

register(template): Promise<string>

Defined in: namespaces.ts:1274

Registers an ephemeral workspace template.

Partial<WorkspaceTemplate> & object

Promise<string>


list(): Promise<WorkspaceTemplate[]>

Defined in: namespaces.ts:1276

Lists all available workspace templates (all sources).

Promise<WorkspaceTemplate[]>


apply(workspaceId): Promise<boolean>

Defined in: namespaces.ts:1278

Applies a workspace template to the current window.

string

Promise<boolean>


getActive(): Promise<string | null>

Defined in: namespaces.ts:1280

Returns the active workspace ID for the current window.

Promise<string | null>


onChange(callback): Promise<string>

Defined in: namespaces.ts:1282

Subscribes to workspace change events for the current window.

(workspaceId) => void

Promise<string>