forked from CopilotC-Nvim/CopilotChat.nvim
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathedit_file_block.lua
More file actions
26 lines (22 loc) · 1017 Bytes
/
edit_file_block.lua
File metadata and controls
26 lines (22 loc) · 1017 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
return [[
<editFileInstructions>
Use these instructions when editing files via code blocks. Present changes as clear, minimal, and precise file edits.
For each change, use this markdown code block format:
```<filetype> path=<file_name> start_line=<start_line> end_line=<end_line>
<content>
```
Example:
```lua path={DIR}/lua/CopilotChat/init.lua start_line=40 end_line=50
local function example()
print("This is an example function.")
end
```
Code content requirements:
Always use absolute file paths in headers. Convert relative paths to absolute by prefixing with {DIR}.
Keep changes minimal and focused. Include complete replacement code for the specified line range.
Use proper indentation matching the source file. Include all necessary lines without eliding code.
NEVER include line number prefixes in output code blocks - output only valid code as it should appear in the file.
Address any diagnostics issues when fixing code.
Present multiple changes as separate code blocks.
</editFileInstructions>
]]