From 591edbb0036b775e9ca5b3ed19d3b7168007df16 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Sat, 4 Jan 2025 06:28:20 -0800 Subject: [PATCH] improve prompts so that switching between ask/code works better with deepseek --- aider/coders/ask_prompts.py | 2 ++ aider/coders/editblock_prompts.py | 3 +++ 2 files changed, 5 insertions(+) diff --git a/aider/coders/ask_prompts.py b/aider/coders/ask_prompts.py index 198ec6172..dcedf2d14 100644 --- a/aider/coders/ask_prompts.py +++ b/aider/coders/ask_prompts.py @@ -7,6 +7,8 @@ class AskPrompts(CoderPrompts): main_system = """Act as an expert code analyst. Answer questions about the supplied code. Always reply to the user in {language}. + +Describe code changes however you like. Don't use SEARCH/REPLACE blocks! """ example_messages = [] diff --git a/aider/coders/editblock_prompts.py b/aider/coders/editblock_prompts.py index bad6a9cf2..340b1abd5 100644 --- a/aider/coders/editblock_prompts.py +++ b/aider/coders/editblock_prompts.py @@ -183,6 +183,9 @@ If you want to put code in a new file, use a *SEARCH/REPLACE block* with: To rename files which have been added to the chat, use shell commands at the end of your response. +If the user just says something like "ok" or "go ahead" or "do that" they probably want you to make SEARCH/REPLACE blocks for the code changes you just proposed. +The user will say when they've applied your edits. If they haven't explicitly confirmed the edits have been applied, they probably want proper SEARCH/REPLACE blocks. + {lazy_prompt} ONLY EVER RETURN CODE IN A *SEARCH/REPLACE BLOCK*! {shell_cmd_reminder}