Member Junction
    Preparing search index...

    Interface IArtifactViewerPluginPreviewStatics

    STATIC preview contract for an artifact-viewer plugin class.

    The inline-PREVIEW slot is resolved WITHOUT instantiating any plugin — the resolver reads these STATIC members directly off the registered constructor. This is deliberate: plugins are Angular components with DI constructors (and some use inject() in field initializers), so a bare new SubClass() outside an Angular injection context throws. Reading statics sidesteps that entirely.

    A plugin that wants to drive an inline preview declares both members as static:

    • static readonly PreviewComponentType — the lightweight IArtifactPreviewComponent.
    • static CanHandlePreview(...) — type/content matcher for the preview slot.

    Preview resolution is INDEPENDENT of full-viewer resolution: the inline slot is filled by the highest-priority registered plugin class whose CanHandlePreview matches AND that exposes a PreviewComponentType. A downstream plugin overriding the full viewer for a type but NOT declaring PreviewComponentType therefore does not suppress a base plugin's preview. When no registered class exposes a matching PreviewComponentType, no inline preview is rendered and the card falls back to its existing info-bar box.

    interface IArtifactViewerPluginPreviewStatics {
        PreviewComponentType?: Type<IArtifactPreviewComponent>;
        CanHandlePreview?(artifactTypeName: string, contentType?: string): boolean;
    }
    Index

    Properties

    PreviewComponentType?: Type<IArtifactPreviewComponent>

    The lightweight component used to render an inline PREVIEW of the artifact directly inside a conversation message card (no toolbar / feedback / tabs). Optional — plugins without a preview omit it and the card falls back to its info-bar box.

    Methods

    • Determines whether this plugin's PreviewComponentType applies to a given artifact. Plugins that declare a PreviewComponentType MUST also declare this; plugins without a preview can omit it (the resolver skips them).

      Parameters

      • artifactTypeName: string

        The artifact type name (e.g., 'Image', 'Video', 'Audio').

      • OptionalcontentType: string

        The MIME type (e.g., 'image/png', 'video/mp4').

      Returns boolean

      true if this plugin's preview can render the artifact.