🐛 fix a few windows specific details

This commit is contained in:
Nate Sesti 2023-12-12 16:26:24 -08:00
parent e78641bc3f
commit e47982b63a
3 changed files with 12 additions and 15 deletions

View file

@ -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`} */}
</span>
<EnterButton

View file

@ -20,7 +20,7 @@ import {
import { defaultModelSelector } from "../../redux/selectors/modelSelectors";
import { setDefaultModel } from "../../redux/slices/stateSlice";
import { RootStore } from "../../redux/store";
import { getMetaKeyLabel } from "../../util";
import { getMetaKeyLabel, isMetaEquivalentKeyPressed } from "../../util";
import { deleteModel } from "../../util/ide";
import HeaderButtonWithText from "../HeaderButtonWithText";
@ -220,7 +220,7 @@ function ModelSelect(props: {}) {
useEffect(() => {
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

View file

@ -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
</StopButton>
) : (
<ComboBox