Skip to main content

Context edit

Create and modify files in context based on natural language instructions.

✓ Multi-file updates in a single API call
✓ Efficient in output tokens—requests diffs

API message structure

[INSTRUCTIONS] // User's natural language instructions
Whenever proposing a file use the markdown code block syntax. Each code block should be a diff patch. Do not send explanations.
<files>
<file path="...">...</file> // context, including current editor
...
</files>
[INSTRUCTIONS] // User's natural language instructions
Whenever proposing a file use the markdown code block syntax. Each code block should be a diff patch. Do not send explanations.