AI Disclosure: This page was generated by an LLM and may contain inaccuracies. Hand-crafted documentation will be implemented over time on the road to 1.0
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;
selectedFiles: FileEntry[];
targetFile: FileEntry | null;
currentPath: string;
isVial: boolean;
hasPropertySchema: boolean;
activeContextKeys: ReadonlySet<CommandContextKey>;
}Members
| Name | Type | Required | Description |
|---|---|---|---|
pane | PluginPaneContext | yes | The active pane (always 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 |
isVial | boolean | yes | Whether current directory is a vial |
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) |