Skip to content

Conversation

zhogu
Copy link

@zhogu zhogu commented Sep 10, 2025

This pull request enhances the chat message display in the ChatHistory.tsx component by improving the rendering of message content and adding a user-friendly copy-to-clipboard feature. The changes focus on better Markdown support, improved styling, and new interactivity for copying messages.

UI/UX Improvements:

  • Added a copy-to-clipboard button that appears when hovering over a chat message, allowing users to easily copy the message content (including reasoning if present) to their clipboard.
  • Improved message and reasoning rendering by replacing plain text with the CustomMarkdown component, enabling better Markdown formatting and display.
  • Enhanced layout and styling for message containers, including better handling of overflow and maximum width for improved readability. [1] [2]

Code and Dependency Updates:

  • Replaced the SigmaIcon import with ClipboardCopy from lucide-react to support the new copy feature, and removed unused icon imports.
  • Introduced hover state management to control the visibility of the copy button.

@zhogu zhogu requested review from hippogr and Copilot September 10, 2025 07:39
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR enhances the chat message display by adding markdown rendering support and a copy-to-clipboard feature. The changes improve the user experience by making messages more readable with proper markdown formatting and providing an easy way to copy message content.

  • Added hover-triggered copy-to-clipboard functionality for chat messages
  • Replaced plain text rendering with CustomMarkdown component for better formatting
  • Improved styling and layout with better overflow handling

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@zhogu zhogu merged commit 1af64a8 into dev Sep 10, 2025
1 check passed
This was referenced Sep 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants