diff options
Diffstat (limited to 'extension/react-app')
-rw-r--r-- | extension/react-app/src/components/ComboBox.tsx | 7 | ||||
-rw-r--r-- | extension/react-app/src/pages/gui.tsx | 2 |
2 files changed, 7 insertions, 2 deletions
diff --git a/extension/react-app/src/components/ComboBox.tsx b/extension/react-app/src/components/ComboBox.tsx index 31cb4371..7314ed91 100644 --- a/extension/react-app/src/components/ComboBox.tsx +++ b/extension/react-app/src/components/ComboBox.tsx @@ -357,6 +357,8 @@ const ComboBox = React.forwardRef((props: ComboBoxProps, ref) => { dispatch(setShowDialog(true)); }; + const [isComposing, setIsComposing] = useState(false); + return ( <> <div @@ -448,6 +450,8 @@ const ComboBox = React.forwardRef((props: ComboBoxProps, ref) => { disabled={props.disabled} placeholder={`Ask a question, give instructions, type '/' for slash commands, or '@' to add context`} {...getInputProps({ + onCompositionStart: () => setIsComposing(true), + onCompositionEnd: () => setIsComposing(false), onChange: (e) => { const target = e.target as HTMLTextAreaElement; // Update the height of the textarea to match the content, up to a max of 200px. @@ -472,7 +476,8 @@ const ComboBox = React.forwardRef((props: ComboBoxProps, ref) => { setCurrentlyInContextQuery(false); } else if ( event.key === "Enter" && - (!downshiftProps.isOpen || items.length === 0) + (!downshiftProps.isOpen || items.length === 0) && + !isComposing ) { const value = downshiftProps.inputValue; if (value !== "") { diff --git a/extension/react-app/src/pages/gui.tsx b/extension/react-app/src/pages/gui.tsx index 848fcddc..ac7c5070 100644 --- a/extension/react-app/src/pages/gui.tsx +++ b/extension/react-app/src/pages/gui.tsx @@ -247,7 +247,7 @@ function GUI(props: GUIProps) { "mainTextEntryCounter", (currentCount + 1).toString() ); - if (currentCount === 40) { + if (currentCount === 100) { dispatch( setDialogMessage( <div className="text-center"> |