stateFlow

abstract val stateFlow: SharedFlow<ChatStateEvent>

Flow of chat state events. Observe this to receive notifications about connection state changes, readiness, and runtime exceptions.

New collectors receive the most recent state event upon subscription if one has already been emitted; otherwise, collection suspends until the first event is emitted.

See also