agent2: Port `edit_file` tool (#35844)

TODO:
- [x] Authorization
- [x] Restore tests

Release Notes:

- N/A

---------

Co-authored-by: Antonio Scandurra <me@as-cii.com>
Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
2526dcb5a5Agus Zubiaga committed on 8/8/2025, 12:43:53 PM· committed by GitHubparentd705585
20 files changedLine totals unavailable