Skip to content

Show patch diff #21

Closed
Closed

Description

@pasei-dev

Description

Would love to be able to enable to show diff when patching like the built in patch tool does. Aft hides the diff by default

AFT:

Image

Use case

No response

Activity

  1. ualtinok commented on Apr 24, 2026

    @ualtinok
    Collaborator

    Fixed in v0.15.3.

    Root cause: AFT's apply_patch was only sending { filePath, relativePath, type } in metadata.files, but OpenCode's UI (at packages/ui/src/components/apply-patch-file.ts) silently drops any entry that doesn't carry a patch (or before/after) field — so every file was dropped and no diff rendered.

    The fix enriches each file entry with the per-file unified diff, additions, deletions, and movePath (when applicable), matching OpenCode's built-in apply_patch contract exactly. Diffs now render the same way as the built-in tool in both TUI and desktop.

    Please upgrade with bunx --bun @cortexkit/aft doctor --force or just restart OpenCode — the plugin auto-downloads v0.15.3 and picks up the new binary on next tool call. Reopen if you still see it.

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

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions