show the repomap before the added files

This commit is contained in:
Paul Gauthier 2023-12-08 09:18:03 -08:00
parent cab7460f94
commit 560759f0c0
2 changed files with 8 additions and 7 deletions

View file

@ -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."),

View file

@ -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*.
"""