Change one element without rewriting the page

A button picked on the canvas with its inspector open, beside a terminal where the agent reads that button and changes one element.

Ask an agent to change one button and it often writes the whole page again. Spacing shifts, a headline you liked gets reworded, and you check every section a second time. Wirely gives your agent the address of the one element you mean, so the rest of the page stays as it was.

How it works

  1. Click the element on the canvas. The inspector opens with its tag and its page.
  2. Press the link button in the inspector's header. Wirely copies a link that names the project, the page, and the element.
  3. Paste the link into your agent and say what you want changed.
  4. The agent calls get_page with that element's id and gets back its exact HTML.
  5. It calls patch_page to replace that HTML and nothing else. The canvas shows the change as it lands.

Without a link

If the element is already selected on the canvas, you can skip the link and say "this button" or "the selected heading". The agent calls get_selection, which returns the element you picked last, and edits it the same way.

Moving things, not only rewording them

Some changes are about structure: move a card above another, duplicate a row, hide a section, or wrap two elements in a new frame. The agent does those with edit_element by element id, without sending the page's HTML back.

Your own edits stay

You can change text, colors, sizes, and spacing by hand on the canvas. Before it writes to a page you touched, the agent can call get_page_changes to see what you changed since its last write. If you and the agent edit the same page at the same moment, Wirely applies the agent's edit to the latest version of the page instead of writing over yours.

Use the canvas lists the rest of what you can do by hand.

All posts