diff --git a/core/config/default.ts b/core/config/default.ts index a863f4c53..3fffb9499 100644 --- a/core/config/default.ts +++ b/core/config/default.ts @@ -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: {} }, ]; diff --git a/gui/src/components/Layout.tsx b/gui/src/components/Layout.tsx index efc53da7d..cab8767eb 100644 --- a/gui/src/components/Layout.tsx +++ b/gui/src/components/Layout.tsx @@ -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 = () => { )} */} {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" && ( )} diff --git a/gui/src/components/dialogs/FTCDialog.tsx b/gui/src/components/dialogs/FTCDialog.tsx index 8a25e6c7a..8990c3026 100644 --- a/gui/src/components/dialogs/FTCDialog.tsx +++ b/gui/src/components/dialogs/FTCDialog.tsx @@ -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() {

Free Trial Limit Reached

- 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{" "} = 100) { + if (u >= ftl()) { dispatch(setShowDialog(true)); dispatch(setDialogMessage()); posthog?.capture("ftc_reached");