From 669a2fce607d5b1e70db1eb0d93ec78794715d2f Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Fri, 12 May 2023 21:23:57 -0700 Subject: [PATCH] Changed prompts to include more detailed steps and added new description to examples/README. --- aider/coder.py | 4 ++-- aider/prompts.py | 6 ++++-- examples/README.md | 3 +-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/aider/coder.py b/aider/coder.py index 9f0dd0236..d3b662d5e 100755 --- a/aider/coder.py +++ b/aider/coder.py @@ -125,7 +125,7 @@ class Coder: commit_message = f"Added new files to the git repo: {show_files}" repo.git.commit("-m", commit_message, "--no-verify") commit_hash = repo.head.commit.hexsha[:7] - self.io.tool(f"{commit_hash} {commit_message}") + self.io.tool(f"Commit {commit_hash} {commit_message}") else: self.io.tool_error("Skipped adding new files to the git repo.") return @@ -531,7 +531,7 @@ class Coder: full_commit_message = commit_message + "\n\n" + context repo.git.commit("-m", full_commit_message, "--no-verify") commit_hash = repo.head.commit.hexsha[:7] - self.io.tool(f"{commit_hash} {commit_message}") + self.io.tool(f"Commit {commit_hash} {commit_message}") return commit_hash, commit_message diff --git a/aider/prompts.py b/aider/prompts.py index f6e9ac56a..fe59d8434 100644 --- a/aider/prompts.py +++ b/aider/prompts.py @@ -23,8 +23,10 @@ If the user's request is ambiguous, ask questions to fully understand. Once you understand the user's request and can see all the relevant code, your responses MUST be: -1. Briefly explain the needed changes. -2. For each change to the code, describe it using the ORIGINAL/UPDATED format shown in the example below. +1. First, think step-by-step. +2. Explain the needed changes in detailed pseudo-code. +3. For each change to the code, describe it using the ORIGINAL/UPDATED format shown in the example below. +4. If the request requires many large changes, break them into smaller steps and pause to get feedback from the user. """ system_reminder = ''' diff --git a/examples/README.md b/examples/README.md index d22071152..aeeaf10ec 100644 --- a/examples/README.md +++ b/examples/README.md @@ -1,7 +1,6 @@ # Aider example chat transcripts -This repository contains chat transcripts that show how Aider can generate and edit code. -Below is a brief description of each example and a link to their respective markdown files. +Here are some example transcripts that show how you can chat with Aider to generate and edit code with GPT-4: 1. [**Hello World Flask App**](hello-world-flask.md): This example demonstrates how to create a simple Flask app with various endpoints, such as adding two numbers and calculating the Fibonacci sequence.