Artifacts
Artifacts are files produced by the AI agent during an intent — SQL models, YAML configuration files, Markdown documentation, Python scripts, JSON data, and images. They are stored in the intent's working workspace and can be viewed, copied, downloaded, and (for unlocked artifacts) edited from the chat.
Supported Artifact Types
| Type | Icon | Description |
|---|---|---|
sql | Database | SQL model or query |
yaml | Braces | YAML configuration (for example, dbt source or schema YAML) |
md / markdown | FileText | Markdown documentation |
json | FileJson | JSON data or configuration |
js / javascript | FileCode | JavaScript file |
ts / typescript | FileCode | TypeScript file |
py / python | FileCode | Python script |
css | FileCode | CSS stylesheet |
csv | FileSpreadsheet | CSV data file |
log | ScrollText | Log output |
txt | FileText | Plain text file |
png, jpg, jpeg, gif, webp, svg, bmp, ico | (image) | Image file rendered visually as <img> |
html | FileText | HTML file (read-only, no edit) |
Opening an Artifact
File links appear inline in agent chat messages. They are rendered as clickable text with a file icon. Click any file link to open the Artifact Modal.
The modal displays:
- A header bar with the file path, type icon, version selector (when multiple versions exist), and action buttons
- The file content in the body (code view or rendered view)
Artifact Header Controls
The header bar at the top of the Artifact Modal contains the following controls, depending on context:
Viewing Mode
| Control | Action |
|---|---|
| WrapText icon | Toggle line wrap on/off (on = active, highlighted) |
| Copy icon | Copy the full file content to the clipboard. Shows a checkmark briefly to confirm. |
| Download icon | Download the file to your local machine |
| Pencil (Edit) icon | Enter edit mode — only shown for unlocked, non-HTML artifacts that have a save callback wired |
| Code View button | Open the file in the full Code View editor — only shown for working-folder artifacts |
| Ask about this button (MessageCircle) | Inject a file reference into the chat input — only shown for working-folder artifacts |
| X | Close the modal |
Editing Mode
When you click the Pencil icon to enter edit mode, the Monaco editor becomes editable and the header shows:
| Control | Action |
|---|---|
| Cancel | Discard changes and return to view mode |
| Save | Save the changes to the working workspace. Shows "Saving..." while in progress. |
After saving, a status message appears briefly:
- "Saved" in green on success
- The error message in red on failure
Viewing Markdown
Markdown artifacts are rendered as formatted HTML (headings, lists, code blocks, tables, etc.) using the MarkdownViewer component. There is no manual toggle between preview and raw views — Markdown files always display as rendered HTML in view mode. When you enter edit mode (via the Pencil icon), the raw Markdown source is shown in the Monaco editor.
Selecting Text and Asking About It
In the Artifact Modal, you can select text with your mouse. When text is selected, a SelectionToolbar appears above the selection with an "Ask about selection" button. Clicking it injects the selected snippet into the chat input with a reference to the file.
Version Selector
The version selector badge (for example, v2) is only shown when the agent has produced multiple versions of the same file. Click the badge to open a dropdown listing all versions. Click a version to view its content.
The latest version is labeled "(current)" in the dropdown. Single-version artifacts do not show a version badge.
Locked Artifacts
Some artifacts are marked as locked — they cannot be edited through the UI. A Lock icon appears in the header next to the filename. Locked artifacts can still be copied, downloaded, and viewed. The Edit (pencil) button is not shown for locked artifacts.
States
| State | What you see |
|---|---|
| Loading | Spinner while content is fetched |
| Empty content | Placeholder message ("No content") |
| Viewing | Full file content with action buttons |
| Editing | Monaco editor (now editable) with Cancel and Save buttons |
| Saving | "Saving..." text in the header; Save button disabled |
| Save success | "Saved" text in green |
| Save error | Error message in red |
| Image | Image rendered as <img> at full width |
Quick Reference
| Action | How |
|---|---|
| Open artifact | Click file link in chat message |
| Copy content | Click Copy (clipboard) icon in header |
| Download | Click Download icon in header |
| Edit file | Click Pencil icon → make changes → Save (unlocked artifacts only) |
| Cancel edit | Click Cancel in edit mode |
| Toggle line wrap | Click WrapText icon |
| Open in Code View | Click Code View button (working-folder artifacts only) |
| Ask about this file | Click Ask about this (MessageCircle) button (working-folder artifacts only) |
| Ask about selected text | Select text → click Ask about selection |
| Switch version | Click version badge → select from dropdown (multi-version artifacts only) |
| Close modal | Click X or press Escape |