diff --git a/aider/coders/base_coder.py b/aider/coders/base_coder.py index 99137e2fa..7b86e00ab 100755 --- a/aider/coders/base_coder.py +++ b/aider/coders/base_coder.py @@ -311,6 +311,13 @@ class Coder: def get_files_messages(self): all_content = "" + + repo_content = self.get_repo_map() + if repo_content: + if all_content: + all_content += "\n" + all_content += repo_content + if self.abs_fnames: files_content = self.gpt_prompts.files_content_prefix files_content += self.get_files_content() @@ -319,12 +326,6 @@ class Coder: all_content += files_content - repo_content = self.get_repo_map() - if repo_content: - if all_content: - all_content += "\n" - all_content += repo_content - files_messages = [ dict(role="user", content=all_content), dict(role="assistant", content="Ok."), diff --git a/aider/coders/editblock_prompts.py b/aider/coders/editblock_prompts.py index e49b70c1c..da27cde6d 100644 --- a/aider/coders/editblock_prompts.py +++ b/aider/coders/editblock_prompts.py @@ -182,7 +182,7 @@ If you want to put code in a new file, use a *SEARCH/REPLACE block* with: files_no_full_files = "I am not sharing any *read-write* files yet." - repo_content_prefix = """Below here are summaries of other files present in this git repository. + repo_content_prefix = """Below here are summaries of files present in the user's git repository. Do not propose changes to these files, they are *read-only*. To make a file *read-write*, ask the user to *add it to the chat*. """