Files
cline/.changeset
Mikołaj Kondratek 8ff5f22cf9 fix(webview): flag attached images the selected model can't use and offer a model switch (#13943)
* fix(webview): warn when an image is pasted or dropped for a text-only model

Pasting or dropping an image into the chat box did not check whether the
selected model accepts image input. The image was attached and shown as a
thumbnail, then silently replaced by a text placeholder before the API call,
so the user never learned it was ignored.

The chat box now refuses the image and shows an inline hint, using the same
overlay pattern as the existing dimension and unsupported-file errors.
Unknown capability data fails open, matching core.

* fix(model-catalog): let declared input modalities decide supportsImages

The provider layer prefers a model's declared input modalities over its
capability list when deciding whether image parts are sent. The adapter that
produces the legacy supportsImages flag only looked at capabilities, so a
model declaring text-only input without a capabilities array was reported as
image-capable to the UI while the request formatter still stripped images.

* fix(webview): keep unsupported images attached, badge them and offer a model switch

Refusing the paste/drop was the wrong shape: it dropped user content and
could not cover images attached before switching to a text-only model.

Images are now attached regardless. While the selected model has no image
input, each image thumbnail carries a warning badge and a notice under the
composer says the images will be ignored and links to the model picker. Both
are derived from the current model, so they appear and disappear as the model
changes.

* fix(webview): make the model-picker link in the images notice a native button

An anchor with role=button and no href is focusable but ignores Enter and
Space, so keyboard users could not open the model picker from the notice.

* fix(webview): keep the link colour on the model-picker button in the images notice

A native button inherits the notice's warning colour, which made the link
blend into the sentence; use the VS Code text-link colours instead.

* refactor(webview): rename imagesUnsupported to unsupportedImagesAttached

The flag also requires images to be attached, so the old name read like a
plain negation of modelSupportsImages.
2026-09-08 21:56:14 +09:00
..