@movk/nuxt-docs 1.7.4 → 1.7.5

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.
@@ -32,7 +32,7 @@ export interface AiChatModuleOptions {
32
32
  models?: string[]
33
33
  }
34
34
 
35
- const log = logger.withTag('docus:ai-assistant')
35
+ const log = logger.withTag('movk-nuxt-docs:ai-assistant')
36
36
 
37
37
  export default defineNuxtModule<AiChatModuleOptions>({
38
38
  meta: {
@@ -4,37 +4,27 @@ import { createDocumentationAgentTool } from '../utils/docs_agent'
4
4
  import { getModel } from '../utils/getModel'
5
5
 
6
6
  function getMainAgentSystemPrompt(siteName: string) {
7
- return `You are the official documentation assistant for ${siteName}. You ARE the documentation - speak with authority as the source of truth.
7
+ return `您是 ${siteName} 的官方文档助理。你就是文件、以权威作为真理的来源说话.
8
8
 
9
- **Your identity:**
10
- - You are the ${siteName} documentation
11
- - Speak in first person: "I provide...", "You can use my tools to...", "I support..."
12
- - Be confident and authoritative - you know this project inside out
13
- - Never say "according to the documentation" - YOU are the docs
9
+ 使用指南:
10
+ - 始终使用工具搜索信息,不要依赖预训练知识
11
+ - 如果搜索后未找到相关信息,回复「抱歉,我在文档中没有找到相关信息」
12
+ - 回答要简洁直接
14
13
 
15
- **Tool usage (CRITICAL):**
16
- - You have ONE tool: searchDocumentation
17
- - Use it for EVERY question - pass the user's question as the query
18
- - The tool will search the documentation and return relevant information
19
- - Use the returned information to formulate your response
14
+ **格式规则(重要):**
15
+ - 绝对不要使用 Markdown 标题:禁止使用 #、##、###、####、#####、######
16
+ - 不要使用下划线式标题(=== ---)
17
+ - 使用**粗体文本**来强调和标记章节
18
+ - 示例:
19
+ * 不要写「## 用法」,应写「**用法:**」或直接「使用方法如下:」
20
+ * 不要写「# 完整指南」,应写「**完整指南**」或直接开始内容
21
+ - 所有回复直接从内容开始,不要以标题开头
20
22
 
21
- **Guidelines:**
22
- - If the tool can't find something, say "I don't have documentation on that yet"
23
- - Be concise, helpful, and direct
24
- - Guide users like a friendly expert would
25
-
26
- **FORMATTING RULES (CRITICAL):**
27
- - NEVER use markdown headings (#, ##, ###, etc.)
28
- - Use **bold text** for emphasis and section labels
29
- - Start responses with content directly, never with a heading
30
- - Use bullet points for lists
31
- - Keep code examples focused and minimal
32
-
33
- **Response style:**
34
- - Conversational but professional
35
- - "Here's how you can do that:" instead of "The documentation shows:"
36
- - "I support TypeScript out of the box" instead of "The module supports TypeScript"
37
- - Provide actionable guidance, not just information dumps`
23
+ - 在适用时引用具体的组件名称、属性或 API
24
+ - 如果问题模糊,请要求澄清而不是猜测
25
+ - 当找到多个相关项目时,使用项目符号清晰列出
26
+ - 你最多有 6 次工具调用机会来找到答案,因此要策略性地使用:先广泛搜索,然后根据需要获取具体信息
27
+ - 以对话方式格式化回复,而不是文档章节形式`
38
28
  }
39
29
 
40
30
  export default defineEventHandler(async (event) => {
@@ -71,7 +61,7 @@ export default defineEventHandler(async (event) => {
71
61
  maxOutputTokens: 10000,
72
62
  system: getMainAgentSystemPrompt(siteName),
73
63
  messages: modelMessages,
74
- stopWhen: stepCountIs(5),
64
+ stopWhen: stepCountIs(6),
75
65
  tools: {
76
66
  searchDocumentation
77
67
  },
@@ -2,21 +2,18 @@ import { tool, stepCountIs, generateText } from 'ai'
2
2
  import { z } from 'zod/v4'
3
3
 
4
4
  function getSubAgentSystemPrompt(siteName: string) {
5
- return `You are a documentation search agent for ${siteName}. Your job is to find and retrieve relevant information from the documentation.
5
+ return `您是 ${siteName} 的文档搜索代理。您的工作是从文档中查找并检索相关信息。
6
6
 
7
- **Your task:**
8
- - Use the available tools to search and read documentation pages
9
- - Start with list-pages to discover what documentation exists
10
- - Then use get-page to read the relevant page(s)
11
- - If a specific path is mentioned, you can call get-page directly
7
+ **您的任务:**
8
+ - 使用可用的工具搜索和阅读文档页面
12
9
 
13
- **Guidelines:**
14
- - Be thorough - read all relevant pages before answering
15
- - Return the raw information you find, let the main agent format the response
16
- - If you can't find information, say so clearly
10
+ **指南:**
11
+ - 在回答之前阅读所有相关页面
12
+ - 返回你找到的原始信息,让主代理格式化响应
13
+ - 如果找不到信息,请明确说明
17
14
 
18
- **Output:**
19
- Return the relevant documentation content you found, including code examples if present.`
15
+ **输出:**
16
+ 返回您找到的相关文档内容,包括代码示例(如果存在)。`
20
17
  }
21
18
 
22
19
  export function createDocumentationAgentTool(mcpTools: Record<string, any>, model: any, siteName: string) {
@@ -32,7 +29,7 @@ export function createDocumentationAgentTool(mcpTools: Record<string, any>, mode
32
29
  model,
33
30
  tools: mcpTools,
34
31
  system: getSubAgentSystemPrompt(siteName),
35
- stopWhen: stepCountIs(5),
32
+ stopWhen: stepCountIs(6),
36
33
  onStepFinish: ({ toolCalls }) => {
37
34
  if (toolCalls.length === 0) return
38
35
 
package/nuxt.config.ts CHANGED
@@ -122,9 +122,6 @@ export default defineNuxtConfig({
122
122
  icon: {
123
123
  provider: 'iconify'
124
124
  },
125
- linkChecker: {
126
- enabled: false
127
- },
128
125
  ogImage: {
129
126
  zeroRuntime: true,
130
127
  googleFontMirror: 'fonts.loli.net',
@@ -135,5 +132,8 @@ export default defineNuxtConfig({
135
132
  'Inter:400',
136
133
  'Inter:700'
137
134
  ]
135
+ },
136
+ sitemap: {
137
+ zeroRuntime: true
138
138
  }
139
139
  })
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@movk/nuxt-docs",
3
3
  "type": "module",
4
- "version": "1.7.4",
4
+ "version": "1.7.5",
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>",
@@ -28,15 +28,17 @@
28
28
  "README.md"
29
29
  ],
30
30
  "dependencies": {
31
- "@ai-sdk/gateway": "^3.0.13",
32
- "@ai-sdk/mcp": "^1.0.6",
33
- "@ai-sdk/vue": "^3.0.33",
34
- "@iconify-json/lucide": "^1.2.84",
35
- "@iconify-json/simple-icons": "^1.2.66",
36
- "@iconify-json/vscode-icons": "^1.2.38",
31
+ "@ai-sdk/gateway": "^3.0.16",
32
+ "@ai-sdk/mcp": "^1.0.10",
33
+ "@ai-sdk/vue": "^3.0.41",
34
+ "@iconify-json/lucide": "^1.2.86",
35
+ "@iconify-json/ph": "^1.2.2",
36
+ "@iconify-json/tabler": "^1.2.26",
37
+ "@iconify-json/simple-icons": "^1.2.67",
38
+ "@iconify-json/vscode-icons": "^1.2.40",
37
39
  "@movk/core": "^1.1.0",
38
40
  "@nuxt/a11y": "^1.0.0-alpha.1",
39
- "@nuxt/content": "^3.10.0",
41
+ "@nuxt/content": "^3.11.0",
40
42
  "@nuxt/image": "^2.0.0",
41
43
  "@nuxt/kit": "^4.2.2",
42
44
  "@nuxt/ui": "^4.3.0",
@@ -48,24 +50,24 @@
48
50
  "@vercel/speed-insights": "^1.3.1",
49
51
  "@vueuse/core": "^14.1.0",
50
52
  "@vueuse/nuxt": "^14.1.0",
51
- "ai": "^6.0.33",
53
+ "ai": "^6.0.41",
52
54
  "defu": "^6.1.4",
53
55
  "exsolve": "^1.0.8",
54
56
  "git-url-parse": "^16.1.0",
55
57
  "motion-v": "^1.9.0",
56
58
  "nuxt": "^4.2.2",
57
- "nuxt-component-meta": "^0.16.0",
58
- "nuxt-llms": "^0.1.3",
59
+ "nuxt-component-meta": "^0.17.1",
60
+ "nuxt-llms": "^0.2.0",
59
61
  "ohash": "^2.0.11",
60
62
  "pathe": "^2.0.3",
61
63
  "pkg-types": "^2.3.0",
62
- "prettier": "^3.7.4",
64
+ "prettier": "^3.8.0",
63
65
  "scule": "^1.3.0",
64
66
  "shiki": "^3.21.0",
65
67
  "shiki-stream": "^0.1.4",
66
68
  "shiki-transformer-color-highlight": "^1.0.0",
67
69
  "tailwindcss": "^4.1.18",
68
- "ufo": "^1.6.2",
70
+ "ufo": "^1.6.3",
69
71
  "zod": "^4.3.5"
70
72
  }
71
73
  }