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
| Name | Type | Required | Description |
|---|---|---|---|
retainOnRelease | () => boolean | no | Clean unreferenced sessions are disposed; unresolved work can retain itself. |
dispose | () => void | Promise<void> | no | - |
relocate | (oldPath: string, newPath: string) => void | Promise<void> | no | Optional in-app path relocation hook. |
editor | PreviewToolbarEditorState | no | Standard editor state rendered by host preview toolbars. |