From cd1ffb0611248dd5b9a5b71b8b6169a7dc311598 Mon Sep 17 00:00:00 2001 From: Test Date: Thu, 12 Sep 2024 14:37:39 -0700 Subject: [PATCH] remove unused dialogs --- gui/src/components/dialogs/FTCDialog.tsx | 72 ---------------- .../components/dialogs/SetupLocalOrKey.tsx | 84 ------------------- 2 files changed, 156 deletions(-) delete mode 100644 gui/src/components/dialogs/FTCDialog.tsx delete mode 100644 gui/src/components/dialogs/SetupLocalOrKey.tsx diff --git a/gui/src/components/dialogs/FTCDialog.tsx b/gui/src/components/dialogs/FTCDialog.tsx deleted file mode 100644 index 951ea47ef..000000000 --- a/gui/src/components/dialogs/FTCDialog.tsx +++ /dev/null @@ -1,72 +0,0 @@ -import React, { useContext } from "react"; -import { useDispatch } from "react-redux"; -import { useNavigate } from "react-router-dom"; -import styled from "styled-components"; -import { Button, Input } from ".."; -import { IdeMessengerContext } from "../../context/IdeMessenger"; -import { setDefaultModel } from "../../redux/slices/stateSlice"; -import { setShowDialog } from "../../redux/slices/uiStateSlice"; -import { FREE_TRIAL_LIMIT_REQUESTS } from "../../util/freeTrial"; - -const GridDiv = styled.div` - display: grid; - grid-template-columns: 1fr 1fr; - grid-gap: 8px; - align-items: center; -`; - -export const ftl = () => { - // const ftc = parseInt(localStorage.getItem("ftc")); - return 50; -}; - -function FTCDialog() { - const navigate = useNavigate(); - const [apiKey, setApiKey] = React.useState(""); - const dispatch = useDispatch(); - const ideMessenger = useContext(IdeMessengerContext); - - return ( -
-

Free Trial Limit Reached

-

- You've reached the free trial limit of {FREE_TRIAL_LIMIT_REQUESTS} free - inputs. To keep using Continue, you can either use your own API key, or - use a local LLM. To read more about the options, see our{" "} - - documentation - - . -

- - setApiKey(e.target.value)} - /> - - - - -
- ); -} - -export default FTCDialog; diff --git a/gui/src/components/dialogs/SetupLocalOrKey.tsx b/gui/src/components/dialogs/SetupLocalOrKey.tsx deleted file mode 100644 index d205fa992..000000000 --- a/gui/src/components/dialogs/SetupLocalOrKey.tsx +++ /dev/null @@ -1,84 +0,0 @@ -import React, { useContext } from "react"; -import { useDispatch } from "react-redux"; -import { useNavigate } from "react-router-dom"; -import styled from "styled-components"; -import { Button, Input } from ".."; -import { IdeMessengerContext } from "../../context/IdeMessenger"; -import { setDefaultModel } from "../../redux/slices/stateSlice"; -import { setShowDialog } from "../../redux/slices/uiStateSlice"; -import { useOnboardingCard } from "../OnboardingCard"; - -const GridDiv = styled.div` - display: grid; - grid-template-columns: 1fr 1fr; - grid-gap: 8px; - align-items: center; -`; - -function SetupLocalOrKeyDialog() { - const navigate = useNavigate(); - const [apiKey, setApiKey] = React.useState(""); - const dispatch = useDispatch(); - const onboardingCard = useOnboardingCard(); - - const ideMessenger = useContext(IdeMessengerContext); - - function onClickLocal() { - dispatch(setShowDialog(false)); - onboardingCard.open("Local"); - } - - return ( -
-

Set up your own model

-

- To keep using Continue after your free inputs, you can either use your - own API key, or use a local LLM. To read more about the options, see our{" "} - - ideMessenger.request( - "openUrl", - "https://docs.continue.dev/reference/Model%20Providers/freetrial", - ) - } - > - documentation - - . -

- - setApiKey(e.target.value)} - /> - -
— OR —
- - - - -
- ); -} - -export default SetupLocalOrKeyDialog;