diff options
author | Ty Dunn <ty@tydunn.com> | 2023-07-05 23:20:06 -0700 |
---|---|---|
committer | Ty Dunn <ty@tydunn.com> | 2023-07-05 23:20:06 -0700 |
commit | a5386d7897f5e3f3f7443246de3a443f5b2179d0 (patch) | |
tree | aa51a50475d06efc4d1f039dad8068363e08fee4 /extension/react-app/src/tabs/gui.tsx | |
parent | c0177d013e79593e6444069feec08bc2dff9c157 (diff) | |
parent | 22b02641b4b14ffad32914d046e645cf6f850253 (diff) | |
download | sncontinue-a5386d7897f5e3f3f7443246de3a443f5b2179d0.tar.gz sncontinue-a5386d7897f5e3f3f7443246de3a443f5b2179d0.tar.bz2 sncontinue-a5386d7897f5e3f3f7443246de3a443f5b2179d0.zip |
Merge branch 'main' of github.com:continuedev/continue
Diffstat (limited to 'extension/react-app/src/tabs/gui.tsx')
-rw-r--r-- | extension/react-app/src/tabs/gui.tsx | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/extension/react-app/src/tabs/gui.tsx b/extension/react-app/src/tabs/gui.tsx index bbf0b126..e5320c6a 100644 --- a/extension/react-app/src/tabs/gui.tsx +++ b/extension/react-app/src/tabs/gui.tsx @@ -71,6 +71,7 @@ function GUI(props: GUIProps) { const [waitingForSteps, setWaitingForSteps] = useState(false); const [userInputQueue, setUserInputQueue] = useState<string[]>([]); const [highlightedRanges, setHighlightedRanges] = useState([]); + const [addingHighlightedCode, setAddingHighlightedCode] = useState(false); const [availableSlashCommands, setAvailableSlashCommands] = useState< { name: string; description: string }[] >([]); @@ -157,6 +158,7 @@ function GUI(props: GUIProps) { setHistory(state.history); setHighlightedRanges(state.highlighted_ranges); setUserInputQueue(state.user_input_queue); + setAddingHighlightedCode(state.adding_highlighted_code); setAvailableSlashCommands( state.slash_commands.map((c: any) => { return { @@ -293,14 +295,16 @@ function GUI(props: GUIProps) { )} {history?.timeline.map((node: HistoryNode, index: number) => { return node.step.name === "User Input" ? ( - <UserInputContainer - onDelete={() => { - client?.deleteAtIndex(index); - }} - historyNode={node} - > - {node.step.description as string} - </UserInputContainer> + node.step.hide || ( + <UserInputContainer + onDelete={() => { + client?.deleteAtIndex(index); + }} + historyNode={node} + > + {node.step.description as string} + </UserInputContainer> + ) ) : ( <StepContainer isLast={index === history.timeline.length - 1} @@ -361,6 +365,10 @@ function GUI(props: GUIProps) { onTogglePin={() => { setPinned((prev: boolean) => !prev); }} + onToggleAddContext={() => { + client?.toggleAddingHighlightedCode(); + }} + addingHighlightedCode={addingHighlightedCode} /> <ContinueButton onClick={onMainTextInput} /> </TopGUIDiv> |