Skip to content

πŸ¦‹ New version release#14

Merged
brentrager merged 1 commit into
mainfrom
changeset-release/main
Jun 27, 2026
Merged

πŸ¦‹ New version release#14
brentrager merged 1 commit into
mainfrom
changeset-release/main

Conversation

@brentrager

Copy link
Copy Markdown
Contributor

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

Releases

@smooai/[email protected]

Minor Changes

  • 586003c: Render sanitized Markdown in assistant replies and citation snippets, and smooth out the streaming reveal.

    Sanitized Markdown rendering. Assistant responses and citation snippets previously showed Markdown literally (**bold**, numbered lists, [links](url) rendered as raw text). They now render to formatted HTML through a tiny, safe-by-default renderer (markdown.ts) that:

    • escapes all text β€” raw <script>, <img onerror=…>, <iframe> etc. render as inert text, never markup;
    • drops images entirely (a scraped tracking pixel can't load) β€” ![alt](src) becomes its alt text;
    • allows only http(s) links (javascript:/data:/relative fall back to plain text) with target="_blank" + rel="noopener noreferrer nofollow";
    • emits only an allowlisted tag set (p, br, strong, em, ul/ol/li, code/pre, a, blockquote) and downgrades headings to bold lines so they fit a chat bubble.

    User bubbles stay plain text; mid-stream text stays plain (partial Markdown renders ugly) and only the final assistant turn is rendered as Markdown. Citation snippets are also cleaned first β€” leading page boilerplate (logo image/link, nav, whitespace) is trimmed and the excerpt is truncated to ~260 chars at a word boundary.

    Smooth streaming reveal. The assistant bubble no longer jumps in jerky, uneven chunks as stream_token bursts arrive. Incoming token text is buffered and revealed via a requestAnimationFrame typewriter at an adaptive rate (chars-per-frame scales with the pending backlog, so it never falls behind the network); only the single streaming bubble is updated per frame (no full list rebuild), and the final turn snaps to the full Markdown render. Respects prefers-reduced-motion (snaps instantly) and keeps auto-scroll without fighting a visitor who has scrolled up.

@brentrager brentrager force-pushed the changeset-release/main branch from d36253a to ace25f3 Compare June 27, 2026 12:42
@brentrager brentrager merged commit de15837 into main Jun 27, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant