CommandContext
Since Plugin API: 1.0.0
Runtime context passed to command handlers and predicates. Built from the active pane’s current state.
Signature
interface CommandContext { pane: PluginPaneContext | null; selectedFiles: FileEntry[]; targetFile: FileEntry | null; currentPath: string; isWorkspace: boolean; hasPropertySchema: boolean; activeContextKeys: ReadonlySet<CommandContextKey>;}Members
| Name | Type | Required | Description |
|---|---|---|---|
pane |
PluginPaneContext | null |
yes | The invocation pane, or null when no eligible Explorer is available |
selectedFiles |
FileEntry[] |
yes | Selected files (empty if none) |
targetFile |
FileEntry | null |
yes | The “target” file (for context menu: right-clicked file; otherwise: first selected) |
currentPath |
string |
yes | Current directory path |
isWorkspace |
boolean |
yes | Whether current directory is a workspace |
hasPropertySchema |
boolean |
yes | Whether the saved-views scope has a property schema (e.g. Boards). |
activeContextKeys |
ReadonlySet<CommandContextKey> |
yes | Active context keys (for debugging/inspection) |