AIConversationFeed

Where an AIConversationTransport tells its AIConversationState what the conversation holds. Call it on the state's thread, the main thread for a viewModelScope.

Once the state's scope is cancelled, its updates go nowhere: stop following what the conversation holds when isConnected is false.

Properties

Link copied to clipboard

Whether the state it updates is still there. Stop following what the conversation holds once it isn't.

Functions

Link copied to clipboard
fun update(activity: AIAgentActivity?)

What the agent says it is doing, or null once it stops saying. An activity in the AIAgentActivity.State.Error state ends the latest request with an AIAgentError.

fun update(hasOlderMessages: Boolean)

Whether there are messages before the first one, which the transport's AIConversationTransport.loadOlderMessages loads.

fun update(messages: List<M>)

The conversation's messages, oldest first, each time they change.