Merged
Conversation
…cies in package.json
…settings provider
…d settings integration
… with refs for API keys
|
@Crokily is attempting to deploy a commit to the longsizhuo's projects Team on Vercel. A member of the Team first needs to authorize it. |
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds a comprehensive AI assistant feature to the documentation site, providing users with an interactive chat interface to ask questions about the current page content.
- Implements an AI-powered chat assistant that appears as a floating icon in the bottom-right corner
- Integrates with both OpenAI and Google Gemini APIs with user-configurable API keys stored in localStorage
- Extracts and provides current page content as context to improve AI responses about the documentation
Reviewed Changes
Copilot reviewed 26 out of 28 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| package.json | Adds AI SDK dependencies, UI components, and animation libraries |
| lib/github.ts | GitHub API integration for fetching file contributors |
| app/hooks/useAssistantSettings.tsx | Settings management hook with localStorage persistence |
| app/components/ui/* | New UI components (dialog, tooltip, radio-group, etc.) |
| app/components/assistant-ui/* | Complete AI assistant UI implementation |
| app/components/DocsAssistant.tsx | Main assistant component with error handling |
| app/docs/[...slug]/page.tsx | Integrates assistant and contributors into doc pages |
| app/api/chat/route.ts | API endpoint for handling AI chat requests |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Closed
…DocPage return with fragment
Contributor
|
测试通过 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
现在文档内页会有个AI图标,点击能展开AI对话框
AI对话框支持流式运输,错误提示,Markdown显示
正常使用步骤:




点击右下角AI图表,会弹出AI对话框
对话框自带2-4个提示(响应式显示)引导用户使用
刚打开时用户需要点击设置按钮配置自己的key才能使用
可选openai和gemini,默认模型均为最性价比模型 gpt-4.1-nano和gemini-2.0 flash
key会被存储到localStorage中供持续使用
配置了key以后即可正常对话
对话会默认包含页面文档的上下文,用于帮助AI回答和页面相关的问题。
另外一个提交:
投稿工具目前会生成tags: []
但数据形式的tags fumadocs不支持,一直使用的是分点式,eg:
这样的效果,所以目前用投稿工具投的稿件会报错,check会失败,因此修正了这一点