Phials developer documentation
User guide
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

SelectionProvider

Selection provider - contributes actions to the multi-selection toolbar

Signature

interface SelectionProvider {
    type: "selection";
    id: string;
    name: string;
    priority?: number;
    extensions?: string[];
    mimeTypes?: string[];
    categories?: FileCategory[];
    canHandle?: (selectedFiles: FileEntry[]) => boolean;
    minSelection?: number;
    getItems: (ctx: SelectionContext, api?: SelectionActionAPI) => SelectionProviderItem[];
}

Members

NameTypeRequiredDescription
type"selection"yes
idstringyes
namestringyes
prioritynumberno
extensionsstring[]noOptional file-type filtering (only shows when all selected files match)
mimeTypesstring[]no
categoriesFileCategory[]no
canHandle(selectedFiles: FileEntry[]) => booleannoCustom handler to check if provider applies to selection
minSelectionnumbernoMinimum number of selected items required (default: 2)
getItems(ctx: SelectionContext, api?: SelectionActionAPI) => SelectionProviderItem[]yesGenerate action items for the current selection