Interface: Command
Defined in: packages/sdk/src/types.ts:175
A named, invokable action. Register with ExtensionContext.registerCommand and trigger from menu items, keybindings, status items, or ExtensionContext.executeCommand.
Properties
id
ts
id: string;Defined in: packages/sdk/src/types.ts:177
Unique id, conventionally area.verb (e.g. "view.toggleLeftPanel").
label
ts
label: string;Defined in: packages/sdk/src/types.ts:179
Human-readable label (shown where the command surfaces in UI).
run
ts
run: () => void;Defined in: packages/sdk/src/types.ts:181
The action. Runs synchronously; do async work inside if needed.
Returns
void