Explorar el Código

feat: right-click to copy message to user input

Yidadaa hace 1 año
padre
commit
50b1f7db12
Se han modificado 1 ficheros con 4 adiciones y 0 borrados
  1. 4 0
      app/components/chat.tsx

+ 4 - 0
app/components/chat.tsx

@@ -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();
     }
   };