Do it yourself
#Undo the agent's last changes (static site)
#- Find the message of yours after which things went wrong, and choose Undo from here under it.
- Change the text if you want a different result.
- Choose Undo & resend. The app asks "Undo changes and resend?": "All the AI's changes made after this message will be undone, and your project files will be restored to how they were at this point. The AI will then try your message again." Confirm with Undo & resend. This cannot be undone.
- Wait for "Changes undone. The AI is trying again."
Take back one change (static site)
#- In the chat, find the file change and choose its undo button (Undo this change).
- If the agent made changes after it, Playcode asks first and names them: "Undo this change and the 2 after it?". Confirm with Undo 3 changes; the messages from there leave the chat. The newest change is undone at once, without a question.
- Playcode says "Changes undone successfully".
Save a checkpoint
#- Open the project menu (☰ and the project name, at the top left) and choose Checkpoint history…. In a Cloud app, the clock button (Checkpoints) at the top opens it too.
- In a static site, choose New checkpoint. It saves at once, named by its date and time: "Checkpoint created. Restore from here anytime." Click the name to rename it, like "Before the redesign".
- In a Cloud app, choose New checkpoint in the DEV or PROD section, give it a name and choose Create checkpoint. See Snapshots and rollback.
Restore a checkpoint
#- Ask the user before you restore a checkpoint in a Cloud app: the restore discards everything made on that computer after the checkpoint.
- Open Checkpoint history…, find the checkpoint and choose Restore.
- In a static site, confirm in "Restore this checkpoint?". The app says: "A checkpoint of the current state is saved first, so you can undo this. The page does not reload - your chats stay exactly where they are." The chat then shows "Restored to checkpoint" with its name, so the agent knows.
- In a Cloud app, a production restore asks you to confirm: "Your live site changes for everyone the moment this completes." The page reloads when the restore is done. See Snapshots and rollback.
If it doesn't work
#Undo from here is missing
#The project is a Cloud app: a chat cannot undo what already ran on its computers, so restore a checkpoint instead. In a static site, the button shows only under a message of yours that has later messages after it.
"Save this checkpoint?"
#The project already has 20 checkpoints of yours: "You have 20 checkpoints, the limit." Choose Create checkpoint to delete the oldest one and save the new one, or delete a checkpoint you no longer need first.
"The project is not open in the editor yet. Try again in a moment."
#The project's files are still loading. Wait a moment and choose New checkpoint again.
"Could not save the safety checkpoint of your current files. Nothing was restored."
#Playcode could not save the current files first, so it did not restore. Try again, or ask a person.
"Checkpoint restored, but the AI chat could not be notified."
#The files are back, but the agent does not know. Mention the restore in your next message.
Limits
#- Undo works in static sites only, on the changes the agent made with its file tools in this chat. It does not change the published site until you publish again.
- Undo puts each changed file back to its earlier content, so your own edits to those files since then are lost too. There is no redo. If you are unsure, save a checkpoint first.
- Undo & resend runs your message again, and that run uses credits.
- A static site keeps up to 20 checkpoints of yours. Playcode also keeps the newest 10 Pre-publish checkpoints, saved by each publish, and the newest 5 Pre-restore checkpoints, saved by each restore. These do not count toward the 20.
- A static site's checkpoint holds the project's files. Chats are not part of it, and a restore never changes them.
- In a static site, anyone who can edit the project can save and restore checkpoints, and the agent cannot. In a Cloud app, the project's creator or an Admin can, and the agent saves checkpoints itself before risky work. Each Cloud computer keeps up to 20 checkpoints of yours and the agent's.
- To try two directions at once in a static site, open the project menu, choose Project, then Remix this project: the copy is a separate project with its own files.