popupFlow

abstract val popupFlow: Flow<PopupEvent>

A Flow that emits PopupEvents when popups should be displayed. A popup that arrives before collection starts is delivered to the first collector; the flow does not replay to later collectors, and each popup is delivered once (single-consumer).

Example usage:

val handler = chat.actions()
handler.popupFlow.collect { event ->
showPopup(event.variables, event.metadata)
}

To stop listening, cancel the Flow collection or call close.

See also