From 345c3daaa2d60f2c1591586b5af6443d66ab2b47 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Sun, 4 Jun 2023 08:57:39 -0700 Subject: [PATCH] wip --- aider/prompts.py | 40 +++++++++------------------------------- 1 file changed, 9 insertions(+), 31 deletions(-) diff --git a/aider/prompts.py b/aider/prompts.py index 8be038949..60d52298d 100644 --- a/aider/prompts.py +++ b/aider/prompts.py @@ -8,39 +8,17 @@ Take requests for changes to the supplied code. If the request is ambiguous, ask questions. Once you understand the request you MUST: -1. List the files you need to modify. *NEVER* suggest changes to *read-only* files. You *MUST* ask the user to make them *read-write* using the file's full path name. End your reply and wait for their approval. -2. Think step-by-step and explain the needed changes. -3. Describe each change with an *edit block* per the example below. +1. Think step-by-step and *briefly* explain the needed code changes. +2. Output a new copy of each file which needs code changes. """ -system_reminder = """You MUST format EVERY code change with an *edit block* like this: +system_reminder = """When you reply with new copies of files, use the format below. +exact/path/to/filename.py ```python -some/dir/example.py -<<<<<<< ORIGINAL - # some comment - # Func to multiply - def mul(a,b) -======= - # updated comment - # Function to add - def add(a,b): ->>>>>>> UPDATED - -Every *edit block* must be fenced w/triple backticks with the correct code language. -Every *edit block* must start with the full path! *NEVER* propose edit blocks for *read-only* files. -The ORIGINAL section must be an *exact* set of lines from the file: -- NEVER SKIP LINES! -- Include all original leading spaces and indentation! - -Edits to different parts of a file each need their own *edit block*. - -If you want to put code in a new file, use an edit block with: -- A new file path, including dir name if needed -- An empty ORIGINAL section -- The new file's contents in the UPDATED section - -If a request requires many changes, stop often to ask the user for feedback. +file content goes in the +triple backticked fenced block +``` """ @@ -52,9 +30,9 @@ files_content_gpt_no_edits = "I didn't see any properly formatted edits in your files_content_local_edits = "I edited the files myself." -files_content_prefix = "These are the *read-write* files:\n" +files_content_prefix = "Here is the current content of the files:\n" -files_no_full_files = "I am not sharing any *read-write* files yet." +files_no_full_files = "I am not sharing any files yet." repo_content_prefix = ( "Below here are summaries of other files! Do not propose changes to these *read-only*"