module RubyLLM::ActiveRecord::MessageBroadcasting

Shows a chat’s messages live with Turbo when Configuration#broadcast_messages, or the model’s broadcasts: option, is on. An empty assistant reply is appended when it is created, so its chunks have a place to land, and each chunk is appended as a numbered span that the chat UI’s Stimulus controller puts back in order. A saved message replaces itself, a destroyed one is removed, and every change refreshes the chat page. Broadcasts go to the chat record’s stream:

<%= turbo_stream_from @chat %>