mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-28 08:14: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:
|
||||
res = try_strategy(texts, strategy, preproc)
|
||||
if res:
|
||||
dump(strategy, preproc)
|
||||
return res
|
||||
|
||||
|
||||
|
|
|
@ -334,8 +334,8 @@ def process_fenced_block(lines, start_line_num):
|
|||
block = lines[start_line_num:line_num]
|
||||
block.append("@@ @@")
|
||||
|
||||
if block[0].startswith("--- "):
|
||||
fname = block[0].split()[1]
|
||||
if block[1].startswith("+++ "):
|
||||
fname = block[1].split()[1]
|
||||
block = block[2:]
|
||||
else:
|
||||
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
|
||||
in their normal training data, and so should be
|
||||
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