# Chat page (chat.wxch.org): what is missing Noted on 2026-10-21 at the owner's request. Nothing here is built yet; the owner said "not yet". Source of the facts: `web/static/chat.html`, `cmd/wxch-server/chat.go`, `cmd/wxch-server/gateway.go`. ## What the page does today - Streams answers, shows the model's reasoning in a folded block, renders markdown (`marked` + `DOMPurify`), copy button on code blocks and on a whole answer, retry/regenerate, stop. - A markdown image `![](url)` in an answer is shown as a picture. There is no download button for it. - Conversations live in the browser (`localStorage`, key `wxch.chat.v1`, about 5 MB for everything). - The request goes to `/chat/completions` and is limited to 4 MB (`maxRequestBody` in `gateway.go`). ## What is missing 1. **Download buttons.** No "save code block as a file", no "save this answer as .md", no download button under a picture. 2. **Video and audio.** A link to an `.mp4` or `.mp3` is only a link; nothing is played inline. 3. **Attachments.** No way to attach a file. Text, code and CSV files could be added to the question as text. Pictures need a vision-capable model (see below) and the `image_url` content format. 4. **Making pictures or video from the chat.** No `/image ...` or `/video ...`; the owner has to go to `studio.wxch.org`. ## What depends on the model - Text-only models cannot read or make pictures or video: this includes `nvidia/NVIDIA-Nemotron-3-Super-120B-A12B-NVFP4`, which the owner chose on 2026-10-21 (74.8 GB in the model list). - In our catalog the models that can look at pictures are Nemotron 3.5 Super VL 120B, Nemotron 3.5 Bolt 74B (GGUF with its vision projector) and Nemotron 3 Nano Omni. None of them has been tried on the PGX yet, and it is not verified that our vLLM / LM Studio supports them. - Making pictures and video is the job of the Studio modules (ComfyUI), never of the chat model. The way to wire that into the chat is item 4 below. ## Suggested order (smallest risk first) 1. **Download and playback (item 1 and 2).** Only `web/static/chat.html` changes; no server change; works with every model. 2. **Text attachments (part of item 3).** Append the file text to the question with a size limit (well below the 4 MB request limit). 3. **Picture attachments (rest of item 3).** Only after one vision model is installed and tested on the PGX. `localStorage` is too small for pictures: keep them for the session only, or move them to IndexedDB. The 4 MB request limit also applies (resize in the browser). 4. **`/image` and `/video` (item 4).** Largest piece: the chat session would have to call the Studio job API, show progress, and cope with image jobs queuing behind a long video on the same ComfyUI. ## Rules to keep when building this - Show pictures only from our own domains and from `data:` addresses. A link the model writes can come from text it read elsewhere; loading it from the outside would let that text send information out through the address. - Keep `DOMPurify` on everything the model writes; do not add `