mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-30 17:24:59 +00:00
Add clear instruction on how to make a new file
This commit is contained in:
parent
042a2b8a08
commit
f0b60a0052
2 changed files with 3 additions and 1 deletions
|
@ -93,6 +93,8 @@ Hunks don't need to be in any particular order.
|
|||
When editing a function, method, loop, etc use a hunk to replace the *entire* code block.
|
||||
Delete the entire existing version with `-` lines and then add a new, updated version with `+` lines.
|
||||
This will help you generate correct code and correct diffs.
|
||||
|
||||
To make a new file, show a diff from `--- /dev/null` to `+++ path/to/new/file.ext`.
|
||||
"""
|
||||
|
||||
files_content_prefix = "These are the *read-write* files:\n"
|
||||
|
|
|
@ -127,7 +127,7 @@ helped clarify some general principles, which I think are applicable to any effe
|
|||
GPT-4 code editing format:
|
||||
|
||||
- FAMILIAR - Choose an edit format that GPT is already familiar with.
|
||||
- SIMPLE - Choose a simple format that avoid escaping, syntactic overhead and brittle specifiers like line numbers or line counts.
|
||||
- SIMPLE - Choose a simple format that avoids escaping, syntactic overhead and brittle specifiers like line numbers or line counts.
|
||||
- HIGH LEVEL - Encourage GPT to structure edits as new versions of substantive code blocks (functions, methods, etc), not as a series of surgical/minimal changes to individual lines of code.
|
||||
- FLEXIBLE - Strive to be maximally flexible when interpreting GPT's edit instructions.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue