Skip to content

Commit d3fba2c

Browse files
committed
docs(readme): add v0.1.3 Image-component showcase
Embed warning-image.png + source asset (what-did-you-do-claude.jpg) and a short note about base64 data URLs (WKWebView blocks file:// from agent:// pages).
1 parent c532e2a commit d3fba2c

3 files changed

Lines changed: 20 additions & 0 deletions

File tree

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,26 @@ Priority dropdown, complexity radio, and notes in one native form. Agent gets st
172172
</tr>
173173
</table>
174174

175+
### Image + structured form (v0.1.3)
176+
177+
Embed a local image (data URL, no `file://` cross-origin issues) alongside RadioGroup, Checkbox, TextInput, and Buttons in one window. Useful when the agent needs to show context — a screenshot, a diagram, a meme — before asking a structured question.
178+
179+
<p align="center">
180+
<img src="media/warning-image.png" alt="Destructive action approval window with embedded image, radio group, checkbox, text input, and buttons" width="320">
181+
</p>
182+
183+
<details>
184+
<summary><b>Embedding a local image</b></summary>
185+
186+
WKWebView blocks `file://` from an `agent://` page (cross-origin). Pass images as data URLs:
187+
188+
```bash
189+
B64=$(base64 < my-image.jpg | tr -d '\n')
190+
# emit `{"Image":{"src":"data:image/jpeg;base64,$B64", ...}}` in your A2UI JSONL
191+
```
192+
193+
</details>
194+
175195
<details>
176196
<summary><b>What the raw A2UI JSONL looks like</b> (click to expand — the skill writes this for you)</summary>
177197

media/warning-image.png

284 KB
Loading

media/what-did-you-do-claude.jpg

113 KB
Loading

0 commit comments

Comments
 (0)