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