feat(tui): support multiple clipboard images in attachment bar - #16095
espinosacodes wants to merge 1 commit into
Conversation
Clipboard paste previously only attached the first image when the clipboard contained multiple images. File paste via shell_words already handled multiple paths. This change extends the clipboard path to process all supported images in order, validates against MAX_IMAGE_COUNT_FOR_QUERY, and shows a combined processing indicator for multiple images. - image_processing: add process_clipboard_contents returning Vec<ImageContext> and keep process_clipboard_content as single-image wrapper - model: update attach_clipboard_image to count supported MIME types, validate count, and append all processed images at once - tests: add coverage for multiple images and unsupported filtering Also adds docs/multi-file-attach-demo.png illustrating the Warp attachment UI for documentation.
|
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @espinosacodes on file. In order for us to review and merge your code, each contributor must visit https://cla.warp.dev to read and agree to our CLA. Once you have done so, please comment |
|
Every PR must be linked to a same-repo issue before Oz can review it. Next step: open or find a same-repo issue describing this change, then link it to this PR by adding See the contribution guidelines for the full readiness model. Powered by Oz |
There was a problem hiding this comment.
Every PR must be linked to a same-repo issue before Oz can review it.
Next step: open or find a same-repo issue describing this change, then link it to this PR by adding Closes #123 to the PR description (or using the "Development" sidebar on GitHub). A maintainer will mark the issue ready-to-implement when it is ready. Once it is marked, comment /warp-agent-review to re-trigger review.
See the contribution guidelines for the full readiness model.
Powered by Oz
Closes espinosacodes#1
Summary
Extends TUI clipboard attachment to support multiple files/images at once, matching existing multi-file support for path paste and GUI file picker.
Previously:
parse_image_paths+process_paths(space-separated, e.g.one.png two.jpg) already workedFilePickerConfiguration::allow_multi_select()atapp/src/editor/view/mod.rs:5047already allowed multiple selectionNow clipboard attaches all supported images in order, validated against
MAX_IMAGE_COUNT_FOR_QUERY(20).Changes
crates/warp_tui/src/attachment_bar/image_processing.rs:152: addprocess_clipboard_contents(content) -> Result<Vec<ImageContext>>that filters byCLIPBOARD_IMAGE_MIME_TYPESand processes each image; keepprocess_clipboard_contentas single-image wrappercrates/warp_tui/src/attachment_bar/model.rs:279: updateattach_clipboard_imageto count supported clipboard images, validate against limit, show combined indicator ("2 clipboard images" for multi), and append all viaappend_pending_imagescrates/warp_tui/src/attachment_bar/image_processing_tests.rs:163: add testsprocesses_multiple_clipboard_images_in_orderandfilters_unsupported_clipboard_imagesdocs/multi-file-attach-demo.png: demo screenshot showing Warp tabs (Notifications setup instructions, /remote-control, File explorer, Rich Input)How to test locally
Manual TUI check:
one.png two.jpgas text, verify both processed in order.Notes
Fork branch
espinosacodes:feature/multi-file-attach-supportcontains the same commit as this PR. Tested locally after Xcode license accept, CI should pass.Skipped: per-image error reporting and drag-drop overlay, add when needed.
CHANGELOG-IMPROVEMENT: TUI attachment bar now supports pasting multiple clipboard images at once.