diff --git a/aider/coder.py b/aider/coder.py index 6c3563cb6..c33d6dd86 100755 --- a/aider/coder.py +++ b/aider/coder.py @@ -138,7 +138,7 @@ class Coder: repo_content = prompts.repo_content_prefix repo_content += files_listing - all_content = repo_content + '\n' + files_content + all_content = repo_content + '\n\n' + files_content files_messages = [ @@ -201,7 +201,7 @@ class Coder: messages += self.get_files_messages() messages += self.cur_messages - # self.show_messages(messages, "all") + #self.show_messages(messages, "all") content, interrupted = self.send(messages) if interrupted: diff --git a/aider/prompts.py b/aider/prompts.py index f876c8e3a..e5710ce1c 100644 --- a/aider/prompts.py +++ b/aider/prompts.py @@ -21,7 +21,9 @@ class Foo: Take requests from the user for new features, improvements, bug fixes and other changes to the supplied code. If the user's request is ambiguous, ask questions to fully understand. -Once you understand the user's request, your responses MUST be: +IF THE FILES DON'T CONTAIN THE RELEVANT CODE, SAY SO! + +Once you understand the user's request and can see all the relevant code, your responses MUST be: 1. Briefly explain the needed changes. 2. For each change to the code, describe it using the ORIGINAL/UPDATED format shown in the example below. @@ -81,7 +83,9 @@ files_content_gpt_no_edits = ( files_content_local_edits = "I made some changes to the files myself." -files_content_prefix = "Here is the current content of the files:\n\n" +repo_content_prefix = "These are the files in the git repo:\n\n" + +files_content_prefix = "Here is the current content of the files we have opened:\n\n" files_content_suffix = """Base any edits on the current contents of the files as shown in the user's last message."""