| 1 | import { |
| 2 | ArrowTopRightOnSquareIcon, |
| 3 | DocumentArrowUpIcon, |
| 4 | PaintBrushIcon, |
| 5 | TableCellsIcon, |
| 6 | } from "@heroicons/react/24/outline"; |
| 7 | import { useContext } from "react"; |
| 8 | import { useNavigate } from "react-router-dom"; |
| 9 | import { IdeMessengerContext } from "../../context/IdeMessenger"; |
| 10 | import { useAppDispatch } from "../../redux/hooks"; |
| 11 | import { setOnboardingCard } from "../../redux/slices/uiSlice"; |
| 12 | import { saveCurrentSession } from "../../redux/thunks/session"; |
| 13 | import { ROUTES } from "../../util/navigation"; |
| 14 | import MoreHelpRow from "./MoreHelpRow"; |
| 15 | |
| 16 | export function HelpCenterSection() { |
| 17 | const ideMessenger = useContext(IdeMessengerContext); |
| 18 | const navigate = useNavigate(); |
| 19 | const dispatch = useAppDispatch(); |
| 20 | |
| 21 | return ( |
| 22 | <div className="py-5"> |
| 23 | <h3 className="mb-4 mt-0 text-xl">Help center</h3> |
| 24 | <div className="-mx-4 flex flex-col"> |
| 25 | <MoreHelpRow |
| 26 | title="Continue Hub" |
| 27 | description="Visit hub.continue.dev to explore custom assistants and blocks" |
| 28 | Icon={ArrowTopRightOnSquareIcon} |
| 29 | onClick={() => |
| 30 | ideMessenger.post("openUrl", "https://hub.continue.dev/") |
| 31 | } |
| 32 | /> |
| 33 | |
| 34 | <MoreHelpRow |
| 35 | title="Documentation" |
| 36 | description="Learn how to configure and use Continue" |
| 37 | Icon={ArrowTopRightOnSquareIcon} |
| 38 | onClick={() => |
| 39 | ideMessenger.post("openUrl", "https://docs.continue.dev/") |
| 40 | } |
| 41 | /> |
| 42 | |
| 43 | <MoreHelpRow |
| 44 | title="Have an issue?" |
| 45 | description="Let us know on GitHub and we'll do our best to resolve it" |
| 46 | Icon={ArrowTopRightOnSquareIcon} |
| 47 | onClick={() => |
| 48 | ideMessenger.post( |
| 49 | "openUrl", |
| 50 | "https://github.com/continuedev/continue/issues/new/choose", |
| 51 | ) |
| 52 | } |
| 53 | /> |
| 54 | |
| 55 | <MoreHelpRow |
| 56 | title="Join the community!" |
| 57 | description="Join us on Discord to stay up-to-date on the latest developments" |
| 58 | Icon={ArrowTopRightOnSquareIcon} |
| 59 | onClick={() => |
| 60 | ideMessenger.post("openUrl", "https://discord.gg/vapESyrFmJ") |
| 61 | } |
| 62 | /> |
| 63 | |
| 64 | <MoreHelpRow |
| 65 | title="Token usage" |
| 66 | description="Daily token usage across models" |
| 67 | Icon={TableCellsIcon} |
| 68 | onClick={() => navigate("/stats")} |
| 69 | /> |
| 70 | |
| 71 | <MoreHelpRow |
| 72 | title="Quickstart" |
| 73 | description="Reopen the quickstart and tutorial file" |
| 74 | Icon={DocumentArrowUpIcon} |
| 75 | onClick={async () => { |
| 76 | navigate("/"); |
| 77 | // Used to clear the chat panel before showing onboarding card |
| 78 | await dispatch( |
| 79 | saveCurrentSession({ |
| 80 | openNewSession: true, |
| 81 | generateTitle: true, |
| 82 | }), |
| 83 | ); |
| 84 | dispatch( |
| 85 | setOnboardingCard({ |
| 86 | show: true, |
| 87 | activeTab: undefined, |
| 88 | }), |
| 89 | ); |
| 90 | ideMessenger.post("showTutorial", undefined); |
| 91 | }} |
| 92 | /> |
| 93 | {process.env.NODE_ENV === "development" && ( |
| 94 | <MoreHelpRow |
| 95 | title="Theme Test Page" |
| 96 | description="Development page for testing themes" |
| 97 | Icon={PaintBrushIcon} |
| 98 | onClick={async () => { |
| 99 | navigate(ROUTES.THEME); |
| 100 | }} |
| 101 | /> |
| 102 | )} |
| 103 | </div> |
| 104 | </div> |
| 105 | ); |
| 106 | } |