- Implementation
- AgentMessage Props
Common Examples
To use theAgentMessage, pass content and a required timestamp. The row left-aligns the content and reserves a 24px inline-end gutter. The kit forbids children.content accepts a string, inline markup, or a Markdown tree. Copy is text-only: pass copyText when content is rich so the copy action stays available.Feedback
WireonLike and onDislike to show thumbs. The component reflects currentFeedback; toggling is yours. When feedback is set, the toolbar shows a confirmation line.Omit both handlers to hide feedback entirely.Internationalization
The action toolbar owns these localized strings:ai-kit.messageToolbar.copyai-kit.messageToolbar.copiedai-kit.messageToolbar.likeai-kit.messageToolbar.removeLikeai-kit.messageToolbar.dislikeai-kit.messageToolbar.removeDislikeai-kit.messageToolbar.feedbackThanksai-kit.messageToolbar.assistantActions
content before passing it. Mount AiKitIntlProvider inside CartoTheme to switch the toolbar strings.React Accessibility
- The toolbar groups assistant actions under a localized name.
- Timestamp is always present in the toolbar.
- Feedback buttons announce like, dislike, and selected state.