Skip to content

WorkspacesAPI

Defined in: namespaces.ts:1271

register(template): Promise<string>

Defined in: namespaces.ts:1273

Registers an ephemeral workspace template.

Partial<WorkspaceTemplate> & object

Promise<string>


list(): Promise<WorkspaceTemplate[]>

Defined in: namespaces.ts:1275

Lists all available workspace templates (all sources).

Promise<WorkspaceTemplate[]>


apply(workspaceId): Promise<boolean>

Defined in: namespaces.ts:1277

Applies a workspace template to the current window.

string

Promise<boolean>


getActive(): Promise<string | null>

Defined in: namespaces.ts:1279

Returns the active workspace ID for the current window.

Promise<string | null>


onChange(callback): Promise<string>

Defined in: namespaces.ts:1281

Subscribes to workspace change events for the current window.

(workspaceId) => void

Promise<string>