mirror of
https://github.com/discourse/discourse.git
synced 2026-08-05 17:25:34 +08:00
Previously, streamed diff-type helper results (e.g. proofread) felt much slower than other AI streams: the server cooked the entire input through the markdown pipeline on every streamed chunk to build a `diff` payload no client consumed, and the client animation was hard-capped at one character per 10ms tick while recomputing the full word diff on every word boundary. This change drops the per-chunk `parse_diff` call (the diff is still computed for the final update), makes the typing animation batch characters adaptively based on how far it lags behind the received text, and throttles diff recomputes to every 100ms. https://github.com/user-attachments/assets/5914cf24-1b52-488e-bca0-6992a780f777 |
||
|---|---|---|
| .. | ||
| assistant.rb | ||
| chat_thread_titler.rb | ||
| date_formatter.rb | ||
| entry_point.rb | ||
| semantic_categorizer.rb | ||