From e47982b63a003964ca10144e384ec124da666e18 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Tue, 12 Dec 2023 16:26:24 -0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix=20a=20few=20windows=20specif?= =?UTF-8?q?ic=20details?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gui/src/components/mainInput/ComboBox.tsx | 13 +++++-------- gui/src/components/modelSelection/ModelSelect.tsx | 4 ++-- gui/src/pages/gui.tsx | 10 +++++----- 3 files changed, 12 insertions(+), 15 deletions(-) diff --git a/gui/src/components/mainInput/ComboBox.tsx b/gui/src/components/mainInput/ComboBox.tsx index 36698142e..2c3b99c9c 100644 --- a/gui/src/components/mainInput/ComboBox.tsx +++ b/gui/src/components/mainInput/ComboBox.tsx @@ -185,16 +185,13 @@ const MainTextInput = styled.textarea<{ color: ${vscForeground}; z-index: 1; border: 0.5px solid - ${(props) => - props.inQueryForDynamicProvider ? buttonColor : "transparent"}; - - outline: 0.5px solid ${(props) => (props.inQueryForDynamicProvider ? buttonColor : lightGray)}; + outline: none; &:focus { - outline: 0.5px solid + border: 0.5px solid ${(props) => (props.inQueryForDynamicProvider ? buttonColor : lightGray)}; - border: 0.5px solid transparent; + outline: none; background-color: ${(props) => props.inQueryForDynamicProvider ? `${buttonColor}22` : secondaryDark}; } @@ -1435,9 +1432,9 @@ const ComboBox = React.forwardRef((props: ComboBoxProps, ref) => { }} className={"hover:underline cursor-pointer float-right"} > - {downshiftProps.inputValue?.startsWith("/codebase") + {/* {downshiftProps.inputValue?.startsWith("/codebase") ? "Using Codebase" - : `${getMetaKeyLabel()} ⏎ Use Codebase`} + : `${getMetaKeyLabel()} ⏎ Use Codebase`} */} { const handleKeyDown = (event: KeyboardEvent) => { - if (event.key === "'" && event.metaKey) { + if (event.key === "'" && isMetaEquivalentKeyPressed(event)) { const direction = event.shiftKey ? -1 : 1; const currentIndex = options.findIndex( (option) => option.value === defaultModel?.title diff --git a/gui/src/pages/gui.tsx b/gui/src/pages/gui.tsx index f87ae18de..366f953cb 100644 --- a/gui/src/pages/gui.tsx +++ b/gui/src/pages/gui.tsx @@ -43,7 +43,7 @@ import { setShowDialog, } from "../redux/slices/uiStateSlice"; import { RootStore } from "../redux/store"; -import { isMetaEquivalentKeyPressed } from "../util"; +import { getMetaKeyLabel, isMetaEquivalentKeyPressed } from "../util"; const TopGuiDiv = styled.div` overflow-y: scroll; @@ -374,9 +374,9 @@ function GUI(props: GUIProps) { } // cmd+enter to /codebase - if (event && isMetaEquivalentKeyPressed(event)) { - input = `/codebase ${input}`; - } + // if (event && isMetaEquivalentKeyPressed(event)) { + // input = `/codebase ${input}`; + // } (mainTextInputRef.current as any).setInputValue(""); sendInput(input); @@ -512,7 +512,7 @@ function GUI(props: GUIProps) { dispatch(setInactive()); }} > - ⌘ ⌫ Cancel + {getMetaKeyLabel()} ⌫ Cancel ) : (