import { marked } from "marked"; import hljs from "highlight.js"; // Render markdown to HTML with code highlighting. During streaming we call this on the // growing text; marked is string-based (fast enough per flush). We override the renderer // to drop raw HTML tokens, preventing XSS via