@vercel/geistdocs 1.2.1 → 1.2.3-canary.48fea3c

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 (339) hide show
  1. package/dist/cli/index.js +3 -0
  2. package/dist/components/callout.d.ts +12 -0
  3. package/dist/components/callout.d.ts.map +1 -0
  4. package/dist/components/callout.js +7 -0
  5. package/dist/components/code-block-tabs.d.ts +7 -0
  6. package/dist/components/code-block-tabs.d.ts.map +1 -0
  7. package/dist/components/code-block-tabs.js +7 -0
  8. package/dist/components/code-block.d.ts +14 -0
  9. package/dist/components/code-block.d.ts.map +1 -0
  10. package/dist/components/code-block.js +45 -0
  11. package/dist/components/copy-prompt.d.ts +11 -0
  12. package/dist/components/copy-prompt.d.ts.map +1 -0
  13. package/dist/components/copy-prompt.js +58 -0
  14. package/dist/components/mermaid.d.ts +4 -0
  15. package/dist/components/mermaid.d.ts.map +1 -0
  16. package/dist/components/mermaid.js +44 -0
  17. package/dist/components/theme-aware-image.d.ts +12 -0
  18. package/dist/components/theme-aware-image.d.ts.map +1 -0
  19. package/dist/components/theme-aware-image.js +8 -0
  20. package/dist/components/video.d.ts +6 -0
  21. package/dist/components/video.d.ts.map +1 -0
  22. package/dist/components/video.js +3 -0
  23. package/dist/config.d.ts +71 -0
  24. package/dist/config.d.ts.map +1 -0
  25. package/dist/config.js +1 -0
  26. package/dist/controls.d.ts +15 -0
  27. package/dist/controls.d.ts.map +1 -0
  28. package/dist/controls.js +52 -0
  29. package/dist/internal/chat/context.d.ts +19 -0
  30. package/dist/internal/chat/context.d.ts.map +1 -0
  31. package/dist/internal/chat/context.js +36 -0
  32. package/dist/internal/chat/conversation.d.ts +10 -0
  33. package/dist/internal/chat/conversation.d.ts.map +1 -0
  34. package/dist/internal/chat/conversation.js +16 -0
  35. package/dist/internal/chat/copy-chat.d.ts +5 -0
  36. package/dist/internal/chat/copy-chat.d.ts.map +1 -0
  37. package/dist/internal/chat/copy-chat.js +35 -0
  38. package/dist/internal/chat/db.d.ts +13 -0
  39. package/dist/internal/chat/db.d.ts.map +1 -0
  40. package/dist/internal/chat/db.js +19 -0
  41. package/dist/internal/chat/message-metadata.d.ts +8 -0
  42. package/dist/internal/chat/message-metadata.d.ts.map +1 -0
  43. package/dist/internal/chat/message-metadata.js +29 -0
  44. package/dist/internal/chat/message.d.ts +11 -0
  45. package/dist/internal/chat/message.d.ts.map +1 -0
  46. package/dist/internal/chat/message.js +11 -0
  47. package/dist/internal/chat/prompt-input.d.ts +13 -0
  48. package/dist/internal/chat/prompt-input.d.ts.map +1 -0
  49. package/dist/internal/chat/prompt-input.js +39 -0
  50. package/dist/internal/chat/shell.d.ts +2 -0
  51. package/dist/internal/chat/shell.d.ts.map +1 -0
  52. package/dist/internal/chat/shell.js +194 -0
  53. package/dist/internal/chat/shimmer.d.ts +11 -0
  54. package/dist/internal/chat/shimmer.d.ts.map +1 -0
  55. package/dist/internal/chat/shimmer.js +18 -0
  56. package/dist/internal/chat/sources.d.ts +13 -0
  57. package/dist/internal/chat/sources.d.ts.map +1 -0
  58. package/dist/internal/chat/sources.js +9 -0
  59. package/dist/internal/chat/suggestion.d.ts +11 -0
  60. package/dist/internal/chat/suggestion.d.ts.map +1 -0
  61. package/dist/internal/chat/suggestion.js +12 -0
  62. package/dist/internal/cn.d.ts +3 -0
  63. package/dist/internal/cn.d.ts.map +1 -0
  64. package/dist/internal/cn.js +3 -0
  65. package/dist/internal/feedback-action.d.ts +14 -0
  66. package/dist/internal/feedback-action.d.ts.map +1 -0
  67. package/dist/internal/feedback-action.js +34 -0
  68. package/dist/internal/i18n.d.ts +6 -0
  69. package/dist/internal/i18n.d.ts.map +1 -0
  70. package/dist/internal/i18n.js +18 -0
  71. package/dist/internal/languages.d.ts +7 -0
  72. package/dist/internal/languages.d.ts.map +1 -0
  73. package/dist/internal/languages.js +18 -0
  74. package/dist/internal/not-implemented.d.ts +2 -0
  75. package/dist/internal/not-implemented.d.ts.map +1 -0
  76. package/dist/internal/not-implemented.js +4 -0
  77. package/dist/internal/page-actions-client.d.ts +13 -0
  78. package/dist/internal/page-actions-client.d.ts.map +1 -0
  79. package/dist/internal/page-actions-client.js +160 -0
  80. package/dist/internal/page-actions.d.ts +18 -0
  81. package/dist/internal/page-actions.d.ts.map +1 -0
  82. package/dist/internal/page-actions.js +4 -0
  83. package/dist/internal/provider-client.d.ts +9 -0
  84. package/dist/internal/provider-client.d.ts.map +1 -0
  85. package/dist/internal/provider-client.js +23 -0
  86. package/dist/internal/search.d.ts +5 -0
  87. package/dist/internal/search.d.ts.map +1 -0
  88. package/dist/internal/search.js +14 -0
  89. package/dist/internal/sidebar.d.ts +9 -0
  90. package/dist/internal/sidebar.d.ts.map +1 -0
  91. package/dist/internal/sidebar.js +38 -0
  92. package/dist/internal/table-of-contents.d.ts +9 -0
  93. package/dist/internal/table-of-contents.d.ts.map +1 -0
  94. package/dist/internal/table-of-contents.js +5 -0
  95. package/dist/internal/ui/button-group.d.ts +13 -0
  96. package/dist/internal/ui/button-group.d.ts.map +1 -0
  97. package/dist/internal/ui/button-group.js +26 -0
  98. package/dist/internal/ui/button.d.ts +12 -0
  99. package/dist/internal/ui/button.d.ts.map +1 -0
  100. package/dist/internal/ui/button.js +33 -0
  101. package/dist/internal/ui/card.d.ts +6 -0
  102. package/dist/internal/ui/card.d.ts.map +1 -0
  103. package/dist/internal/ui/card.js +14 -0
  104. package/dist/internal/ui/collapsible.d.ts +6 -0
  105. package/dist/internal/ui/collapsible.d.ts.map +1 -0
  106. package/dist/internal/ui/collapsible.js +12 -0
  107. package/dist/internal/ui/drawer.d.ts +6 -0
  108. package/dist/internal/ui/drawer.d.ts.map +1 -0
  109. package/dist/internal/ui/drawer.js +13 -0
  110. package/dist/internal/ui/dropdown-menu.d.ts +22 -0
  111. package/dist/internal/ui/dropdown-menu.d.ts.map +1 -0
  112. package/dist/internal/ui/dropdown-menu.js +41 -0
  113. package/dist/internal/ui/input-group.d.ts +15 -0
  114. package/dist/internal/ui/input-group.d.ts.map +1 -0
  115. package/dist/internal/ui/input-group.js +44 -0
  116. package/dist/internal/ui/input.d.ts +3 -0
  117. package/dist/internal/ui/input.d.ts.map +1 -0
  118. package/dist/internal/ui/input.js +5 -0
  119. package/dist/internal/ui/kbd.d.ts +4 -0
  120. package/dist/internal/ui/kbd.d.ts.map +1 -0
  121. package/dist/internal/ui/kbd.js +8 -0
  122. package/dist/internal/ui/popover.d.ts +6 -0
  123. package/dist/internal/ui/popover.d.ts.map +1 -0
  124. package/dist/internal/ui/popover.js +13 -0
  125. package/dist/internal/ui/scroll-area.d.ts +5 -0
  126. package/dist/internal/ui/scroll-area.d.ts.map +1 -0
  127. package/dist/internal/ui/scroll-area.js +12 -0
  128. package/dist/internal/ui/separator.d.ts +4 -0
  129. package/dist/internal/ui/separator.d.ts.map +1 -0
  130. package/dist/internal/ui/separator.js +7 -0
  131. package/dist/internal/ui/sheet.d.ts +10 -0
  132. package/dist/internal/ui/sheet.d.ts.map +1 -0
  133. package/dist/internal/ui/sheet.js +24 -0
  134. package/dist/internal/ui/sonner.d.ts +3 -0
  135. package/dist/internal/ui/sonner.d.ts.map +1 -0
  136. package/dist/internal/ui/sonner.js +20 -0
  137. package/dist/internal/ui/spinner.d.ts +3 -0
  138. package/dist/internal/ui/spinner.d.ts.map +1 -0
  139. package/dist/internal/ui/spinner.js +6 -0
  140. package/dist/internal/ui/textarea.d.ts +3 -0
  141. package/dist/internal/ui/textarea.d.ts.map +1 -0
  142. package/dist/internal/ui/textarea.js +5 -0
  143. package/dist/internal/ui/tooltip.d.ts +7 -0
  144. package/dist/internal/ui/tooltip.d.ts.map +1 -0
  145. package/dist/internal/ui/tooltip.js +16 -0
  146. package/dist/internal/use-mobile.d.ts +2 -0
  147. package/dist/internal/use-mobile.d.ts.map +1 -0
  148. package/dist/internal/use-mobile.js +16 -0
  149. package/dist/layout.d.ts +14 -0
  150. package/dist/layout.d.ts.map +1 -0
  151. package/dist/layout.js +31 -0
  152. package/dist/mdx.d.ts +36 -0
  153. package/dist/mdx.d.ts.map +1 -0
  154. package/dist/mdx.js +74 -0
  155. package/dist/pages/docs.d.ts +77 -0
  156. package/dist/pages/docs.d.ts.map +1 -0
  157. package/dist/pages/docs.js +92 -0
  158. package/dist/proxy.d.ts +37 -0
  159. package/dist/proxy.d.ts.map +1 -0
  160. package/dist/proxy.js +162 -0
  161. package/dist/routes/chat.d.ts +14 -0
  162. package/dist/routes/chat.d.ts.map +1 -0
  163. package/dist/routes/chat.js +242 -0
  164. package/dist/routes/llms.d.ts +51 -0
  165. package/dist/routes/llms.d.ts.map +1 -0
  166. package/dist/routes/llms.js +59 -0
  167. package/dist/routes/search.d.ts +11 -0
  168. package/dist/routes/search.d.ts.map +1 -0
  169. package/dist/routes/search.js +74 -0
  170. package/dist/routes/sitemap.d.ts +44 -0
  171. package/dist/routes/sitemap.d.ts.map +1 -0
  172. package/dist/routes/sitemap.js +168 -0
  173. package/dist/sidebar.d.ts +11 -0
  174. package/dist/sidebar.d.ts.map +1 -0
  175. package/dist/sidebar.js +16 -0
  176. package/dist/source.d.ts +174 -0
  177. package/dist/source.d.ts.map +1 -0
  178. package/dist/source.js +129 -0
  179. package/dist/versions.d.ts +15 -0
  180. package/dist/versions.d.ts.map +1 -0
  181. package/dist/versions.js +52 -0
  182. package/package.json +141 -9
  183. package/styles.css +193 -0
  184. package/template/_gitignore +29 -0
  185. package/template/app/[lang]/(home)/components/centered-section.tsx +26 -0
  186. package/template/app/[lang]/(home)/components/cta.tsx +19 -0
  187. package/template/app/[lang]/(home)/components/hero.tsx +27 -0
  188. package/template/app/[lang]/(home)/components/one-two-section.tsx +25 -0
  189. package/template/app/[lang]/(home)/components/templates.tsx +50 -0
  190. package/template/app/[lang]/(home)/components/text-grid-section.tsx +20 -0
  191. package/template/app/[lang]/(home)/layout.tsx +14 -0
  192. package/template/app/[lang]/(home)/page.tsx +126 -0
  193. package/template/app/[lang]/docs/[[...slug]]/page.tsx +19 -0
  194. package/template/app/[lang]/docs/layout.tsx +14 -0
  195. package/template/app/[lang]/layout.tsx +29 -0
  196. package/template/app/[lang]/llms.mdx/[[...slug]]/route.ts +7 -0
  197. package/template/app/[lang]/llms.txt/route.ts +6 -0
  198. package/template/app/[lang]/og/[...slug]/background.png +0 -0
  199. package/template/app/[lang]/og/[...slug]/geist-sans-regular.ttf +0 -0
  200. package/template/app/[lang]/og/[...slug]/geist-sans-semibold.ttf +0 -0
  201. package/template/app/[lang]/og/[...slug]/route.tsx +95 -0
  202. package/template/app/[lang]/rss.xml/route.ts +52 -0
  203. package/template/app/[lang]/sitemap.md/route.ts +9 -0
  204. package/template/app/actions/feedback/emotions.ts +18 -0
  205. package/template/app/actions/feedback/index.ts +45 -0
  206. package/template/app/api/chat/route.ts +8 -0
  207. package/template/app/api/search/route.ts +5 -0
  208. package/template/app/favicon.ico +0 -0
  209. package/template/app/global.css +2 -0
  210. package/template/app/robots.ts +14 -0
  211. package/template/app/sitemap.ts +36 -0
  212. package/template/app/styles/geistdocs.css +554 -0
  213. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-arrow-up-right-small.tsx +35 -0
  214. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-arrow-up-right.tsx +27 -0
  215. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-check.tsx +27 -0
  216. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-chevron-down-small.tsx +30 -0
  217. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-chevron-right.tsx +27 -0
  218. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-copy.tsx +27 -0
  219. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-file-text.tsx +25 -0
  220. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-menu-alt.tsx +27 -0
  221. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-slash-forward.tsx +36 -0
  222. package/template/components/geistcn-fallbacks/geistcn-assets/icons/index.tsx +11 -0
  223. package/template/components/geistcn-fallbacks/geistcn-assets/logos/index.tsx +14 -0
  224. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-ai-elements.tsx +29 -0
  225. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-ai-sdk.tsx +38 -0
  226. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-chat-sdk.tsx +42 -0
  227. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-flags-sdk.tsx +42 -0
  228. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-icon-vercel.tsx +31 -0
  229. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-streamdown.tsx +29 -0
  230. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-vercel-oss.tsx +24 -0
  231. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-workflow-sdk.tsx +73 -0
  232. package/template/components/geistdocs/callout.tsx +40 -0
  233. package/template/components/geistdocs/chat.tsx +24 -0
  234. package/template/components/geistdocs/code-block-tabs.tsx +61 -0
  235. package/template/components/geistdocs/code-block.tsx +134 -0
  236. package/template/components/geistdocs/copy-page.tsx +27 -0
  237. package/template/components/geistdocs/desktop-menu.tsx +52 -0
  238. package/template/components/geistdocs/docs-layout.tsx +20 -0
  239. package/template/components/geistdocs/docs-page.tsx +35 -0
  240. package/template/components/geistdocs/edit-source.tsx +30 -0
  241. package/template/components/geistdocs/feedback.tsx +139 -0
  242. package/template/components/geistdocs/footer.tsx +30 -0
  243. package/template/components/geistdocs/github-button.tsx +19 -0
  244. package/template/components/geistdocs/home-layout.tsx +46 -0
  245. package/template/components/geistdocs/icons.tsx +13 -0
  246. package/template/components/geistdocs/installer.tsx +58 -0
  247. package/template/components/geistdocs/language-selector.tsx +3 -0
  248. package/template/components/geistdocs/mdx-components.tsx +5 -0
  249. package/template/components/geistdocs/mermaid.tsx +68 -0
  250. package/template/components/geistdocs/mobile-docs-bar.tsx +77 -0
  251. package/template/components/geistdocs/mobile-menu.tsx +150 -0
  252. package/template/components/geistdocs/navbar-logo.tsx +124 -0
  253. package/template/components/geistdocs/navbar.tsx +22 -0
  254. package/template/components/geistdocs/provider.tsx +31 -0
  255. package/template/components/geistdocs/rss-button.tsx +10 -0
  256. package/template/components/geistdocs/scroll-top.tsx +21 -0
  257. package/template/components/geistdocs/search.tsx +17 -0
  258. package/template/components/geistdocs/sidebar.tsx +128 -0
  259. package/template/components/geistdocs/theme-aware-image.tsx +22 -0
  260. package/template/components/geistdocs/theme-toggle.tsx +3 -0
  261. package/template/components/geistdocs/video.tsx +16 -0
  262. package/template/components/ui/badge.tsx +46 -0
  263. package/template/components/ui/button-group.tsx +83 -0
  264. package/template/components/ui/button.tsx +60 -0
  265. package/template/components/ui/card.tsx +92 -0
  266. package/template/components/ui/collapsible.tsx +33 -0
  267. package/template/components/ui/command-prompt.tsx +488 -0
  268. package/template/components/ui/command.tsx +184 -0
  269. package/template/components/ui/dialog.tsx +143 -0
  270. package/template/components/ui/drawer.tsx +135 -0
  271. package/template/components/ui/dropdown-menu.tsx +257 -0
  272. package/template/components/ui/hover-card.tsx +44 -0
  273. package/template/components/ui/input-group.tsx +170 -0
  274. package/template/components/ui/input.tsx +21 -0
  275. package/template/components/ui/kbd.tsx +28 -0
  276. package/template/components/ui/navigation-menu.tsx +192 -0
  277. package/template/components/ui/popover.tsx +48 -0
  278. package/template/components/ui/scroll-area.tsx +58 -0
  279. package/template/components/ui/select.tsx +187 -0
  280. package/template/components/ui/separator.tsx +28 -0
  281. package/template/components/ui/sheet.tsx +139 -0
  282. package/template/components/ui/sonner.tsx +40 -0
  283. package/template/components/ui/spinner.tsx +16 -0
  284. package/template/components/ui/textarea.tsx +18 -0
  285. package/template/components/ui/tooltip.tsx +61 -0
  286. package/template/components.json +22 -0
  287. package/template/content/docs/ask-ai.cn.mdx +85 -0
  288. package/template/content/docs/ask-ai.mdx +89 -0
  289. package/template/content/docs/configuration.cn.mdx +155 -0
  290. package/template/content/docs/configuration.mdx +200 -0
  291. package/template/content/docs/deployment.cn.mdx +34 -0
  292. package/template/content/docs/deployment.mdx +40 -0
  293. package/template/content/docs/edit-on-github.cn.mdx +47 -0
  294. package/template/content/docs/edit-on-github.mdx +51 -0
  295. package/template/content/docs/env.cn.mdx +25 -0
  296. package/template/content/docs/env.mdx +29 -0
  297. package/template/content/docs/feedback.cn.mdx +85 -0
  298. package/template/content/docs/feedback.mdx +89 -0
  299. package/template/content/docs/getting-started.cn.mdx +86 -0
  300. package/template/content/docs/getting-started.mdx +107 -0
  301. package/template/content/docs/index.cn.mdx +57 -0
  302. package/template/content/docs/index.mdx +92 -0
  303. package/template/content/docs/internationalization.cn.mdx +111 -0
  304. package/template/content/docs/internationalization.mdx +122 -0
  305. package/template/content/docs/llms-txt.cn.mdx +72 -0
  306. package/template/content/docs/llms-txt.mdx +85 -0
  307. package/template/content/docs/md.cn.mdx +65 -0
  308. package/template/content/docs/md.mdx +81 -0
  309. package/template/content/docs/meta.json +23 -0
  310. package/template/content/docs/open-in-chat.cn.mdx +78 -0
  311. package/template/content/docs/open-in-chat.mdx +80 -0
  312. package/template/content/docs/provider.cn.mdx +70 -0
  313. package/template/content/docs/provider.mdx +74 -0
  314. package/template/content/docs/proxy.cn.mdx +96 -0
  315. package/template/content/docs/proxy.mdx +124 -0
  316. package/template/content/docs/rss.cn.mdx +104 -0
  317. package/template/content/docs/rss.mdx +108 -0
  318. package/template/content/docs/syntax.cn.mdx +416 -0
  319. package/template/content/docs/syntax.mdx +411 -0
  320. package/template/content/docs/theme-aware-image.mdx +57 -0
  321. package/template/content/docs/versioned-docs.cn.mdx +117 -0
  322. package/template/content/docs/versioned-docs.mdx +181 -0
  323. package/template/geistdocs.tsx +51 -0
  324. package/template/hooks/geistdocs/use-sidebar.ts +13 -0
  325. package/template/hooks/use-mobile.ts +19 -0
  326. package/template/lib/geistdocs/config.tsx +27 -0
  327. package/template/lib/geistdocs/fonts.ts +18 -0
  328. package/template/lib/geistdocs/i18n.ts +13 -0
  329. package/template/lib/geistdocs/md-tracking.ts +56 -0
  330. package/template/lib/geistdocs/source.ts +12 -0
  331. package/template/lib/utils.ts +6 -0
  332. package/template/next.config.ts +22 -0
  333. package/template/package.json +63 -0
  334. package/template/postcss.config.mjs +5 -0
  335. package/template/proxy.ts +18 -0
  336. package/template/source.config.ts +62 -0
  337. package/template/tsconfig.json +37 -0
  338. package/dist/index.js +0 -2
  339. /package/dist/{index.d.ts → cli/index.d.ts} +0 -0
@@ -0,0 +1,187 @@
1
+ "use client"
2
+
3
+ import * as React from "react"
4
+ import { Select as SelectPrimitive } from "radix-ui"
5
+ import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react"
6
+
7
+ import { cn } from "@/lib/utils"
8
+
9
+ function Select({
10
+ ...props
11
+ }: React.ComponentProps<typeof SelectPrimitive.Root>) {
12
+ return <SelectPrimitive.Root data-slot="select" {...props} />
13
+ }
14
+
15
+ function SelectGroup({
16
+ ...props
17
+ }: React.ComponentProps<typeof SelectPrimitive.Group>) {
18
+ return <SelectPrimitive.Group data-slot="select-group" {...props} />
19
+ }
20
+
21
+ function SelectValue({
22
+ ...props
23
+ }: React.ComponentProps<typeof SelectPrimitive.Value>) {
24
+ return <SelectPrimitive.Value data-slot="select-value" {...props} />
25
+ }
26
+
27
+ function SelectTrigger({
28
+ className,
29
+ size = "default",
30
+ children,
31
+ ...props
32
+ }: React.ComponentProps<typeof SelectPrimitive.Trigger> & {
33
+ size?: "sm" | "default"
34
+ }) {
35
+ return (
36
+ <SelectPrimitive.Trigger
37
+ data-slot="select-trigger"
38
+ data-size={size}
39
+ className={cn(
40
+ "border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
41
+ className
42
+ )}
43
+ {...props}
44
+ >
45
+ {children}
46
+ <SelectPrimitive.Icon asChild>
47
+ <ChevronDownIcon className="size-4 opacity-50" />
48
+ </SelectPrimitive.Icon>
49
+ </SelectPrimitive.Trigger>
50
+ )
51
+ }
52
+
53
+ function SelectContent({
54
+ className,
55
+ children,
56
+ position = "popper",
57
+ align = "center",
58
+ ...props
59
+ }: React.ComponentProps<typeof SelectPrimitive.Content>) {
60
+ return (
61
+ <SelectPrimitive.Portal>
62
+ <SelectPrimitive.Content
63
+ data-slot="select-content"
64
+ className={cn(
65
+ "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",
66
+ position === "popper" &&
67
+ "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
68
+ className
69
+ )}
70
+ position={position}
71
+ align={align}
72
+ {...props}
73
+ >
74
+ <SelectScrollUpButton />
75
+ <SelectPrimitive.Viewport
76
+ className={cn(
77
+ "p-1",
78
+ position === "popper" &&
79
+ "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"
80
+ )}
81
+ >
82
+ {children}
83
+ </SelectPrimitive.Viewport>
84
+ <SelectScrollDownButton />
85
+ </SelectPrimitive.Content>
86
+ </SelectPrimitive.Portal>
87
+ )
88
+ }
89
+
90
+ function SelectLabel({
91
+ className,
92
+ ...props
93
+ }: React.ComponentProps<typeof SelectPrimitive.Label>) {
94
+ return (
95
+ <SelectPrimitive.Label
96
+ data-slot="select-label"
97
+ className={cn("text-muted-foreground px-2 py-1.5 text-xs", className)}
98
+ {...props}
99
+ />
100
+ )
101
+ }
102
+
103
+ function SelectItem({
104
+ className,
105
+ children,
106
+ ...props
107
+ }: React.ComponentProps<typeof SelectPrimitive.Item>) {
108
+ return (
109
+ <SelectPrimitive.Item
110
+ data-slot="select-item"
111
+ className={cn(
112
+ "focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
113
+ className
114
+ )}
115
+ {...props}
116
+ >
117
+ <span className="absolute right-2 flex size-3.5 items-center justify-center">
118
+ <SelectPrimitive.ItemIndicator>
119
+ <CheckIcon className="size-4" />
120
+ </SelectPrimitive.ItemIndicator>
121
+ </span>
122
+ <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>
123
+ </SelectPrimitive.Item>
124
+ )
125
+ }
126
+
127
+ function SelectSeparator({
128
+ className,
129
+ ...props
130
+ }: React.ComponentProps<typeof SelectPrimitive.Separator>) {
131
+ return (
132
+ <SelectPrimitive.Separator
133
+ data-slot="select-separator"
134
+ className={cn("bg-border pointer-events-none -mx-1 my-1 h-px", className)}
135
+ {...props}
136
+ />
137
+ )
138
+ }
139
+
140
+ function SelectScrollUpButton({
141
+ className,
142
+ ...props
143
+ }: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>) {
144
+ return (
145
+ <SelectPrimitive.ScrollUpButton
146
+ data-slot="select-scroll-up-button"
147
+ className={cn(
148
+ "flex cursor-default items-center justify-center py-1",
149
+ className
150
+ )}
151
+ {...props}
152
+ >
153
+ <ChevronUpIcon className="size-4" />
154
+ </SelectPrimitive.ScrollUpButton>
155
+ )
156
+ }
157
+
158
+ function SelectScrollDownButton({
159
+ className,
160
+ ...props
161
+ }: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>) {
162
+ return (
163
+ <SelectPrimitive.ScrollDownButton
164
+ data-slot="select-scroll-down-button"
165
+ className={cn(
166
+ "flex cursor-default items-center justify-center py-1",
167
+ className
168
+ )}
169
+ {...props}
170
+ >
171
+ <ChevronDownIcon className="size-4" />
172
+ </SelectPrimitive.ScrollDownButton>
173
+ )
174
+ }
175
+
176
+ export {
177
+ Select,
178
+ SelectContent,
179
+ SelectGroup,
180
+ SelectItem,
181
+ SelectLabel,
182
+ SelectScrollDownButton,
183
+ SelectScrollUpButton,
184
+ SelectSeparator,
185
+ SelectTrigger,
186
+ SelectValue,
187
+ }
@@ -0,0 +1,28 @@
1
+ "use client"
2
+
3
+ import * as React from "react"
4
+ import { Separator as SeparatorPrimitive } from "radix-ui"
5
+
6
+ import { cn } from "@/lib/utils"
7
+
8
+ function Separator({
9
+ className,
10
+ orientation = "horizontal",
11
+ decorative = true,
12
+ ...props
13
+ }: React.ComponentProps<typeof SeparatorPrimitive.Root>) {
14
+ return (
15
+ <SeparatorPrimitive.Root
16
+ data-slot="separator"
17
+ decorative={decorative}
18
+ orientation={orientation}
19
+ className={cn(
20
+ "bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
21
+ className
22
+ )}
23
+ {...props}
24
+ />
25
+ )
26
+ }
27
+
28
+ export { Separator }
@@ -0,0 +1,139 @@
1
+ "use client"
2
+
3
+ import * as React from "react"
4
+ import { Dialog as SheetPrimitive } from "radix-ui"
5
+ import { XIcon } from "lucide-react"
6
+
7
+ import { cn } from "@/lib/utils"
8
+
9
+ function Sheet({ ...props }: React.ComponentProps<typeof SheetPrimitive.Root>) {
10
+ return <SheetPrimitive.Root data-slot="sheet" {...props} />
11
+ }
12
+
13
+ function SheetTrigger({
14
+ ...props
15
+ }: React.ComponentProps<typeof SheetPrimitive.Trigger>) {
16
+ return <SheetPrimitive.Trigger data-slot="sheet-trigger" {...props} />
17
+ }
18
+
19
+ function SheetClose({
20
+ ...props
21
+ }: React.ComponentProps<typeof SheetPrimitive.Close>) {
22
+ return <SheetPrimitive.Close data-slot="sheet-close" {...props} />
23
+ }
24
+
25
+ function SheetPortal({
26
+ ...props
27
+ }: React.ComponentProps<typeof SheetPrimitive.Portal>) {
28
+ return <SheetPrimitive.Portal data-slot="sheet-portal" {...props} />
29
+ }
30
+
31
+ function SheetOverlay({
32
+ className,
33
+ ...props
34
+ }: React.ComponentProps<typeof SheetPrimitive.Overlay>) {
35
+ return (
36
+ <SheetPrimitive.Overlay
37
+ data-slot="sheet-overlay"
38
+ className={cn(
39
+ "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
40
+ className
41
+ )}
42
+ {...props}
43
+ />
44
+ )
45
+ }
46
+
47
+ function SheetContent({
48
+ className,
49
+ children,
50
+ side = "right",
51
+ ...props
52
+ }: React.ComponentProps<typeof SheetPrimitive.Content> & {
53
+ side?: "top" | "right" | "bottom" | "left"
54
+ }) {
55
+ return (
56
+ <SheetPortal>
57
+ <SheetOverlay />
58
+ <SheetPrimitive.Content
59
+ data-slot="sheet-content"
60
+ className={cn(
61
+ "bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
62
+ side === "right" &&
63
+ "data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",
64
+ side === "left" &&
65
+ "data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",
66
+ side === "top" &&
67
+ "data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",
68
+ side === "bottom" &&
69
+ "data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",
70
+ className
71
+ )}
72
+ {...props}
73
+ >
74
+ {children}
75
+ <SheetPrimitive.Close className="ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none">
76
+ <XIcon className="size-4" />
77
+ <span className="sr-only">Close</span>
78
+ </SheetPrimitive.Close>
79
+ </SheetPrimitive.Content>
80
+ </SheetPortal>
81
+ )
82
+ }
83
+
84
+ function SheetHeader({ className, ...props }: React.ComponentProps<"div">) {
85
+ return (
86
+ <div
87
+ data-slot="sheet-header"
88
+ className={cn("flex flex-col gap-1.5 p-4", className)}
89
+ {...props}
90
+ />
91
+ )
92
+ }
93
+
94
+ function SheetFooter({ className, ...props }: React.ComponentProps<"div">) {
95
+ return (
96
+ <div
97
+ data-slot="sheet-footer"
98
+ className={cn("mt-auto flex flex-col gap-2 p-4", className)}
99
+ {...props}
100
+ />
101
+ )
102
+ }
103
+
104
+ function SheetTitle({
105
+ className,
106
+ ...props
107
+ }: React.ComponentProps<typeof SheetPrimitive.Title>) {
108
+ return (
109
+ <SheetPrimitive.Title
110
+ data-slot="sheet-title"
111
+ className={cn("text-foreground font-semibold", className)}
112
+ {...props}
113
+ />
114
+ )
115
+ }
116
+
117
+ function SheetDescription({
118
+ className,
119
+ ...props
120
+ }: React.ComponentProps<typeof SheetPrimitive.Description>) {
121
+ return (
122
+ <SheetPrimitive.Description
123
+ data-slot="sheet-description"
124
+ className={cn("text-muted-foreground text-sm", className)}
125
+ {...props}
126
+ />
127
+ )
128
+ }
129
+
130
+ export {
131
+ Sheet,
132
+ SheetTrigger,
133
+ SheetClose,
134
+ SheetContent,
135
+ SheetHeader,
136
+ SheetFooter,
137
+ SheetTitle,
138
+ SheetDescription,
139
+ }
@@ -0,0 +1,40 @@
1
+ "use client"
2
+
3
+ import {
4
+ CircleCheckIcon,
5
+ InfoIcon,
6
+ Loader2Icon,
7
+ OctagonXIcon,
8
+ TriangleAlertIcon,
9
+ } from "lucide-react"
10
+ import { useTheme } from "next-themes"
11
+ import { Toaster as Sonner, type ToasterProps } from "sonner"
12
+
13
+ const Toaster = ({ ...props }: ToasterProps) => {
14
+ const { theme = "system" } = useTheme()
15
+
16
+ return (
17
+ <Sonner
18
+ theme={theme as ToasterProps["theme"]}
19
+ className="toaster group"
20
+ icons={{
21
+ success: <CircleCheckIcon className="size-4" />,
22
+ info: <InfoIcon className="size-4" />,
23
+ warning: <TriangleAlertIcon className="size-4" />,
24
+ error: <OctagonXIcon className="size-4" />,
25
+ loading: <Loader2Icon className="size-4 animate-spin" />,
26
+ }}
27
+ style={
28
+ {
29
+ "--normal-bg": "var(--popover)",
30
+ "--normal-text": "var(--popover-foreground)",
31
+ "--normal-border": "var(--border)",
32
+ "--border-radius": "var(--radius)",
33
+ } as React.CSSProperties
34
+ }
35
+ {...props}
36
+ />
37
+ )
38
+ }
39
+
40
+ export { Toaster }
@@ -0,0 +1,16 @@
1
+ import { Loader2Icon } from "lucide-react"
2
+
3
+ import { cn } from "@/lib/utils"
4
+
5
+ function Spinner({ className, ...props }: React.ComponentProps<"svg">) {
6
+ return (
7
+ <Loader2Icon
8
+ role="status"
9
+ aria-label="Loading"
10
+ className={cn("size-4 animate-spin", className)}
11
+ {...props}
12
+ />
13
+ )
14
+ }
15
+
16
+ export { Spinner }
@@ -0,0 +1,18 @@
1
+ import * as React from "react"
2
+
3
+ import { cn } from "@/lib/utils"
4
+
5
+ function Textarea({ className, ...props }: React.ComponentProps<"textarea">) {
6
+ return (
7
+ <textarea
8
+ data-slot="textarea"
9
+ className={cn(
10
+ "border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
11
+ className
12
+ )}
13
+ {...props}
14
+ />
15
+ )
16
+ }
17
+
18
+ export { Textarea }
@@ -0,0 +1,61 @@
1
+ "use client"
2
+
3
+ import * as React from "react"
4
+ import { Tooltip as TooltipPrimitive } from "radix-ui"
5
+
6
+ import { cn } from "@/lib/utils"
7
+
8
+ function TooltipProvider({
9
+ delayDuration = 0,
10
+ ...props
11
+ }: React.ComponentProps<typeof TooltipPrimitive.Provider>) {
12
+ return (
13
+ <TooltipPrimitive.Provider
14
+ data-slot="tooltip-provider"
15
+ delayDuration={delayDuration}
16
+ {...props}
17
+ />
18
+ )
19
+ }
20
+
21
+ function Tooltip({
22
+ ...props
23
+ }: React.ComponentProps<typeof TooltipPrimitive.Root>) {
24
+ return (
25
+ <TooltipProvider>
26
+ <TooltipPrimitive.Root data-slot="tooltip" {...props} />
27
+ </TooltipProvider>
28
+ )
29
+ }
30
+
31
+ function TooltipTrigger({
32
+ ...props
33
+ }: React.ComponentProps<typeof TooltipPrimitive.Trigger>) {
34
+ return <TooltipPrimitive.Trigger data-slot="tooltip-trigger" {...props} />
35
+ }
36
+
37
+ function TooltipContent({
38
+ className,
39
+ sideOffset = 0,
40
+ children,
41
+ ...props
42
+ }: React.ComponentProps<typeof TooltipPrimitive.Content>) {
43
+ return (
44
+ <TooltipPrimitive.Portal>
45
+ <TooltipPrimitive.Content
46
+ data-slot="tooltip-content"
47
+ sideOffset={sideOffset}
48
+ className={cn(
49
+ "bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",
50
+ className
51
+ )}
52
+ {...props}
53
+ >
54
+ {children}
55
+ <TooltipPrimitive.Arrow className="bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" />
56
+ </TooltipPrimitive.Content>
57
+ </TooltipPrimitive.Portal>
58
+ )
59
+ }
60
+
61
+ export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider }
@@ -0,0 +1,22 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema.json",
3
+ "style": "new-york",
4
+ "rsc": true,
5
+ "tsx": true,
6
+ "tailwind": {
7
+ "config": "",
8
+ "css": "app/global.css",
9
+ "baseColor": "neutral",
10
+ "cssVariables": true,
11
+ "prefix": ""
12
+ },
13
+ "iconLibrary": "lucide",
14
+ "aliases": {
15
+ "components": "@/components",
16
+ "utils": "@/lib/utils",
17
+ "ui": "@/components/ui",
18
+ "lib": "@/lib",
19
+ "hooks": "@/hooks"
20
+ },
21
+ "registries": {}
22
+ }
@@ -0,0 +1,85 @@
1
+ ---
2
+ title: 向 AI 提问
3
+ description: 一个由 AI 提供支持的聊天助手,通过上下文感知的回答帮助用户理解您的文档
4
+ type: conceptual
5
+ summary: 具有上下文感知搜索、持久历史记录和建议提示的 AI 聊天助手。
6
+ prerequisites:
7
+ - /docs/env
8
+ related:
9
+ - /docs/open-in-chat
10
+ - /docs/llms-txt
11
+ - /docs/configuration
12
+ ---
13
+
14
+ The Ask AI feature provides an intelligent chat assistant built directly into your documentation. Users can ask questions about your docs and get instant, context-aware answers powered by AI. The assistant can search through your documentation, understand context, and provide helpful responses.
15
+
16
+ ## 工作原理
17
+
18
+ The AI chat assistant is available in two ways:
19
+
20
+ ### 1. 每页快速访问
21
+
22
+ Each documentation page has an "Ask AI about this page" button in the table of contents sidebar. When clicked, it:
23
+
24
+ 1. Opens the chat interface
25
+ 2. Pre-fills a prompt asking the AI to read the current page
26
+ 3. Allows users to ask specific questions about that page
27
+
28
+ ### 2. 全局聊天界面
29
+
30
+ Users can open the chat interface at any time by:
31
+
32
+ - Clicking the "Ask AI" button in the navbar
33
+ - Using the keyboard shortcut: `⌘I` (Mac) or `Ctrl+I` (Windows/Linux)
34
+
35
+ Once open, users can:
36
+
37
+ - Ask questions about any part of your documentation
38
+ - Upload files or images for context
39
+ - View AI-powered search results from your docs
40
+ - Get step-by-step guidance on complex topics
41
+
42
+ ## 功能
43
+
44
+ ### 上下文感知搜索
45
+
46
+ The AI assistant includes a built-in `search_docs` tool that:
47
+
48
+ 1. Searches through your documentation content
49
+ 2. Finds relevant pages based on the user's question
50
+ 3. Shows source citations with links to the referenced pages
51
+ 4. Uses the content to provide accurate, contextual answers
52
+
53
+ ### 持久化聊天历史
54
+
55
+ Conversations are automatically saved to the browser's IndexedDB, providing:
56
+
57
+ - 聊天历史在页面重新加载后仍然保留
58
+ - 能够继续先前的对话
59
+ - 开始新聊天或清除历史的选项
60
+ - 离线访问过去的对话
61
+
62
+ ### 交互功能
63
+
64
+ - **建议**:首次使用的用户会看到建议的问题以便入门
65
+ - **文件上传**:用户可以附加文件或图像以提供上下文
66
+ - **支持 Markdown**:响应以正确的 Markdown 格式呈现
67
+ - **代码语法高亮**:响应中的代码块包含语法高亮
68
+ - **推理显示**:在开发模式下,可以查看 AI 的推理过程
69
+
70
+ ### 移动响应式
71
+
72
+ The chat interface adapts to different screen sizes:
73
+
74
+ - **桌面**:作为侧边栏面板从右侧滑入
75
+ - **移动端**:以底部抽屉的形式打开,便于访问
76
+
77
+ ## 配置
78
+
79
+ The environment variables `AI_GATEWAY_API_KEY` and `NEXT_PUBLIC_VERCEL_PROJECT_PRODUCTION_URL` must be set, which you can read more about in the [环境变量](/docs/env) section.
80
+
81
+ The model used is `openai/gpt-4.1-mini` via the Vercel AI Gateway.
82
+
83
+ ## 建议的提示
84
+
85
+ You can customize the initial suggested prompts shown to users. These are configured in the Geistdocs configuration file, which you can read more about in the [配置](/docs/configuration) section.
@@ -0,0 +1,89 @@
1
+ ---
2
+ title: Ask AI
3
+ description: An AI-powered chat assistant that helps users understand your documentation with context-aware responses
4
+ type: conceptual
5
+ summary: An AI-powered chat assistant with context-aware search, persistent history, and suggested prompts for your documentation.
6
+ prerequisites:
7
+ - /docs/env
8
+ related:
9
+ - /docs/open-in-chat
10
+ - /docs/llms-txt
11
+ - /docs/configuration
12
+ ---
13
+
14
+ The Ask AI feature provides an intelligent chat assistant built directly into your documentation. Users can ask questions about your docs and get instant, context-aware answers powered by AI. The assistant can search through your documentation, understand context, and provide helpful responses.
15
+
16
+ <CopyPrompt text="Help me configure Ask AI for this Geistdocs site. Check my AI prompt, suggestions, environment variables, and search route, then recommend improvements for the assistant experience.">
17
+ Help me configure Ask AI for this Geistdocs site. Check my AI prompt, suggestions, environment variables, and search route, then recommend improvements for the assistant experience.
18
+ </CopyPrompt>
19
+
20
+ ## How it works
21
+
22
+ The AI chat assistant is available in two ways:
23
+
24
+ ### 1. Per-Page Quick Access
25
+
26
+ Each documentation page has an "Ask AI about this page" button in the table of contents sidebar. When clicked, it:
27
+
28
+ 1. Opens the chat interface
29
+ 2. Pre-fills a prompt asking the AI to read the current page
30
+ 3. Allows users to ask specific questions about that page
31
+
32
+ ### 2. Global Chat Interface
33
+
34
+ Users can open the chat interface at any time by:
35
+
36
+ - Clicking the "Ask AI" button in the navbar
37
+ - Using the keyboard shortcut: `⌘I` (Mac) or `Ctrl+I` (Windows/Linux)
38
+
39
+ Once open, users can:
40
+
41
+ - Ask questions about any part of your documentation
42
+ - Upload files or images for context
43
+ - View AI-powered search results from your docs
44
+ - Get step-by-step guidance on complex topics
45
+
46
+ ## Features
47
+
48
+ ### Context-Aware Search
49
+
50
+ The AI assistant includes a built-in `search_docs` tool that:
51
+
52
+ 1. Searches through your documentation content
53
+ 2. Finds relevant pages based on the user's question
54
+ 3. Shows source citations with links to the referenced pages
55
+ 4. Uses the content to provide accurate, contextual answers
56
+
57
+ ### Persistent Chat History
58
+
59
+ Conversations are automatically saved to the browser's IndexedDB, providing:
60
+
61
+ - Chat history that persists across page reloads
62
+ - Ability to continue previous conversations
63
+ - Option to start a new chat or clear history
64
+ - Offline access to past conversations
65
+
66
+ ### Interactive Features
67
+
68
+ - **Suggestions**: First-time users see suggested questions to get started
69
+ - **File Upload**: Users can attach files or images for context
70
+ - **Markdown Support**: Responses are formatted with proper Markdown rendering
71
+ - **Code Syntax Highlighting**: Code blocks in responses include syntax highlighting
72
+ - **Reasoning Display**: In development mode, view the AI's reasoning process
73
+
74
+ ### Mobile-Responsive
75
+
76
+ The chat interface adapts to different screen sizes:
77
+
78
+ - **Desktop**: Slides in from the right side as a sidebar panel
79
+ - **Mobile**: Opens as a bottom drawer.
80
+
81
+ ## Configuration
82
+
83
+ The environment variables `AI_GATEWAY_API_KEY` and `NEXT_PUBLIC_VERCEL_PROJECT_PRODUCTION_URL` must be set, which you can read more about in the [Environment Variables](/docs/env) section.
84
+
85
+ The model used is `openai/gpt-4.1-mini` via the Vercel AI Gateway.
86
+
87
+ ## Suggested Prompts
88
+
89
+ You can customize the initial suggested prompts shown to users. These are configured in the Geistdocs configuration file, which you can read more about in the [Configuration](/docs/configuration) section.