diff options
author | Nate Sesti <sestinj@gmail.com> | 2023-07-03 19:34:33 -0700 |
---|---|---|
committer | Nate Sesti <sestinj@gmail.com> | 2023-07-03 19:34:33 -0700 |
commit | 813329600c2c7022b006ba566a869179db067089 (patch) | |
tree | 2c8bc43eb8e306851ff33780f03ec5adc32d2dae /extension/react-app/src | |
parent | b3c3a3fd2b93c4056bd4d329579fb41e6a83c4ca (diff) | |
download | sncontinue-813329600c2c7022b006ba566a869179db067089.tar.gz sncontinue-813329600c2c7022b006ba566a869179db067089.tar.bz2 sncontinue-813329600c2c7022b006ba566a869179db067089.zip |
fix python version on windows, other bugs, jest
Diffstat (limited to 'extension/react-app/src')
-rw-r--r-- | extension/react-app/src/components/ComboBox.tsx | 2 | ||||
-rw-r--r-- | extension/react-app/src/tabs/gui.tsx | 43 |
2 files changed, 25 insertions, 20 deletions
diff --git a/extension/react-app/src/components/ComboBox.tsx b/extension/react-app/src/components/ComboBox.tsx index f299c3a2..d9cd0d3d 100644 --- a/extension/react-app/src/components/ComboBox.tsx +++ b/extension/react-app/src/components/ComboBox.tsx @@ -269,7 +269,7 @@ const ComboBox = React.forwardRef((props: ComboBoxProps, ref) => { <span className="text-trueGray-400 ml-auto mr-4 text-xs"> Highlight code to include as context.{" "} - {highlightedCodeSections.length > 0 && + {highlightedCodeSections.length === 0 && "Otherwise using entire currently open file."} </span> </div> diff --git a/extension/react-app/src/tabs/gui.tsx b/extension/react-app/src/tabs/gui.tsx index e0b32a24..58aab984 100644 --- a/extension/react-app/src/tabs/gui.tsx +++ b/extension/react-app/src/tabs/gui.tsx @@ -215,30 +215,35 @@ function GUI(props: GUIProps) { mainTextInputRef.current.value = ""; if (!client) return; + setWaitingForSteps(true); + if ( - history?.timeline.length && - history.timeline[history.current_index].step.name === - "Waiting for user input" + history && + history.current_index >= 0 && + history.current_index < history.timeline.length ) { - if (input.trim() === "") return; - onStepUserInput(input, history!.current_index); - } else if ( - history?.timeline.length && - history.timeline[history.current_index].step.name === + if ( + history.timeline[history.current_index].step.name === + "Waiting for user input" + ) { + if (input.trim() === "") return; + onStepUserInput(input, history!.current_index); + return; + } else if ( + history.timeline[history.current_index].step.name === "Waiting for user confirmation" - ) { - onStepUserInput("ok", history!.current_index); - } else { - if (input.trim() === "") return; - - client.sendMainInput(input); - setUserInputQueue((queue) => { - return [...queue, input]; - }); + ) { + onStepUserInput("ok", history!.current_index); + return; + } } - } + if (input.trim() === "") return; - setWaitingForSteps(true); + client.sendMainInput(input); + setUserInputQueue((queue) => { + return [...queue, input]; + }); + } }; const onStepUserInput = (input: string, index: number) => { |