Generative UI lets agents answer with interactive charts, diagrams, maps, plans, tables, and forms rendered inline in the Paseo chat timeline.

Instead of replying only with plain Markdown tables or pasted command output, agents write `ui` and `app` code blocks in their replies. The plugin compiles and renders those blocks live while the reply streams. Sliders, toggles, editable tables, and decision weights recompute locally in the app without extra model calls. Buttons and forms send your choice back to the agent as your next message through Paseo.

## Setup

Requires Paseo 0.14.0 or later on both the daemon and the app. Git and the GitHub CLI (`gh`) on the daemon host are optional and used only when a block includes `Changes()`, `Commits()`, or `PullRequest()`.

When automatic instructions are enabled, new agents receive the Generative UI component reference in their system prompt when created. For an existing agent, run `/genui` in the composer to send it the component reference, or `/genui-demo` to append an interactive sample block to the timeline. Open the **Gen-UI Gallery** from the sidebar or workspace panel to browse all 88 components across 10 groups with 170+ live examples and an interactive spec playground.

## Capabilities and data access

- **88 components in 10 groups**: Layout, Content, Data, Media, Inputs, Widgets, Project, Dev, Manage, and Evidence.
- **Confined file reading**: `Load(path)`, `Snippet(path, from, to)`, and `Image(path)` read JSON, CSV, TSV, logs, test reports (Vitest, Jest, JUnit), coverage (`lcov`, Istanbul, `coverage.py`, Go), lint and typecheck findings (ESLint, SARIF, `tsc`, Ruff), HAR traces, and benchmarks. Reads are strictly confined to the agent's workspace directory, its per-agent thread storage directory (`/tmp/opencode/genui-storage/<agentId>`), `/tmp`, and any extra folders added in settings.
- **Live workspace and git state**: `Changes()`, `Commits()`, `PullRequest()`, `Threads()`, and `Environments()` read the workspace's git diff, commits, pull request status, subagents, and worktrees on the daemon host.
- **Replies the user builds**: Agents can let you answer a card in your own words before anything is sent. A `Queue` button adds its text to your reply instead of sending it, `comments: true` adds a Comment action to each item of a Plan, Steps, List, Table, Findings, Decision or OptionCards, `editable: true` lets you rewrite an item's text, and `Other()` opens a free-form box. The queued parts from every card in the chat show in a composer pill, where you can remove them, send them, or clear them; the next Send sends them together with its own text as one message. The queue is kept in the app's local storage per chat. A message you type in Paseo's composer does not include the queue.
- **Optional `render_ui` tool**: Agents write `ui` blocks in their reply by default, and the plugin asks them once to fix a block that fails. The plugin also gives each agent an optional `render_ui` tool through Paseo's agent tools. The agent passes a `ui` spec and a one-sentence answer, which the plugin shows as text above the card; the daemon checks the spec (compile, file loads, render) and adds it to the chat only when it renders, otherwise it returns the errors so the agent fixes them in the same turn. The plugin approves `render_ui` permission prompts on its own, because the tool only reads files the plugin can already read and adds UI to the chat.
- **Repair of broken blocks**: When an agent's turn ends, the daemon checks each `ui` block in its reply. If a block fails to compile, load a file, or render, the plugin sends the agent one follow-up message that starts with `[genui]` and lists the errors, and the agent replies with corrected blocks. It sends at most one such message per user message and skips subagents. The follow-up shows in the chat as a user message. Turning off automatic agent instructions in settings also turns this off.
- **Sandboxed mini-apps**: `app` blocks run self-contained HTML and JavaScript inside a sandboxed iframe (`sandbox="allow-scripts"`) with a network-blocking Content Security Policy on desktop and web clients.
- **Settings and web lookups**: Under **Settings -> Plugins -> Generative UI**, you can toggle automatic agent instructions for new sessions and toggle server-side web lookups, and add extra folders (for example `~/dev/scratch`) that file reads may use. When web lookups are on, the daemon fetches photo searches from Wikimedia Commons (`commons.wikimedia.org` / `upload.wikimedia.org`), geocoding from Photon (`photon.komoot.io`), map tiles from OpenStreetMap (`tile.openstreetmap.org`), and HTTPS images through an address-checked proxy that rejects loopback, private, and link-local IP addresses. No cookies, credentials, or conversation text beyond the specific search query or place name are sent. Turning web lookups off disables all external network requests.

## Limits

File reads outside the agent's workspace, thread storage, `/tmp`, and the extra folders in settings are refused; agents are told to copy other files into thread storage first. Sandboxed `app` blocks require a desktop or browser client; mobile clients display the block's source code.
