ChaiBuilder Logo

AI Page Editing

The AI panel edits the page you have open. You describe the change in plain language; the assistant reads the page, then adds, rewrites, or removes blocks in front of you. It is the fastest way to get a first draft of a page on screen, and a reasonable way to make small copy and layout edits without hunting for the right setting.

It works on one page at a time - the page currently open in the builder.

Two ways to ask

Surface Scope Use it for
AI panel (sidebar, brain icon) The whole page Building sections, restructuring, adding blocks, wiring data
Block prompt (AI button on a selected block's toolbar) That block only, strictly "Make this shorter", "fix the grammar", tweaking one section

The two behave differently on purpose. In the sidebar panel, selecting a block is a hint - the assistant prioritises it but may still touch the rest of the page. The block prompt is a hard boundary: it can only read and rewrite the block you selected, and if you ask for a page-wide change it will tell you to use the sidebar panel instead.

The block prompt is deliberately minimal - a small text box with presets (Make longer, Make shorter, Fix grammar), no transcript, and no model picker. It always runs the default model.

What happens when you send a prompt

For a multi-section request the assistant writes a short plan first, then works through it. Each step appears in the transcript as a card - Adding new content..., Updating section... - and the section appears on the canvas as it is written, so you watch the page build rather than waiting for a result.

When it finishes, the page is saved as a draft automatically. Sections are saved as they complete, so a long build that times out halfway keeps the parts that finished.

The chat stays in plain language - the page is the output, not the transcript.

Long builds pause

A full page can take more work than one turn allows. When it reaches that point the assistant stops, says it has paused to keep things responsive, and asks you to reply continue to finish the remaining sections. If it stopped on an error instead, the progress checklist shows Stopped on <section> with a Resume button that does the same thing.

What the assistant can change

  • Rewrite an existing block - copy, layout, classes.
  • Add blocks - standard content, repeaters, icons, and shared partials such as a header or footer.
  • Add a custom block - any block you have registered, added by its real props rather than as HTML, so it stays a first-class block.
  • Remove blocks.
  • Bind a prop to data - set a {{ }} binding on a block prop. See Data binding.
  • Find photos - it searches stock photography for the sections it builds, falling back to grey placeholders when no photo source is available. See Media and images.

It works within your design system rather than around it: it uses your design tokens and the semantic theme colors, keeps existing block ids, bindings, and custom styles intact, and always writes alt text and explicit image dimensions.

Shared partials can only be edited on their own page. From a page that merely uses a header partial, the assistant can add or remove it but not edit its contents. Partials also nest at most two levels deep, and ineligible ones simply aren't offered.

The context it works from

Beyond the page itself, the assistant takes into account:

  • Website context - what your business is, who it's for, your value proposition, key products, plus a Look and Tone preset and a list of banned words.
  • Page context - this page's purpose, target keywords, and what the H1 should achieve.
  • Your design tokens, the custom blocks available for this page type, and the data the page can bind to.

Website and page context are the highest-leverage thing you can set. Without them the assistant writes generic marketing copy; with them it writes about your product.

Managing context

The cards above the prompt input show what's in scope - the selected block, page context, website context. Click the pencil on either card to open Manage Context, which has a Current Page tab and a Website tab.

Write the context roughly and press the wand to have the assistant restructure it into the shape it wants (business, audience, value proposition, products for the site; purpose, keywords, H1 goal for the page). It's a rewrite of what you typed, not research - it won't invent facts about your business. Both fields also accept dictation.

Website context is stored once for the site; page context is stored per page. Both are saved when you press Save in the modal, not on close.

Model, images, and files

The model picker in the panel lists the available models with their credit multiplier and remembers your choice. Some models are text-only - with one of those selected the attachment menu disappears, and any files you had attached are dropped with a warning rather than sent silently.

The paperclip attaches an image (to work from a screenshot or a design) or a document - PDF, TXT, CSV, XLS/XLSX, DOC/DOCX.

To generate an image rather than describe one, use the AI tab in the media manager; see Media and images.

Stopping, undoing, starting over

Stop replaces the send button while the assistant is working. Stopping reverts the page to how it was before that prompt - partial work is discarded, not kept. The chat says so explicitly.

That revert is itself undoable: if you hit Stop by accident, Ctrl/Cmd + Z in the builder brings the assistant's partial work back.

Note the asymmetry, because it surprises people:

Ending The page
You press Stop Rolled back to the pre-prompt state
It errors or times out Completed sections are kept and saved, with a Resume button

The + button starts a fresh conversation. The conversation is not stored - reloading the builder or switching pages clears the transcript. Your page changes are saved; the chat history is not.

Other languages

The AI panel edits pages in your default language. Switch the builder to another language and the panel switches to translation: it fills the secondary language's text from the default one, block by block, and keeps the layout shared. There is no model picker or attachments in that mode, and selecting a block gives you a one-click Translate content to <language> action. See Multilingual.

Access

Page and block editing require the ai:use permission; the block toolbar button also requires pages:update. AI must be enabled by the ai feature flag. If credit metering is on and the balance runs out, the request is refused with a message rather than partially completing. See Roles and permissions.

Working with it well

  • Fill in website and page context before your first real prompt. It is the difference between usable copy and filler.
  • Ask for one section at a time when you care about the result; ask for a whole page when you want something to react to.
  • Use the block prompt for edits to existing content - it can't wander.
  • Review before publishing. Everything the assistant does lands in the draft; the live site is unchanged until you publish. See Preview and publish.
  • If a build goes wrong, revisions hold your earlier drafts.

© ChaiBuilder. All rights reserved.