Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Included button to copy chat history item (#789)
### Motivation and Context 1. Why is this change required? UX 2. What problem does it solve? Improve user experience when need copy chat history item ### Description If the current message is from a bot and if the message has a prompt, it renders a Tooltip component with a Button inside it. The Tooltip component is used to display a small pop-up box when the user hovers over an element. The content of the Tooltip changes based on the state of messagedCopied. If messagedCopied is true, the Tooltip displays 'Copied', otherwise, it displays 'Copy text'. Inside the Tooltip, there is a Button component. The icon of the Button changes based on the messagedCopied state. If messagedCopied is true, it shows a ClipboardTask20Regular icon, otherwise, it shows a Clipboard20Regular icon. The Button has an onClick event handler that triggers the copyOnClick function when the button is clicked. ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [ x ] The code builds clean without any errors or warnings - [ x ] The PR follows the [Contribution Guidelines](https://github.com/microsoft/chat-copilot/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/chat-copilot/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [ x ] All unit tests pass, and I have added new tests where possible - [ x ] I didn't break anyone 😄 ![copy_button](https://github.com/microsoft/chat-copilot/assets/6529846/98f64934-1a64-475e-9727-daf397c97004) Co-authored-by: Marcelo Jose <[email protected]>
- Loading branch information