@movk/nuxt-docs 1.16.0 → 1.16.1
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.
- package/README.md +9 -8
- package/modules/ai-chat/runtime/components/AiChatPanel.vue +5 -2
- package/nuxt.config.ts +5 -1
- package/package.json +3 -3
- package/server/mcp/tools/get-example.ts +1 -1
- package/server/mcp/tools/get-page.ts +1 -1
- package/server/mcp/tools/list-examples.ts +1 -1
- package/server/mcp/tools/list-getting-started-guides.ts +1 -1
- package/server/mcp/tools/list-pages.ts +2 -2
package/README.md
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
[](https://docs.mhaibaraai.cn/)
|
|
1
2
|
[](https://docs.mhaibaraai.cn/)
|
|
2
3
|
|
|
3
4
|
> 基于 Nuxt 4 的现代文档主题,集成组件自动化文档、AI 聊天助手、MCP Server 和完整的开发者体验优化
|
|
@@ -21,7 +22,7 @@
|
|
|
21
22
|
### 🤖 AI 增强体验
|
|
22
23
|
|
|
23
24
|
<div style="padding: 40px 0; display: flex; justify-content: center;">
|
|
24
|
-
|
|
25
|
+
<img src="https://docs.mhaibaraai.cn/ai/AiChat.png" alt="AiChat" width="400">
|
|
25
26
|
</div>
|
|
26
27
|
|
|
27
28
|
- **AI 聊天助手** - 内置智能文档助手,基于 Vercel AI SDK 支持多种 LLM 模型
|
|
@@ -201,11 +202,11 @@ export default defineNuxtConfig({
|
|
|
201
202
|
````md [md]
|
|
202
203
|
```mermaid
|
|
203
204
|
graph TD
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
205
|
+
A[开始] --> B{是否有效?}
|
|
206
|
+
B -->|是| C[处理数据]
|
|
207
|
+
B -->|否| D[显示错误]
|
|
208
|
+
C --> E[完成]
|
|
209
|
+
D --> E
|
|
209
210
|
```
|
|
210
211
|
````
|
|
211
212
|
|
|
@@ -218,9 +219,9 @@ graph TD
|
|
|
218
219
|
|
|
219
220
|
**支持的图表类型:**
|
|
220
221
|
- **流程图**(`flowchart`/`graph`):用于展示流程和决策
|
|
221
|
-
|
|
222
|
+

|
|
222
223
|
- **时序图**(`sequenceDiagram`):用于展示交互时序
|
|
223
|
-
|
|
224
|
+

|
|
224
225
|
- **类图**(`classDiagram`):用于展示类关系
|
|
225
226
|
- **状态图**(`stateDiagram`):用于展示状态转换
|
|
226
227
|
- **甘特图**(`gantt`):用于展示项目时间线
|
|
@@ -98,8 +98,11 @@ function getToolIcon(part: ToolPart): string {
|
|
|
98
98
|
const { toolIcon } = useToolCall(part.state, toolName, part.input || {} as any)
|
|
99
99
|
|
|
100
100
|
const iconMap: Record<string, string> = {
|
|
101
|
-
'get-page': 'i-lucide-
|
|
102
|
-
'get-example': 'i-lucide-
|
|
101
|
+
'get-page': 'i-lucide-book-open',
|
|
102
|
+
'get-example': 'i-lucide-codepen',
|
|
103
|
+
'list-examples': 'i-lucide-codesandbox',
|
|
104
|
+
'list-getting-started-guides': 'i-lucide-square-play',
|
|
105
|
+
'list-pages': 'i-lucide-book-minus',
|
|
103
106
|
...toolIcon
|
|
104
107
|
}
|
|
105
108
|
|
package/nuxt.config.ts
CHANGED
|
@@ -172,7 +172,7 @@ export default defineNuxtConfig({
|
|
|
172
172
|
|
|
173
173
|
fonts: {
|
|
174
174
|
families: [
|
|
175
|
-
{ name: 'Public Sans', global: true
|
|
175
|
+
{ name: 'Public Sans', global: true },
|
|
176
176
|
{ name: 'Noto Sans SC', global: true, provider: 'local' }
|
|
177
177
|
]
|
|
178
178
|
},
|
|
@@ -194,5 +194,9 @@ export default defineNuxtConfig({
|
|
|
194
194
|
// Must be defined before @nuxt/content setup,
|
|
195
195
|
// otherwise Content LLMS module will overwrite it in modules:done.
|
|
196
196
|
contentRawMarkdown: false
|
|
197
|
+
},
|
|
198
|
+
|
|
199
|
+
ogImage: {
|
|
200
|
+
zeroRuntime: true
|
|
197
201
|
}
|
|
198
202
|
})
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@movk/nuxt-docs",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.16.
|
|
4
|
+
"version": "1.16.1",
|
|
5
5
|
"private": false,
|
|
6
6
|
"description": "Modern Nuxt 4 documentation theme with auto-generated component docs, AI chat assistant, MCP server, and complete developer experience optimization.",
|
|
7
7
|
"author": "YiXuan <mhaibaraai@gmail.com>",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@ai-sdk/gateway": "^3.0.83",
|
|
43
43
|
"@ai-sdk/mcp": "^1.0.30",
|
|
44
|
-
"@ai-sdk/vue": "^3.0.
|
|
44
|
+
"@ai-sdk/vue": "^3.0.141",
|
|
45
45
|
"@iconify-json/lucide": "^1.2.100",
|
|
46
46
|
"@iconify-json/simple-icons": "^1.2.75",
|
|
47
47
|
"@iconify-json/vscode-icons": "^1.2.45",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"motion-v": "^2.2.0",
|
|
71
71
|
"nuxt-component-meta": "^0.17.2",
|
|
72
72
|
"nuxt-llms": "^0.2.0",
|
|
73
|
-
"nuxt-og-image": "^6.
|
|
73
|
+
"nuxt-og-image": "^6.3.0",
|
|
74
74
|
"ohash": "^2.0.11",
|
|
75
75
|
"pathe": "^2.0.3",
|
|
76
76
|
"pkg-types": "^2.3.0",
|
|
@@ -13,7 +13,7 @@ export default defineMcpTool({
|
|
|
13
13
|
content: [{ type: 'text' as const, text: result.code }]
|
|
14
14
|
}
|
|
15
15
|
} catch {
|
|
16
|
-
|
|
16
|
+
throw createError({ statusCode: 404, message: `示例 '${exampleName}' 未找到。使用 list_examples 工具查看所有可用示例。` })
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
})
|
|
@@ -8,10 +8,10 @@ export default defineMcpTool({
|
|
|
8
8
|
|
|
9
9
|
const pages = await queryCollection(event, 'docs').all()
|
|
10
10
|
|
|
11
|
-
return
|
|
11
|
+
return pages.map(doc => ({
|
|
12
12
|
title: doc.title,
|
|
13
13
|
description: doc.description,
|
|
14
14
|
path: doc.path
|
|
15
|
-
}))
|
|
15
|
+
}))
|
|
16
16
|
}
|
|
17
17
|
})
|