From f5f10efee3402e117c34b6f0de4bf2fd7d2819c1 Mon Sep 17 00:00:00 2001
From: Nate Sesti <sestinj@gmail.com>
Date: Tue, 26 Sep 2023 10:16:19 -0700
Subject: fix: :bug: ftc fix

---
 extension/react-app/src/pages/gui.tsx | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'extension/react-app/src/pages/gui.tsx')

diff --git a/extension/react-app/src/pages/gui.tsx b/extension/react-app/src/pages/gui.tsx
index dfcefdee..96526d6d 100644
--- a/extension/react-app/src/pages/gui.tsx
+++ b/extension/react-app/src/pages/gui.tsx
@@ -129,8 +129,7 @@ function GUI(props: GUIProps) {
   // #region Selectors
   const history = useSelector((state: RootStore) => state.serverState.history);
   const defaultModel = useSelector(
-    (state: RootStore) =>
-      (state.serverState.config as any).models?.default?.class_name
+    (state: RootStore) => (state.serverState.config as any).models?.default
   );
   const user_input_queue = useSelector(
     (state: RootStore) => state.serverState.user_input_queue
@@ -289,7 +288,8 @@ function GUI(props: GUIProps) {
       }
 
       if (
-        defaultModel === "OpenAIFreeTrial" &&
+        defaultModel.class_name === "OpenAIFreeTrial" &&
+        defaultModel.api_key === "" &&
         (!input.startsWith("/") || input.startsWith("/edit"))
       ) {
         const ftc = localStorage.getItem("ftc");
-- 
cgit v1.2.3-70-g09d2

