Skip to main content

Use interactive views inside chat answers

Open Complexity and enable Interactive view or Markdown document in its tool picker. Small interactive additions stream directly inside an answer. Brief explanations, a few values, formulas, or small controls do not require a sidebar.

A requested dashboard or substantial data display can use the sidebar. Preview content appears progressively. Controls remain disabled until the output fully validates. Other completed outputs can stay active during generation.

Local interaction with a completed view does not start a model call. One answer can contain separate Markdown and OpenUI outputs. Move, pin, or detach completed results where those controls are available. Existing sidebar outputs do not move automatically to inline placement.

Read an answer​

Inline OpenUI views, Markdown documents, and ordinary display-tool results appear as borderless sections within the answer. Sidebar and detached-window results keep their cards. Prose and displayed results keep their original order.

Completed tool calls appear in a collapsed Tool calls summary above the response. Expand it to inspect individual calls. The summary shows an error marker when a call fails. Active calls keep their status display.

When the provider supplies reasoning, a completed response shows it in a separate Reasoning disclosure above the final prose. Expand it to read the supplied text. Reasoning stays separate from tool calls and the answer text.

The inline layout keeps each view's canonical source, revision, saved field state, and placement controls. Required approvals and permission checks still apply.

Preview a native view​

During generation, the native preview keeps complete static sections in their layout: text, formulas, tables, charts, safe SVG, and disclosure content. Consecutive disclosures share an outline when the completed view uses a vertical container. Each disclosure keeps its own saved open state.

Incomplete sections and values that need state or calculation remain placeholders. Form controls appear empty and disabled, without authored, default, or saved values. Tabs show their labels without a selected tab. All tab panels and both conditional branches appear separately. Repeated content shows one bounded template without reading its data.

Preview content is inert. It cannot save values, submit input, or run a host action. Saved-state loading uses the same empty controls and static layout until hydration completes.

Custom React views​

If your administrator enables the optional runtime, Interactive view can also produce custom React views. These use version 4 of displayOpenUI. Native versions 1–3 remain supported.

Custom views keep the same inline, sidebar, and detached-window placement controls. A complete backend preview can appear during generation. Its controls stay disabled until the view completes and saved values load. Incomplete source does not run in the browser.

The available elements are text containers, buttons, SVG circles, and a bounded canvas. The canvas supports static circle commands, not arbitrary drawing scripts or external images. A previous ready frame can remain visible during replacement or failure, with its controls disabled.

After 60 seconds, the custom session pauses normally. The host shows This interactive session ended. Resume to interact again. The last ready output remains readable, with its controls disabled. Click Resume interactive view to reload the same revision and its saved nonsecret values. Expiry does not automatically renew the session. Reconnecting after expiry does not resume it or start a model response.

On navigation or reload, the page requests release of its own custom sessions. It clears secret input and completion status before the browser freezes the page. If you return through the browser’s back-forward cache, click Resume interactive view to interact again. Release uses a best-effort keepalive request, so browser termination, network failure, or delayed delivery can leave a worker until its 60-second lifetime ends. A new page cannot release a worker whose session identifier never reached the previous page. Immediate availability after reload is therefore not guaranteed.

Use Try again when the host reports an unavailable session. If another window changed saved values, use Use saved values. These controls reload the session and saved state. They do not start a model response. Host status and controls use the selected English or Hungarian interface language.

Only declared, nonsecret values can persist for the exact view revision. A successful explicit user interaction can save them. Opening, previewing, reloading, or reconnecting does not save them. A version check rejects conflicting writes. Saved values do not automatically enter model context.

When runtime v2 is available, declared secret fields appear in a trusted host area outside the generated view. Mark as provided immediately clears and discards the entered value. The generated view receives only an unverified completion boolean. This does not store a credential, verify it, supply it to a consumer, or grant permission.

Secret entry lasts at most 60 seconds for the session. Expiry clears unfinished secret input and completion status. Resume starts with all completion statuses false. Locking, closing, or reloading also clears entry and completion status. Reconnecting an active session starts with all completion statuses false. Runtime v1 and unsupported sessions show Secret entry is unavailable for this view. Custom guest buttons cannot execute Open mail or Create draft actions.

Copy Markdown includes the exact completed custom source in a tsx code block. A refinement contributes its complete resulting source. Copy does not export saved state. Native views continue to use openui blocks.

See runtime setup and deployment requirements.

Canvas event coordinates​

For custom source, onClick and onPointerDown handlers receive {x, y} in logical pixels relative to the target. These are not 0..1 fractions or viewport coordinates. Target dimensions are width=1..512 and height=1..256, with defaults of 512×256.

The host accounts for CSS scaling:

x = (clientX - left) * width / CSSWidth
y = (clientY - top) * height / CSSHeight

Here, left, top, CSSWidth, and CSSHeight describe the displayed target rectangle. The host clamps x to 0..512 and y to 0..256. For example, a 512×256 canvas displayed at 256×128 CSS pixels reports {x: 128, y: 64} at one-quarter width and height. Keyboard activation through the custom keyboard handler, including canvas and non-native targets, supplies the target center: {x: width / 2, y: height / 2}. Native onClick buttons use native click coordinate mapping, often {x: 0, y: 0}. Do not rely on native-button coordinates to locate keyboard activation.

For fractions, divide event.x by the target logical width and event.y by its logical height. For a width={320} slider that maps to -10..10, use Math.round(-10 + (event.x / 320) * 20). An x value of 80 gives -5. An x value of 240 gives 5.

Mail actions from a completed view​

Completed native and custom views can show a separate action row supplied by the trusted host. Open mail requires the corresponding tool to be enabled for the original response and still selected. The current operation grant and mailbox access must also allow it. Selecting a tool does not grant permission. See tool authorization.

Click Open mail in this row to open the message in the standard mail reader. This does not start another model decision turn. Opening the view, replaying history, or reloading the page does not execute the action or open the reader. Custom guest buttons cannot execute host actions.

If the outcome is unknown, click Check action status. This checks the same action intent without submitting another execution. A known final failed or cancelled Open mail action offers Retry action. Another explicit click starts a new attempt. Status checks and retries still require current permission and mailbox access.

Create draft uses the canonical draft writer when the host advertises the action and current permissions allow it. A normal successful save opens the saved draft without an extra approval. A conflicting or late proposal can require separate host review. Use Apply proposal or Cancel proposal only after reviewing that proposal. Cancellation does not delete an existing draft.

Reloading or opening the same view in another tab retrieves the existing action status through authenticated recovery. It does not rerun the writer or open the composer automatically. See draft review and recovery for the version checks and uncertain-result behavior.

Close or return a panel​

In user settings, Closing the side panel has two choices:

ChoiceBehavior
Return views to chat (default)Closing the panel returns its generated interactive views and Markdown documents to their answers.
Hide viewsClosing the panel hides it and keeps the current placement.

Mobile panel dismissal uses the same preference. Show in chat returns one generated view directly, regardless of the close preference. Use it in the panel or on the view's attachment in the answer. You do not need to reopen a hidden panel.

Returning a view changes its placement. It keeps the same answer, output revision, generated source, and saved field state. It does not start generation again. Other panel tools keep their own placement behavior.

Copy an answer​

Use Copy Markdown to copy the answer's prose and copyable displayed results in order. A completed, validated native interactive view also contributes its exact canonical OpenUI source in an openui code block. A refined view contributes the complete resulting source, not its patch. The source remains unchanged inside the block.

A view in a panel or detached window contributes its source at its attachment position in the answer. Preview, failed, and stopped views do not contribute a completed source block. Formatted copy carries displayed content as HTML. Its plain-text alternative carries the Markdown and source. Copy excludes provider reasoning and tool activity. It is not a backup of saved field state or panel placement.

Failed or stopped views​

An invalid interactive view shows The interactive view could not be displayed. A stopped view shows The interactive view stopped before it was complete. These compact statuses replace an unusable interactive card. A failure in one view does not disable completed sibling views.

For an errored, stopped, or interrupted run, Retry appears when the matching response is available. It requires chat permission and remains disabled while the application is busy. Retry starts a new response. It does not turn the partial response into a completed view.

If saved values fail to load, the view stays unavailable until those values load. See saved view state for state behavior.

Other tools and history​

Table panel, HTML panel, Update plan, and MailGen tools remain available under their own permissions. Mailbox tools require the appropriate selected mailbox and operation grants. See tool authorization.

Retired Weather, Artifact, Callout, Card, Key-value pairs, List, Table, Statistics, Timeline, and JSON display tools remain readable in old history. Saved tool settings do not authorize new execution. History still requires current mailbox, permission, and group grant checks.

See generated-view behavior, revisions, and input disclosure before reusing form values.