AIUIComponentContext
class AIUIComponentContext(val messageId: String, val isStreaming: Boolean, val host: AIUIHost, uriHandler: UriHandler, emit: (event: String, label: String, payload: Map<String, Any?>) -> Unit)
What a component gets besides its arguments: which reply it is in, and how it tells the agent what the person did.
Parameters
messageId
The reply the component is in.
isStreaming
Whether the agent is still writing the reply's UI, so the arguments may still change.
host
The conversation's host, for running the app's tools and keeping state.
uriHandler
Opens the links openUrl lets through, such as the composition's LocalUriHandler.
emit
Sends an event to the agent the way the renderer's format does.
Constructors
Functions
Link copied to clipboard
Opens a link, when the host lets links of its kind open (see AIUIHost.canOpen).