diff --git a/package.json b/package.json index 1f77712..a21fede 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "pageassist", "displayName": "Page Assist - A Web UI for Local AI Models", - "version": "1.0.6", + "version": "1.0.7", "description": "Use your locally running AI models to assist you in your web browsing.", "author": "n4ze3m", "scripts": { diff --git a/src/components/Sidepanel/Chat/form.tsx b/src/components/Sidepanel/Chat/form.tsx index 8a2fe13..f567d9e 100644 --- a/src/components/Sidepanel/Chat/form.tsx +++ b/src/components/Sidepanel/Chat/form.tsx @@ -18,6 +18,7 @@ export const SidepanelForm = ({ dropedFile }: Props) => { const textareaRef = React.useRef(null) const inputRef = React.useRef(null) const { sendWhenEnter, setSendWhenEnter } = useWebUI() + const [typing, setTyping] = React.useState(false) const textAreaFocus = () => { if (textareaRef.current) { @@ -72,14 +73,14 @@ export const SidepanelForm = ({ dropedFile }: Props) => { } }) - const handleKeyDown = (e: KeyboardEvent) => { + const handleKeyDown = (e: React.KeyboardEvent) => { if (e.key === "Process" || e.key === "229") return if ( e.key === "Enter" && !e.shiftKey && !isSending && sendWhenEnter && - !e.isComposing + !typing ) { e.preventDefault() form.onSubmit(async (value) => { @@ -171,7 +172,7 @@ export const SidepanelForm = ({ dropedFile }: Props) => { />