events

A stream of real-time ConversationEvents for this conversation.

Events are emitted when new entries arrive, typing indicators change, or queue position updates are received. This flow is hot and only emits events that occur after collection begins — it does not replay historical events.

Samples

scope.launch {
    conversationClient.events.collect { event ->
        when (event) {
            is ConversationEvent.Entry -> { /* Display the new entry in the chat feed */ }
            is ConversationEvent.ProgressIndicator -> { /* Show typing indicator */ }
            is ConversationEvent.QueuePosition -> { /* Update queue position UI */ }
            else -> {}
        }
    }
}