feat: right-click to copy message to user input

This commit is contained in:
Yidadaa 2023-06-24 22:32:46 +08:00
parent fb82806956
commit 50b1f7db12

View File

@ -605,6 +605,10 @@ export function Chat() {
const onRightClick = (e: any, message: ChatMessage) => {
// copy to clipboard
if (selectOrCopy(e.currentTarget, message.content)) {
if (userInput.length === 0) {
setUserInput(message.content);
}
e.preventDefault();
}
};