AIMessageAttachmentItem

fun AIMessageAttachmentItem(attachment: AIMessageAttachment, modifier: Modifier = Modifier, imageSize: Dp = 180.dp, nameTextStyle: TextStyle = MaterialTheme.typography.labelLarge, detailsTextStyle: TextStyle = MaterialTheme.typography.bodySmall, colors: AIMessageAttachmentColors = AIMessageAttachmentDefaults.colors(), icons: AIMessageAttachmentIcons = AIMessageAttachmentDefaults.icons())

One of a message's attachments: an image as a square thumbnail, and any other kind as a file, with its name, type and size, that opens when tapped.

AIMessageAttachmentItem(attachment = AIMessageAttachment.file(uri, name = "Itinerary.pdf"))

An image shows the bitmap the app holds, else the one at its URI, on this device or on the web, loaded at the size it shows at. An image with neither shows as a file. A file opens in an app for its type, and a page on the web in the browser.

Parameters

attachment

What to show.

modifier

The modifier to apply to the attachment.

imageSize

The width and height of an image.

nameTextStyle

The style of a file's name.

detailsTextStyle

The style of a file's type and size.

colors

The palette of the attachment.

icons

The icons of the types of file.