MessageActions
Loading example…
Copy, regenerate, like and dislike for an assistant message. Feedback toggles off on re-press.
Import
Section titled “Import”import { MessageActions } from "@jcsoftdev/ui/ai";Single-component entry points tree-shake to just this component: @jcsoftdev/ui/ai/message-actions.
<MessageActions text="Tienes tres huecos libres mañana: 10:00, 11:30 y 16:00."/>| Prop | Type | Default | Description |
|---|---|---|---|
text * |
string |
Text copied by the copy button. | |
onCopy |
((text: string) => void) |
||
onRegenerate |
(() => void) |
Omit to hide the regenerate button. | |
onFeedback |
((value: MessageFeedback) => void) |
Omit to hide the like/dislike buttons. | |
feedback |
null | "like" | "dislike" |
||
defaultFeedback |
null | "like" | "dislike" |
null |
* marks a required prop.
It also accepts the native props of the element or primitive it renders (for example className, id, aria-* and event handlers).
Storybook stories
Section titled “Storybook stories”Source
Section titled “Source”packages/ui/src/ai/message-actions/message-actions.tsx