SIGN IN SIGN UP

feat(diff): render image files as before/after pictures

Opening a diff on a PNG or JPEG landed in the text viewer with two empty
panes, and `parseUnifiedDiff` dropped hunkless files, so an image change
vanished from a multi-file diff entirely.

Add a `git_show_file_base64` command that pins the blob oid before sizing
and reading it, refusing anything over 8 MB per side, and an
`ImageDiffView` that shows two panes plus a swipe overlay when both sides
carry pixels. Each side resolves to image / absent / tooLarge /
unavailable, and "absent" requires positive evidence, so a failed read is
never reported as an addition or a deletion. Wired into the workspace
rich-diff tab, the commit dialog, the push workspace and the unstash
dialog; the unified preview now keeps binary files and reads their change
kind off the file-mode headers.

SVG stays on the text path: git line-diffs it, which says more than two
pictures that may look identical.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
X
xintaofei committed
504fc27956c916e7a2a18594cb446266ebdd422b
Parent: 0570714