@movk/nuxt-docs 1.6.1 → 1.7.0
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/app/app.config.ts +37 -0
- package/app/app.vue +8 -3
- package/app/components/DocsAsideRightBottom.vue +17 -22
- package/app/components/PageHeaderLinks.vue +6 -1
- package/app/components/content/PageLastCommit.vue +5 -5
- package/app/components/header/Header.vue +1 -1
- package/app/components/header/HeaderBody.vue +12 -2
- package/app/components/header/HeaderBottom.vue +1 -0
- package/app/components/header/HeaderCTA.vue +2 -2
- package/app/components/header/HeaderCenter.vue +1 -1
- package/app/components/header/HeaderLogo.vue +1 -1
- package/app/layouts/default.vue +3 -1
- package/app/layouts/docs.vue +1 -1
- package/app/pages/docs/[...slug].vue +3 -2
- package/app/templates/releases.vue +98 -0
- package/app/types/index.d.ts +149 -0
- package/content.config.ts +24 -2
- package/modules/ai-chat/index.ts +75 -24
- package/modules/ai-chat/runtime/components/AiChat.vue +4 -10
- package/modules/ai-chat/runtime/components/AiChatDisabled.vue +3 -0
- package/modules/ai-chat/runtime/components/AiChatFloatingInput.vue +24 -9
- package/modules/ai-chat/runtime/components/AiChatModelSelect.vue +2 -0
- package/modules/ai-chat/runtime/components/AiChatPanel.vue +318 -0
- package/modules/ai-chat/runtime/components/AiChatPreStream.vue +1 -0
- package/modules/ai-chat/runtime/components/AiChatReasoning.vue +3 -3
- package/modules/ai-chat/runtime/components/AiChatSlideoverFaq.vue +2 -5
- package/modules/ai-chat/runtime/composables/useAIChat.ts +48 -0
- package/modules/ai-chat/runtime/composables/useModels.ts +3 -6
- package/modules/ai-chat/runtime/server/api/ai-chat.ts +92 -0
- package/modules/ai-chat/runtime/server/utils/docs_agent.ts +23 -15
- package/modules/ai-chat/runtime/types.ts +6 -0
- package/modules/css.ts +3 -2
- package/modules/routing.ts +26 -0
- package/nuxt.config.ts +2 -0
- package/nuxt.schema.ts +493 -0
- package/package.json +11 -9
- package/app/composables/useFaq.ts +0 -21
- package/modules/ai-chat/runtime/components/AiChatSlideover.vue +0 -255
- package/modules/ai-chat/runtime/server/api/search.ts +0 -84
- /package/{app → modules/ai-chat/runtime}/composables/useHighlighter.ts +0 -0
package/nuxt.schema.ts
ADDED
|
@@ -0,0 +1,493 @@
|
|
|
1
|
+
import { field, group } from '@nuxt/content/preview'
|
|
2
|
+
|
|
3
|
+
export default defineNuxtSchema({
|
|
4
|
+
appConfig: {
|
|
5
|
+
vercelAnalytics: group({
|
|
6
|
+
title: 'Vercel Analytics',
|
|
7
|
+
description: 'Vercel Analytics 配置',
|
|
8
|
+
icon: 'i-lucide-activity',
|
|
9
|
+
fields: {
|
|
10
|
+
enable: field({
|
|
11
|
+
type: 'boolean',
|
|
12
|
+
title: '启用 Analytics',
|
|
13
|
+
description: '是否启用 Vercel Analytics',
|
|
14
|
+
icon: 'i-lucide-toggle-right',
|
|
15
|
+
default: false
|
|
16
|
+
}),
|
|
17
|
+
debug: field({
|
|
18
|
+
type: 'boolean',
|
|
19
|
+
title: '调试模式',
|
|
20
|
+
description: '是否启用调试模式',
|
|
21
|
+
icon: 'i-lucide-bug',
|
|
22
|
+
default: false
|
|
23
|
+
})
|
|
24
|
+
}
|
|
25
|
+
}),
|
|
26
|
+
|
|
27
|
+
seo: group({
|
|
28
|
+
title: 'SEO',
|
|
29
|
+
description: 'SEO 相关配置',
|
|
30
|
+
icon: 'i-lucide-search',
|
|
31
|
+
fields: {
|
|
32
|
+
titleTemplate: field({
|
|
33
|
+
type: 'string',
|
|
34
|
+
title: '标题模板',
|
|
35
|
+
description: '页面标题模板,使用 %s 作为占位符',
|
|
36
|
+
icon: 'i-lucide-layout-template',
|
|
37
|
+
default: '%s'
|
|
38
|
+
}),
|
|
39
|
+
title: field({
|
|
40
|
+
type: 'string',
|
|
41
|
+
title: '站点标题',
|
|
42
|
+
description: '网站的默认标题',
|
|
43
|
+
icon: 'i-lucide-heading',
|
|
44
|
+
default: ''
|
|
45
|
+
}),
|
|
46
|
+
description: field({
|
|
47
|
+
type: 'string',
|
|
48
|
+
title: '站点描述',
|
|
49
|
+
description: '网站的默认描述',
|
|
50
|
+
icon: 'i-lucide-text',
|
|
51
|
+
default: ''
|
|
52
|
+
})
|
|
53
|
+
}
|
|
54
|
+
}),
|
|
55
|
+
|
|
56
|
+
header: group({
|
|
57
|
+
title: 'Header',
|
|
58
|
+
description: '页面头部配置',
|
|
59
|
+
icon: 'i-lucide-layout-dashboard',
|
|
60
|
+
fields: {
|
|
61
|
+
title: field({
|
|
62
|
+
type: 'string',
|
|
63
|
+
title: '标题',
|
|
64
|
+
description: 'Header 中显示的标题',
|
|
65
|
+
icon: 'i-lucide-type',
|
|
66
|
+
default: ''
|
|
67
|
+
}),
|
|
68
|
+
avatar: field({
|
|
69
|
+
type: 'string',
|
|
70
|
+
title: '头像',
|
|
71
|
+
description: '头像图片 URL',
|
|
72
|
+
icon: 'i-lucide-user-circle',
|
|
73
|
+
default: ''
|
|
74
|
+
}),
|
|
75
|
+
to: field({
|
|
76
|
+
type: 'string',
|
|
77
|
+
title: '链接地址',
|
|
78
|
+
description: '点击标题跳转的地址',
|
|
79
|
+
icon: 'i-lucide-link',
|
|
80
|
+
default: '/'
|
|
81
|
+
}),
|
|
82
|
+
search: field({
|
|
83
|
+
type: 'boolean',
|
|
84
|
+
title: '搜索功能',
|
|
85
|
+
description: '是否显示搜索框',
|
|
86
|
+
icon: 'i-lucide-search',
|
|
87
|
+
default: true
|
|
88
|
+
}),
|
|
89
|
+
colorMode: field({
|
|
90
|
+
type: 'boolean',
|
|
91
|
+
title: '主题切换',
|
|
92
|
+
description: '是否显示主题切换按钮',
|
|
93
|
+
icon: 'i-lucide-sun-moon',
|
|
94
|
+
default: true
|
|
95
|
+
}),
|
|
96
|
+
links: field({
|
|
97
|
+
type: 'array',
|
|
98
|
+
title: 'Header 链接',
|
|
99
|
+
description: 'Header 中显示的导航链接按钮',
|
|
100
|
+
icon: 'i-lucide-link',
|
|
101
|
+
default: []
|
|
102
|
+
})
|
|
103
|
+
}
|
|
104
|
+
}),
|
|
105
|
+
|
|
106
|
+
footer: group({
|
|
107
|
+
title: 'Footer',
|
|
108
|
+
description: '页面底部配置',
|
|
109
|
+
icon: 'i-lucide-layout-footer',
|
|
110
|
+
fields: {
|
|
111
|
+
credits: field({
|
|
112
|
+
type: 'string',
|
|
113
|
+
title: '版权信息',
|
|
114
|
+
description: 'Footer 中显示的版权信息',
|
|
115
|
+
icon: 'i-lucide-copyright',
|
|
116
|
+
default: ''
|
|
117
|
+
}),
|
|
118
|
+
socials: field({
|
|
119
|
+
type: 'array',
|
|
120
|
+
title: '社交媒体链接',
|
|
121
|
+
description: 'Footer 中显示的社交媒体链接按钮',
|
|
122
|
+
icon: 'i-lucide-share-2',
|
|
123
|
+
default: []
|
|
124
|
+
})
|
|
125
|
+
}
|
|
126
|
+
}),
|
|
127
|
+
|
|
128
|
+
toc: group({
|
|
129
|
+
title: 'TOC',
|
|
130
|
+
description: '目录配置',
|
|
131
|
+
icon: 'i-lucide-list-tree',
|
|
132
|
+
fields: {
|
|
133
|
+
title: field({
|
|
134
|
+
type: 'string',
|
|
135
|
+
title: '目录标题',
|
|
136
|
+
description: '目录区域的标题',
|
|
137
|
+
icon: 'i-lucide-heading',
|
|
138
|
+
default: '目录'
|
|
139
|
+
}),
|
|
140
|
+
|
|
141
|
+
bottom: group({
|
|
142
|
+
title: '底部配置',
|
|
143
|
+
description: '目录底部区域配置',
|
|
144
|
+
icon: 'i-lucide-align-vertical-distribute-end',
|
|
145
|
+
fields: {
|
|
146
|
+
title: field({
|
|
147
|
+
type: 'string',
|
|
148
|
+
title: '底部标题',
|
|
149
|
+
description: '目录底部区域的标题',
|
|
150
|
+
icon: 'i-lucide-heading',
|
|
151
|
+
default: ''
|
|
152
|
+
}),
|
|
153
|
+
links: field({
|
|
154
|
+
type: 'array',
|
|
155
|
+
title: '底部链接',
|
|
156
|
+
description: '目录底部显示的链接按钮',
|
|
157
|
+
icon: 'i-lucide-link',
|
|
158
|
+
default: []
|
|
159
|
+
})
|
|
160
|
+
}
|
|
161
|
+
})
|
|
162
|
+
}
|
|
163
|
+
}),
|
|
164
|
+
|
|
165
|
+
github: group({
|
|
166
|
+
title: 'GitHub',
|
|
167
|
+
description: 'GitHub 仓库配置',
|
|
168
|
+
icon: 'i-lucide-github',
|
|
169
|
+
fields: {
|
|
170
|
+
owner: field({
|
|
171
|
+
type: 'string',
|
|
172
|
+
title: '仓库所有者',
|
|
173
|
+
description: 'GitHub 仓库所有者用户名',
|
|
174
|
+
icon: 'i-lucide-user',
|
|
175
|
+
default: ''
|
|
176
|
+
}),
|
|
177
|
+
name: field({
|
|
178
|
+
type: 'string',
|
|
179
|
+
title: '仓库名称',
|
|
180
|
+
description: 'GitHub 仓库名称',
|
|
181
|
+
icon: 'i-lucide-folder-git',
|
|
182
|
+
default: ''
|
|
183
|
+
}),
|
|
184
|
+
url: field({
|
|
185
|
+
type: 'string',
|
|
186
|
+
title: '仓库 URL',
|
|
187
|
+
description: 'GitHub 仓库完整 URL',
|
|
188
|
+
icon: 'i-lucide-link',
|
|
189
|
+
default: ''
|
|
190
|
+
}),
|
|
191
|
+
branch: field({
|
|
192
|
+
type: 'string',
|
|
193
|
+
title: '分支',
|
|
194
|
+
description: '默认分支名称',
|
|
195
|
+
icon: 'i-lucide-git-branch',
|
|
196
|
+
default: 'main'
|
|
197
|
+
}),
|
|
198
|
+
rootDir: field({
|
|
199
|
+
type: 'string',
|
|
200
|
+
title: '根目录',
|
|
201
|
+
description: '文档在仓库中的根目录',
|
|
202
|
+
icon: 'i-lucide-folder',
|
|
203
|
+
default: ''
|
|
204
|
+
}),
|
|
205
|
+
commitPath: field({
|
|
206
|
+
type: 'string',
|
|
207
|
+
title: 'Commit 路径',
|
|
208
|
+
description: 'GitHub commit 页面路径模板',
|
|
209
|
+
icon: 'i-lucide-git-commit',
|
|
210
|
+
default: '/commit'
|
|
211
|
+
}),
|
|
212
|
+
since: field({
|
|
213
|
+
type: 'string',
|
|
214
|
+
title: '开始日期',
|
|
215
|
+
description: '获取提交记录的开始日期',
|
|
216
|
+
icon: 'i-lucide-calendar',
|
|
217
|
+
default: ''
|
|
218
|
+
}),
|
|
219
|
+
suffix: field({
|
|
220
|
+
type: 'string',
|
|
221
|
+
title: '文件后缀',
|
|
222
|
+
description: '文档文件的后缀',
|
|
223
|
+
icon: 'i-lucide-file',
|
|
224
|
+
default: '.md'
|
|
225
|
+
}),
|
|
226
|
+
per_page: field({
|
|
227
|
+
type: 'number',
|
|
228
|
+
title: '每页数量',
|
|
229
|
+
description: '每页显示的 commit 数量',
|
|
230
|
+
icon: 'i-lucide-hash',
|
|
231
|
+
default: 30
|
|
232
|
+
}),
|
|
233
|
+
until: field({
|
|
234
|
+
type: 'string',
|
|
235
|
+
title: '结束日期',
|
|
236
|
+
description: '获取提交记录的结束日期',
|
|
237
|
+
icon: 'i-lucide-calendar',
|
|
238
|
+
default: ''
|
|
239
|
+
}),
|
|
240
|
+
author: field({
|
|
241
|
+
type: 'string',
|
|
242
|
+
title: '作者',
|
|
243
|
+
description: '过滤特定作者的提交',
|
|
244
|
+
icon: 'i-lucide-user',
|
|
245
|
+
default: ''
|
|
246
|
+
}),
|
|
247
|
+
casing: field({
|
|
248
|
+
type: 'string',
|
|
249
|
+
title: '文件命名格式',
|
|
250
|
+
description: '文件命名格式:auto(自动)、kebab(短横线)、camel(驼峰)、pascal(帕斯卡)',
|
|
251
|
+
icon: 'i-lucide-case-sensitive',
|
|
252
|
+
default: 'auto'
|
|
253
|
+
}),
|
|
254
|
+
|
|
255
|
+
dateFormat: group({
|
|
256
|
+
title: '日期格式化',
|
|
257
|
+
description: '日期格式化配置',
|
|
258
|
+
icon: 'i-lucide-calendar-clock',
|
|
259
|
+
fields: {
|
|
260
|
+
locale: field({
|
|
261
|
+
type: 'string',
|
|
262
|
+
title: 'Locale',
|
|
263
|
+
description: '日期的地区设置(如 zh-CN、en-US)',
|
|
264
|
+
icon: 'i-lucide-globe',
|
|
265
|
+
default: 'zh-CN'
|
|
266
|
+
}),
|
|
267
|
+
options: field({
|
|
268
|
+
type: 'object',
|
|
269
|
+
title: '格式化选项',
|
|
270
|
+
description: 'Intl.DateTimeFormat 的配置选项(JSON 对象)',
|
|
271
|
+
icon: 'i-lucide-settings',
|
|
272
|
+
default: {}
|
|
273
|
+
})
|
|
274
|
+
}
|
|
275
|
+
})
|
|
276
|
+
}
|
|
277
|
+
}),
|
|
278
|
+
|
|
279
|
+
aiChat: group({
|
|
280
|
+
title: 'AI Chat',
|
|
281
|
+
description: 'AI 聊天助手配置',
|
|
282
|
+
icon: 'i-lucide-sparkles',
|
|
283
|
+
fields: {
|
|
284
|
+
floatingInput: field({
|
|
285
|
+
type: 'boolean',
|
|
286
|
+
title: '浮动输入框',
|
|
287
|
+
description: '在文档页面底部显示浮动输入框',
|
|
288
|
+
icon: 'i-lucide-message-square',
|
|
289
|
+
default: true
|
|
290
|
+
}),
|
|
291
|
+
explainWithAi: field({
|
|
292
|
+
type: 'boolean',
|
|
293
|
+
title: '用 AI 解释',
|
|
294
|
+
description: '在文档侧边栏中显示「用 AI 解释」按钮',
|
|
295
|
+
icon: 'i-lucide-brain',
|
|
296
|
+
default: true
|
|
297
|
+
}),
|
|
298
|
+
faqQuestions: field({
|
|
299
|
+
type: 'array',
|
|
300
|
+
title: 'FAQ 问题',
|
|
301
|
+
description: '显示的常见问题解答问题。支持简单格式(字符串数组)或分类格式(对象数组)',
|
|
302
|
+
icon: 'i-lucide-help-circle',
|
|
303
|
+
default: []
|
|
304
|
+
}),
|
|
305
|
+
|
|
306
|
+
shortcuts: group({
|
|
307
|
+
title: '快捷键',
|
|
308
|
+
description: '键盘快捷键配置',
|
|
309
|
+
icon: 'i-lucide-keyboard',
|
|
310
|
+
fields: {
|
|
311
|
+
focusInput: field({
|
|
312
|
+
type: 'string',
|
|
313
|
+
title: '聚焦输入框',
|
|
314
|
+
description: '快捷键用于聚焦浮动输入框',
|
|
315
|
+
icon: 'i-lucide-focus',
|
|
316
|
+
default: 'meta_i'
|
|
317
|
+
})
|
|
318
|
+
}
|
|
319
|
+
}),
|
|
320
|
+
|
|
321
|
+
texts: group({
|
|
322
|
+
title: '文本配置',
|
|
323
|
+
description: 'UI 文本配置',
|
|
324
|
+
icon: 'i-lucide-languages',
|
|
325
|
+
fields: {
|
|
326
|
+
title: field({
|
|
327
|
+
type: 'string',
|
|
328
|
+
title: '标题',
|
|
329
|
+
description: 'AI 聊天面板的标题文本',
|
|
330
|
+
icon: 'i-lucide-heading',
|
|
331
|
+
default: 'AI 助手'
|
|
332
|
+
}),
|
|
333
|
+
collapse: field({
|
|
334
|
+
type: 'string',
|
|
335
|
+
title: '折叠按钮',
|
|
336
|
+
description: '折叠按钮的文本',
|
|
337
|
+
icon: 'i-lucide-chevron-up',
|
|
338
|
+
default: '折叠'
|
|
339
|
+
}),
|
|
340
|
+
expand: field({
|
|
341
|
+
type: 'string',
|
|
342
|
+
title: '展开按钮',
|
|
343
|
+
description: '展开按钮的文本',
|
|
344
|
+
icon: 'i-lucide-chevron-down',
|
|
345
|
+
default: '展开'
|
|
346
|
+
}),
|
|
347
|
+
clearChat: field({
|
|
348
|
+
type: 'string',
|
|
349
|
+
title: '清除聊天记录',
|
|
350
|
+
description: '清除聊天记录按钮的文本',
|
|
351
|
+
icon: 'i-lucide-trash-2',
|
|
352
|
+
default: '清除聊天记录'
|
|
353
|
+
}),
|
|
354
|
+
close: field({
|
|
355
|
+
type: 'string',
|
|
356
|
+
title: '关闭按钮',
|
|
357
|
+
description: '关闭按钮的文本',
|
|
358
|
+
icon: 'i-lucide-x',
|
|
359
|
+
default: '关闭'
|
|
360
|
+
}),
|
|
361
|
+
loading: field({
|
|
362
|
+
type: 'string',
|
|
363
|
+
title: '加载中',
|
|
364
|
+
description: '加载时的提示文本',
|
|
365
|
+
icon: 'i-lucide-loader',
|
|
366
|
+
default: 'Loading...'
|
|
367
|
+
}),
|
|
368
|
+
askAnything: field({
|
|
369
|
+
type: 'string',
|
|
370
|
+
title: '询问提示',
|
|
371
|
+
description: '询问任何事情的文本',
|
|
372
|
+
icon: 'i-lucide-message-circle',
|
|
373
|
+
default: '问我任何事情...'
|
|
374
|
+
}),
|
|
375
|
+
askMeAnythingDescription: field({
|
|
376
|
+
type: 'string',
|
|
377
|
+
title: '询问提示描述',
|
|
378
|
+
description: '询问任何事情的描述文本',
|
|
379
|
+
icon: 'i-lucide-info',
|
|
380
|
+
default: '我可以帮助您浏览文档、解释概念并回答您的问题。'
|
|
381
|
+
}),
|
|
382
|
+
faq: field({
|
|
383
|
+
type: 'string',
|
|
384
|
+
title: 'FAQ 建议',
|
|
385
|
+
description: 'FAQ 建议标题文本',
|
|
386
|
+
icon: 'i-lucide-help-circle',
|
|
387
|
+
default: 'FAQ 建议'
|
|
388
|
+
}),
|
|
389
|
+
placeholder: field({
|
|
390
|
+
type: 'string',
|
|
391
|
+
title: '输入占位符',
|
|
392
|
+
description: '浮动输入框的占位符文本',
|
|
393
|
+
icon: 'i-lucide-type',
|
|
394
|
+
default: '输入你的问题...'
|
|
395
|
+
}),
|
|
396
|
+
lineBreak: field({
|
|
397
|
+
type: 'string',
|
|
398
|
+
title: '换行提示',
|
|
399
|
+
description: '换行的提示文本',
|
|
400
|
+
icon: 'i-lucide-corner-down-left',
|
|
401
|
+
default: '换行'
|
|
402
|
+
}),
|
|
403
|
+
trigger: field({
|
|
404
|
+
type: 'string',
|
|
405
|
+
title: '触发按钮',
|
|
406
|
+
description: 'AI 聊天面板触发按钮的提示文本',
|
|
407
|
+
icon: 'i-lucide-sparkles',
|
|
408
|
+
default: '与 AI 聊天'
|
|
409
|
+
}),
|
|
410
|
+
streaming: field({
|
|
411
|
+
type: 'string',
|
|
412
|
+
title: '思考中',
|
|
413
|
+
description: '思考时的提示文本',
|
|
414
|
+
icon: 'i-lucide-brain',
|
|
415
|
+
default: '思考中...'
|
|
416
|
+
}),
|
|
417
|
+
streamed: field({
|
|
418
|
+
type: 'string',
|
|
419
|
+
title: '思考完成',
|
|
420
|
+
description: '思考后的提示文本',
|
|
421
|
+
icon: 'i-lucide-check-circle',
|
|
422
|
+
default: '思考过程'
|
|
423
|
+
}),
|
|
424
|
+
explainWithAi: field({
|
|
425
|
+
type: 'string',
|
|
426
|
+
title: '用 AI 解释按钮',
|
|
427
|
+
description: '用 AI 解释按钮的文本',
|
|
428
|
+
icon: 'i-lucide-brain',
|
|
429
|
+
default: '用 AI 解释此页面'
|
|
430
|
+
})
|
|
431
|
+
}
|
|
432
|
+
}),
|
|
433
|
+
|
|
434
|
+
icons: group({
|
|
435
|
+
title: '图标配置',
|
|
436
|
+
description: 'UI 图标配置',
|
|
437
|
+
icon: 'i-lucide-icon',
|
|
438
|
+
fields: {
|
|
439
|
+
loading: field({
|
|
440
|
+
type: 'string',
|
|
441
|
+
title: '加载图标',
|
|
442
|
+
description: '加载时的图标',
|
|
443
|
+
icon: 'i-lucide-loader',
|
|
444
|
+
default: 'i-lucide-loader'
|
|
445
|
+
}),
|
|
446
|
+
trigger: field({
|
|
447
|
+
type: 'string',
|
|
448
|
+
title: '触发图标',
|
|
449
|
+
description: 'AI 聊天触发按钮的图标',
|
|
450
|
+
icon: 'i-lucide-sparkles',
|
|
451
|
+
default: 'i-lucide-sparkles'
|
|
452
|
+
}),
|
|
453
|
+
explain: field({
|
|
454
|
+
type: 'string',
|
|
455
|
+
title: '解释图标',
|
|
456
|
+
description: '「用 AI 解释」按钮的图标',
|
|
457
|
+
icon: 'i-lucide-brain',
|
|
458
|
+
default: 'i-lucide-brain'
|
|
459
|
+
}),
|
|
460
|
+
streaming: field({
|
|
461
|
+
type: 'string',
|
|
462
|
+
title: '思考图标',
|
|
463
|
+
description: '思考时的图标',
|
|
464
|
+
icon: 'i-lucide-chevron-down',
|
|
465
|
+
default: 'i-lucide-chevron-down'
|
|
466
|
+
}),
|
|
467
|
+
clearChat: field({
|
|
468
|
+
type: 'string',
|
|
469
|
+
title: '清除图标',
|
|
470
|
+
description: '清除聊天记录按钮的图标',
|
|
471
|
+
icon: 'i-lucide-trash-2',
|
|
472
|
+
default: 'i-lucide-trash-2'
|
|
473
|
+
}),
|
|
474
|
+
close: field({
|
|
475
|
+
type: 'string',
|
|
476
|
+
title: '关闭图标',
|
|
477
|
+
description: '关闭按钮的图标',
|
|
478
|
+
icon: 'i-lucide-x',
|
|
479
|
+
default: 'i-lucide-x'
|
|
480
|
+
}),
|
|
481
|
+
providers: field({
|
|
482
|
+
type: 'object',
|
|
483
|
+
title: 'AI 提供商图标',
|
|
484
|
+
description: '用于映射不同 AI 提供商的图标(JSON 对象,键为提供商名称,值为图标名称)',
|
|
485
|
+
icon: 'i-lucide-layout-grid',
|
|
486
|
+
default: {}
|
|
487
|
+
})
|
|
488
|
+
}
|
|
489
|
+
})
|
|
490
|
+
}
|
|
491
|
+
})
|
|
492
|
+
}
|
|
493
|
+
})
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@movk/nuxt-docs",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.7.0",
|
|
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>",
|
|
@@ -21,24 +21,26 @@
|
|
|
21
21
|
"content.config.ts",
|
|
22
22
|
"modules",
|
|
23
23
|
"nuxt.config.ts",
|
|
24
|
+
"nuxt.schema.ts",
|
|
24
25
|
"server",
|
|
25
26
|
"utils",
|
|
26
27
|
"pnpm-workspace.yaml",
|
|
27
28
|
"README.md"
|
|
28
29
|
],
|
|
29
30
|
"dependencies": {
|
|
30
|
-
"@ai-sdk/gateway": "^3.0.
|
|
31
|
+
"@ai-sdk/gateway": "^3.0.11",
|
|
31
32
|
"@ai-sdk/mcp": "^1.0.5",
|
|
32
|
-
"@ai-sdk/vue": "^3.0.
|
|
33
|
-
"@iconify-json/lucide": "^1.2.
|
|
34
|
-
"@iconify-json/simple-icons": "^1.2.
|
|
35
|
-
"@iconify-json/vscode-icons": "^1.2.
|
|
33
|
+
"@ai-sdk/vue": "^3.0.27",
|
|
34
|
+
"@iconify-json/lucide": "^1.2.84",
|
|
35
|
+
"@iconify-json/simple-icons": "^1.2.66",
|
|
36
|
+
"@iconify-json/vscode-icons": "^1.2.38",
|
|
36
37
|
"@movk/core": "^1.1.0",
|
|
38
|
+
"@nuxt/a11y": "^1.0.0-alpha.1",
|
|
37
39
|
"@nuxt/content": "^3.10.0",
|
|
38
40
|
"@nuxt/image": "^2.0.0",
|
|
39
41
|
"@nuxt/kit": "^4.2.2",
|
|
40
42
|
"@nuxt/ui": "^4.3.0",
|
|
41
|
-
"@nuxtjs/mcp-toolkit": "^0.6.
|
|
43
|
+
"@nuxtjs/mcp-toolkit": "^0.6.2",
|
|
42
44
|
"@nuxtjs/seo": "^3.3.0",
|
|
43
45
|
"@octokit/rest": "^22.0.1",
|
|
44
46
|
"@openrouter/ai-sdk-provider": "^1.5.4",
|
|
@@ -46,11 +48,11 @@
|
|
|
46
48
|
"@vercel/speed-insights": "^1.3.1",
|
|
47
49
|
"@vueuse/core": "^14.1.0",
|
|
48
50
|
"@vueuse/nuxt": "^14.1.0",
|
|
49
|
-
"ai": "^6.0.
|
|
51
|
+
"ai": "^6.0.27",
|
|
50
52
|
"defu": "^6.1.4",
|
|
51
53
|
"exsolve": "^1.0.8",
|
|
52
54
|
"git-url-parse": "^16.1.0",
|
|
53
|
-
"motion-v": "^1.
|
|
55
|
+
"motion-v": "^1.8.1",
|
|
54
56
|
"nuxt": "^4.2.2",
|
|
55
57
|
"nuxt-component-meta": "^0.16.0",
|
|
56
58
|
"nuxt-llms": "^0.1.3",
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export interface FaqItem {
|
|
2
|
-
category: string
|
|
3
|
-
items: string[]
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
export function useFaq() {
|
|
7
|
-
const faqQuestions: FaqItem[] = [
|
|
8
|
-
{
|
|
9
|
-
category: 'MCP 工具使用',
|
|
10
|
-
items: [
|
|
11
|
-
'如何查询所有可用的文档页面?',
|
|
12
|
-
'如何获取特定文档页面的完整内容?',
|
|
13
|
-
'什么时候应该使用 list-pages 而不是 get-page?'
|
|
14
|
-
]
|
|
15
|
-
}
|
|
16
|
-
]
|
|
17
|
-
|
|
18
|
-
return {
|
|
19
|
-
faqQuestions
|
|
20
|
-
}
|
|
21
|
-
}
|