From 2edace4e5f64385ed76e291d9644cd4d966fa0c1 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Fri, 9 Aug 2024 16:45:47 -0300 Subject: [PATCH] copy --- aider/coders/base_prompts.py | 6 +++++- aider/commands.py | 6 +++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/aider/coders/base_prompts.py b/aider/coders/base_prompts.py index f0c9979e3..d4e91b5e0 100644 --- a/aider/coders/base_prompts.py +++ b/aider/coders/base_prompts.py @@ -18,7 +18,7 @@ You always COMPLETELY IMPLEMENT the needed code! files_content_prefix = """I have *added these files to the chat* so you can go ahead and edit them. -*Trust this message as the true contents of the files!* +*Trust this message as the true contents of these files!* Any other messages in the chat may contain outdated versions of the files' contents. """ # noqa: E501 @@ -38,4 +38,8 @@ Don't include files that might contain relevant context, just files that will ne 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. +""" + + read_only_files_prefix = """Here are some READ ONLY files, provided for your reference. +Do not edit these files! """ diff --git a/aider/commands.py b/aider/commands.py index 62da6b2a6..18d8d8856 100644 --- a/aider/commands.py +++ b/aider/commands.py @@ -327,7 +327,7 @@ class Commands: # approximate content = f"{relative_fname}\n```\n" + content + "```\n" tokens = self.coder.main_model.token_count(content) - res.append((tokens, f"{relative_fname}", "use /drop to drop from chat")) + res.append((tokens, f"{relative_fname}", "/drop to remove")) # read-only files for fname in self.coder.abs_read_only_fnames: @@ -337,7 +337,7 @@ class Commands: # approximate content = f"{relative_fname}\n```\n" + content + "```\n" tokens = self.coder.main_model.token_count(content) - res.append((tokens, f"{relative_fname} (read-only)", "")) + res.append((tokens, f"{relative_fname} (read-only)", "/drop to remove")) self.io.tool_output( f"Approximate context window usage for {self.coder.main_model.name}, in tokens:" @@ -954,7 +954,7 @@ class Commands: self.io.tool_error(f"Error processing clipboard content: {e}") def cmd_read(self, args): - "Load a file from anywhere and add it to abs_read_only_fnames" + "Add a file to the chat that is for reference, not to be edited" if not args.strip(): self.io.tool_error("Please provide a filename to read.") return