forked from XiaoMo/ChatGPT-Next-Web
feat: right-click to copy message to user input
This commit is contained in:
parent
fb82806956
commit
50b1f7db12
@ -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();
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user