A failed MCP batch goes back to where it started however long the undo history is: rollback undid as many steps as the undo history had grown, but the history is capped at 200 steps, so once it was full a failed batch reported undone: 0 and left its sketches behind (an empty Sketch1, two sketches named TapHole). New commands edit.checkpoint and edit.restore_checkpoint (forget: true drops one) remember and restore the design, the active sketch and the undo history; batch takes a checkpoint before its first step, restores it on a failure and forgets it on success. Against an app without checkpoints batch falls back to counting undo steps
This commit is contained in:
1 parent
54a86dc6f5
commit
ab23fc9906
6 files changed
+195
-13
No files matched your search
+5
-2
@@ -69,8 +69,11 @@ Errors: an unknown tool or arguments that don't match the tool's schema are JSON
|
||||
`-32602` errors; an engine failure (bad command parameters, a feature that fails) is a tool
|
||||
result with `isError: true` and the engine's message, which the model can read and correct.
|
||||
|
||||
`batch` rollback undoes as many steps as the batch added to the undo history; batches that
|
||||
themselves call `edit.undo`, `file.new` or `doc.open` are not rolled back exactly.
|
||||
`batch` rollback goes back to an engine checkpoint (`edit.checkpoint`) taken before the first
|
||||
step: the design, the active sketch and the undo history are restored exactly as they were,
|
||||
however long the history is. Batches that call `file.new` or `doc.open` get the design back,
|
||||
not its file path. (An older app without checkpoints falls back to undoing as many steps as
|
||||
the batch added to the undo history.)
|
||||
|
||||
## Demo: an enclosure built over MCP
|
||||
|
||||
|
||||
Reference in new issue
Block a user