Ask AI in the workbench

Docs

Ask AI on the breadcrumb row opens a chat that reads your project's tokens, answers questions about them ("which components use violet?") and edits values and references on request. Its edits land as unsaved changes, so Discard is the undo. It edits tokens only; pages and screens are made on the Pages & screens page, and asking for one here gets a reply that points there. See Screens.

How to use it

Open it, pick a model in the header row (the pick is remembered in this browser), and type. Enter sends, Shift+Enter breaks the line. Attach images, PDFs or text files by paste, drop or the paperclip; a screenshot of a wanted look is a common attachment. The header shows the session's token usage and a Clear conversation button.

Each reply streams as the model types it. An edit shows up as Changed N tokens. and lights the tier tab it touched; Save keeps it, Discard drops it, undo walks it back one edit at a time.

Every message is about tokens, on every view. A request for a screen or page, or a change to one, is answered with a pointer to Pages & screens and spends nothing.

How it works

The chat reads the project's real tokens, the unsaved overlay included, in a one-line-per-token form (design.color.brand.500 = …, semantic.primary -> light | dark), so it sees what the preview shows. It addresses tokens by path and emits either a message or a token edit: a new value for a design token, or new references for a semantic or component token. Every edit runs through the same tier rules the editor enforces, against an advancing copy of the token map, and an unknown path, a no-op or an invalid edit is rejected; a message whose every edit was rejected is dropped, so the chat never claims a change it did not make. Only values and references of existing tokens change; adding and deleting stay in the editor. That includes the gradients: the chat can change their stop colours and directions, but making or removing one, or choosing which surfaces paint it, is the Semantic tab's gradient group.

A model's edits are not contrast-repaired: an instruction is an instruction. The score's Contrast row drops when one fails a pair, and the contrast check's Fix all repairs it.

Attachments: up to four files and 2 MB decoded per message, images scaled to 1568 pixels on the long edge, text files up to 64 KB. Your message shows a sent image as a thumbnail for the rest of the session. Later turns see a file's name, not its bytes.

Messages see the earlier messages of the conversation. The conversation lives in this tab for this project and resets when you switch project. The call runs on your own key or on credits like every generation; a stall or a provider refusal ends the turn with a Retry.

What can go wrong

  • The model says it changed something and nothing moved: the edit was invalid or a no-op and was rejected; the message is dropped when every edit was. Ask again with the token's path.
  • “<family>” isn't on Google Fonts, so that change was skipped.: a font the model named does not exist there.
  • A 402 mid-stream reopens the key dialog with the message queued behind a saved key.