Apply Patch
apply_patchApply a V4A patch to a Floot project — create, update, and delete multiple files in ONE atomic operation. Format: "*** Begin Patch" envelope with "*** Add File: path" (+ prefixed lines), "*** Update File: path" (hunks: optional "@@ anchor" locator, space-prefixed context, -/+ lines, optional "*** End of File"), "*** Delete File: path", then "*** End Patch". Paths follow the Floot item scheme (see read_file). To replace a file wholesale use Add File on its own — Add OVERWRITES. Never Delete+Add the same path: Delete is item-scoped (deleting components/X.tsx deletes the whole item, its .module.css included), so it is both unnecessary before an Add and destructive to the siblings. Move to: is not supported — to RENAME, Add File at the new path and Delete File the old one. Keep each patch MODEST (a few files / few hundred lines): chat clients cap per-message output, and a patch cut off mid-way is rejected whole ("missing *** End Patch") — split big changes across several apply_patch calls.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| patch | Yes | ||
| projectId | Yes | ||
| expected_version | No |