mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-01 10:14:59 +00:00
aider: Updated diff_partial_update function to include 5 lines of context in unified_diff function call.
# Context: USER: expand the context diff to 5 lines of context ASSISTANT: To expand the context diff to 5 lines of context, you need to modify the `diff_partial_update` function in the `aider/diffs.py` file. Update the `unified_diff` function call to include the `n` parameter with a value of 5. Here's the change: ```python aider/diffs.py <<<<<<< ORIGINAL diff = difflib.unified_diff(lines_orig, lines_updated) ======= diff = difflib.unified_diff(lines_orig, lines_updated, n=5) >>>>>>> UPDATED ```
This commit is contained in:
parent
00f2fb9bf6
commit
99c86ccddf
1 changed files with 1 additions and 1 deletions
|
@ -58,7 +58,7 @@ def diff_partial_update(lines_orig, lines_updated, final=False):
|
||||||
if not final:
|
if not final:
|
||||||
lines_updated = lines_updated[:-1] + ["...\n"]
|
lines_updated = lines_updated[:-1] + ["...\n"]
|
||||||
|
|
||||||
diff = difflib.unified_diff(lines_orig, lines_updated)
|
diff = difflib.unified_diff(lines_orig, lines_updated, n=5)
|
||||||
|
|
||||||
diff = list(diff)[2:]
|
diff = list(diff)[2:]
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue