Files
Magiczerowxy 20a3898bf5 page-chat 0.1.4: model brand icons, data-URI images only (a remote image is a link), gateway port from magpie's settings.json, by Magic_zero (#534)
page-chat 0.1.4, by Magic_zero (Magiczerowxy). This adds:
- model brand icons in the picker and the transcript, from @lobehub/icons (MIT, chat/icons/models/NOTICE);
- inline images, base64 data URIs only. A remote ![](https://…) image is shown as a link the user can click and is never fetched, so a reply can't send data off the machine through an image URL;
- the gateway port read from magpie's settings.json, read-only and 127.0.0.1 only, after an explicit gateway or MAGPIE_ADDR;
- a switch for the system prompt;
- stdio MCP servers run in a workspace folder of their own;
- code fences kept whole while a reply streams.

The suggestion buttons and the 「模型」 label are gone from the empty state. finish() still renders a reply that arrives in one chunk (the fix from #498).

Run at the reviewed head 8ded766, on the Mac mini (Bun 1.4.2, sandbox HOME):
- bun test: 3871 pass, 0 fail, 9 skip. bun scripts/check.mjs: exit 0.
- A Playwright probe ran the real service against a fake gateway that sends the reply in one SSE chunk, and recorded every request leaving 127.0.0.1. The reply carried md, http, protocol-relative and blob images, HTML img, srcset, picture, inline style url(), a <style> block, a link around an image, a reference-style image, a bare URL, KaTeX \includegraphics and \href, and a data:image/svg+xml with script, onload, <image href> and CSS url(); the probe also opened that SVG in the lightbox. No request left the machine and the reply rendered. Run in Chromium on the Mac mini, and in Chromium and WebKit on Linux (magpie-desktop). WebKit didn't launch on the loaded Mac mini.
- Broken by hand: letting https images through safeImgSrc turns "the chat UI never auto-loads a remote image" red, and the probe records the request to attacker.example. finish() back to checking only .md-stable turns "finish() renders a reply that arrived in one chunk" red, and the probe shows an empty body.

Not tried: the real magpie window, and a portable install's data/settings.json.
2026-10-31 10:10:30 +08:00
..