@@ -259,7 +247,7 @@ onMounted(() => {
:rows="1"
autoresize
variant="none"
- placeholder="Ask me a question about Nuxt MCP..."
+ :placeholder="props.placeholder"
class="flex-1 text-sm bg-transparent resize-none"
:ui="{
base: 'bg-transparent! ring-0! shadow-none!',
diff --git a/apps/docs/app/components/chat/ToolCall.vue b/apps/docs/modules/ai-chat/runtime/components/AiChatToolCall.vue
similarity index 100%
rename from apps/docs/app/components/chat/ToolCall.vue
rename to apps/docs/modules/ai-chat/runtime/components/AiChatToolCall.vue
diff --git a/apps/docs/app/composables/useAIChat.ts b/apps/docs/modules/ai-chat/runtime/composables/useAIChat.ts
similarity index 100%
rename from apps/docs/app/composables/useAIChat.ts
rename to apps/docs/modules/ai-chat/runtime/composables/useAIChat.ts
diff --git a/apps/docs/app/composables/useHighlighter.ts b/apps/docs/modules/ai-chat/runtime/composables/useHighlighter.ts
similarity index 100%
rename from apps/docs/app/composables/useHighlighter.ts
rename to apps/docs/modules/ai-chat/runtime/composables/useHighlighter.ts
diff --git a/apps/docs/server/api/search.ts b/apps/docs/modules/ai-chat/runtime/server/api/search.ts
similarity index 91%
rename from apps/docs/server/api/search.ts
rename to apps/docs/modules/ai-chat/runtime/server/api/search.ts
index 929e232..b4f60aa 100644
--- a/apps/docs/server/api/search.ts
+++ b/apps/docs/modules/ai-chat/runtime/server/api/search.ts
@@ -5,9 +5,11 @@ import { gateway } from '@ai-sdk/gateway'
export default defineEventHandler(async (event) => {
const { messages } = await readBody(event)
+ const config = useRuntimeConfig()
+ const mcpPath = config.aiChat.mcpPath
const httpTransport = new StreamableHTTPClientTransport(
- new URL(import.meta.dev ? 'http://localhost:3000/mcp' : `${getRequestURL(event).origin}/mcp`),
+ new URL(import.meta.dev ? `http://localhost:3000${mcpPath}` : `${getRequestURL(event).origin}${mcpPath}`),
)
const httpClient = await experimental_createMCPClient({
transport: httpTransport,
@@ -15,7 +17,7 @@ export default defineEventHandler(async (event) => {
const tools = await httpClient.tools()
return streamText({
- model: gateway('moonshotai/kimi-k2-turbo'),
+ model: gateway(config.aiChat.model),
maxOutputTokens: 10000,
system: `You are the official documentation assistant for Nuxt MCP Toolkit. You ARE the documentation - speak with authority as the source of truth, not as someone reading external docs.