Repository navigation
Closed
Labels
enhancementNew feature or requestgood first issueGood for newcomershelp wantedExtra attention is needed
Description
Summary
On the in-product AI agent page (/dashboard/agent), there's no way to copy an assistant reply. Users often ask the assistant to draft/generate content and then want to reuse it — right now they have to hand-select the text. Add a copy button to each assistant message that copies the reply to the clipboard.
What to change
In web/src/app/[locale]/(dashboard)/dashboard/agent/page.tsx, in the MessageBubble component (renders each message; assistant messages go through <Markdown>):
- For assistant messages only (
!isUser), add a small copy icon button in an unobtrusive spot — e.g. the bottom-right of the bubble, or just below it. - Clicking it copies the message's text to the clipboard via
navigator.clipboard.writeText(...), and briefly flips to a "copied" state (a check icon / "Copied" tooltip), like the existing copy affordances in the app (e.g. the team invite link copy insettings/team-section.tsx, which uses the lucideCopyicon + atoast.success('Link copied')). - Copy the raw text the assistant produced — concatenate the text parts:
(message.parts ?? []).filter((p) => p.type === 'text').map((p) => p.text).join('\n\n'). (Copy the markdown source, so lists/bold survive a paste into a doc.)
Scope / non-goals
- Only the text parts — skip tool-call disclosures and rendered charts (
tool-*/tool-render_chartparts). - Only assistant messages; user messages don't need a copy button.
- No streaming concern needed beyond showing the button once the message is present (it can show while streaming too; it copies whatever text has arrived).
How to test
/dashboard/agent→ ask the assistant something (e.g. "draft a short intro paragraph") → a copy button appears on the assistant reply.- Click it → the reply text is on the clipboard (paste into a doc → the markdown/text matches), and the button shows a brief "copied" confirmation.
- User messages and tool/chart parts have no copy button.
Notes
- Small, self-contained UI change — good first issue. Reuses the existing
Copy-icon + clipboard pattern already used elsewhere in the app.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestgood first issueGood for newcomershelp wantedExtra attention is needed
Activity
[-]feat(agent): add a copy button to assistant messages in the AI assistant chat[/-][+]feat(agent): add a copy button to agent messages in the AI agent chat[/+]d180 commentedon Jul 7, 2026
Hi @gkhngyk , I would like to work on this issue.
feat(agent): add copy button to assistant messages in AI agent chat (c…