diff options
Diffstat (limited to 'extension/react-app/src/components')
-rw-r--r-- | extension/react-app/src/components/ComboBox.tsx | 5 | ||||
-rw-r--r-- | extension/react-app/src/components/ModelSelect.tsx | 10 | ||||
-rw-r--r-- | extension/react-app/src/components/RingLoader.tsx | 2 |
3 files changed, 16 insertions, 1 deletions
diff --git a/extension/react-app/src/components/ComboBox.tsx b/extension/react-app/src/components/ComboBox.tsx index 43b66476..12cd91a2 100644 --- a/extension/react-app/src/components/ComboBox.tsx +++ b/extension/react-app/src/components/ComboBox.tsx @@ -40,6 +40,7 @@ import { } from "../util"; import { ContextItem } from "../../../schema/FullState"; import StyledMarkdownPreview from "./StyledMarkdownPreview"; +import { setTakenActionTrue } from "../redux/slices/miscSlice"; const SEARCH_INDEX_NAME = "continue_context_items"; @@ -343,6 +344,7 @@ const ComboBox = React.forwardRef((props: ComboBoxProps, ref) => { useEffect(() => { if (!nestedContextProvider) { + dispatch(setTakenActionTrue(null)); setItems( contextProviders?.map((provider) => ({ name: provider.display_title, @@ -435,6 +437,7 @@ const ComboBox = React.forwardRef((props: ComboBoxProps, ref) => { setNestedContextProvider(undefined); // Handle slash commands + dispatch(setTakenActionTrue(null)); setItems( availableSlashCommands?.filter((slashCommand) => slashCommand.name.toLowerCase().startsWith(inputValue.toLowerCase()) @@ -594,12 +597,14 @@ const ComboBox = React.forwardRef((props: ComboBoxProps, ref) => { const handler = (event: any) => { if (event.data.type === "focusContinueInput") { inputRef.current!.focus(); + dispatch(setTakenActionTrue(null)); } else if (event.data.type === "focusContinueInputWithEdit") { inputRef.current!.focus(); if (!inputRef.current?.value.startsWith("/edit")) { downshiftProps.setInputValue("/edit "); } + dispatch(setTakenActionTrue(null)); } }; window.addEventListener("message", handler); diff --git a/extension/react-app/src/components/ModelSelect.tsx b/extension/react-app/src/components/ModelSelect.tsx index 6856a2cf..b08141f9 100644 --- a/extension/react-app/src/components/ModelSelect.tsx +++ b/extension/react-app/src/components/ModelSelect.tsx @@ -189,6 +189,16 @@ function ModelSelect(props: {}) { } }} > + {!defaultModel && !savedModels && ( + <option + value={JSON.stringify({ + t: "default", + idx: -1, + })} + > + OpenAIFreeTrial - gpt-4 + </option> + )} {defaultModel && ( <option value={JSON.stringify({ diff --git a/extension/react-app/src/components/RingLoader.tsx b/extension/react-app/src/components/RingLoader.tsx index 5eb8a60f..4d0a28fb 100644 --- a/extension/react-app/src/components/RingLoader.tsx +++ b/extension/react-app/src/components/RingLoader.tsx @@ -29,7 +29,7 @@ const LoaderSvg = styled.svg` `; const RingLoader = () => ( - <div className="m-auto w-full text-center"> + <div className="m-auto w-full text-center mt-2"> <LoaderSvg viewBox="0 0 32 32"> <circle cx="16" cy="16" r="14" /> </LoaderSvg> |