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
ContextProvider
Context provider - contributes items to the right-click context menu.
Items are defined statically in the items array and filtered at runtime
using the provider’s canHandle and each item’s canHandle.
Signature
interface ContextProvider {
type: "context";
id: string;
name: string;
priority?: number;
selectionMode?: "single" | "multi";
extensions?: string[];
mimeTypes?: string[];
categories?: FileCategory[];
canHandle?: (ctx: ContextItemContext) => boolean;
category?: ContextProviderCategory | null;
items: ContextProviderItem[];
}Members
| Name | Type | Required | Description |
|---|---|---|---|
type | "context" | yes | — |
id | string | yes | — |
name | string | yes | — |
priority | number | no | — |
selectionMode | "single" | "multi" | no | Selection mode: ‘single’ (default) or ‘multi’ |
extensions | string[] | no | Optional file-type filtering at provider level |
mimeTypes | string[] | no | — |
categories | FileCategory[] | no | — |
canHandle | (ctx: ContextItemContext) => boolean | no | Provider-level visibility check. For single mode: receives the right-clicked entry. For multi mode: receives all selected entries. |
category | ContextProviderCategory | null | no | Submenu category (null = root level) |
items | ContextProviderItem[] | yes | Static array of menu items provided by this provider |