Skip to content

Commit 46fc5bb

Browse files
Sync docs with @vercel/geistdocs 1.2.0–1.2.3 (#399)
* docs: sync geistdocs template 1.2.0–1.2.3 + polish - Ran @vercel/geistdocs@1.2.2 update --sync against origin/main (already contains merged 1.2.3) for: - components/geistdocs/* - components/geistcn-fallbacks/**/* (new) - components/ui/command-prompt.tsx, navigation-menu.tsx - app/styles/geistdocs.css - Manual overlays (paths skipped by sync due to chat customizations): - app/[lang]/layout.tsx: drop scroll-smooth (1.2.2) - app/[lang]/docs/[[...slug]]/page.tsx: MobileDocsBar + disable default TOC popover (1.2.0) - app/[lang]/docs/layout.tsx: wrap in bg-background-200 (1.2.3) - components/ui/badge.tsx: secondary variant → bg-gray-300/text-gray-1000 (1.2.3) - Home hero: replace Get Started + Installer with CommandPrompt humans/agents switcher ("npm install chat" / "npx skills add vercel/chat") - (home) layout: swap bg-sidebar dark:bg-background for bg-background-200 so /, /adapters, /resources share the navbar surface - DesktopMenu: active-state detection with longest-prefix match (so /docs/api highlights "API", not also "Docs") - navbar-logo dropdown: drop Chat SDK self-entry - New geist-fill icons (check-circle-fill, cross-circle-fill, warning-fill) ported from @vercel/geistcn-assets; new components/custom/status-icons.tsx registers Check/Cross/Warn MDX components - content/docs/adapters.mdx: replace ✅/❌/⚠️ emojis with the new icons (emoji.mdx intentionally left alone) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * docs: use LogoChatSdk from geistcn-fallbacks as the app Logo Replace the inline Chat SDK wordmark SVG in geistdocs.tsx with <LogoChatSdk /> so the navbar and other Logo consumers share the same source of truth. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * docs: default hero CommandPrompt to humans tab Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 7e5b447 commit 46fc5bb

47 files changed

Lines changed: 2116 additions & 138 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

apps/docs/app/[lang]/(home)/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const Layout = async ({ children, params }: LayoutProps<"/[lang]">) => {
66

77
return (
88
<HomeLayout tree={source.pageTree[lang]}>
9-
<div className="min-h-screen bg-sidebar pt-0 pb-32 dark:bg-background">
9+
<div className="min-h-screen bg-background-200 pt-0 pb-32">
1010
{children}
1111
</div>
1212
</HomeLayout>

apps/docs/app/[lang]/(home)/page.tsx

Lines changed: 37 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
1-
import DynamicLink from "fumadocs-core/dynamic-link";
21
import type { Metadata } from "next";
32
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";
614
import { discord, gchat, slack, teams } from "@/lib/logos";
715
import { AdaptersSection } from "./components/adapters-section";
816
import { CenteredSection } from "./components/centered-section";
@@ -32,6 +40,9 @@ const LogoChip = ({
3240
</span>
3341
);
3442

43+
const COMMAND_FOR_HUMANS = "npm install chat";
44+
const COMMAND_FOR_AGENTS = "npx skills add vercel/chat";
45+
3546
const title = "Chat SDK";
3647
const textDescription =
3748
"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 = () => (
161172
description={heroDescription}
162173
title={title}
163174
>
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>
172198
</Hero>
173199
<div className="grid divide-y border-y sm:border-x">
174200
<CenteredSection

apps/docs/app/[lang]/docs/[[...slug]]/page.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import {
1212
import { EditSource } from "@/components/geistdocs/edit-source";
1313
import { Feedback } from "@/components/geistdocs/feedback";
1414
import { getMDXComponents } from "@/components/geistdocs/mdx-components";
15+
import { MobileDocsBar } from "@/components/geistdocs/mobile-docs-bar";
1516
import { OpenInChat } from "@/components/geistdocs/open-in-chat";
1617
import { ScrollTop } from "@/components/geistdocs/scroll-top";
1718
import { Separator } from "@/components/ui/separator";
@@ -45,8 +46,10 @@ const Page = async ({ params }: PageProps<"/[lang]/docs/[[...slug]]">) => {
4546
</div>
4647
),
4748
}}
49+
tableOfContentPopover={{ enabled: false }}
4850
toc={page.data.toc}
4951
>
52+
<MobileDocsBar toc={page.data.toc} />
5053
<DocsTitle>{page.data.title}</DocsTitle>
5154
<DocsDescription>{page.data.description}</DocsDescription>
5255
<DocsBody>

apps/docs/app/[lang]/docs/layout.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@ import { source } from "@/lib/geistdocs/source";
44
const Layout = async ({ children, params }: LayoutProps<"/[lang]/docs">) => {
55
const { lang } = await params;
66

7-
return <DocsLayout tree={source.pageTree[lang]}>{children}</DocsLayout>;
7+
return (
8+
<div className="bg-background-200">
9+
<DocsLayout tree={source.pageTree[lang]}>{children}</DocsLayout>
10+
</div>
11+
);
812
};
913

1014
export default Layout;

apps/docs/app/[lang]/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const Layout = async ({ children, params }: LayoutProps<"/[lang]">) => {
1111

1212
return (
1313
<html
14-
className={cn(sans.variable, mono.variable, "scroll-smooth antialiased")}
14+
className={cn(sans.variable, mono.variable, "antialiased")}
1515
lang={lang}
1616
suppressHydrationWarning
1717
>

0 commit comments

Comments
 (0)