agent: Refactor edit file tool state handling (#55663)

Ports some changes introduced in #51165 out to make merge conflicts
easier to handle.

Splits the `Pipeline` into two separate types for mode edit/write so we
don't need to maintain that invariant inside the pipeline/in the parser

Also moves the parser to be a submodule of `edit_file_tool`

Release Notes:

- N/A
8f2ab516d0Bennet Bo Fenner committed on 5/4/2026, 3:45:06 PM· committed by GitHubparent11371e6
4 files changedLine totals unavailable