Skip to content

Feature: paste and attach multiple images to Desktop prompts - #87

Merged
DevMando merged 2 commits into
mainfrom
codex/desktop-image-attachments
Nov 11, 2026
Merged

DevMando merged 2 commits into
mainfrom
codex/desktop-image-attachments

Conversation

@DevMando

Copy link
Copy Markdown
Owner

Summary

Desktop could send browser-preview screenshots to a vision model, but users could not paste or attach their own images in chat. This PR adds that workflow, including up to four images per message.

For example, users can paste a screenshot, add a second image, review both previews, and ask the selected vision model to compare them.

What changed

  • Paste, attach, or drop images: paste screenshots or copied image files, select multiple files with Attach image, or drop image files into chat. Ordinary text paste keeps its native behavior.
  • Review before sending: each image has a numbered thumbnail, filename, size, and Remove button. The attachment strip shows the count and total size and scrolls horizontally in narrow panes.
  • Bounded attachments: support up to four PNG, JPEG, GIF, or WebP images per message. Each image is limited to 4 MiB and 16 million pixels. Clipboard bitmaps are converted to PNG, file signatures are checked, and previews are decoded before an image is staged.
  • Vision checks and draft protection: refuse attachments when vision support is unknown or unsupported, and recheck the selected model at send time. Keep drafts when a request is refused. Image bytes stay with the tab's draft until that agent claims the user's turn.
  • Explicit delivery: images are sent with the submitted prompt. Sending images without text supplies a description prompt. The shared engine supplies image content for that turn rather than uploading the same images with every later request.
  • Decision-model errors: recognize Ollama's rejection when a selected decision model requires a different API. Show guidance to choose a compatible chat model, mark the model unavailable for chat until changed or revalidated, and avoid treating the provider error as a successful assistant answer.
  • Update the README and Unreleased changelog.

Why this was done

Users should be able to bring screenshots and visual examples directly into a Desktop conversation. The shared engine already supports image delivery, so this adds the missing Desktop input and preview workflow while keeping attachments tied to the intended agent and prompt.

How it was tested

  • Release Desktop build passed with zero warnings and errors against the currently pinned engine.
  • All 631 Desktop tests passed in Release. Coverage includes image signatures, size limits, copied draft bytes, model capability changes, command rejection, batch limits, four-image engine queue admission, and decision-model error handling.
  • The shared engine's 11 image-delivery tests passed earlier in this work, covering delivery and cleanup behavior.
  • Manual UI checks verified file selection, thumbnail preview, removal, and Ctrl+V screenshot paste. The project owner also confirmed image pasting works in their testing.
  • Remaining interactive checks: a live multi-image comparison and mixed valid/invalid file selections. The exact decision-model failure was covered with simulated provider errors; the reported model was unavailable on the local server.

Notes

  • The engine submodule pin, dependencies, and application version are unchanged.
  • This does not implement the decision-model API or the deferred Ollama model browser.
  • Visual Studio may still pause where a provider exception is first thrown when break-on-thrown is enabled. The app's error handling runs when execution continues.
  • The local engine launch-settings edit is excluded.

@DevMando
DevMando merged commit edf5208 into main Nov 11, 2026
1 check passed
@DevMando
DevMando deleted the codex/desktop-image-attachments branch November 11, 2026 08:33
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