summaryrefslogtreecommitdiff
path: root/extension/react-app/src/tabs
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
commit4a77e7251c36dfcce15d68471dd8865c698ad679 (patch)
tree42f4d8a08d99744ed29571084240d47b122dc935 /extension/react-app/src/tabs
parenta09e8564d658a603a67e8431620aaf9b14f71046 (diff)
parentaf67d7d8309c88f7dced869a31359de66e9341c3 (diff)
downloadsncontinue-4a77e7251c36dfcce15d68471dd8865c698ad679.tar.gz
sncontinue-4a77e7251c36dfcce15d68471dd8865c698ad679.tar.bz2
sncontinue-4a77e7251c36dfcce15d68471dd8865c698ad679.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')
-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();