Elffuss BraidHub

kikocis/continue public

9d8db5fc402e · 2.5 KiBRawPermalink
1import {
2 ArrowTopRightOnSquareIcon,
3 DocumentArrowUpIcon,
4 TableCellsIcon,
5} from "@heroicons/react/24/outline";
6import { useContext } from "react";
7import { useNavigate } from "react-router-dom";
8import { IdeMessengerContext } from "../../context/IdeMessenger";
9import { useAppDispatch } from "../../redux/hooks";
10import { setOnboardingCard } from "../../redux/slices/uiSlice";
11import { saveCurrentSession } from "../../redux/thunks/session";
12import MoreHelpRow from "./MoreHelpRow";
13
14export function HelpCenterSection() {
15 const ideMessenger = useContext(IdeMessengerContext);
16 const navigate = useNavigate();
17 const dispatch = useAppDispatch();
18
19 return (
20 <div className="py-5">
21 <h3 className="mb-4 mt-0 text-xl">Help center</h3>
22 <div className="-mx-4 flex flex-col">
23 <MoreHelpRow
24 title="Documentation"
25 description="Learn how to configure and use Continue"
26 Icon={ArrowTopRightOnSquareIcon}
27 onClick={() =>
28 ideMessenger.post("openUrl", "https://docs.continue.dev/")
29 }
30 />
31
32 <MoreHelpRow
33 title="Have an issue?"
34 description="Let us know on GitHub and we'll do our best to resolve it"
35 Icon={ArrowTopRightOnSquareIcon}
36 onClick={() =>
37 ideMessenger.post(
38 "openUrl",
39 "https://github.com/continuedev/continue/issues/new/choose",
40 )
41 }
42 />
43
44 <MoreHelpRow
45 title="Join the community!"
46 description="Join us on Discord to stay up-to-date on the latest developments"
47 Icon={ArrowTopRightOnSquareIcon}
48 onClick={() =>
49 ideMessenger.post("openUrl", "https://discord.gg/vapESyrFmJ")
50 }
51 />
52
53 <MoreHelpRow
54 title="Token usage"
55 description="Daily token usage across models"
56 Icon={TableCellsIcon}
57 onClick={() => navigate("/stats")}
58 />
59
60 <MoreHelpRow
61 title="Quickstart"
62 description="Reopen the quickstart and tutorial file"
63 Icon={DocumentArrowUpIcon}
64 onClick={async () => {
65 navigate("/");
66 // Used to clear the chat panel before showing onboarding card
67 await dispatch(
68 saveCurrentSession({
69 openNewSession: true,
70 generateTitle: true,
71 }),
72 );
73 dispatch(setOnboardingCard({ show: true, activeTab: "Best" }));
74 ideMessenger.post("showTutorial", undefined);
75 }}
76 />
77 </div>
78 </div>
79 );
80}