mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-24 22:34:59 +00:00
show the repomap before the added files
This commit is contained in:
parent
cab7460f94
commit
560759f0c0
2 changed files with 8 additions and 7 deletions
|
@ -311,6 +311,13 @@ class Coder:
|
||||||
|
|
||||||
def get_files_messages(self):
|
def get_files_messages(self):
|
||||||
all_content = ""
|
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:
|
if self.abs_fnames:
|
||||||
files_content = self.gpt_prompts.files_content_prefix
|
files_content = self.gpt_prompts.files_content_prefix
|
||||||
files_content += self.get_files_content()
|
files_content += self.get_files_content()
|
||||||
|
@ -319,12 +326,6 @@ class Coder:
|
||||||
|
|
||||||
all_content += files_content
|
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 = [
|
files_messages = [
|
||||||
dict(role="user", content=all_content),
|
dict(role="user", content=all_content),
|
||||||
dict(role="assistant", content="Ok."),
|
dict(role="assistant", content="Ok."),
|
||||||
|
|
|
@ -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."
|
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*.
|
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*.
|
To make a file *read-write*, ask the user to *add it to the chat*.
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue