Skip to content
Look

Shared with the landing page. Theme is the select beside this menu.

MessageActions

Open .md
Live preview

Loading example…

Copy, regenerate, like and dislike for an assistant message. Feedback toggles off on re-press.

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
actionIntents Partial<Record<MessageActionName, IntentProps>>
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).

packages/ui/src/ai/message-actions/message-actions.tsx