ConversationClosed
Renders the banner displayed when the conversation has been closed by the agent or system.
Override this to show a custom end-of-conversation message, a "start new conversation" button, or any other composable. This component appears at the bottom of the chat feed in place of the message input bar once the conversation is closed.
Parameters
content
The SDK's default closed-conversation banner. Call it to retain default rendering.
Samples
uiClient.viewComponents = object : ViewComponents {
@Composable
override fun ConversationClosed(content: @Composable () -> Unit) {
Column(Modifier.fillMaxWidth().padding(16.dp)) {
Text(
text = "This conversation has ended.",
style = MaterialTheme.typography.bodyLarge
)
Button(onClick = {
UIClient.Factory.destroy()
val newConfig = UIConfiguration(
configuration = uiClient.configuration,
conversationId = UUID.randomUUID()
)
UIClient.Factory.create(newConfig).openConversationActivity(context)
}) {
Text("Start New Conversation")
}
}
}
}Content copied to clipboard