Skip to content

Read PNG clipboard images, stub other platforms#181

Merged
treeform merged 1 commit into
masterfrom
agent/clipboard-image-png-stubs
Jul 16, 2026
Merged

Read PNG clipboard images, stub other platforms#181
treeform merged 1 commit into
masterfrom
agent/clipboard-image-png-stubs

Conversation

@treeform

Copy link
Copy Markdown
Owner

Summary

  • macOS getClipboardImage / getClipboardContentKinds now accept PNG as well as TIFF (screenshots and many apps provide both).
  • Add no-op getClipboardImage / getClipboardContentKinds stubs on Linux (X11) and Emscripten so the API is available on every backend (Windows already had full support).

Test plan

  • On macOS: copy a screenshot to the clipboard (Cmd+Ctrl+Shift+4), run a small snippet that calls getClipboardContentKinds() and getClipboardImage(), confirm non-nil image with expected size
  • On macOS: copy plain text only, confirm ImageContent is absent and getClipboardImage() returns nil
  • Linux/Emscripten still compile with the new stubs

Made with Cursor

Co-authored-by: Cursor <cursoragent@cursor.com>
@treeform
treeform merged commit 0c688c3 into master Jul 16, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant