diff --git a/src/renderer/src/windows/mini/home/HomeWindow.tsx b/src/renderer/src/windows/mini/home/HomeWindow.tsx index 870c75a7..fec0c6e4 100644 --- a/src/renderer/src/windows/mini/home/HomeWindow.tsx +++ b/src/renderer/src/windows/mini/home/HomeWindow.tsx @@ -59,7 +59,7 @@ const HomeWindow: FC = () => { if (e.key === 'Enter') { e.preventDefault() - if (text.trim() === '') { + if (textRef.current.trim() === '') { return } setRoute('chat') diff --git a/src/renderer/src/windows/mini/home/components/InputBar.tsx b/src/renderer/src/windows/mini/home/components/InputBar.tsx index 689ce560..012aeebc 100644 --- a/src/renderer/src/windows/mini/home/components/InputBar.tsx +++ b/src/renderer/src/windows/mini/home/components/InputBar.tsx @@ -24,7 +24,7 @@ const InputBar: FC = ({ text, model, placeholder, handleKeyDown, bordered={false} autoFocus onKeyDown={handleKeyDown} - onChange={(e) => setText(e.target.value.trim())} + onChange={(e) => setText(e.target.value)} disabled={generating} />