Skip to content

Restore Edit argument diffs in /toolcalls detail #2122

Closed

Description

@jbeda

Problem

The conversation shows an Edit call's old_string and new_string as a colored red/green diff while the call is active. In /toolcalls, the same call's detail is a generic list of argument fields. Once the conversation settles to a one-line summary, reviewers can still find the complete received arguments, but comparing the edit means reconstructing the change by eye.

The inline diff is derived from received call arguments, not from the result or a verified filesystem patch (cmd/mecatui/ui/render.go, renderEditDiff). Inspector detail currently renders those arguments generically (cmd/mecatui/ui/toolcalls.go, toolcallDetailRows).

Desired behavior

  • Show a readable, colored diff for Edit in /toolcalls detail, using the received path, old/new strings, and replace_all flag. Keep the complete original arguments and canonical result inspectable; the diff is a view of the request, not proof that the edit was applied. Failed or pending calls must retain honest status.
  • Consider Write and other tools only where a tool-specific view adds comparable value. Do not introduce a generic renderer framework just to support one diff.
  • Preserve theme contrast, terminal-control sanitization, long-line wrapping, narrow-width scrolling, and live/reloaded transcript parity. Malformed or incomplete arguments retain the existing readable fallback.

Verification

Exercise a multiline Edit with removal/addition colors, replace_all, a pending call, a failed result, and a resumed call. Check that the diff and full arguments/results remain accessible without dropped or duplicated content. Cover hostile text and narrow terminal widths.

Companion to #2115: this improves the detail of a call already present in /toolcalls; it does not expand child-call inventory or imply that bounded Subagent previews contain full arguments. Related to #2066, which covers result-body rendering by content type. This issue is specifically about the argument-derived Edit/Write view.

Activity

  1. jbeda commented on Oct 7, 2026

    @jbeda
    ContributorAuthor

    Completed by #2139: /toolcalls detail now renders the received Edit request as a colored argument-derived diff while retaining inspectable received arguments and canonical result, without claiming the edit was applied.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions