mirror of
https://github.com/mudler/LocalAI.git
synced 2026-07-30 18:09:05 -04:00
One agent turn runs several internal LLM generations (tool selection, reasoning, final answer) that all emit stream_event deltas over the same per-agent SSE channel. The chat page accumulated every 'content' delta into a single live bubble and ignored the 'done' boundary events, so the internal generations' text (e.g. the English tool-selection rationale) merged with — and visually corrupted — the streamed final answer. Reset the accumulated content/reasoning on 'done': each generation gets a clean live bubble, and the authoritative full answer still arrives via the final json_message event as before. Signed-off-by: Stefan Walcz <stefan.walcz@walcz.de>