mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-29 16:54:59 +00:00
pull the filename from the +++ line
This commit is contained in:
parent
6165fcc960
commit
042a2b8a08
3 changed files with 3 additions and 4 deletions
|
@ -584,7 +584,6 @@ def flexible_search_and_replace(texts, strategies):
|
||||||
for preproc in preprocs:
|
for preproc in preprocs:
|
||||||
res = try_strategy(texts, strategy, preproc)
|
res = try_strategy(texts, strategy, preproc)
|
||||||
if res:
|
if res:
|
||||||
dump(strategy, preproc)
|
|
||||||
return res
|
return res
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -334,8 +334,8 @@ def process_fenced_block(lines, start_line_num):
|
||||||
block = lines[start_line_num:line_num]
|
block = lines[start_line_num:line_num]
|
||||||
block.append("@@ @@")
|
block.append("@@ @@")
|
||||||
|
|
||||||
if block[0].startswith("--- "):
|
if block[1].startswith("+++ "):
|
||||||
fname = block[0].split()[1]
|
fname = block[1].split()[1]
|
||||||
block = block[2:]
|
block = block[2:]
|
||||||
else:
|
else:
|
||||||
fname = None
|
fname = None
|
||||||
|
|
|
@ -444,4 +444,4 @@ seems to be an important part of successful GPT code editing.
|
||||||
Most LLMs will have already seen plenty of unified diffs
|
Most LLMs will have already seen plenty of unified diffs
|
||||||
in their normal training data, and so should be
|
in their normal training data, and so should be
|
||||||
very amenable to fining tuning towards this
|
very amenable to fining tuning towards this
|
||||||
particular style of diff.
|
particular diff style.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue