Summary
apply_patch computes and renders a diff preview while the tool is pending, but the final successful tool result only carries the textual summaries (add: ..., update: ..., etc.). Once the tool finishes, the richer diff preview disappears and the rendered result falls back to plain text.
Expected behavior
The final result should retain the computed preview details so the TUI can render the same changed-line preview after completion, similar to the built-in edit tool.
Proposed fix
Carry the pending preview into the final tool result details and render completed patches as Applied patch with the preview diff.
Summary
apply_patchcomputes and renders a diff preview while the tool is pending, but the final successful tool result only carries the textual summaries (add: ...,update: ..., etc.). Once the tool finishes, the richer diff preview disappears and the rendered result falls back to plain text.Expected behavior
The final result should retain the computed preview details so the TUI can render the same changed-line preview after completion, similar to the built-in edit tool.
Proposed fix
Carry the pending preview into the final tool result details and render completed patches as
Applied patchwith the preview diff.