1 "use client"
2
3 import { CheckMini, SquareTwoStack } from "@medusajs/icons"
4 import clsx from "clsx"
5 import { CopyButton, HeadlineTags } from "docs-ui"
6 import HomepageEdges from "../Edges"
7 import HomepageStartPromptClaudeIcon from "./Icons/Claude"
8 import HomepageStartPromptCodexIcon from "./Icons/Codex"
9 import HomepageStartPromptCopilotIcon from "./Icons/Copilot"
10 import HomepageStartPromptCursorIcon from "./Icons/Cursor"
11 import HomepageStartPromptGeminiCliIcon from "./Icons/GeminiCli"
12 import HomepageStartPromptOpenCodeIcon from "./Icons/OpenCode"
13
14 const PROMPT =
15 "Fetch https://docs.medusajs.com/start and create an ecommerce store with Medusa Cloud"
16
17 const agents = [
18 { icon: HomepageStartPromptClaudeIcon },
19 { icon: HomepageStartPromptCursorIcon },
20 { icon: HomepageStartPromptCodexIcon },
21 { icon: HomepageStartPromptCopilotIcon },
22 { icon: HomepageStartPromptGeminiCliIcon },
23 { icon: HomepageStartPromptOpenCodeIcon },
24 ]
25
26 const HomepageStartPrompt = () => {
27 return (
28 <div className="w-full flex flex-col md:flex-row gap-0 border-y border-medusa-border-base">
29 <div
30 className={clsx(
31 "w-full md:w-1/3 py-4 px-2 flex flex-col gap-0.75 justify-center",
32 "border-b md:border-b-0 md:border-r border-medusa-border-base"
33 )}
34 >
35 <HeadlineTags
36 tags={[
37 "AI Agents",
38 {
39 text: "Learn more",
40 link: "/start",
41 },
42 ]}
43 className="!justify-start"
44 />
45 <h2 className="text-h1 text-medusa-fg-base">
46 Get started with your AI agent.
47 </h2>
48 <p className="txt-large text-medusa-fg-base">
49 Use this prompt with any AI agent to install and deploy a
50 Medusa-powered ecommerce store.
51 </p>
52 </div>
53 <div
54 className={clsx(
55 "w-full md:w-2/3 p-2 flex flex-col gap-2 justify-center",
56 "bg-medusa-bg-component relative"
57 )}
58 >
59 <div
60 className={clsx(
61 "flex items-start justify-between gap-2",
62 "border border-medusa-border-base bg-medusa-bg-base",
63 "px-1.5 py-1.5 relative"
64 )}
65 >
66 <span className="text-code-body font-mono text-medusa-fg-base leading-relaxed">
67 {PROMPT}
68 </span>
69 <CopyButton
70 text={PROMPT}
71 className="flex-shrink-0 mt-[2px]"
72 buttonClassName={clsx(
73 "text-medusa-fg-subtle hover:text-medusa-fg-base",
74 "transition-colors duration-100"
75 )}
76 >
77 {({ isCopied }) => {
78 return isCopied ? (
79 <CheckMini className="text-medusa-fg-interactive" />
80 ) : (
81 <SquareTwoStack />
82 )
83 }}
84 </CopyButton>
85 <HomepageEdges />
86 </div>
87
88 <div className="flex items-center gap-0 flex-wrap">
89 {agents.map(({ icon: Icon }, index) => (
90 <div
91 key={index}
92 className={clsx(
93 "flex items-center px-0.25 py-0.5",
94 "text-medusa-fg-subtle"
95 )}
96 >
97 <Icon />
98 </div>
99 ))}
100 </div>
101 </div>
102 </div>
103 )
104 }
105
106 export default HomepageStartPrompt