Files
openidea/crates/ide-agent
l0ng-ai 5895022904 fix(agents): declare an image's type from its bytes when sending it to an agent (#3987)
A pasted image kept the type the clipboard declared, which for an image copied from
a web page can be image/png over JPEG or WebP bytes. Agents that validate image
blocks (DeepSeek Harness over ACP, Claude's API) rejected the whole prompt with
"Declared image type does not match its bytes". Image blocks now declare the type
read from the PNG, JPEG, GIF or WebP signature, and the declared one otherwise.

Fixes #3911
2026-11-17 19:37:05 +08:00
..