AI Notice: Most documentation right now was auto-generated by an LLM. Handwritten documentation will be implemented over time on the road to 1.0
CommandContext
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;
isRecursiveVial: 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). |
isRecursiveVial | boolean | yes | Active vial uses recursive subtree indexing |
activeContextKeys | ReadonlySet<CommandContextKey> | yes | Active context keys (for debugging/inspection) |