From 8e15ec3c2c1490d4a7d6371f877368376fd64e8a Mon Sep 17 00:00:00 2001
From: Nate Sesti <sestinj@gmail.com>
Date: Thu, 6 Jul 2023 23:10:18 -0700
Subject: fix: :bug: fix command enter, stop streaming on reject

---
 extension/react-app/src/components/ComboBox.tsx | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

(limited to 'extension/react-app/src/components/ComboBox.tsx')

diff --git a/extension/react-app/src/components/ComboBox.tsx b/extension/react-app/src/components/ComboBox.tsx
index 4dab8bcd..e6632360 100644
--- a/extension/react-app/src/components/ComboBox.tsx
+++ b/extension/react-app/src/components/ComboBox.tsx
@@ -293,8 +293,7 @@ const ComboBox = React.forwardRef((props: ComboBoxProps, ref) => {
                 event.key === "Enter" &&
                 (!downshiftProps.isOpen || items.length === 0)
               ) {
-                downshiftProps.setInputValue("");
-                const value = event.currentTarget.value;
+                const value = downshiftProps.inputValue;
                 if (value !== "") {
                   setPositionInHistory(history.length + 1);
                   setHistory([...history, value]);
@@ -302,10 +301,6 @@ const ComboBox = React.forwardRef((props: ComboBoxProps, ref) => {
                 // Prevent Downshift's default 'Enter' behavior.
                 (event.nativeEvent as any).preventDownshiftDefault = true;
 
-                // cmd+enter to /edit
-                if (event.metaKey) {
-                  event.currentTarget.value = `/edit ${event.currentTarget.value}`;
-                }
                 if (props.onEnter) props.onEnter(event);
               } else if (event.key === "Tab" && items.length > 0) {
                 downshiftProps.setInputValue(items[0].name);
-- 
cgit v1.2.3-70-g09d2

