ArtifactViewer
Part-type-aware renderer for the A2A Artifact model ({artifactId, name?, parts}): text parts as a typographic block, data parts as DataList-convention key/value rows, file parts as a mediaType + uri chip (never fetched), unknown kinds as a warning row. Validation-gold accent — an artifact is enriched output. The appending prop shows a StreamingDot tail while artifact-update appends arrive.
import { ArtifactViewer } from "@nodus/design-system/patterns"Props
| Prop | Type | Default | Description |
|---|---|---|---|
artifactreq | { artifactId: string; name?: string; parts: Array<{ kind: 'text' | 'data' | 'file'; text?: string; data?: Record<string, unknown>; file?: { uri?: string; mediaType?: string } }> } | — | The A2A Artifact to render. Parts are routed by kind; unknown kinds degrade to warning rows. |
appending | boolean | false | True while streaming artifact-update appends are still arriving — shows the StreamingDot tail. |
artifactrequired{ artifactId: string; name?: string; parts: Array<{ kind: 'text' | 'data' | 'file'; text?: string; data?: Record<string, unknown>; file?: { uri?: string; mediaType?: string } }> }Default —The A2A Artifact to render. Parts are routed by kind; unknown kinds degrade to warning rows.
appendingbooleanDefault falseTrue while streaming artifact-update appends are still arriving — shows the StreamingDot tail.
This component was designed to express:
Explore Related
Renders streamed code, markdown, or text output with progressive disclosure, syntax highlighting via line-number table, diff view, and copy action. Integrates with useStream patterns via controlled content + state props.
Single A2A Task detail surface mirroring the spec's Task object: identity header (task id + contextId + TaskStateBadge), role-turned message history in ChatMessage conventions, artifact list delegating each artifact to ArtifactViewer, and a mono key/value metadata block. Temporal spine — a task is a thing moving through time.
Animated dot sequence for streaming/typing indicators
Key-value list for structured data display