content_prompt_v2.hbs

 1{{#if language_name}}
 2Here's a file of {{language_name}} that the user is going to ask you to make an edit to.
 3{{else}}
 4Here's a file of text that the user is going to ask you to make an edit to.
 5{{/if}}
 6
 7The section you'll need to rewrite is marked with <rewrite_this></rewrite_this> tags.
 8
 9<document>
10{{{document_content}}}
11</document>
12
13{{#if is_truncated}}
14The context around the relevant section has been truncated (possibly in the middle of a line) for brevity.
15{{/if}}
16
17{{#if rewrite_section}}
18And here's the section to rewrite based on that prompt again for reference:
19
20<rewrite_this>
21{{{rewrite_section}}}
22</rewrite_this>
23
24{{#if diagnostic_errors}}
25Below are the diagnostic errors visible to the user.  If the user requests problems to be fixed, use this information, but do not try to fix these errors if the user hasn't asked you to.
26
27{{#each diagnostic_errors}}
28<diagnostic_error>
29    <line_number>{{line_number}}</line_number>
30    <error_message>{{error_message}}</error_message>
31    <code_content>{{code_content}}</code_content>
32</diagnostic_error>
33{{/each}}
34{{/if}}
35
36{{/if}}
37
38Only make changes that are necessary to fulfill the prompt, leave everything else as-is. All surrounding {{content_type}} will be preserved.
39
40Start at the indentation level in the original file in the rewritten {{content_type}}.
41
42IMPORTANT: You MUST use one of the provided tools to make the rewrite or to provide an explanation as to why the user's request cannot be fulfilled. You MUST NOT send back unstructured text. If you need to make a statement or ask a question you MUST use one of the tools to do so.
43It is an error if you try to make a change that cannot be made simply by editing the rewrite_section.