DocumentationComponentsTheme Creator
Theme CreatorGitHubIntroduction
InstallationUsageThemingMotion
Components
AI ChatAI Chat PageAI UsageAgent RoutinesAgent TimelineAgent StatusAI AnswerAgent PlanAgent Tool CallsAI ComposerAI Side PanelPrompt Studio
AI agentsContributing

Prompt Studio

One card for editing, testing and shipping a prompt template — variables as chips with sample values, a test run against the chosen model, and versions you can compare and promote to production.

The card is a composition, so it follows your theme preset. Copy the source from the Code tab and replace the sample prompt, versions and test cases with your own; runs here are simulated and nothing is sent to a model.

What it's made of

PartComponent
Card shellCard, filled on a grouped page
Version and model chipsDropdown Menu on a ghost Button
Version rowsRadio rows with an Avatar, a Badge for the production marker
System and UserSegmented Control, solid
Variable valuesField, one per variable
Test casesSegmented Control
Run and StopButton with a Shortcut
Working stateSpinner
Version compareParameter Diff's TextDiff, with a tokenizer that keeps each {{variable}} whole
CopyIcon Button

Writing the template

Placeholders are written as {{name}} and show as chips, each variable in its own series colour. Type {{ to pick a variable from the list, or type a new name and close it with }} to add a variable and a field for it. A chip is removed whole with Backspace or Delete, and copying and pasting keeps the braces, so the text you copy is the template.

A variable with no value draws its chips with a dashed edge. Focusing a field lights its chips, and editing a value flashes them once. Clicking a chip focuses its field.

Versions

The version chip says whether the open version is in production or the latest. Its menu lists every version with its author and age; pick one to compare it with the open version or to promote it. Compare turns the editor into a word diff, with the counts beside the System and User switch and a dot on each part that changed. Promote moves the production marker to that version, and Undo moves it back.

Running

Run sends the selected test case to the chosen model. The panel at the foot says Thinking, then streams the reply, then shows how long it took, how many tokens it used and what it cost at the model's prices. Stop keeps what has arrived. A run that fails says why and offers Retry; the first run of Past window fails on purpose, so you can see it.

Motion

Every movement explains a change, and none plays when the card first appears.

  • Promoting a version glides the production marker from its old row to the new one; Undo glides it back.
  • The reply streams in chunks of a few whole words; each chunk fades in, and settled text never moves.
  • The panel follows its content's height. A rerun holds the panel at its height until the new reply is in, so nothing collapses and regrows.
  • A changing label — the version state, the model, the effort, Run and Stop, the run status — fades in from just below.
  • The System and User switch and the test case highlight slide, and the token count rolls its digits in a fixed slot.

With reduced motion, the marker moves at once, the reply and the panel appear without easing, and labels swap in place. Every state and announcement stays.

Keyboard and screen readers

  • ⌘ Enter or Ctrl Enter runs the selected case from anywhere in the card, and stops a run in progress.
  • In the editor, {{ opens the variable list: Up and Down move, Enter or Tab insert, Escape closes it. ⌘ Z and ⇧ ⌘ Z undo and redo, with typing in a short pause as one step.
  • The editor is a multi-line text box named for its part. System and User are one radio group: Left and Right switch parts, and the hidden editor is inert, so it leaves the tab order.
  • Status is never colour alone: the version chip says Production or Latest, the run status pairs an icon with a word, an empty variable's chips switch to a dashed edge, and the diff strikes removed words through, underlines added ones and opens each with a hidden "Removed:" or "Added:".
  • Runs, results, errors, promotions, undos and compare mode are announced once in a polite status region; the streaming reply itself is not.

In a narrow card

The card reads well from 320px and adapts to its slot, not the viewport. Below 560px of card width the variable fields fall into two columns, and below 340px into one. Below 480px the model chip wraps under the title, and the test cases and Run each take a full row. System and User share one editor slot sized to the taller text, so switching parts never changes the card's height.

AI Side PanelAI agents

On this page

What it's made ofWriting the templateVersionsRunningMotionKeyboard and screen readersIn a narrow card