Repository navigation
Make this an artifact, under an answer a Bot draws - #2972
Open
davidmckayv wants to merge 1 commit into
Open
davidmckayv wants to merge 1 commit into
davidmckayv wants to merge 1 commit into
Conversation
A drawn answer (a native interface, an HTML interface, or a gallery or Playground component that drew) gets "Make this an artifact" under it, in the toolbar style of Copy under a reply. Pressing it sends the Bot the person's ask as an ordinary message, naming the drawing by its title or its place when there are several, and the Bot makes the artifact with the artifact_create every Bot holds. The same for a Bot connected over plain AG-UI. Text answers and artifact cards get none. The offer in the Bot's prompt didn't reach people on GPT models; this is OpenBot's version of Claude's "Save as artifact" on its custom visuals.
davidmckayv
requested review from
MikeRyanDev,
dustywusty,
guidovizoso,
mxmzb,
samjulien and
tylerslaton
as code owners
December 4, 2026 23:24
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
An answer a Bot draws in the conversation now has Make this an artifact under it. Pressing it sends the Bot the person's ask to keep that drawing, and the Bot makes the artifact with its own
artifact_create.Why
Sam's product call: answer quick asks in the chat, draw when that helps, and offer an artifact as a follow-up. Asking the Bot to make that offer in its reply didn't work on GPT models (no offers at all in the runs), so the offer is now a button under the drawing.
What changes
app/src/components/channels/drawn-answers.ts): a native catalog interface (render_ui, agenerative-ui-surfaceactivity), an HTML interface (generateSandboxedUi,open-generative-ui), and a gallery or Playground component call that put something on screen. A component that drew says in its first sentence that it is on screen for the person. A refused call, one with wrong arguments, one called too early and a decision all answer differently, so they get no button. Text answers, artifact cards, interfaces still being drawn and failed ones get none either.Make “Weekend trip budget” an artifact.by its title (a Card's title, the first heading line, the first<h1>–<h3>, or a component'stitle). Without a title it'sMake what you drew an artifact.for the only drawing,Make the last thing you drew an artifact.for the newest, andMake the second thing you drew an artifact.and so on for the rest.ConversationView), exactly like Carry on. When the Bot is free it goes at once. While a turn runs it waits as queued. A second press while the same ask is waiting or sending does nothing. A stock AG-UI Bot gets exactly what a built-in one gets. The Bot's instructions already say to make an artifact when asked to keep something it answered.The artifact viewer and the Bot's prompt are not touched.
What the leaders do
Claude is the one leader with this exact feature, so this follows Claude: one action per drawn answer, beside it. One difference, on purpose: Claude converts the visual in its own app. Here the press asks the Bot, because a connected AG-UI Bot must get everything a built-in Bot gets, and every Bot already holds
artifact_create.Tests
app/tests/make-artifact-browser.test.tsx(new, real browser, Chromium and WebKit, light and dark, 1280px and 390px). It runs the real conversation in the app's frame against a stock AG-UI agent at the runtime's address. The history holds a text answer, an artifact card and a drawn packing list. The person asks for a trip budget, and the agent streams it as agenerative-ui-surfaceactivity. Each drawing has the button, and the text answer, the reply and the artifact card have none. Pressing it under the budget sendsMake “Weekend trip budget” an artifact.as the person's message. The agent answers withartifact_create, the budget's artifact card is drawn, and nothing is wider than the window. Added to the WebKit job's list inci.yml.app/tests/drawn-answers.test.tschecks the rule against what the app really writes: every shipped gallery component's own on-screen answer counts as drawn. That includes the activity report's "The report is on screen…", which a first version of the rule missed. Refusals, wrong arguments (from the realwrongArguments), called-too-early, decisions, text answers, artifact cards, and interfaces still drawing or failed don't count. It also checks each ask's wording, titles that two drawings share, and a long title cut at a word.scripts/ci-changes.test.ts, and the related transcript, conversation and look-guard tests pass.Screenshots
From the browser test. Before is main, with the same conversation at the same moment.
A drawn budget, before and after (the packing list above it shows its button on hover):
The before shots sit a little further down the conversation, so the packing list's last line shows at the top. The budget, the reply and its Copy are drawn as they were, and the button's row is the only thing added.
After pressing it, the person's ask and the artifact the Bot made:
The artifact card's preview is blank because the test serves no page for it. That's the existing card, not part of this change.
Changelog
Conversations.