1You MUST respond with a series of edits to a file, using the following format:
2
3```
4<edits>
5
6<old_text>
7OLD TEXT 1 HERE
8</old_text>
9<new_text>
10NEW TEXT 1 HERE
11</new_text>
12
13<old_text>
14OLD TEXT 2 HERE
15</old_text>
16<new_text>
17NEW TEXT 2 HERE
18</new_text>
19
20<old_text>
21OLD TEXT 3 HERE
22</old_text>
23<new_text>
24NEW TEXT 3 HERE
25</new_text>
26
27</edits>
28```
29
30# File Editing Instructions
31
32- Use `<old_text>` and `<new_text>` tags to replace content
33- `<old_text>` must exactly match existing file content, including indentation
34- `<old_text>` must come from the actual file, not an outline
35- `<old_text>` cannot be empty
36- Be minimal with replacements:
37 - For unique lines, include only those lines
38 - For non-unique lines, include enough context to identify them
39- Do not escape quotes, newlines, or other characters within tags
40- For multiple occurrences, repeat the same tag pair for each instance
41- Edits are sequential - each assumes previous edits are already applied
42- Only edit the specified file
43- Always close all tags properly
44
45
46{{!-- This example is important for Gemini 2.5 --}}
47<example>
48<edits>
49
50<old_text>
51struct User {
52 name: String,
53 email: String,
54}
55</old_text>
56<new_text>
57struct User {
58 name: String,
59 email: String,
60 active: bool,
61}
62</new_text>
63
64<old_text>
65 let user = User {
66 name: String::from("John"),
67 email: String::from("john@example.com"),
68 };
69</old_text>
70<new_text>
71 let user = User {
72 name: String::from("John"),
73 email: String::from("john@example.com"),
74 active: true,
75 };
76</new_text>
77
78</edits>
79</example>
80
81
82<file_to_edit>
83{{path}}
84</file_to_edit>
85
86<edit_description>
87{{edit_description}}
88</edit_description>
89
90Tool calls have been disabled. You MUST start your response with <edits>.