refactor(docs): migrate chat-sdk.dev to @vercel/geistdocs#686
Conversation
Replace the locally-copied geistdocs runtime in apps/docs with the published @vercel/geistdocs package, keeping site-specific content, custom sections, and established public contracts local. Package-backed now: docs page + layouts (createDocsPage, GeistdocsDocsLayout/HomeLayout), navbar/footer/provider, search (createSearchRoute), Ask AI (createChatRoute, AI SDK v6), per-page markdown (createDocsMarkdownRoute), sitemap.md (createSitemapMarkdownRoute, now with an Adapters section), a new /agents.md surface (createAgentsRoute), proxy (createProxy with explicit markdownRoutes for /docs and /adapters), MDX defaults, design tokens/styles, and icon/logo assets. Kept local by design: the curated /llms.txt index and /llms-full.txt corpus (referenced by the published SKILL.md artifacts and tests), the adapters section (README fetching, OG images, JSON-LD, feature matrices, adapters.mdx markdown route), RSS, and the OG image route. Also: removes 13 now-unused dependencies (ai@5, @ai-sdk/react@2, dexie, jotai, cmdk, vaul, mermaid, etc.), slims the local CSS to overrides on top of @vercel/geistdocs/styles.css, and updates the docs-llms integration test to assert on the new proxy shape. Signed-off-by: molebox <rich@vercel.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
The @vercel/geistdocs stylesheet inverts the dark background tokens (background-100 becomes pure black over a near-black background-200), which flattened elevated surfaces on the homepage: the Chat SDK Core code window blended into the page and the active code-showcase tab had no visible state. Restore the site's original dark values (elevated background-100 over pure-black background-200) in the local override layer. Signed-off-by: molebox <rich@vercel.com>
Brings the Ask AI panel z-index fix (paints below the search command menu) and adds the Turborepo logo to the navbar OSS products dropdown, matching the new package default (we keep an explicit list because the package default includes chat-sdk.dev itself). Signed-off-by: molebox <rich@vercel.com>
…docs Signed-off-by: molebox <rich@vercel.com> # Conflicts: # apps/docs/app/api/chat/route.ts
|
Merged Main's #687 switched the old custom chat route's model to Follow-up: propose a |
|
Upstream PR for the Ask AI model regression: vercel/geistdocs#142 adds a Plan: once that lands and a release is cut, bump |
1.10.0 adds the createChatRoute model option (vercel/geistdocs#142). Pass xai/grok-4.5 to restore the model set in #687, which the package-backed chat route had reverted to its hardcoded default. Signed-off-by: molebox <rich@vercel.com>
Summary
Migrates
apps/docsfrom locally-copied geistdocs runtime code to the published@vercel/geistdocspackage (1.8.2), following the official migration guide. Net −8,400 lines.Package-backed now
createDocsPage,GeistdocsDocsLayout,GeistdocsHomeLayout(JSON-LD + sr-only markdown hints preserved viarenderTop)navbarOssProducts), footer, provider, search dialog, page actions (edit source, feedback, copy page, Ask AI, open-in-chat, scroll top)/api/search→createSearchRoute,/api/chat→createChatRoute(AI SDK v6; AI Gateway default, optionalGEISTDOCS_CHAT_PROXY_URL)llms.mdx→createDocsMarkdownRoute,sitemap.md→createSitemapMarkdownRoute(now includes an Adapters section)/agents.mdviacreateAgentsRoute, backed by a newagentreadiness configproxy.ts→createProxywith explicitmarkdownRoutesfor/docs→llms.mdxand/adapters→adapters.mdx(adds AI-agent UA rewrites)@vercel/geistdocs/styles.css+ slim local overrides (shadcn tokens for remainingcomponents/ui, body tint, prose inline code,#nd-*tweaks); code blocks now use the geist Shiki theme@vercel/geistdocs/assets/*; feedback via the package action (same geistdocs.com endpoint +siteId)Kept local by design
/llms.txtindex +/llms-full.txtcorpus — the publishedAGENTS.md/SKILL.md artifacts and integration tests reference this exact contractadapters.mdxmarkdown route) — now rendered inside the package docs layout/.well-known/mcp.json: no MCP servers configured, and the proxy matcher must keep excluding.well-knownfor the served agent-skills filesCleanup
components/geistdocs/*chrome,components/ai-elements/*, chat hooks/persistence, feedback server actions, unused shadcn primitives, geistcn logo/icon fallbacks covered by package assetsai@5,@ai-sdk/react@2,dexie,jotai,cmdk,vaul,mermaid,nanoid,react-player,use-stick-to-bottom,@orama/tokenizers,dexie-react-hooks,next-themes)docs-llms.test.tsproxy assertions to thecreateProxymarkdown-route shapeBehavior changes to be aware of
/sitemap.md,/llms.txt,/agents.md)Test plan
pnpm validategreen (knip + check + typecheck + test + build)next build && next start:/,/docs,/adapters,/agents.md,/llms.txt,/llms-full.txt,/sitemap.md, page-level.mdURLs for both docs and adapters,Accept: text/markdownnegotiation, search API, JSON-LD, sr-only markdown hints, edit-source URLs (apps/docs/content/docs/{path}), OSS navbar, page actionsrm -rf apps/docs/.nextfixes it)Checklist
git commit -s)pnpm validatepasses