Commit f1f7cb4
authored
test(readFileTool): comprehensive coverage; align legacy failure flag with native path (#222)
Add unit coverage for ReadFileTool: input validation, rooignore blocking,
directory/binary/image handling, image memory limits, approval flow, slice and
indentation modes, output structure, and the legacy multi-file format.
Source changes:
- Drop the temporary "[read_file] Legacy format detected" debug console.warn.
- Mirror the native path in the legacy read path: set didToolFailInCurrentTurn
on rooignore blocks, directory reads, and read errors so a failed legacy read
fails the tool turn consistently.
- Recognize re-hydrated bare-`files` calls in isLegacyReadFileParams (history
persisted before the _legacyFormat flag existed).
Co-authored-by: Armando Vaquera <263793884+proyectoauraorg@users.noreply.github.com>1 parent 3df406e commit f1f7cb4
3 files changed
Lines changed: 770 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
93 | 100 | | |
94 | 101 | | |
95 | 102 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
668 | 668 | | |
669 | 669 | | |
670 | 670 | | |
671 | | - | |
672 | | - | |
673 | | - | |
674 | 671 | | |
675 | 672 | | |
676 | 673 | | |
| |||
694 | 691 | | |
695 | 692 | | |
696 | 693 | | |
| 694 | + | |
| 695 | + | |
697 | 696 | | |
698 | 697 | | |
699 | 698 | | |
| |||
731 | 730 | | |
732 | 731 | | |
733 | 732 | | |
| 733 | + | |
| 734 | + | |
734 | 735 | | |
735 | 736 | | |
736 | 737 | | |
| |||
802 | 803 | | |
803 | 804 | | |
804 | 805 | | |
| 806 | + | |
| 807 | + | |
805 | 808 | | |
806 | 809 | | |
807 | 810 | | |
| |||
0 commit comments