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:
Paul Gauthier 2023-06-06 18:13:36 -07:00
parent 00f2fb9bf6
commit 99c86ccddf

View file

@ -58,7 +58,7 @@ def diff_partial_update(lines_orig, lines_updated, final=False):
if not final:
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:]