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

PreviewSession

Since Plugin API: 1.0.0

Provider-owned state shared by every presentation of one file preview.

Signature

interface PreviewSession {
    retainOnRelease?: () => boolean;
    dispose?: () => void | Promise<void>;
    relocate?: (oldPath: string, newPath: string) => void | Promise<void>;
    editor?: PreviewToolbarEditorState;
}

Members

NameTypeRequiredDescription
retainOnRelease() => booleannoClean unreferenced sessions are disposed; unresolved work can retain itself.
dispose() => void | Promise<void>no-
relocate(oldPath: string, newPath: string) => void | Promise<void>noOptional in-app path relocation hook.
editorPreviewToolbarEditorStatenoStandard editor state rendered by host preview toolbars.