@movk/nuxt-docs 1.16.2 → 1.16.3
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/components/DocsAsideRightBottom.vue +2 -2
- package/app/components/header/Header.vue +3 -3
- package/modules/ai-chat/runtime/components/AiChat.vue +3 -3
- package/modules/ai-chat/runtime/components/AiChatFloatingInput.vue +2 -2
- package/modules/ai-chat/runtime/components/AiChatPanel.vue +10 -10
- package/modules/ai-chat/runtime/composables/useModels.ts +1 -1
- package/package.json +1 -1
- package/server/api/github/commits.json.get.ts +3 -3
- package/server/api/github/last-commit.json.get.ts +5 -5
- package/server/api/github/releases.json.get.ts +2 -2
|
@@ -13,9 +13,9 @@ const showExplainWithAi = computed(() => {
|
|
|
13
13
|
<template>
|
|
14
14
|
<UButton
|
|
15
15
|
v-if="showExplainWithAi"
|
|
16
|
-
:icon="aiChat.icons
|
|
16
|
+
:icon="aiChat.icons?.explain ?? ''"
|
|
17
17
|
target="_blank"
|
|
18
|
-
:label="aiChat.texts
|
|
18
|
+
:label="aiChat.texts?.explainWithAi ?? ''"
|
|
19
19
|
size="sm"
|
|
20
20
|
variant="ghost"
|
|
21
21
|
color="neutral"
|
|
@@ -4,7 +4,7 @@ import type { ButtonProps } from '@nuxt/ui'
|
|
|
4
4
|
const route = useRoute()
|
|
5
5
|
const { header, github } = useAppConfig()
|
|
6
6
|
|
|
7
|
-
const links = computed<ButtonProps[]>(() => github && github.url
|
|
7
|
+
const links = computed<ButtonProps[]>(() => (github && github.url
|
|
8
8
|
? [
|
|
9
9
|
{
|
|
10
10
|
'icon': 'i-simple-icons-github',
|
|
@@ -12,9 +12,9 @@ const links = computed<ButtonProps[]>(() => github && github.url
|
|
|
12
12
|
'target': '_blank',
|
|
13
13
|
'aria-label': 'GitHub'
|
|
14
14
|
},
|
|
15
|
-
...header?.links || []
|
|
15
|
+
...(header?.links || [])
|
|
16
16
|
]
|
|
17
|
-
: header
|
|
17
|
+
: header?.links || []) as ButtonProps[])
|
|
18
18
|
</script>
|
|
19
19
|
|
|
20
20
|
<template>
|
|
@@ -4,12 +4,12 @@ const { toggleChat } = useAIChat()
|
|
|
4
4
|
</script>
|
|
5
5
|
|
|
6
6
|
<template>
|
|
7
|
-
<UTooltip :text="aiChat.texts
|
|
7
|
+
<UTooltip :text="aiChat.texts?.trigger ?? ''">
|
|
8
8
|
<UButton
|
|
9
|
-
:icon="aiChat.icons
|
|
9
|
+
:icon="aiChat.icons?.trigger ?? ''"
|
|
10
10
|
variant="ghost"
|
|
11
11
|
class="rounded-full"
|
|
12
|
-
:aria-label="aiChat.texts
|
|
12
|
+
:aria-label="aiChat.texts?.trigger ?? ''"
|
|
13
13
|
@click="toggleChat"
|
|
14
14
|
/>
|
|
15
15
|
</UTooltip>
|
|
@@ -12,7 +12,7 @@ const inputRef = ref<{ inputRef: HTMLInputElement } | null>(null)
|
|
|
12
12
|
|
|
13
13
|
const isDocsRoute = computed(() => route.meta.layout === 'docs')
|
|
14
14
|
const isFloatingInputEnabled = computed(() => aiChat.floatingInput !== false)
|
|
15
|
-
const focusInputShortcut = computed(() => aiChat.shortcuts
|
|
15
|
+
const focusInputShortcut = computed(() => aiChat.shortcuts?.focusInput ?? 'meta_i')
|
|
16
16
|
|
|
17
17
|
const shortcutDisplayKeys = computed(() => {
|
|
18
18
|
const shortcut = focusInputShortcut.value
|
|
@@ -72,7 +72,7 @@ defineShortcuts(shortcuts)
|
|
|
72
72
|
<UInput
|
|
73
73
|
ref="inputRef"
|
|
74
74
|
v-model="input"
|
|
75
|
-
:placeholder="aiChat.texts
|
|
75
|
+
:placeholder="aiChat.texts?.placeholder ?? ''"
|
|
76
76
|
size="lg"
|
|
77
77
|
maxlength="1000"
|
|
78
78
|
:ui="{
|
|
@@ -159,30 +159,30 @@ const faqQuestions = computed<FaqCategory[]>(() => {
|
|
|
159
159
|
<USidebar
|
|
160
160
|
v-model:open="isOpen"
|
|
161
161
|
side="right"
|
|
162
|
-
:title="aiChat.texts
|
|
162
|
+
:title="aiChat.texts?.title ?? ''"
|
|
163
163
|
rail
|
|
164
164
|
:style="{ '--sidebar-width': '24rem' }"
|
|
165
165
|
:ui="{ footer: 'p-0', actions: 'gap-0.5' }"
|
|
166
166
|
>
|
|
167
167
|
<template #actions>
|
|
168
|
-
<UTooltip v-if="canClear" :text="aiChat.texts
|
|
168
|
+
<UTooltip v-if="canClear" :text="aiChat.texts?.clearChat ?? ''">
|
|
169
169
|
<UButton
|
|
170
|
-
:icon="aiChat.icons
|
|
170
|
+
:icon="aiChat.icons?.clearChat ?? ''"
|
|
171
171
|
color="neutral"
|
|
172
172
|
variant="ghost"
|
|
173
|
-
:aria-label="aiChat.texts
|
|
173
|
+
:aria-label="aiChat.texts?.clearChat ?? ''"
|
|
174
174
|
@click="clearMessages"
|
|
175
175
|
/>
|
|
176
176
|
</UTooltip>
|
|
177
177
|
</template>
|
|
178
178
|
|
|
179
179
|
<template #close>
|
|
180
|
-
<UTooltip :text="aiChat.texts
|
|
180
|
+
<UTooltip :text="aiChat.texts?.close ?? ''">
|
|
181
181
|
<UButton
|
|
182
|
-
:icon="aiChat.icons
|
|
182
|
+
:icon="aiChat.icons?.close ?? ''"
|
|
183
183
|
color="neutral"
|
|
184
184
|
variant="ghost"
|
|
185
|
-
:aria-label="aiChat.texts
|
|
185
|
+
:aria-label="aiChat.texts?.close ?? ''"
|
|
186
186
|
@click="isOpen = false"
|
|
187
187
|
/>
|
|
188
188
|
</UTooltip>
|
|
@@ -221,7 +221,7 @@ const faqQuestions = computed<FaqCategory[]>(() => {
|
|
|
221
221
|
v-if="isReasoningUIPart(part)"
|
|
222
222
|
:text="part.text"
|
|
223
223
|
:streaming="isReasoningStreaming(message, index, chat)"
|
|
224
|
-
:icon="aiChat.icons
|
|
224
|
+
:icon="aiChat.icons?.reasoning ?? ''"
|
|
225
225
|
>
|
|
226
226
|
<MDCCached
|
|
227
227
|
:value="part.text"
|
|
@@ -262,7 +262,7 @@ const faqQuestions = computed<FaqCategory[]>(() => {
|
|
|
262
262
|
<UChatPrompt
|
|
263
263
|
v-model="input"
|
|
264
264
|
:error="chat.error"
|
|
265
|
-
:placeholder="aiChat.texts
|
|
265
|
+
:placeholder="aiChat.texts?.placeholder ?? ''"
|
|
266
266
|
variant="naked"
|
|
267
267
|
size="sm"
|
|
268
268
|
autofocus
|
|
@@ -275,7 +275,7 @@ const faqQuestions = computed<FaqCategory[]>(() => {
|
|
|
275
275
|
<AiChatModelSelect v-model="model" />
|
|
276
276
|
|
|
277
277
|
<div class="flex gap-1 justify-between items-center px-1 text-xs text-muted">
|
|
278
|
-
<span>{{ aiChat.texts
|
|
278
|
+
<span>{{ aiChat.texts?.lineBreak ?? '' }}</span>
|
|
279
279
|
<UKbd value="shift" />
|
|
280
280
|
<UKbd value="enter" />
|
|
281
281
|
</div>
|
|
@@ -3,7 +3,7 @@ export function useModels() {
|
|
|
3
3
|
const model = useCookie<string>('model', { default: () => config.public.aiChat.model })
|
|
4
4
|
|
|
5
5
|
const { aiChat } = useAppConfig()
|
|
6
|
-
const providerIcons = computed(() => aiChat.icons
|
|
6
|
+
const providerIcons = computed(() => (aiChat.icons?.providers ?? {}) as Record<string, string>)
|
|
7
7
|
|
|
8
8
|
function getModelIcon(modelId: string): string {
|
|
9
9
|
const provider = modelId.split('/')[0] || ''
|
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.3",
|
|
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>",
|
|
@@ -32,9 +32,9 @@ export default defineCachedEventHandler(async (event) => {
|
|
|
32
32
|
const allCommits = await Promise.all(
|
|
33
33
|
paths.map(path =>
|
|
34
34
|
octokit.rest.repos.listCommits({
|
|
35
|
-
sha: github.branch
|
|
36
|
-
owner: github.owner
|
|
37
|
-
repo: github.name
|
|
35
|
+
sha: github.branch!,
|
|
36
|
+
owner: github.owner!,
|
|
37
|
+
repo: github.name!,
|
|
38
38
|
path,
|
|
39
39
|
since: github.since,
|
|
40
40
|
per_page: github.per_page || 100,
|
|
@@ -29,9 +29,9 @@ export default defineCachedEventHandler(async (event) => {
|
|
|
29
29
|
|
|
30
30
|
try {
|
|
31
31
|
const commits = await octokit.rest.repos.listCommits({
|
|
32
|
-
sha: github.branch
|
|
33
|
-
owner: github.owner
|
|
34
|
-
repo: github.name
|
|
32
|
+
sha: github.branch!,
|
|
33
|
+
owner: github.owner!,
|
|
34
|
+
repo: github.name!,
|
|
35
35
|
path,
|
|
36
36
|
per_page: 1
|
|
37
37
|
}).then(res => res.data).catch(() => [])
|
|
@@ -58,8 +58,8 @@ export default defineCachedEventHandler(async (event) => {
|
|
|
58
58
|
const prMatch = commit.commit.message.match(/#(\d+)/)
|
|
59
59
|
if (prMatch?.[1]) {
|
|
60
60
|
const prData = await octokit.rest.pulls.get({
|
|
61
|
-
owner: github.owner
|
|
62
|
-
repo: github.name
|
|
61
|
+
owner: github.owner!,
|
|
62
|
+
repo: github.name!,
|
|
63
63
|
pull_number: Number.parseInt(prMatch[1])
|
|
64
64
|
}).then(res => res.data).catch(() => null)
|
|
65
65
|
|
|
@@ -17,8 +17,8 @@ export default defineCachedEventHandler(async () => {
|
|
|
17
17
|
const octokit = new Octokit({ auth: process.env.NUXT_GITHUB_TOKEN })
|
|
18
18
|
|
|
19
19
|
const releases = await octokit.rest.repos.listReleases({
|
|
20
|
-
owner: github.owner
|
|
21
|
-
repo: github.name
|
|
20
|
+
owner: github.owner!,
|
|
21
|
+
repo: github.name!
|
|
22
22
|
}).then(res => res.data).catch(() => [])
|
|
23
23
|
|
|
24
24
|
return releases
|