Optional ReadonlyPreviewThe 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.
OptionalCanDetermines 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).
The artifact type name (e.g., 'Image', 'Video', 'Audio').
OptionalcontentType: stringThe MIME type (e.g., 'image/png', 'video/mp4').
true if this plugin's preview can render the artifact.
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 barenew 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
CanHandlePreviewmatches AND that exposes aPreviewComponentType. A downstream plugin overriding the full viewer for a type but NOT declaringPreviewComponentTypetherefore does not suppress a base plugin's preview. When no registered class exposes a matchingPreviewComponentType, no inline preview is rendered and the card falls back to its existing info-bar box.