Commit a6c1d8c
Eric Wheeler
fix: reduce redundant context in apply_diff error messages
When apply_diff fails to find a match, the error message previously included:
- The search content that was just sent (redundant since model already has it)
- A large snippet of the original file (noisy and context-consuming)
This change streamlines the error output to only show the "Best Match Found"
section, which provides the most actionable information for debugging while
conserving valuable context window space.
The best match section shows exactly what was found in the file that was
closest to the search pattern, enabling targeted corrections without
re-reading the entire file.
Fixes: #5795
Signed-off-by: Eric Wheeler <[email protected]>1 parent 2f4d833 commit a6c1d8c
File tree
2 files changed
+2
-29
lines changed- src/core/diff/strategies
2 files changed
+2
-29
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
614 | 614 | | |
615 | 615 | | |
616 | 616 | | |
617 | | - | |
618 | | - | |
619 | | - | |
620 | | - | |
621 | | - | |
622 | | - | |
623 | | - | |
624 | | - | |
625 | | - | |
626 | | - | |
627 | | - | |
628 | | - | |
629 | | - | |
630 | | - | |
631 | 617 | | |
632 | 618 | | |
633 | 619 | | |
| |||
644 | 630 | | |
645 | 631 | | |
646 | 632 | | |
647 | | - | |
| 633 | + | |
648 | 634 | | |
649 | 635 | | |
650 | 636 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
521 | 521 | | |
522 | 522 | | |
523 | 523 | | |
524 | | - | |
525 | | - | |
526 | | - | |
527 | | - | |
528 | | - | |
529 | | - | |
530 | | - | |
531 | | - | |
532 | | - | |
533 | | - | |
534 | | - | |
535 | | - | |
536 | | - | |
537 | 524 | | |
538 | 525 | | |
539 | 526 | | |
| |||
542 | 529 | | |
543 | 530 | | |
544 | 531 | | |
545 | | - | |
| 532 | + | |
546 | 533 | | |
547 | 534 | | |
548 | 535 | | |
| |||
0 commit comments