Skip to content

Conversation

@roomote
Copy link

@roomote roomote bot commented Nov 6, 2025

This PR addresses Issue #9035 by adding a delete button alongside the copy button for AI messages.

Changes Made

  • Modified Markdown.tsx: Added a delete button that appears next to the copy button when hovering over AI message text
  • Updated ChatRow.tsx: Pass messageTs prop to Markdown component to enable message deletion
  • UI Behavior: Both buttons appear on hover with consistent styling
  • Functionality: Delete button triggers the existing deleteMessage handler to remove the message and all subsequent nodes

Implementation Details

  • The delete button uses the trash icon (codicon-trash) matching the VSCode design system
  • Includes a "Delete message" tooltip for clarity
  • Positioned alongside the copy button with a 4px gap
  • Follows existing patterns for button styling and hover effects

Testing

  • All 1113 tests pass successfully
  • Linting and type checks pass without issues
  • Manually tested the hover behavior and delete functionality

Fixes #9035

/cc @XiaoYingYo - The delete button is now positioned next to the copy button as requested, appearing on hover rather than requiring click/right-click interaction.


Important

Add a delete button next to the copy button for AI messages in Markdown.tsx, enabling message deletion via vscode.postMessage.

  • UI Changes:
    • Add delete button next to copy button in Markdown.tsx for AI messages, visible on hover.
    • Consistent styling for both buttons with a 4px gap.
  • Functionality:
    • Delete button in Markdown.tsx triggers deleteMessage via vscode.postMessage.
    • ChatRow.tsx updated to pass messageTs to Markdown for message deletion.
  • Icons and Tooltips:
    • Delete button uses codicon-trash icon.
    • Tooltip "Delete message" added for clarity.
  • Testing:
    • All tests pass, including manual hover and delete functionality tests.

This description was created by Ellipsis for 61f7cec. You can customize this summary. It will automatically update as commits are pushed.

- Added delete button in Markdown component alongside copy button
- Buttons appear on hover with same styling as copy button
- Pass messageTs prop through ChatRow to enable deletion
- Follows existing UI pattern for user message deletion

Addresses #9035
@roomote roomote bot requested review from cte, jr and mrubens as code owners November 6, 2025 05:00
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. UI/UX UI/UX related or focused labels Nov 6, 2025
@roomote
Copy link
Author

roomote bot commented Nov 6, 2025

Rooviewer Clock   See task on Roo Cloud

Review complete. The implementation looks good - the delete button is properly integrated alongside the copy button with consistent styling and behavior. All changes follow existing patterns in the codebase.

Mention @roomote in a comment to trigger your PR Fixer agent and make changes to this pull request.

</VSCodeButton>
</StandardTooltip>
{(messageTs || onDeleteMessage) && (
<StandardTooltip content="Delete message">
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similarly, the tooltip text “Delete message” is hardcoded. Use the i18n translation function for this user-facing string to support localization.

This comment was generated because it violated a code review rule: irule_C0ez7Rji6ANcGkkX.

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Nov 6, 2025
@daniel-lxs daniel-lxs closed this Nov 6, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Nov 6, 2025
@github-project-automation github-project-automation bot moved this from Triage to Done in Roo Code Roadmap Nov 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. size:M This PR changes 30-99 lines, ignoring generated files. UI/UX UI/UX related or focused

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Support deleting AI messages and subsequent nodes

4 participants