From 00512e3d1cdd67478ed7466b86ddcf4145c630d4 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Wed, 9 Aug 2023 08:25:49 -0300 Subject: [PATCH] no fuzy matching, stronger prompt for whitespace --- aider/coders/editblock_coder.py | 1 + aider/coders/editblock_prompts.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/aider/coders/editblock_coder.py b/aider/coders/editblock_coder.py index 2c9706a74..c64902a61 100644 --- a/aider/coders/editblock_coder.py +++ b/aider/coders/editblock_coder.py @@ -102,6 +102,7 @@ def replace_most_similar_chunk(whole, part, replace): except ValueError: pass + return # Try fuzzy matching res = replace_closest_edit_distance(whole_lines, part, part_lines, replace_lines) if res: diff --git a/aider/coders/editblock_prompts.py b/aider/coders/editblock_prompts.py index 05f26b2a8..7f0e7eb51 100644 --- a/aider/coders/editblock_prompts.py +++ b/aider/coders/editblock_prompts.py @@ -36,7 +36,7 @@ Every *edit block* must be fenced with {fence[0]}...{fence[1]} with the correct 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 sequential lines* from the file: - NEVER SKIP LINES! -- Include all original leading spaces and indentation! +- NEVER SKIP LEADING WHITESPACE FROM LINES! Edits to different parts of a file each need their own *edit block*.