Skip to content

fix: support pasting WeChat screenshots on macOS#3137

Open
jialudev wants to merge 1 commit into
charmbracelet:mainfrom
jialudev:fix-wechat-screenshot-paste-macos
Open

fix: support pasting WeChat screenshots on macOS#3137
jialudev wants to merge 1 commit into
charmbracelet:mainfrom
jialudev:fix-wechat-screenshot-paste-macos

Conversation

@jialudev

Copy link
Copy Markdown

Problem

On macOS, pasting a WeChat screenshot (微信截图) into Crush with Ctrl+V silently fails, while copying an image file and pasting it works.

Root cause

go-nativeclipboard reads clipboard images on macOS using only NSPasteboardTypePNG. WeChat screenshots are copied as NSPasteboardTypeTIFF, so the library returns ErrUnavailable and Crush falls back to reading text from the clipboard.

Fix

Add a macOS-specific fallback that reads NSPasteboardTypeTIFF from the pasteboard and converts it to PNG before creating the attachment. Non-macOS platforms keep the existing behavior.

Related

Fixes #3136

WeChat screenshots are copied to the clipboard as TIFF, but
go-nativeclipboard only reads NSPasteboardTypePNG on macOS. This caused
Ctrl+V to silently fail for those images.

Add a macOS-specific fallback that reads NSPasteboardTypeTIFF and
converts it to PNG before attaching it to the message.

Fixes charmbracelet#3136
@charmcli

charmcli commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@jialudev

Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA.

@jialudev

Copy link
Copy Markdown
Author

I have read the Contributor License Agreement (CLA) and hereby sign the CLA.

@jialudev

Copy link
Copy Markdown
Author

recheck

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pasting images from WeChat screenshot clipboard fails on macOS

2 participants