# XWUIArtifactPanel

Side panel for agent artifacts with a code/preview toggle, version history, copy, download and open-in. Default autonomy is `suggest`. A proposed version is a preview until `applyVersion()`. Model text is untrusted and never written into `html`. Preview mode holds the untrusted-markup lane for a host-owned frame.

## Basic Usage

Single TypeScript artifact in code mode.

```example
file: examples/BasicUsage.ts
html: examples/BasicUsage.html
title: Basic Usage
description: Single TypeScript artifact in code mode.
```

## Preview Mode

Preview does not render model markup as HTML.

```example
file: examples/PreviewMode.ts
html: examples/PreviewMode.html
title: Preview Mode
description: Preview shows a host-owned notice instead of rendering previewHtml.
```

## Version History

Selecting a version previews it; apply copies the content into the artifact.

```example
file: examples/VersionHistory.ts
html: examples/VersionHistory.html
title: Version History
description: Proposed version stays a preview until apply at autonomy suggest.
```

## Empty Panel

No artifacts. Autonomy remains visible.

```example
file: examples/EmptyPanel.ts
html: examples/EmptyPanel.html
title: Empty Panel
description: Empty artifact panel with visible autonomy mode.
```

```api
```
