From c310c71576a1b08d1311ce543d1b086afe38a4c1 Mon Sep 17 00:00:00 2001 From: kangfenmao Date: Sat, 12 Oct 2024 23:22:32 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=95=BF=E6=96=87=E6=9C=AC=E8=BE=93?= =?UTF-8?q?=E5=85=A5=E6=97=B6=E7=94=9F=E6=88=90=E6=96=87=E4=BB=B6=E5=90=8E?= =?UTF-8?q?=E6=96=87=E6=9C=AC=E4=BE=9D=E6=97=A7=E4=BF=9D=E7=95=99=20#179?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/src/pages/home/Inputbar/Inputbar.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/renderer/src/pages/home/Inputbar/Inputbar.tsx b/src/renderer/src/pages/home/Inputbar/Inputbar.tsx index e15d3024..00c47de1 100644 --- a/src/renderer/src/pages/home/Inputbar/Inputbar.tsx +++ b/src/renderer/src/pages/home/Inputbar/Inputbar.tsx @@ -207,14 +207,14 @@ const Inputbar: FC = ({ assistant, setActiveTopic }) => { await window.api.file.write(tempFilePath, pasteText) const selectedFile = await window.api.file.get(tempFilePath) selectedFile && setFiles((prevFiles) => [...prevFiles, selectedFile]) - setText((prevText) => prevText.replace(pasteText, '')) + setText(text) setTimeout(() => resizeTextArea(), 0) } }) } } }, - [pasteLongTextAsFile, supportExts] + [pasteLongTextAsFile, supportExts, text] ) // Command or Ctrl + N create new topic