For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt, and this page is available as Markdown at /server-editor/interfaces/IModalTool.md.

Interface: IModalTool

Beta

Properties

id

readonly id: string

Beta

Remarks

Unique identifier for the tool


isActive

实验性

readonly isActive: boolean

Beta

Remarks

Active state of the modal tool


onModalToolActivation

onModalToolActivation: EventSink<ModalToolLifecycleEventPayload>

Beta

Remarks

Provides lifecycle activation events for a modal tool

Methods

bindPropertyPane()

bindPropertyPane(pane): void

Beta

Parameters

pane

IRootPropertyPane

Root pane associated with the modal tool

Returns

void

Remarks

Binds a property pane to the tool. When the tool is selected, the pane's visibility updates. Only one pane can be bound at a time.


registerKeyBinding()

registerKeyBinding(action, binding, info?): IRegisteredKeyBinding

Beta

Parameters

action

SupportedKeyboardActionTypes

Action to register the binding for.

binding

KeyBinding

Keyboard binding to invoke action.

info?

KeyBindingInfo

Additional information about key binding.

Returns

IRegisteredKeyBinding

Remarks

Register a key press binding for an action which will be handled by the tool input context.


registerMouseButtonBinding()

registerMouseButtonBinding(action): void

Beta

Parameters

action

SupportedMouseActionTypes

Action to register the binding for.

Returns

void

Remarks

Register an action to be called when mouse left/middle/right buttons are pressed or released.


registerMouseDragBinding()

registerMouseDragBinding(action): void

Beta

Parameters

action

SupportedMouseActionTypes

Action to register the binding for.

Returns

void

Remarks

Register an action to be called when mouse is dragged while left mouse button is down.


registerMouseWheelBinding()

registerMouseWheelBinding(action): void

Beta

Parameters

action

SupportedMouseActionTypes

Action to register the binding for.

Returns

void

Remarks

Register an action to be called when mouse wheel is scrolled.


setMouseIcon()

setMouseIcon(mouseIcon): void

Beta

Parameters

mouseIcon

MouseCursorIconType | undefined

The mouse cursor icon, or undefined to reset to default.

Returns

void

Remarks

Set the mouse cursor icon for this tool when it's active. The icon will only be visible when this tool is the currently selected tool.


unregisterInputBindings()

unregisterInputBindings(): void

Beta

Returns

void

Remarks

Unregister all input binding for this tool.