Who it is forA frontend developer building an AI chat interface who needs the controls under each assistant message to feel finished.
The problemBuilding copy, regenerate, thumbs and read-aloud controls with clear state changes takes time and is easy to get visually or accessibly wrong.
The outcomeA working Message Actions component in components/ui that shows copy confirmation, regenerate feedback and feedback buttons under AI replies.
What you need first
- A React 19 project, with or without TypeScript
- A setup that supports the shadcn CLI, such as Next.js or shadcn-configured projects with the @/* import alias
- Access to the affectui.com registry URLs
Steps
- Run
npx shadcn@latest add https://www.affectui.com/r/message-actions.jsonin the project root. - Open the generated file in components/ui and read the props on the item page at https://www.affectui.com/components/message-actions.
- Import the component into the chat message renderer with
import { MessageActions } from "@/components/ui/message-actions";. (inferred, check the README) - Connect your own copy, regenerate and feedback handlers to the component props.
- Send a test AI reply in the app and confirm the bar appears and the copy control shows a check after a click.
Prompt for your agent
In the affectui repo context, install the message-actions item into the <project-path> Next.js or React 19 project using `npx shadcn@latest add https://www.affectui.com/r/message-actions.json`, then render it under the last assistant message in <chat-component-file>. Expected output: a MessageActions import and usage in that file with your existing handlers wired to props. Verify the project still builds and the bar renders with no console errors.
Caveat. The README describes the component behavior but the exact props for your handlers are on the item page, so check them there before wiring the bar to your API.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for flohoeller/affectui and "Add a polished message action bar to an AI chat"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer