summaryrefslogtreecommitdiff
path: root/extension/react-app/src/tabs/gui.tsx
diff options
context:
space:
mode:
authorTy Dunn <ty@tydunn.com>2023-06-22 13:04:46 -0700
committerGitHub <noreply@github.com>2023-06-22 13:04:46 -0700
commite203dd81262d231aed2b73f269c7863dde010d3c (patch)
treebd777a30350df8abef38018951091a24e8588b7c /extension/react-app/src/tabs/gui.tsx
parent4c7702f10e2be7e6687d975604c9ac84ad98f15f (diff)
parent71f8e361117ea5b4d88cc5c94e2e54a8ac5f2bf8 (diff)
downloadsncontinue-e203dd81262d231aed2b73f269c7863dde010d3c.tar.gz
sncontinue-e203dd81262d231aed2b73f269c7863dde010d3c.tar.bz2
sncontinue-e203dd81262d231aed2b73f269c7863dde010d3c.zip
Merge pull request #141 from continuedev/model-button
adding button to toggle between 3.5 and 4
Diffstat (limited to 'extension/react-app/src/tabs/gui.tsx')
-rw-r--r--extension/react-app/src/tabs/gui.tsx6
1 files changed, 4 insertions, 2 deletions
diff --git a/extension/react-app/src/tabs/gui.tsx b/extension/react-app/src/tabs/gui.tsx
index f0e3ffd4..16c950ef 100644
--- a/extension/react-app/src/tabs/gui.tsx
+++ b/extension/react-app/src/tabs/gui.tsx
@@ -230,6 +230,7 @@ function GUI(props: GUIProps) {
console.log("CLIENT ON STATE UPDATE: ", client, client?.onStateUpdate);
client?.onStateUpdate((state) => {
// Scroll only if user is at very bottom of the window.
+ setUsingFastModel(state.default_model === "gpt-3.5-turbo");
const shouldScrollToBottom =
topGuiDivRef.current &&
topGuiDivRef.current?.offsetHeight - window.scrollY < 100;
@@ -470,9 +471,10 @@ function GUI(props: GUIProps) {
Contribute Data
</span>
</div>
- {/* <HeaderButtonWithText
+ <HeaderButtonWithText
onClick={() => {
setUsingFastModel((prev) => !prev);
+ client?.changeDefaultModel();
}}
text={usingFastModel ? "gpt-3.5-turbo" : "gpt-4"}
>
@@ -481,7 +483,7 @@ function GUI(props: GUIProps) {
>
{usingFastModel ? "⚡" : "🧠"}
</div>
- </HeaderButtonWithText> */}
+ </HeaderButtonWithText>
<HeaderButtonWithText
onClick={() => {
client?.sendClear();