Add assistant response copy action with copy format setting#1477
Add assistant response copy action with copy format setting#1477leonardoxr wants to merge 8 commits intopingdotgg:mainfrom
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ee80eb6417
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 00f34deb78
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 45a53c262a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3f2e028d99
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Summary
Validation
bun fmtbun lintbun typecheckbun run test -- src/lib/assistantMessageCopy.test.ts src/components/chat/MessagesTimeline.test.tsxinapps/webbun run test:browser -- src/components/ChatView.browser.tsx -t "copies the raw assistant markdown by default|copies assistant responses as plain text when the setting is enabled|keeps markdown code-block copy scoped to the code block"inapps/webAssets
Chat before
Chat after
Settings before
Settings after
Interaction details
Issue: #1455
Closes #1455
Note
Medium Risk
Adds new clipboard-copy behavior and markdown parsing dependencies, and updates timeline virtualization height estimation based on a new client setting; regressions could affect chat rendering/scrolling or copy output.
Overview
Adds a copy button for completed assistant messages in the chat timeline, gated to non-streaming responses with copyable content, and wires it into
ChatViewvia a new client-onlyassistantResponseCopyFormatsetting (markdowndefault orplain-text).Introduces
assistantMessageCopyto resolve copy text (raw markdown or normalized plain text) usingunified/remark-parse/remark-gfmwith an LRU cache, and updatesMessageCopyButtonto support lazy text and accessible labels.Updates timeline height estimation/virtualization to account for the new assistant action row and to re-measure when the copy format setting changes, and adds unit + browser tests plus a settings UI control to configure/reset the format.
Written by Cursor Bugbot for commit 4803895. This will update automatically on new commits. Configure here.
Note
Add assistant response copy button with configurable markdown or plain-text copy format
MessagesTimeline, visible on hover/focus, that writes to the clipboard.assistantResponseCopyFormatclient setting ('markdown'or'plain-text', defaulting to'markdown') configurable from the chat settings page.assistantMessageCopy.tswhich converts markdown to plain text usingunified+remark-parsewith custom renderers for GFM elements; results are LRU-cached (500 entries, ~5MB cap).estimateTimelineMessageHeightto use a taller base height (96pxvs78px) for completed assistant messages that have copy-worthy content, keeping virtualization accurate.Macroscope summarized 4803895.