diff options
author | Nate Sesti <sestinj@gmail.com> | 2023-06-25 08:22:37 -0700 |
---|---|---|
committer | Nate Sesti <sestinj@gmail.com> | 2023-06-25 08:22:37 -0700 |
commit | 3f1123095d2ee652b1db239d325aa74f5acfb0cf (patch) | |
tree | e4ec3d1e1a9217ff499ad5a180ff7eb87ad6dde6 /extension/react-app/src | |
parent | a63a8aa2b228e9165359bae7f5a8e19227e9e824 (diff) | |
download | sncontinue-3f1123095d2ee652b1db239d325aa74f5acfb0cf.tar.gz sncontinue-3f1123095d2ee652b1db239d325aa74f5acfb0cf.tar.bz2 sncontinue-3f1123095d2ee652b1db239d325aa74f5acfb0cf.zip |
Diff kb shortcut, fix bug
Diffstat (limited to 'extension/react-app/src')
-rw-r--r-- | extension/react-app/src/tabs/gui.tsx | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/extension/react-app/src/tabs/gui.tsx b/extension/react-app/src/tabs/gui.tsx index f47371ee..a457382d 100644 --- a/extension/react-app/src/tabs/gui.tsx +++ b/extension/react-app/src/tabs/gui.tsx @@ -215,7 +215,7 @@ function GUI(props: GUIProps) { useEffect(() => { const listener = (e: any) => { // Cmd + J to toggle fast model - if (e.key === "j" && e.metaKey) { + if (e.key === "i" && e.metaKey && e.shiftKey) { setUsingFastModel((prev) => !prev); } }; @@ -237,15 +237,17 @@ function GUI(props: GUIProps) { setWaitingForSteps(state.active); setHistory(state.history); setUserInputQueue(state.user_input_queue); - const nextStepsOpen = [...stepsOpen]; - for ( - let i = nextStepsOpen.length; - i < state.history.timeline.length; - i++ - ) { - nextStepsOpen.push(true); - } - setStepsOpen(nextStepsOpen); + setStepsOpen((prev) => { + const nextStepsOpen = [...prev]; + for ( + let i = nextStepsOpen.length; + i < state.history.timeline.length; + i++ + ) { + nextStepsOpen.push(true); + } + return nextStepsOpen; + }); if (shouldScrollToBottom) { scrollToBottom(); |