Version: Antigravity 2.21.1 and 2.23.0 (still present after update)
OS: Windows 11 (10.0.26200)
Symptom
When I drag a file or folder into the Agent chat input (or when the agent references files like xxx.md in its reply), every file/folder chip shows Chromium’s “broken image” placeholder instead of the file-type icon. It happens for all types I tried: folders, .md, .txt.
Root cause (verified)
The icons are <img src="/symbols-icons/icons/files/markdown.svg"> etc., served by language_server.exe on https://127.0.0.1``:<port>/. The response is:
HTTP/1.1 200 OK
Content-Type: image/svg
Content-Length: 330
The body is a valid SVG, but image/svg is not a valid MIME type, so Chromium refuses to render it in <img>. Same for /symbols-icons/icons/folders/folder.svg. PNG icons (e.g. nuxt.png) are served correctly as image/png.
This is not caused by the Windows registry: Go’s mime.TypeByExtension(".svg") returns image/svg+xml on the same machine, and the language server still returns image/svg after a restart. So the mapping seems to come from the language server’s own code (perhaps something like "image/" + ext).
Workaround (confirms the cause)
Adding a session.defaultSession.webRequest.onHeadersReceived hook in the Electron main process (resources/app.asar → dist/main.js) that rewrites image/svg to image/svg+xml for 127.0.0.1 responses makes all icons render correctly. Each auto-update overwrites it, though.
Suggested fix
Serve .svg files with Content-Type: image/svg+xml in the language server’s static file handler.