mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-09 06:05:00 +00:00
Fix ReplaceAll, using new git diff helper
This commit is contained in:
parent
46b0bee184
commit
26ec1c4f82
1 changed files with 3 additions and 3 deletions
|
@ -4,6 +4,7 @@ from .tool_utils import (
|
||||||
validate_file_for_edit,
|
validate_file_for_edit,
|
||||||
apply_change,
|
apply_change,
|
||||||
handle_tool_error,
|
handle_tool_error,
|
||||||
|
generate_unified_diff_snippet,
|
||||||
format_tool_result,
|
format_tool_result,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -33,8 +34,7 @@ def _execute_replace_all(coder, file_path, find_text, replace_text, change_id=No
|
||||||
return f"Warning: No changes made (replacement identical to original)"
|
return f"Warning: No changes made (replacement identical to original)"
|
||||||
|
|
||||||
# 4. Generate diff for feedback
|
# 4. Generate diff for feedback
|
||||||
# Note: _generate_diff_chunks is currently on the Coder class
|
diff_examples = generate_unified_diff_snippet(original_content, new_content, rel_path)
|
||||||
diff_examples = coder._generate_diff_chunks(original_content, find_text, replace_text)
|
|
||||||
|
|
||||||
# 5. Handle dry run
|
# 5. Handle dry run
|
||||||
if dry_run:
|
if dry_run:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue