disabled gpt-3.5 powered edits

This commit is contained in:
Paul Gauthier 2023-05-08 23:40:56 -07:00
parent 94afa11d19
commit 782d4c3659
2 changed files with 5 additions and 5 deletions

View file

@ -401,10 +401,9 @@ class Coder:
self.fnames[path] = 0 self.fnames[path] = 0
edited.add(path) edited.add(path)
if self.do_replace(path, original, updated): self.do_replace(path, original, updated)
continue # edit = match.group()
edit = match.group() # self.do_gpt_powered_replace(path, edit, inp)
self.do_gpt_powered_replace(path, edit, inp)
return edited return edited
@ -427,6 +426,7 @@ class Coder:
else: else:
new_content = replace_most_similar_chunk(content, before_text, after_text) new_content = replace_most_similar_chunk(content, before_text, after_text)
if not new_content: if not new_content:
self.console.print(f"[red]Failed to apply edit to {fname}")
return return
fname.write_text(new_content) fname.write_text(new_content)

View file

@ -53,7 +53,7 @@ EVERY ORIGINAL/UPDATED BLOCK MUST BE TRIPLE QUOTED!
THE ORIGINAL BLOCK MUST BE THE *EXACT* LINES FROM THE FILE. IT *MUST* INCLUDE: THE ORIGINAL BLOCK MUST BE THE *EXACT* LINES FROM THE FILE. IT *MUST* INCLUDE:
- ALL THE COMMENTS IN THE ORIGINAL FILE. - ALL THE COMMENTS IN THE ORIGINAL FILE.
- ALL THE BLANK LINES IN THE ORIGINAL FILE. - ALL THE CONSECUTIVE LINES IN THE ORIGINAL FILE, INCLUDING BLANK OR IRRELEVANT LINES.
- ALL THE ORIGINAL LEADING SPACES AND INDENTATION! - ALL THE ORIGINAL LEADING SPACES AND INDENTATION!
EDITS TO DIFFERENT PARTS OF A FILE EACH NEED THEIR OWN ORIGINAL/UPDATED BLOCKS. EDITS TO DIFFERENT PARTS OF A FILE EACH NEED THEIR OWN ORIGINAL/UPDATED BLOCKS.