|
1 | | -import DynamicLink from "fumadocs-core/dynamic-link"; |
2 | 1 | import type { Metadata } from "next"; |
3 | 2 | import type { ComponentProps } from "react"; |
4 | | -import { Installer } from "@/components/geistdocs/installer"; |
5 | | -import { Button } from "@/components/ui/button"; |
| 3 | +import { |
| 4 | + CommandPromptContent, |
| 5 | + CommandPromptCopy, |
| 6 | + CommandPromptList, |
| 7 | + CommandPromptPrefix, |
| 8 | + CommandPromptRoot, |
| 9 | + CommandPromptSurface, |
| 10 | + CommandPromptTrigger, |
| 11 | + CommandPromptTriggerDivider, |
| 12 | + CommandPromptViewport, |
| 13 | +} from "@/components/ui/command-prompt"; |
6 | 14 | import { discord, gchat, slack, teams } from "@/lib/logos"; |
7 | 15 | import { AdaptersSection } from "./components/adapters-section"; |
8 | 16 | import { CenteredSection } from "./components/centered-section"; |
@@ -32,6 +40,9 @@ const LogoChip = ({ |
32 | 40 | </span> |
33 | 41 | ); |
34 | 42 |
|
| 43 | +const COMMAND_FOR_HUMANS = "npm install chat"; |
| 44 | +const COMMAND_FOR_AGENTS = "npx skills add vercel/chat"; |
| 45 | + |
35 | 46 | const title = "Chat SDK"; |
36 | 47 | const textDescription = |
37 | 48 | "A unified TypeScript SDK for building chat bots across Slack, Microsoft Teams, Google Chat, Discord, and more. Write your bot logic once, deploy everywhere."; |
@@ -161,14 +172,29 @@ const HomePage = () => ( |
161 | 172 | description={heroDescription} |
162 | 173 | title={title} |
163 | 174 | > |
164 | | - <div className="mx-auto inline-flex w-fit items-center gap-3"> |
165 | | - <Button asChild className="px-4" size="lg"> |
166 | | - <DynamicLink href="/[lang]/docs/getting-started"> |
167 | | - Get Started |
168 | | - </DynamicLink> |
169 | | - </Button> |
170 | | - <Installer className="w-28" command="npm i chat" /> |
171 | | - </div> |
| 175 | + <CommandPromptRoot className="mt-6" defaultValue="humans"> |
| 176 | + <CommandPromptList> |
| 177 | + <CommandPromptTrigger className="min-w-[90px]" value="humans"> |
| 178 | + For humans |
| 179 | + </CommandPromptTrigger> |
| 180 | + <CommandPromptTriggerDivider /> |
| 181 | + <CommandPromptTrigger className="min-w-[84px]" value="agents"> |
| 182 | + For agents |
| 183 | + </CommandPromptTrigger> |
| 184 | + </CommandPromptList> |
| 185 | + <CommandPromptSurface> |
| 186 | + <CommandPromptPrefix>$</CommandPromptPrefix> |
| 187 | + <CommandPromptViewport> |
| 188 | + <CommandPromptContent copyValue={COMMAND_FOR_HUMANS} value="humans"> |
| 189 | + {COMMAND_FOR_HUMANS} |
| 190 | + </CommandPromptContent> |
| 191 | + <CommandPromptContent copyValue={COMMAND_FOR_AGENTS} value="agents"> |
| 192 | + {COMMAND_FOR_AGENTS} |
| 193 | + </CommandPromptContent> |
| 194 | + </CommandPromptViewport> |
| 195 | + <CommandPromptCopy /> |
| 196 | + </CommandPromptSurface> |
| 197 | + </CommandPromptRoot> |
172 | 198 | </Hero> |
173 | 199 | <div className="grid divide-y border-y sm:border-x"> |
174 | 200 | <CenteredSection |
|
0 commit comments