diff options
Diffstat (limited to 'extension/react-app/src/components/ComboBox.tsx')
-rw-r--r-- | extension/react-app/src/components/ComboBox.tsx | 5 |
1 files changed, 5 insertions, 0 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); |