@vercel/geistdocs 2.14.5 → 2.14.7-canary.6ce58a6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (93) hide show
  1. package/dist/assets/icons/icon-share.d.ts +13 -0
  2. package/dist/assets/icons/icon-share.d.ts.map +1 -0
  3. package/dist/assets/icons/icon-share.js +12 -0
  4. package/dist/assets/icons/index.d.ts +1 -0
  5. package/dist/assets/icons/index.d.ts.map +1 -1
  6. package/dist/assets/icons/index.js +1 -0
  7. package/dist/cli/index.js +5 -5
  8. package/dist/config.d.ts +38 -3
  9. package/dist/config.d.ts.map +1 -1
  10. package/dist/controls.d.ts +3 -40
  11. package/dist/controls.d.ts.map +1 -1
  12. package/dist/controls.js +5 -96
  13. package/dist/internal/chat/share-chat.d.ts +7 -0
  14. package/dist/internal/chat/share-chat.d.ts.map +1 -0
  15. package/dist/internal/chat/share-chat.js +76 -0
  16. package/dist/internal/chat/sharing.d.ts +24 -0
  17. package/dist/internal/chat/sharing.d.ts.map +1 -0
  18. package/dist/internal/chat/sharing.js +117 -0
  19. package/dist/internal/chat/shell.d.ts.map +1 -1
  20. package/dist/internal/chat/shell.js +2 -1
  21. package/dist/internal/chat-retrieval.d.ts +10 -9
  22. package/dist/internal/chat-retrieval.d.ts.map +1 -1
  23. package/dist/internal/chat-retrieval.js +32 -68
  24. package/dist/internal/controls-client.d.ts +40 -0
  25. package/dist/internal/controls-client.d.ts.map +1 -0
  26. package/dist/internal/controls-client.js +87 -0
  27. package/dist/internal/language-selector.d.ts +2 -0
  28. package/dist/internal/language-selector.d.ts.map +1 -0
  29. package/dist/internal/language-selector.js +12 -0
  30. package/dist/internal/mixedbread-store.d.ts +53 -0
  31. package/dist/internal/mixedbread-store.d.ts.map +1 -0
  32. package/dist/internal/mixedbread-store.js +129 -0
  33. package/dist/internal/navbar/mobile-menu.js +1 -1
  34. package/dist/internal/page-action-options.d.ts +37 -0
  35. package/dist/internal/page-action-options.d.ts.map +1 -0
  36. package/dist/internal/page-action-options.js +39 -0
  37. package/dist/internal/page-actions-client.d.ts +1 -31
  38. package/dist/internal/page-actions-client.d.ts.map +1 -1
  39. package/dist/internal/page-actions-client.js +5 -103
  40. package/dist/internal/page-actions-gate.d.ts +3 -0
  41. package/dist/internal/page-actions-gate.d.ts.map +1 -0
  42. package/dist/internal/page-actions-gate.js +15 -0
  43. package/dist/internal/provider-client.d.ts.map +1 -1
  44. package/dist/internal/provider-client.js +26 -1
  45. package/dist/internal/relative-docs-link.d.ts +7 -0
  46. package/dist/internal/relative-docs-link.d.ts.map +1 -0
  47. package/dist/internal/relative-docs-link.js +22 -0
  48. package/dist/internal/sidebar.d.ts.map +1 -1
  49. package/dist/internal/sidebar.js +1 -1
  50. package/dist/internal/toc-actions-client.d.ts +9 -0
  51. package/dist/internal/toc-actions-client.d.ts.map +1 -0
  52. package/dist/internal/toc-actions-client.js +78 -0
  53. package/dist/mdx.d.ts.map +1 -1
  54. package/dist/mdx.js +5 -2
  55. package/dist/navbar.js +1 -1
  56. package/dist/pages/changelog.js +1 -1
  57. package/dist/pages/docs.d.ts.map +1 -1
  58. package/dist/pages/docs.js +4 -3
  59. package/dist/routes/chat.d.ts +4 -4
  60. package/dist/routes/chat.d.ts.map +1 -1
  61. package/dist/routes/chat.js +19 -34
  62. package/dist/routes/openapi.d.ts.map +1 -1
  63. package/dist/routes/openapi.js +13 -5
  64. package/dist/routes/search-export.d.ts +1 -1
  65. package/dist/routes/search-export.d.ts.map +1 -1
  66. package/dist/routes/search-export.js +5 -2
  67. package/dist/routes/search.d.ts +10 -2
  68. package/dist/routes/search.d.ts.map +1 -1
  69. package/dist/routes/search.js +215 -55
  70. package/docs/agents.md +3 -3
  71. package/docs/llms.txt +237 -32
  72. package/docs/manifest.json +5 -5
  73. package/docs/pages/ask-ai.md +17 -1
  74. package/docs/pages/configuration.md +33 -3
  75. package/docs/pages/env.md +5 -5
  76. package/docs/pages/index.md +1 -1
  77. package/docs/pages/llms-txt.md +1 -1
  78. package/docs/pages/mixedbread-retrieval.md +174 -18
  79. package/docs/pages/provider.md +3 -0
  80. package/docs/sitemap.md +2 -2
  81. package/package.json +6 -6
  82. package/template/.env.example +1 -0
  83. package/template/AGENTS.md +11 -7
  84. package/template/content/docs/ask-ai.mdx +17 -1
  85. package/template/content/docs/configuration.mdx +33 -3
  86. package/template/content/docs/env.mdx +5 -5
  87. package/template/content/docs/index.mdx +1 -1
  88. package/template/content/docs/llms-txt.mdx +1 -1
  89. package/template/content/docs/mixedbread-retrieval.mdx +174 -18
  90. package/template/content/docs/provider.mdx +3 -0
  91. package/template/geistdocs.tsx +6 -1
  92. package/template/lib/geistdocs/config.tsx +2 -0
  93. package/template/package.json +1 -1
package/docs/llms.txt CHANGED
@@ -1,13 +1,13 @@
1
1
  # Geistdocs Package Documentation
2
2
 
3
- These docs are bundled with `@vercel/geistdocs` 2.14.5.
3
+ These docs are bundled with `@vercel/geistdocs` 2.14.7-canary.6ce58a6.
4
4
  They describe how to build package-backed Geistdocs sites and how to use the package APIs from generated project adapters.
5
5
 
6
6
  ## Documentation Index
7
7
 
8
8
  - [Overview](pages/index.md): Geistdocs is a packaged documentation system for creating Next.js and Fumadocs sites with shared runtime features.
9
9
  - [Getting Started](pages/getting-started.md): Create a Geistdocs project, run it locally, and edit your first documentation page.
10
- - [Environment Variables](pages/env.md): Environment variables required by Geistdocs for AI chat, Mixedbread retrieval, proxy mode, eve agent session cookies, and production URL configuration.
10
+ - [Environment Variables](pages/env.md): Environment variables required by Geistdocs for AI chat, Mixedbread retrieval for Ask AI and site search, proxy mode, eve agent session cookies, and production URL configuration.
11
11
  - [Deploy to Vercel](pages/deployment.md): Deploy a Geistdocs site to Vercel with the required project settings and environment variables.
12
12
  - [Migrate to Geistdocs](pages/migration.md): Move an existing documentation site to @vercel/geistdocs while keeping local content, routing, middleware behavior, and AI-readable surfaces intact.
13
13
  - [Choose a Geistdocs package](pages/packages.md): Use the public package by default and the private package only where restricted Vercel npm dependencies are already available.
@@ -35,7 +35,7 @@ They describe how to build package-backed Geistdocs sites and how to use the pac
35
35
  - [Edit on GitHub](pages/edit-on-github.md): A direct link on every documentation page that lets readers propose changes through GitHub pull requests.
36
36
  - [Feedback](pages/feedback.md): An interactive feedback widget that collects user sentiment and creates structured GitHub Issues automatically.
37
37
  - [Image](pages/components/image.md): Use the Geistdocs Image wrapper for documentation-aware Next.js images.
38
- - [Improve Ask AI answers with Mixedbread](pages/mixedbread-retrieval.md): Provision a Mixedbread Store for one Geistdocs consumer site, enable semantic retrieval, and sync documentation during production builds.
38
+ - [Improve Ask AI and site search with Mixedbread](pages/mixedbread-retrieval.md): Provision a Mixedbread Store for one Geistdocs consumer site, turn on semantic retrieval for Ask AI with ai.retrieval and for site search with search.provider, and sync documentation during production builds.
39
39
  - [Input](pages/components/input.md): Use Input for text entry in custom documentation and application interfaces.
40
40
  - [Internationalization](pages/internationalization.md): Serve documentation in multiple languages with automatic translation via the Geistdocs CLI and Fumadocs routing.
41
41
  - [llms.txt](pages/llms-txt.md): A single endpoint that returns all documentation as plain Markdown text following the llms.txt standard.
@@ -139,7 +139,7 @@ Advanced projects can use package APIs for versioned docs, multiple content sour
139
139
  - MDX documentation with custom components
140
140
  - Local content in `content/docs`
141
141
  - Search and Ask AI
142
- - Optional Mixedbread semantic retrieval for Ask AI
142
+ - Optional Mixedbread semantic retrieval for Ask AI and site search
143
143
  - Page actions, including feedback, copy page, open in chat, and edit on GitHub
144
144
  - Agent-readiness metadata with `/agents.md` and `/.well-known/mcp.json`
145
145
  - Raw Markdown routes for AI tools
@@ -327,7 +327,7 @@ Then follow [Deploy to Vercel](/docs/deployment), including environment-variable
327
327
  title: Environment Variables
328
328
  description: Learn about the environment variables used in Geistdocs
329
329
  type: reference
330
- summary: Environment variables required by Geistdocs for AI chat, Mixedbread retrieval, proxy mode, eve agent session cookies, and production URL configuration.
330
+ summary: Environment variables required by Geistdocs for AI chat, Mixedbread retrieval for Ask AI and site search, proxy mode, eve agent session cookies, and production URL configuration.
331
331
  url: /docs/env
332
332
  source: apps/template/content/docs/env.mdx
333
333
  prerequisites:
@@ -339,7 +339,7 @@ related:
339
339
 
340
340
  # Environment Variables
341
341
 
342
- Geistdocs uses environment variables to configure Ask AI, optional Mixedbread retrieval, optional Vertex-backed proxy mode, eve agent session cookie signing, and production URL behavior.
342
+ Geistdocs uses environment variables to configure Ask AI, optional Mixedbread retrieval for Ask AI and site search, optional Vertex-backed proxy mode, eve agent session cookie signing, and production URL behavior.
343
343
 
344
344
  Review this Geistdocs project and help me configure the required environment variables. Check whether `AI_GATEWAY_API_KEY`, `MXBAI_API_KEY`, `MXBAI_STORE_ID`, `GEISTDOCS_CHAT_PROXY_URL`, `GEISTDOCS_CHAT_PROXY_TOKEN`, `GEISTDOCS_CHAT_SECRET`, and `NEXT_PUBLIC_VERCEL_PROJECT_PRODUCTION_URL` are needed for the features I enabled, then tell me where to set them locally and on Vercel.
345
345
 
@@ -353,13 +353,13 @@ Leave `GEISTDOCS_CHAT_PROXY_URL` unset to use AI Gateway mode.
353
353
 
354
354
  ## `MXBAI_API_KEY`
355
355
 
356
- The server-only API key for Mixedbread retrieval. The Mixedbread Vercel Marketplace integration injects this value when you provision a Store and connect it to the consumer site's Vercel project.
356
+ The server-only API key for Mixedbread retrieval, used by Ask AI and site search. The Mixedbread Vercel Marketplace integration injects this value when you provision a Store and connect it to the consumer site's Vercel project.
357
357
 
358
358
  ## `MXBAI_STORE_ID`
359
359
 
360
- The Mixedbread Store used by one consumer site. Set `ai.retrieval` to `"mixedbread"` and configure a unique `siteId` before using this value.
360
+ The Mixedbread Store used by one consumer site. Configure a unique `siteId`, then set `ai.retrieval`, `search.provider`, or both to `"mixedbread"` before using this value. Ask AI and site search share this Store and `MXBAI_API_KEY`. When either value or `siteId` is missing at runtime, each surface that uses Mixedbread answers from local search instead.
361
361
 
362
- Provision the Store by running `vercel integration add mixedbread` from the root of the consumer site's repository, where Vercel CLI is linked to that site's project. Do not run the provisioning command from the Geistdocs package repository. Read [Improve Ask AI answers with Mixedbread](/docs/mixedbread-retrieval) for the complete setup.
362
+ Provision the Store by running `vercel integration add mixedbread` from the root of the consumer site's repository, where Vercel CLI is linked to that site's project. Do not run the provisioning command from the Geistdocs package repository. Read [Improve Ask AI and site search with Mixedbread](/docs/mixedbread-retrieval) for the complete setup.
363
363
 
364
364
  ## `GEISTDOCS_CHAT_PROXY_URL`
365
365
 
@@ -1189,7 +1189,10 @@ Read [Configure sidebar navigation](/docs/guides/nested-navigation) for page ord
1189
1189
  The root `geistdocs.tsx` file is the primary configuration surface:
1190
1190
 
1191
1191
  ```tsx title="geistdocs.tsx"
1192
- import type { GeistdocsNavbarBrand } from "@vercel/geistdocs/config";
1192
+ import type {
1193
+ GeistdocsNavbarBrand,
1194
+ GeistdocsSearchConfig,
1195
+ } from "@vercel/geistdocs/config";
1193
1196
 
1194
1197
  export const navbarBrand: GeistdocsNavbarBrand = "vercel";
1195
1198
 
@@ -1228,6 +1231,8 @@ export const translations = {
1228
1231
  en: { displayName: "English" },
1229
1232
  };
1230
1233
 
1234
+ export const search = {} satisfies GeistdocsSearchConfig;
1235
+
1231
1236
  export const basePath: string | undefined = undefined;
1232
1237
  export const siteId: string | undefined = undefined;
1233
1238
  ```
@@ -1296,6 +1301,7 @@ import {
1296
1301
  nav,
1297
1302
  navbarBrand,
1298
1303
  prompt,
1304
+ search,
1299
1305
  siteId,
1300
1306
  suggestions,
1301
1307
  title,
@@ -1311,6 +1317,7 @@ export const config = defineConfig({
1311
1317
  nav,
1312
1318
  navbarBrand,
1313
1319
  basePath,
1320
+ search,
1314
1321
  siteId,
1315
1322
  translations,
1316
1323
  ai: {
@@ -1347,7 +1354,7 @@ export const config = defineConfig({
1347
1354
  });
1348
1355
  ```
1349
1356
 
1350
- The `ai` config accepts `retrieval: "mixedbread"` to use semantic documentation retrieval and `eveAgent` to answer Ask AI requests with a hosted eve framework agent:
1357
+ The `ai` config accepts `retrieval: "mixedbread"` to use semantic documentation retrieval for Ask AI and `eveAgent` to answer Ask AI requests with a hosted eve framework agent:
1351
1358
 
1352
1359
  ```tsx title="geistdocs.tsx"
1353
1360
  export const ai = {
@@ -1370,6 +1377,7 @@ The `ai` config also controls the chat panel and its route:
1370
1377
  | `suggestions` | `(string \| { text: string; icon?: ReactNode })[]` | `[]` | Suggested prompts. The first four distinct prompts are shown, and strings render without an icon. |
1371
1378
  | `history.retentionDays` | `number` | `30` | Days a stored conversation is kept after its most recent message. `0` stores no history, and `Infinity` never expires it. |
1372
1379
  | `messageFeedback` | `boolean` | `false` | Show thumbs up and thumbs down buttons on finished answers and send votes to the Geistdocs feedback service. |
1380
+ | `share` | `GeistdocsAIShareConfig` | `undefined` | Show a Share chat action backed by your persistence endpoint and public shared-conversation route. |
1373
1381
  | `toolLabels` | `Record<string, string>` | `{}` | Activity label shown while a named tool runs, such as `{ web_search: "Searching..." }`. Other tools show `Running <tool name>...`. |
1374
1382
 
1375
1383
  ```tsx title="geistdocs.tsx"
@@ -1378,13 +1386,35 @@ export const ai = {
1378
1386
  title: "Ask Acme AI",
1379
1387
  history: { retentionDays: 7 },
1380
1388
  messageFeedback: true,
1389
+ share: {
1390
+ endpoint: "/api/ai-chat/share",
1391
+ path: "/ai-chat",
1392
+ },
1381
1393
  };
1382
1394
  ```
1383
1395
 
1384
- See [Ask AI](/docs/ask-ai) for the full eve agent mode behavior, including authentication, for moving the chat route adapter when you set `endpoint`, for what a `messageFeedback` vote sends, and for matching a production Vertex or eve setup with `toolLabels` and the server-only `createChatRoute` options. Read [Improve Ask AI answers with Mixedbread](/docs/mixedbread-retrieval) before enabling semantic retrieval.
1396
+ The endpoint receives `{ messages, hostPath, summary? }` and must return `{ shareId }`. The public route at `path/<shareId>` must display the saved conversation. Both paths are app-local; Geistdocs adds `basePath` automatically. See [Share a conversation](/docs/ask-ai#share-a-conversation) for the full contract.
1397
+
1398
+ See [Ask AI](/docs/ask-ai) for the full eve agent mode behavior, including authentication, for moving the chat route adapter when you set `endpoint`, for what a `messageFeedback` vote sends, and for matching a production Vertex or eve setup with `toolLabels` and the server-only `createChatRoute` options. Read [Improve Ask AI and site search with Mixedbread](/docs/mixedbread-retrieval) before enabling semantic retrieval.
1385
1399
 
1386
1400
  Use [Versioned docs](/docs/versioned-docs) for versioned source setup and [Proxy and markdown routes](/docs/proxy) for route mappings.
1387
1401
 
1402
+ ### Choose the site search provider
1403
+
1404
+ The `search` export selects the index behind the search dialog, `GET /api/search`, and the MCP `search_docs` tool. `provider` accepts `"local"`, the default, or `"mixedbread"`:
1405
+
1406
+ ```tsx title="geistdocs.tsx"
1407
+ import type { GeistdocsSearchConfig } from "@vercel/geistdocs/config";
1408
+
1409
+ export const search = {
1410
+ provider: "mixedbread",
1411
+ } satisfies GeistdocsSearchConfig;
1412
+ ```
1413
+
1414
+ `"mixedbread"` ranks results with the site's Mixedbread Store and renders every result from the running deployment. It needs a non-empty `siteId` and the server-only `MXBAI_API_KEY` and `MXBAI_STORE_ID` variables. Without them, or when a Mixedbread request fails, the search route answers from the local index. `search.provider` and `ai.retrieval` are independent, and `search.enabled` keeps its existing meaning.
1415
+
1416
+ The generated `lib/geistdocs/config.tsx` forwards `search` to `defineConfig`. A site created before this release adds the `search` export and the forward once. Without the forward, search stays local with no error. Read [Improve Ask AI and site search with Mixedbread](/docs/mixedbread-retrieval#use-mixedbread-for-site-search) for the full setup.
1417
+
1388
1418
  ## Single-language sites
1389
1419
 
1390
1420
  A site with one language can drop the `[lang]` route segment by setting `singleLanguage: true` in `defineConfig`. Routes then live directly under `app/`, the proxy skips locale rewrites, and route factories resolve every request to `defaultLanguage`. `translations` may only list `defaultLanguage`. Public URLs, `.md` routes, `llms.txt`, and `agents.md` keep their paths.
@@ -2502,6 +2532,9 @@ The provider handles these behaviors:
2502
2532
  2. **Analytics**: Integrates Vercel Analytics and Speed Insights when the local adapter includes them.
2503
2533
  3. **Search**: Configures the search dialog and connects it to your search API.
2504
2534
  4. **Ask AI**: Provides the client state used by the chat sidebar and page actions.
2535
+ 5. **Theme shortcut**: Press `T` with no modifiers while the page has focus to switch between light and dark themes. The shortcut is disabled when a theme is forced.
2536
+
2537
+ The shortcut is part of the package provider, so generated consumer projects get it by default. It does not run while an input, button, link, or other element has focus.
2505
2538
 
2506
2539
  ## Usage
2507
2540
 
@@ -4004,9 +4037,25 @@ Once open, users can:
4004
4037
  - Ask questions about any part of your documentation
4005
4038
  - View the documentation pages used as sources for each answer
4006
4039
  - Copy an answer as Markdown
4040
+ - Share a conversation with a public link when the site configures chat sharing
4007
4041
  - Expand the desktop panel to fill the viewport
4008
4042
  - Get step-by-step guidance on complex topics
4009
4043
 
4044
+ ### Share a conversation
4045
+
4046
+ To show **Share chat** in the chat header, set `ai.share` to an app-local POST endpoint and the public route that displays shared conversations:
4047
+
4048
+ ```tsx title="geistdocs.tsx"
4049
+ export const ai = {
4050
+ share: {
4051
+ endpoint: "/api/ai-chat/share",
4052
+ path: "/ai-chat",
4053
+ },
4054
+ };
4055
+ ```
4056
+
4057
+ Geistdocs sends the endpoint a JSON body with `messages`, `hostPath`, and an optional `summary` containing the first user message. The endpoint must persist the conversation and return `{ "shareId": "..." }`. Geistdocs copies a link to `<path>/<shareId>`; your app must serve that public route and load the saved conversation. The endpoint and path are app-local, and Geistdocs adds `basePath` when needed. Chat sharing is disabled when `ai.share` is unset.
4058
+
4010
4059
  ## Control Ask AI from your own components
4011
4060
 
4012
4061
  `useGeistdocsChat` from `@vercel/geistdocs/controls` opens, closes, and sends messages to the Ask AI chat from your own client components. Call it from any component rendered inside `GeistdocsProvider`, such as a custom header, a callout, or an MDX component.
@@ -4656,7 +4705,7 @@ By default, the AI assistant includes a built-in `search_docs` tool that:
4656
4705
 
4657
4706
  When `GEISTDOCS_CHAT_PROXY_URL` is set, Geistdocs runs local documentation retrieval on the first user message before forwarding the request to the configured proxy. This gives proxy-backed services access to the current page and related local documentation without requiring them to read the site's source files directly. With `contextInjection: "page-only"`, Geistdocs skips this retrieval.
4658
4707
 
4659
- Set `ai.retrieval` to `"mixedbread"` to replace local keyword retrieval with semantic retrieval for default, proxy, and hosted eve modes. Mixedbread returns the matching content chunk, while the AI model and the visible search dialog remain unchanged. Geistdocs falls back to local Orama retrieval when Mixedbread is unavailable. Read [Improve Ask AI answers with Mixedbread](/docs/mixedbread-retrieval) to provision a Store and configure production sync.
4708
+ Set `ai.retrieval` to `"mixedbread"` to replace local keyword retrieval with semantic retrieval for default, proxy, and hosted eve modes. Mixedbread returns the matching content chunk, while the AI model stays the same. Geistdocs falls back to local Orama retrieval when Mixedbread is unavailable. `ai.retrieval` does not change the search dialog. To serve site search from the same Store, set `search.provider` to `"mixedbread"` as well. Read [Improve Ask AI and site search with Mixedbread](/docs/mixedbread-retrieval) to provision a Store and configure production sync.
4660
4709
 
4661
4710
  ### Persistent Chat History
4662
4711
 
@@ -5699,10 +5748,10 @@ Pass `srcLight` and `srcDark` for theme-aware artwork. `Image` is also included
5699
5748
  ---
5700
5749
 
5701
5750
  ---
5702
- title: Improve Ask AI answers with Mixedbread
5703
- description: Configure Mixedbread retrieval for a Geistdocs Ask AI chat and sync documentation to a site-specific Store
5751
+ title: Improve Ask AI and site search with Mixedbread
5752
+ description: Configure Mixedbread semantic retrieval for Geistdocs Ask AI, site search, or both, and sync documentation to a site-specific Store
5704
5753
  type: guide
5705
- summary: Provision a Mixedbread Store for one Geistdocs consumer site, enable semantic retrieval, and sync documentation during production builds.
5754
+ summary: Provision a Mixedbread Store for one Geistdocs consumer site, turn on semantic retrieval for Ask AI with ai.retrieval and for site search with search.provider, and sync documentation during production builds.
5706
5755
  url: /docs/mixedbread-retrieval
5707
5756
  source: apps/template/content/docs/mixedbread-retrieval.mdx
5708
5757
  prerequisites:
@@ -5714,26 +5763,35 @@ related:
5714
5763
  - /docs/llms-txt
5715
5764
  ---
5716
5765
 
5717
- # Improve Ask AI answers with Mixedbread
5766
+ # Improve Ask AI and site search with Mixedbread
5718
5767
 
5719
- Mixedbread retrieval gives Ask AI the documentation passages that best match a user's question. The AI model stays the same, while semantic retrieval improves the evidence included with each question.
5768
+ Mixedbread retrieval matches documentation to a reader's words by meaning instead of by keyword. A Geistdocs site can use its Mixedbread Store for Ask AI, for site search, or for both, and each surface has its own setting.
5720
5769
 
5721
- Geistdocs keeps the visible search dialog on its local Orama index. Mixedbread only changes the documentation retrieval used by Ask AI.
5770
+ Both settings default to local Orama search. A site that sets neither behaves exactly as before, and a site that already uses Mixedbread for Ask AI keeps the same Ask AI behavior.
5722
5771
 
5723
- Help me enable Mixedbread retrieval for this Geistdocs consumer site. Confirm that I am in this site's own repository and linked to the correct Vercel project before provisioning a Store. Then verify `siteId`, `ai.retrieval`, the search export route, the build script, and the `MXBAI` environment variables.
5772
+ Help me enable Mixedbread retrieval for this Geistdocs consumer site. Confirm that I am in this site's own repository and linked to the correct Vercel project before provisioning a Store. Then verify `siteId`, `ai.retrieval`, `search.provider`, the `search` config forwarded by `lib/geistdocs/config.tsx`, the search export route, the build script, and the `MXBAI` environment variables.
5724
5773
 
5725
5774
  ## How Mixedbread retrieval works
5726
5775
 
5727
- Ask AI searches documentation before sending a question to the configured AI model. The default local retriever matches keywords with Orama. Mixedbread adds semantic matching and returns the relevant content chunk instead of the start of a matching page.
5776
+ Two independent settings decide which surfaces read the Store:
5777
+
5778
+ | Setting | Surfaces | Default |
5779
+ | --- | --- | --- |
5780
+ | `ai.retrieval: "mixedbread"` | The documentation retrieval Ask AI runs before it sends a question to the AI model | `"local"` |
5781
+ | `search.provider: "mixedbread"` | The search dialog, `GET /api/search`, and the MCP `search_docs` tool, which calls the same route | `"local"` |
5782
+
5783
+ A site can set either, both, or neither. One Store and one sync serve both surfaces.
5784
+
5785
+ For Ask AI, the default local retriever matches keywords with Orama. Mixedbread adds semantic matching and returns the relevant content chunk instead of the start of a matching page. The AI model stays the same.
5786
+
5787
+ For site search, Mixedbread ranks pages and sections, and Geistdocs renders each result from the running deployment. The response shape stays the same, so the search dialog needs no change.
5728
5788
 
5729
5789
  The production build performs an incremental sync:
5730
5790
 
5731
5791
  1. Next.js statically generates `/api/search/export` from the site's configured content sources.
5732
5792
  2. `geistdocs search sync` uploads new or changed Markdown documents to the site's Mixedbread Store.
5733
- 3. Ask AI queries the Store by `siteId` and locale.
5734
- 4. Geistdocs falls back to the local Orama retriever if Mixedbread is unavailable or its credentials are missing at runtime.
5735
-
5736
- Pages with `internal: true` or `excludeFrom: [chat]` are omitted from the export and removed from the Store on the next successful sync.
5793
+ 3. Ask AI, site search, or both query the Store by `siteId` and locale.
5794
+ 4. Geistdocs answers from the local Orama index if Mixedbread is unavailable or its credentials are missing at runtime.
5737
5795
 
5738
5796
  ## Prerequisites
5739
5797
 
@@ -5741,7 +5799,7 @@ Before enabling Mixedbread retrieval, confirm that:
5741
5799
 
5742
5800
  - The Mixedbread Marketplace integration is installed on your Vercel team.
5743
5801
  - The consumer site has its own Vercel project.
5744
- - The consumer repository uses a Geistdocs release that includes `geistdocs search sync` and `createSearchExportRoute`.
5802
+ - The consumer repository uses a Geistdocs release that includes `geistdocs search sync` and `createSearchExportRoute`. Site search needs a release that includes `search.provider`.
5745
5803
  - `source.config.ts` enables `includeProcessedMarkdown`, as generated Geistdocs projects do by default.
5746
5804
  - `next.config.ts` enables `cacheComponents`, as generated Geistdocs projects do by default. Next.js must statically prerender `/api/search/export` before the sync command runs.
5747
5805
 
@@ -5776,7 +5834,13 @@ vercel integration list --integration mixedbread
5776
5834
 
5777
5835
  ## Configure the consumer site
5778
5836
 
5779
- Set a unique `siteId` and enable Mixedbread in the consumer repository's root `geistdocs.tsx` file:
5837
+ Set a unique `siteId` in the consumer repository's root `geistdocs.tsx` file, then turn on Mixedbread for Ask AI, site search, or both. Both surfaces need `siteId`, and both read the same `MXBAI_API_KEY` and `MXBAI_STORE_ID` variables.
5838
+
5839
+ Keep `MXBAI_API_KEY` and `MXBAI_STORE_ID` out of `geistdocs.tsx` and every other config value, because that config is available to client components.
5840
+
5841
+ ### Use Mixedbread for Ask AI
5842
+
5843
+ Set `ai.retrieval` in `geistdocs.tsx`:
5780
5844
 
5781
5845
  ```tsx title="geistdocs.tsx"
5782
5846
  import type {
@@ -5790,7 +5854,64 @@ export const ai = {
5790
5854
  } satisfies GeistdocsAIConfig;
5791
5855
  ```
5792
5856
 
5793
- The generated `lib/geistdocs/config.tsx` spreads `ai` into the package config. Keep `MXBAI_API_KEY` and `MXBAI_STORE_ID` out of `geistdocs.tsx` because that config is available to client components.
5857
+ The generated `lib/geistdocs/config.tsx` spreads `ai` into the package config.
5858
+
5859
+ ### Use Mixedbread for site search
5860
+
5861
+ Site search takes two edits. First, set `search.provider` in `geistdocs.tsx`:
5862
+
5863
+ ```tsx title="geistdocs.tsx"
5864
+ import type {
5865
+ GeistdocsSearchConfig,
5866
+ } from "@vercel/geistdocs/config";
5867
+
5868
+ export const siteId = "my-product-docs";
5869
+
5870
+ export const search = {
5871
+ provider: "mixedbread",
5872
+ } satisfies GeistdocsSearchConfig;
5873
+ ```
5874
+
5875
+ Second, make sure `lib/geistdocs/config.tsx` imports `search` and passes it to `defineConfig`:
5876
+
5877
+ ```tsx title="lib/geistdocs/config.tsx"
5878
+ import { defineConfig } from "@vercel/geistdocs/config";
5879
+ import {
5880
+ // ...your other exports
5881
+ search,
5882
+ siteId,
5883
+ } from "@/geistdocs";
5884
+
5885
+ export const config = defineConfig({
5886
+ // ...
5887
+ search,
5888
+ siteId,
5889
+ });
5890
+ ```
5891
+
5892
+ New projects generated from the template already export `search` as `{}` and forward it, so they only change the `provider` value. A site created before this release adds the `search` export and the forward once. Without the forward, the setting never reaches the search route, and search stays local with no error.
5893
+
5894
+ The search route file doesn't change. `createSearchRoute({ config, sources })` reads `search.provider` from `config`, and `search.enabled` keeps its existing meaning.
5895
+
5896
+ ### Override the connection on the server
5897
+
5898
+ To pass credentials another way, or to use a non-default Mixedbread API origin, set the server-only `mixedbread` option on the search route. It has the same shape as the `mixedbread` option on `createChatRoute`:
5899
+
5900
+ ```ts title="app/api/search/route.ts"
5901
+ import { createSearchRoute } from "@vercel/geistdocs/routes/search";
5902
+ import { config } from "@/lib/geistdocs/config";
5903
+ import { geistdocsSource } from "@/lib/geistdocs/source";
5904
+
5905
+ export const GET = createSearchRoute({
5906
+ config,
5907
+ sources: [geistdocsSource],
5908
+ mixedbread: {
5909
+ apiBaseUrl: "https://mixedbread.example.com/v1",
5910
+ },
5911
+ });
5912
+ ```
5913
+
5914
+ The option also accepts `apiKey`, `storeId`, and `requestTimeoutMs`, which defaults to 1,500 ms for site search. `MXBAI_API_KEY` and `MXBAI_STORE_ID` fill any credential you omit. The runtime does not read `MXBAI_BASE_URL`. Only the `geistdocs search sync` command reads it, so set `apiBaseUrl` on the route for runtime requests.
5794
5915
 
5795
5916
  ## Add the export route to an existing site
5796
5917
 
@@ -5809,6 +5930,38 @@ export const { GET } = createSearchExportRoute({
5809
5930
 
5810
5931
  Pass every configured source in `sources` when the site has multiple sections or documentation versions.
5811
5932
 
5933
+ ## Control which pages reach the Store
5934
+
5935
+ The export holds the pages of every surface that reads the Store:
5936
+
5937
+ | Configuration | Pages in the export |
5938
+ | --- | --- |
5939
+ | Only `ai.retrieval: "mixedbread"` | Chat-visible pages, as before |
5940
+ | Only `search.provider: "mixedbread"` | Search-visible pages |
5941
+ | Both | Pages visible to chat, search, or both |
5942
+
5943
+ Pages with `internal: true` are never exported. A page that leaves the export is removed from the Store on the next successful sync.
5944
+
5945
+ When site search uses Mixedbread, a page with `excludeFrom: [chat]` that search can still show is uploaded to the Mixedbread Store. Ask AI still never retrieves it, because Ask AI checks every Store hit against chat visibility.
5946
+
5947
+ Each surface checks every Store hit against the running deployment before it uses the hit. Site search never shows a page with `excludeFrom: [search]`, an `internal: true` page, a page that the search route's `filterPage` rejects, or a page that no longer exists, whatever the Store holds. Ask AI applies the same check for chat.
5948
+
5949
+ To keep a page out of the Store entirely, reject it with `filterPage` on the export route:
5950
+
5951
+ ```ts title="app/api/search/export/route.ts"
5952
+ import { createSearchExportRoute } from "@vercel/geistdocs/routes/search-export";
5953
+ import { config } from "@/lib/geistdocs/config";
5954
+ import { geistdocsSource } from "@/lib/geistdocs/source";
5955
+
5956
+ export const { GET } = createSearchExportRoute({
5957
+ config,
5958
+ sources: [geistdocsSource],
5959
+ filterPage: (page) => !page.url.includes("/internal"),
5960
+ });
5961
+ ```
5962
+
5963
+ Pass the same `filterPage` to the export, chat, and search routes. The search route can only drop more hits at request time, and a page that the export filter rejects is not in the Store.
5964
+
5812
5965
  ## Sync after each production build
5813
5966
 
5814
5967
  New Geistdocs projects run the sync from their build script. For an existing site, update `package.json`:
@@ -5821,7 +5974,9 @@ New Geistdocs projects run the sync from their build script. For an existing sit
5821
5974
  }
5822
5975
  ```
5823
5976
 
5824
- Deploy the site to production. The first production build uploads every chat-visible page. Later builds upload changed pages and remove stale pages while leaving unrelated Store files untouched.
5977
+ Deploy the site to production. The first production build uploads every exported page. Later builds upload changed pages and remove stale pages while leaving unrelated Store files untouched.
5978
+
5979
+ The sync runs when Ask AI, site search, or both use Mixedbread. When neither does, it prints `Geistdocs search sync skipped: neither Ask AI nor site search uses Mixedbread.`
5825
5980
 
5826
5981
  Local and preview builds skip the remote sync. To test a sync outside a production Vercel build, build the site and run the sync with the linked project's production environment variables:
5827
5982
 
@@ -5831,18 +5986,68 @@ vercel env run --environment production -- \
5831
5986
  pnpm exec geistdocs search sync --allow-non-production
5832
5987
  ```
5833
5988
 
5834
- The sync command fails when Mixedbread retrieval is enabled for a production build but the Store environment variables are missing. The error prints the provisioning command and reminds you to run it from the correct consumer repository.
5989
+ The sync command fails when Ask AI or site search uses Mixedbread for a production build but the Store environment variables are missing. The error prints the provisioning command and reminds you to run it from the correct consumer repository.
5990
+
5991
+ An existing Ask AI site uploads nothing new when it upgrades Geistdocs, because Store metadata and content hashes are unchanged. Turning on `search.provider` adds the search-visible pages that chat excludes.
5992
+
5993
+ ## Preview and local deployments
5994
+
5995
+ The Store holds the content of the last production sync. Preview and local deployments that have the `MXBAI_*` variables query the production Store, and Geistdocs still renders and checks every result against the deployment that serves the request.
5996
+
5997
+ A page that exists only in a preview deployment is not in the Store. That page appears in search results only when local search answers.
5998
+
5999
+ The provisioning command connects the Store to the production environment. A preview deployment without the `MXBAI_*` variables serves local search and local Ask AI retrieval.
6000
+
6001
+ ## What readers see in site search
6002
+
6003
+ Mixedbread decides which pages and sections match and in what order. Every string in a result, including the title, breadcrumbs, heading, anchor, excerpt, and URL, comes from the page in the running deployment. Geistdocs never shows text stored in Mixedbread.
6004
+
6005
+ Each query returns up to 8 pages, and each page shows up to 3 sections. URLs stay app-local, as they are with local search. The generated OpenAPI document describes the search operation as semantic search when `search.provider` is `"mixedbread"`.
6006
+
6007
+ ## When local search answers instead
6008
+
6009
+ Site search never fails because of Mixedbread. The search route answers from the local index with status 200 when:
6010
+
6011
+ - `MXBAI_API_KEY`, `MXBAI_STORE_ID`, or `siteId` is missing. The server logs one warning per route instance, such as `[Geistdocs search] search.provider is "mixedbread" but MXBAI_STORE_ID is missing. Serving local search.`
6012
+ - The Mixedbread request fails or exceeds its timeout, which is 1,500 ms by default, with no retries. The server logs `[Geistdocs search] Mixedbread search failed. Serving local search.` with the error.
6013
+ - Mixedbread returns nothing that the deployment can show, for example before the first production sync.
6014
+
6015
+ The local route always answers these requests without calling Mixedbread:
6016
+
6017
+ - A request with an empty query.
6018
+ - A request with a `tag` parameter. The built-in local index still returns no results for a tagged request, as before.
6019
+ - A request for a locale the site does not configure.
5835
6020
 
5836
6021
  ## Verify retrieval
5837
6022
 
5838
- Open the Mixedbread dashboard through Vercel and confirm that the Store contains one file per chat-visible documentation page:
6023
+ Open the Mixedbread dashboard through Vercel and confirm that the Store contains one file per exported documentation page:
5839
6024
 
5840
6025
  ```bash title="Terminal"
5841
6026
  vercel integration open mixedbread
5842
6027
  ```
5843
6028
 
6029
+ ### Verify Ask AI
6030
+
5844
6031
  Ask a question that uses different words from the page title. Ask AI should cite the relevant page and answer from the matching section. If Mixedbread returns an error or exceeds the request timeout, Geistdocs logs a warning and retries the question with local Orama retrieval.
5845
6032
 
6033
+ ### Verify site search
6034
+
6035
+ Every search response from a site with `search.provider: "mixedbread"` carries the `x-geistdocs-search-provider` header. Request a query and read the header:
6036
+
6037
+ ```bash title="Terminal"
6038
+ curl -si 'https://docs.example.com/api/search?query=deploy%20a%20site&locale=en'
6039
+ ```
6040
+
6041
+ | Header value | Meaning |
6042
+ | --- | --- |
6043
+ | `mixedbread` | Mixedbread ranked the results. |
6044
+ | `local` | The site opted in, but local search answered this request. Check the server logs for a warning. |
6045
+ | No header | The setting did not reach the search route. Check that `geistdocs.tsx` sets `search.provider` and that `lib/geistdocs/config.tsx` forwards `search`. |
6046
+
6047
+ ## Request cost
6048
+
6049
+ The search dialog sends one request per debounced query. Each request that reaches Mixedbread is one Mixedbread search request. Geistdocs does not cache search results.
6050
+
5846
6051
 
5847
6052
  ---
5848
6053
 
@@ -6097,7 +6302,7 @@ export const { GET } = createLlmsRoute({
6097
6302
  });
6098
6303
  ```
6099
6304
 
6100
- `filterPage` receives the page plus its language and source. Use the same synchronous filter function for every public aggregate route so `/llms.txt`, `sitemap.md`, local search, Mixedbread search export, and Ask AI expose the same cacheable page set. Pass that function as `canViewPage` to `createDocsMarkdownRoute`. Request-specific HTML access belongs in `createDocsPage({ canViewPage })`; do not personalize public indexes.
6305
+ `filterPage` receives the page plus its language and source. Use the same synchronous filter function for every public aggregate route so `/llms.txt`, `sitemap.md`, site search, Mixedbread search export, and Ask AI expose the same cacheable page set. Pass that function as `canViewPage` to `createDocsMarkdownRoute`. Request-specific HTML access belongs in `createDocsPage({ canViewPage })`; do not personalize public indexes.
6101
6306
 
6102
6307
  ## The llms.txt standard
6103
6308
 
@@ -30,7 +30,7 @@
30
30
  "description": "Learn about the environment variables used in Geistdocs",
31
31
  "path": "pages/env.md",
32
32
  "source": "apps/template/content/docs/env.mdx",
33
- "summary": "Environment variables required by Geistdocs for AI chat, Mixedbread retrieval, proxy mode, eve agent session cookies, and production URL configuration.",
33
+ "summary": "Environment variables required by Geistdocs for AI chat, Mixedbread retrieval for Ask AI and site search, proxy mode, eve agent session cookies, and production URL configuration.",
34
34
  "title": "Environment Variables",
35
35
  "type": "reference",
36
36
  "url": "/docs/env"
@@ -279,11 +279,11 @@
279
279
  "url": "/docs/components/image"
280
280
  },
281
281
  {
282
- "description": "Configure Mixedbread retrieval for a Geistdocs Ask AI chat and sync documentation to a site-specific Store",
282
+ "description": "Configure Mixedbread semantic retrieval for Geistdocs Ask AI, site search, or both, and sync documentation to a site-specific Store",
283
283
  "path": "pages/mixedbread-retrieval.md",
284
284
  "source": "apps/template/content/docs/mixedbread-retrieval.mdx",
285
- "summary": "Provision a Mixedbread Store for one Geistdocs consumer site, enable semantic retrieval, and sync documentation during production builds.",
286
- "title": "Improve Ask AI answers with Mixedbread",
285
+ "summary": "Provision a Mixedbread Store for one Geistdocs consumer site, turn on semantic retrieval for Ask AI with ai.retrieval and for site search with search.provider, and sync documentation during production builds.",
286
+ "title": "Improve Ask AI and site search with Mixedbread",
287
287
  "type": "guide",
288
288
  "url": "/docs/mixedbread-retrieval"
289
289
  },
@@ -467,5 +467,5 @@
467
467
  }
468
468
  ],
469
469
  "source": "apps/template/content/docs",
470
- "version": "2.14.5"
470
+ "version": "2.14.7-canary.6ce58a6"
471
471
  }
@@ -52,9 +52,25 @@ Once open, users can:
52
52
  - Ask questions about any part of your documentation
53
53
  - View the documentation pages used as sources for each answer
54
54
  - Copy an answer as Markdown
55
+ - Share a conversation with a public link when the site configures chat sharing
55
56
  - Expand the desktop panel to fill the viewport
56
57
  - Get step-by-step guidance on complex topics
57
58
 
59
+ ### Share a conversation
60
+
61
+ To show **Share chat** in the chat header, set `ai.share` to an app-local POST endpoint and the public route that displays shared conversations:
62
+
63
+ ```tsx title="geistdocs.tsx"
64
+ export const ai = {
65
+ share: {
66
+ endpoint: "/api/ai-chat/share",
67
+ path: "/ai-chat",
68
+ },
69
+ };
70
+ ```
71
+
72
+ Geistdocs sends the endpoint a JSON body with `messages`, `hostPath`, and an optional `summary` containing the first user message. The endpoint must persist the conversation and return `{ "shareId": "..." }`. Geistdocs copies a link to `<path>/<shareId>`; your app must serve that public route and load the saved conversation. The endpoint and path are app-local, and Geistdocs adds `basePath` when needed. Chat sharing is disabled when `ai.share` is unset.
73
+
58
74
  ## Control Ask AI from your own components
59
75
 
60
76
  `useGeistdocsChat` from `@vercel/geistdocs/controls` opens, closes, and sends messages to the Ask AI chat from your own client components. Call it from any component rendered inside `GeistdocsProvider`, such as a custom header, a callout, or an MDX component.
@@ -704,7 +720,7 @@ By default, the AI assistant includes a built-in `search_docs` tool that:
704
720
 
705
721
  When `GEISTDOCS_CHAT_PROXY_URL` is set, Geistdocs runs local documentation retrieval on the first user message before forwarding the request to the configured proxy. This gives proxy-backed services access to the current page and related local documentation without requiring them to read the site's source files directly. With `contextInjection: "page-only"`, Geistdocs skips this retrieval.
706
722
 
707
- Set `ai.retrieval` to `"mixedbread"` to replace local keyword retrieval with semantic retrieval for default, proxy, and hosted eve modes. Mixedbread returns the matching content chunk, while the AI model and the visible search dialog remain unchanged. Geistdocs falls back to local Orama retrieval when Mixedbread is unavailable. Read [Improve Ask AI answers with Mixedbread](/docs/mixedbread-retrieval) to provision a Store and configure production sync.
723
+ Set `ai.retrieval` to `"mixedbread"` to replace local keyword retrieval with semantic retrieval for default, proxy, and hosted eve modes. Mixedbread returns the matching content chunk, while the AI model stays the same. Geistdocs falls back to local Orama retrieval when Mixedbread is unavailable. `ai.retrieval` does not change the search dialog. To serve site search from the same Store, set `search.provider` to `"mixedbread"` as well. Read [Improve Ask AI and site search with Mixedbread](/docs/mixedbread-retrieval) to provision a Store and configure production sync.
708
724
 
709
725
  ### Persistent Chat History
710
726