Calm motion: animations on this site only fade, with no movement
Artifact panel
A side panel for a document that the model writes, with versions, a copy, and a download
Shows the document or the code that an AI assistant makes, next to the chat, so the chat stays short and the work stays in one place.
Basic
titlenames the document.versionsis the list of texts, oldest first. Each change from the model adds a version.v-model:versionis the index in view. It shows the newest version until the person picks another with the arrows.langshows the text as code in a code block. Without it, the text shows as a plain document.writingsays that the model writes the newest version now. The download waits until it ends, and the body hasaria-busy.- Copy puts the text in the clipboard, and a status line says so. Download saves it as
filename. - The ✕ button emits
close. The panel is a landmark with a name, such as "Document: Launch plan". - Change the words with
labelsor a label pack. The API table lists the keys.
Usage
ts
import { BlessArtifactPanel } from "blessing-ui";API
Props
| Name | Type | Default | Description |
|---|---|---|---|
title* | string | — | |
versions* | string[] | — | each version of the document, oldest first |
lang | string | — | a code language shows the text as code; leave it out for a plain document |
filename | string | "document.txt" | the name of the file for the download |
writing | boolean | — | the model writes the last version now |
labels | Partial<{ panel: string; version: (n: number, total: number) => string; older: string; newer: string; copy: string; copied: string; download: string; close: string; writing: string; }> | — | |
version | number | — | the index of the version in view; the newest by default |
Events
| Name | Payload | Description |
|---|---|---|
close | [] | |
update:version | [value: number | undefined] |