🎨 update defaults
This commit is contained in:
parent
f1fcb9115b
commit
87bcecc652
4 changed files with 19 additions and 11 deletions
|
|
@ -115,7 +115,6 @@ export const defaultContextProvidersVsCode: ContextProviderWithParams[] = [
|
|||
{ name: "code", params: {} },
|
||||
{ name: "docs", params: {} },
|
||||
{ name: "diff", params: {} },
|
||||
{ name: "open", params: {} },
|
||||
{ name: "terminal", params: {} },
|
||||
{ name: "problems", params: {} },
|
||||
{ name: "folder", params: {} },
|
||||
|
|
@ -123,5 +122,7 @@ export const defaultContextProvidersVsCode: ContextProviderWithParams[] = [
|
|||
];
|
||||
|
||||
export const defaultContextProvidersJetBrains: ContextProviderWithParams[] = [
|
||||
{ name: "open", params: {} },
|
||||
{ name: "diff", params: {} },
|
||||
{ name: "folder", params: {} },
|
||||
{ name: "codebase", params: {} },
|
||||
];
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ import { isJetBrains, postToIde } from "../util/ide";
|
|||
import { getLocalStorage } from "../util/localStorage";
|
||||
import HeaderButtonWithText from "./HeaderButtonWithText";
|
||||
import TextDialog from "./dialogs";
|
||||
import { ftl } from "./dialogs/FTCDialog";
|
||||
import IndexingProgressBar from "./loaders/IndexingProgressBar";
|
||||
import ProgressBar from "./loaders/ProgressBar";
|
||||
import ModelSelect from "./modelSelection/ModelSelect";
|
||||
|
|
@ -267,12 +268,10 @@ const Layout = () => {
|
|||
)} */}
|
||||
<ModelSelect />
|
||||
{indexingState.status !== "indexing" && // Would take up too much space together with indexing progress
|
||||
defaultModel?.provider === "free-trial" &&
|
||||
(location.pathname === "/settings" ||
|
||||
parseInt(localStorage.getItem("ftc") || "0") >= 10) && (
|
||||
defaultModel?.provider === "free-trial" && (
|
||||
<ProgressBar
|
||||
completed={parseInt(localStorage.getItem("ftc") || "0")}
|
||||
total={100}
|
||||
total={ftl()}
|
||||
/>
|
||||
)}
|
||||
|
||||
|
|
|
|||
|
|
@ -14,6 +14,14 @@ const GridDiv = styled.div`
|
|||
align-items: center;
|
||||
`;
|
||||
|
||||
export const ftl = () => {
|
||||
const ftc = parseInt(localStorage.getItem("ftc"));
|
||||
if (ftc && ftc > 52) {
|
||||
return 100;
|
||||
}
|
||||
return 50;
|
||||
};
|
||||
|
||||
function FTCDialog() {
|
||||
const navigate = useNavigate();
|
||||
const [apiKey, setApiKey] = React.useState("");
|
||||
|
|
@ -23,9 +31,9 @@ function FTCDialog() {
|
|||
<div className="p-4">
|
||||
<h3>Free Trial Limit Reached</h3>
|
||||
<p>
|
||||
You've reached the free trial limit of 100 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{" "}
|
||||
You've reached the free trial limit of {ftl()} 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{" "}
|
||||
<a
|
||||
href="https://docs.continue.dev/customization/models"
|
||||
target="_blank"
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ import {
|
|||
vscBackground,
|
||||
vscForeground,
|
||||
} from "../components";
|
||||
import FTCDialog from "../components/dialogs/FTCDialog";
|
||||
import FTCDialog, { ftl } from "../components/dialogs/FTCDialog";
|
||||
import StepContainer from "../components/gui/StepContainer";
|
||||
import TimelineItem from "../components/gui/TimelineItem";
|
||||
import ContinueInputBox from "../components/mainInput/ContinueInputBox";
|
||||
|
|
@ -244,7 +244,7 @@ function GUI(props: GUIProps) {
|
|||
const u = parseInt(ftc);
|
||||
localStorage.setItem("ftc", (u + 1).toString());
|
||||
|
||||
if (u >= 100) {
|
||||
if (u >= ftl()) {
|
||||
dispatch(setShowDialog(true));
|
||||
dispatch(setDialogMessage(<FTCDialog />));
|
||||
posthog?.capture("ftc_reached");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue