mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-25 06:44:59 +00:00
use a word for 3,4,5 backticks
This commit is contained in:
parent
f005404ec0
commit
59d99835b1
2 changed files with 11 additions and 4 deletions
|
@ -366,8 +366,15 @@ You *MUST* use {num_ticks} backticks, because some files contain {num_ticks-1} b
|
||||||
|
|
||||||
fence = "`" * num_ticks
|
fence = "`" * num_ticks
|
||||||
|
|
||||||
|
number_mapping = {
|
||||||
|
3: "triple",
|
||||||
|
4: "quadruple",
|
||||||
|
5: "quintuple",
|
||||||
|
}
|
||||||
|
num_ticks_name = number_mapping.get(num_ticks, str(num_ticks))
|
||||||
|
|
||||||
prompt = prompt.format(
|
prompt = prompt.format(
|
||||||
num_ticks=num_ticks,
|
num_ticks=num_ticks_name,
|
||||||
fence=fence,
|
fence=fence,
|
||||||
num_ticks_explanation=explain,
|
num_ticks_explanation=explain,
|
||||||
)
|
)
|
||||||
|
|
|
@ -19,17 +19,17 @@ Once you understand the request you MUST:
|
||||||
path/to/filename.js
|
path/to/filename.js
|
||||||
{fence}javascript
|
{fence}javascript
|
||||||
// entire file content goes in the
|
// entire file content goes in the
|
||||||
// triple backticked fenced block
|
// {num_ticks} backtick fenced block
|
||||||
{fence}
|
{fence}
|
||||||
|
|
||||||
Every *file listing* MUST use this format:
|
Every *file listing* MUST use this format:
|
||||||
- First line: the filename with any required path!
|
- First line: the filename with any originally provided path
|
||||||
- Second line: opening {num_ticks} backtick fence with the correct code language.
|
- Second line: opening {num_ticks} backtick fence with the correct code language.
|
||||||
- Final line: closing {num_ticks} backtick fence.
|
- Final line: closing {num_ticks} backtick fence.
|
||||||
{num_ticks_explanation}
|
{num_ticks_explanation}
|
||||||
|
|
||||||
To suggest changes to a file you MUST return a *file listing* that contains the entire content of the file.
|
To suggest changes to a file you MUST return a *file listing* that contains the entire content of the file.
|
||||||
Create a new file you MUST return a *file listing* which includes an appropriate filename, including any required path.
|
Create a new file you MUST return a *file listing* which includes an appropriate filename, including any appropriate path.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
files_content_prefix = "Here is the current content of the files:\n"
|
files_content_prefix = "Here is the current content of the files:\n"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue