From b1cdb9d488162d1b4e59a175abbc910dc0183100 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Sat, 24 Jun 2023 20:05:35 -0700 Subject: [PATCH] handle /path/to --- aider/coders/wholefile_coder.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/aider/coders/wholefile_coder.py b/aider/coders/wholefile_coder.py index d8448a79c..eb74e634c 100644 --- a/aider/coders/wholefile_coder.py +++ b/aider/coders/wholefile_coder.py @@ -66,6 +66,10 @@ class WholeFileCoder(Coder): # fname==None ... starting a new block if i > 0: fname = lines[i - 1].strip() + path_to = "/path/to/" + # gpt-3.5 will sometimes crib /path/to from the one-shot example + if fname.startswith(path_to) and fname not in chat_files: + fname = fname[len(path_to) :] if not fname: # blank line? or ``` was on first line i==0 if saw_fname: fname = saw_fname