Elffuss BraidHub

kikocis/continue public

87544dc1817f · 1.7 KiBRawPermalink
1import { DISCORD_LINK, GITHUB_LINK } from "core/util/constants";
2import { useContext } from "react";
3import { SecondaryButton } from "../../components";
4import { DiscordIcon } from "../../components/svg/DiscordIcon";
5import { GithubIcon } from "../../components/svg/GithubIcon";
6import { IdeMessengerContext } from "../../context/IdeMessenger";
7
8export function ModelsAddOnLimitDialog() {
9 const ideMessenger = useContext(IdeMessengerContext);
10
11 return (
12 <div className={`flex flex-col gap-1 px-3 pb-2 pt-3`}>
13 <p className="m-0 p-0 text-lg">Models Add-On Limit Reached</p>
14
15 <div className="mt-2 flex flex-col gap-1.5">
16 <span>
17 You have reached the monthly limit for chat requests with the Models
18 Add-On. This limit exists to avoid abuse, but if this happened from
19 normal usage we encourage you to contact us on GitHub or Discord
20 </span>
21 <div className="flex flex-row flex-wrap items-center gap-2">
22 <SecondaryButton
23 className="flex flex-row items-center gap-2 hover:opacity-70"
24 onClick={() => {
25 ideMessenger.post("openUrl", GITHUB_LINK);
26 }}
27 >
28 <GithubIcon className="h-5 w-5" />
29 <span className="xs:flex hidden">Github</span>
30 </SecondaryButton>
31 <SecondaryButton
32 className="flex flex-row items-center gap-2 hover:opacity-70"
33 onClick={() => {
34 ideMessenger.post("openUrl", DISCORD_LINK);
35 }}
36 >
37 <DiscordIcon className="h-5 w-5" />
38 <span className="xs:flex hidden">Discord</span>
39 </SecondaryButton>
40 </div>
41 </div>
42 </div>
43 );
44}