summaryrefslogtreecommitdiff
path: root/extension/react-app/src/components/dialogs/FTCDialog.tsx
diff options
context:
space:
mode:
authorTuowen Zhao <ztuowen@gmail.com>2023-10-18 23:27:15 -0700
committerTuowen Zhao <ztuowen@gmail.com>2023-10-18 23:30:20 -0700
commit08f38574fa2633bbf709d24e1c79417d4285ba61 (patch)
tree6a60ee3f013295b56d6d2c1c67f46761054023b1 /extension/react-app/src/components/dialogs/FTCDialog.tsx
parent9168219b829aab55fefcb114937d3fc196548cde (diff)
downloadsncontinue-08f38574fa2633bbf709d24e1c79417d4285ba61.tar.gz
sncontinue-08f38574fa2633bbf709d24e1c79417d4285ba61.tar.bz2
sncontinue-08f38574fa2633bbf709d24e1c79417d4285ba61.zip
cleanup ui
Diffstat (limited to 'extension/react-app/src/components/dialogs/FTCDialog.tsx')
-rw-r--r--extension/react-app/src/components/dialogs/FTCDialog.tsx73
1 files changed, 0 insertions, 73 deletions
diff --git a/extension/react-app/src/components/dialogs/FTCDialog.tsx b/extension/react-app/src/components/dialogs/FTCDialog.tsx
deleted file mode 100644
index 5fa2d4e6..00000000
--- a/extension/react-app/src/components/dialogs/FTCDialog.tsx
+++ /dev/null
@@ -1,73 +0,0 @@
-import React, { useContext } from "react";
-import styled from "styled-components";
-import { Button, Input } from "..";
-import { useNavigate } from "react-router-dom";
-import { GUIClientContext } from "../../App";
-import { useDispatch } from "react-redux";
-import { setShowDialog } from "../../redux/slices/uiStateSlice";
-
-const GridDiv = styled.div`
- display: grid;
- grid-template-columns: 1fr 1fr;
- grid-gap: 8px;
- align-items: center;
-`;
-
-function FTCDialog() {
- const navigate = useNavigate();
- const [apiKey, setApiKey] = React.useState("");
- const client = useContext(GUIClientContext);
- const dispatch = useDispatch();
-
- return (
- <div className="p-4">
- <h3>Free Trial Limit Reached</h3>
- <p>
- You've reached the free trial limit of 250 free inputs with Continue's
- OpenAI API key. 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{" "}
- <a
- href="https://continue.dev/docs/customization/models"
- target="_blank"
- >
- documentation
- </a>
- . If you're just looking for fastest way to keep going, type '/config'
- to open your Continue config file and paste your API key into the
- OpenAIFreeTrial object.
- </p>
-
- <Input
- type="text"
- placeholder="Enter your OpenAI API key"
- value={apiKey}
- onChange={(e) => setApiKey(e.target.value)}
- />
- <GridDiv>
- <Button
- onClick={() => {
- dispatch(setShowDialog(false));
- navigate("/models");
- }}
- >
- Select model
- </Button>
- <Button
- disabled={!apiKey}
- onClick={() => {
- client?.addModelForRole("*", "OpenAI", {
- model: "gpt-4",
- api_key: apiKey,
- title: "GPT-4",
- });
- dispatch(setShowDialog(false));
- }}
- >
- Use my API key
- </Button>
- </GridDiv>
- </div>
- );
-}
-
-export default FTCDialog;