Interface: DockPanelApi
Defined in: packages/sdk/src/types.ts:75
The panel API handed to a DockPanelKind component. Use these methods to drive the panel's own tab (title, close, focus) and update its stored parameters. The host provides the implementation; extensions never construct this object directly.
Properties
isActive
readonly isActive: boolean;Defined in: packages/sdk/src/types.ts:83
true while this panel is the active one in its dock group.
isVisible
readonly isVisible: boolean;Defined in: packages/sdk/src/types.ts:98
true while this panel is visible — its tab is the selected one in its group. Distinct from isActive: with split groups, every group's selected tab is visible but only one panel in the whole dock is active.
Methods
setTitle()
setTitle(title): void;Defined in: packages/sdk/src/types.ts:77
Update the title shown in the panel's tab.
Parameters
title
string
Returns
void
close()
close(): void;Defined in: packages/sdk/src/types.ts:79
Programmatically close this panel.
Returns
void
setActive()
setActive(): void;Defined in: packages/sdk/src/types.ts:81
Bring this panel to focus (make it the active panel in its group).
Returns
void
onDidActiveChange()
onDidActiveChange(listener): Disposable;Defined in: packages/sdk/src/types.ts:89
Subscribe to active-state transitions. The listener is called whenever the panel gains or loses active status, with an event carrying the new state. Returns a Disposable that cancels the subscription.
Parameters
listener
(event) => void
Returns
onDidVisibilityChange()
onDidVisibilityChange(listener): Disposable;Defined in: packages/sdk/src/types.ts:105
Subscribe to visibility transitions (the panel's tab being selected or deselected in its group). Use to pause expensive work while hidden, or to re-measure on reveal (e.g. the terminal refits xterm when its tab becomes visible again). Returns a Disposable that cancels the subscription.
Parameters
listener
(event) => void
Returns
updateParameters()
updateParameters(params): void;Defined in: packages/sdk/src/types.ts:113
Shallow-merge params into this panel's stored parameters. Keys absent from params are left unchanged. Useful for keeping tabs-serializable state (e.g. the open URL in a web-viewer panel) consistent with the UI.
Parameters
params
object
Returns
void