From 300e1417369017015546fa543caf1dc077c79683 Mon Sep 17 00:00:00 2001 From: Timothy Carambat Date: Sat, 28 Sep 2024 15:29:31 -0700 Subject: [PATCH] Patch bug with pasted text not being detected (#2386) --- .../WorkspaceChat/ChatContainer/PromptInput/index.jsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/index.jsx b/frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/index.jsx index ac42aa351..cc5ae1491 100644 --- a/frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/index.jsx +++ b/frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/index.jsx @@ -121,7 +121,11 @@ export default function PromptInput({ } const pasteText = e.clipboardData.getData("text/plain"); - if (pasteText) setPromptInput((prev) => prev + pasteText.trim()); + if (pasteText) { + const newPromptInput = promptInput + pasteText.trim(); + setPromptInput(newPromptInput); + onChange({ target: { value: newPromptInput } }); + } return; };