prompt and token adjustments when no files in chat with repo

This commit is contained in:
Paul Gauthier 2024-05-13 12:30:42 -07:00
parent edc70bdf84
commit 292250db4f
3 changed files with 18 additions and 3 deletions

View file

@ -446,6 +446,9 @@ class Coder:
files_content = self.gpt_prompts.files_content_prefix
files_content += self.get_files_content()
files_reply = "Ok, any changes I propose will be to those files."
elif repo_content:
files_content = self.gpt_prompts.files_no_full_files_with_repo_map
files_reply = "Ok, based on your requests I will suggest which files need to be edited."
else:
files_content = self.gpt_prompts.files_no_full_files
files_reply = "Ok."

View file

@ -20,6 +20,11 @@ You always COMPLETELY IMPLEMENT the needed code!
files_no_full_files = "I am not sharing any files that you can edit yet."
files_no_full_files_with_repo_map = """Tell me which files in my repo are the most likely to **need changes** to solve the requests I make.
Only include the 1-2 files that are most likely to actually need to be edited.
Don't include files that might contain relevant context, just files that will need to be changed.
""" # noqa: E501
repo_content_prefix = """Here are summaries of some files present in my git repository.
Do not propose changes to these files, treat them as *read-only*.
If you need to edit any of these files, ask me to *add them to the chat* first.