mirror of
https://github.com/openai/codex.git
synced 2026-11-10 21:00:47 +00:00
## Why The macOS clipboard reader requests TIFF even when PNG or JPEG data is available, causing clipboard owners to generate a large TIFF just for a paste. Pasted image files also need their orientation metadata applied before encoding attachments. ## What changed - Read native macOS pasteboard representations before falling back to `arboard`, preferring PNG within each item while respecting item order and JPEG/TIFF ordering. - Keep copied image files ahead of clipboard previews and apply orientation metadata when decoding files and native PNG/JPEG data. - Share orientation-aware decoding with transcript thumbnails while preserving allocation limits. ## Testing Add tests for pasteboard item ordering, all EXIF orientations in PNG and JPEG images, and rejection of images exceeding the allocation budget. GitOrigin-RevId: 088f37a3205e49c805a09a84bbbb00b74dd6cb78