0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-05 17:25:34 +08:00
discourse/plugins/discourse-ai/lib/ai_helper
Rafael dos Santos Silva 53e25da301
PERF: Speed up AI helper diff streaming (#41787)
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
2026-07-17 10:17:54 -03:00
..
assistant.rb PERF: Speed up AI helper diff streaming (#41787) 2026-07-17 10:17:54 -03:00
chat_thread_titler.rb DEV: AI persona to agent migration (#38319) 2026-03-10 15:59:45 +11:00
date_formatter.rb
entry_point.rb DEV: Enable Rails/FilePath rubocop rule (#40097) 2026-05-19 19:07:54 +02:00
semantic_categorizer.rb FIX: Respect category tag restrictions when suggesting tags (#40545) 2026-06-04 09:11:56 +02:00