diff --git a/aider/coders/base_coder.py b/aider/coders/base_coder.py index 5e99950fd..d788ad6a3 100755 --- a/aider/coders/base_coder.py +++ b/aider/coders/base_coder.py @@ -366,8 +366,15 @@ You *MUST* use {num_ticks} backticks, because some files contain {num_ticks-1} b 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( - num_ticks=num_ticks, + num_ticks=num_ticks_name, fence=fence, num_ticks_explanation=explain, ) diff --git a/aider/coders/wholefile_prompts.py b/aider/coders/wholefile_prompts.py index 26680098c..b44446c98 100644 --- a/aider/coders/wholefile_prompts.py +++ b/aider/coders/wholefile_prompts.py @@ -19,17 +19,17 @@ Once you understand the request you MUST: path/to/filename.js {fence}javascript // entire file content goes in the -// triple backticked fenced block +// {num_ticks} backtick fenced block {fence} 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. - Final line: closing {num_ticks} backtick fence. {num_ticks_explanation} 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"