Skip to content

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 &#124; Promise<void> no -
relocate (oldPath: string, newPath: string) => void &#124; Promise<void> no Optional in-app path relocation hook.
editor PreviewToolbarEditorState no Standard editor state rendered by host preview toolbars.

This article includes AI-assisted content.

Documentation is licensed under CC BY 4.0. Phoundry names and marks remain reserved.