agent: Fix path checks in edit_file (#30909)

- Fixed bug where creating a file failed when the root path wasn't
provided

- Many new checks for the edit_file path

Closes #30706

Release Notes:

- N/A
875d1ef263Oleksiy Syvokon committed on 5/19/2025, 8:56:15 AM· committed by GitHubparente1a2e8a
1 file changedLine totals unavailable