AISuggestions

fun AISuggestions(suggestions: List<String>, onSuggestionClick: (String) -> Unit, modifier: Modifier = Modifier, itemMaxWidth: Dp = 160.dp, contentPadding: PaddingValues = PaddingValues(horizontal = 16.dp, vertical = 8.dp))

A horizontally scrolling row of suggestion chips, usually placed above ChatComposer on a new chat.

Each chip shows its text on up to 2 lines. Tapping a chip calls onSuggestionClick with the chip's exact text. The component doesn't send anything itself, so the caller decides what happens, for example sending the text right away. All chips in the row have the same height. Customize the chips through ChatAiComponentFactory.AISuggestionsChip.

Parameters

suggestions

The texts shown as chips, in order.

onSuggestionClick

Called with the chip's text when the user taps a chip.

modifier

Modifier to be applied to the row.

itemMaxWidth

The maximum width of a chip. Longer text wraps to a second line, then ends with an ellipsis.

contentPadding

Padding around the chips. It scrolls with the chips.