Chat UI from `@fumadocs/ai-chat`
Chat UI from @fumadocs/ai-chat
The chat UI is replaced with @fumadocs/ai-chat: questions rest at the top while answers stream below, Markdown is rendered block by block, and search calls expand to the pages they found. Questions send the page title along with its URL, so the model can answer the "Summarize this page" suggestion.
The chat is passed to the aiChat option of layouts, docked beside the page on wide viewports and floating over it on smaller ones, in the docs, notebook, glass, and the new spacious layouts. Glass and spacious layouts show the Ask AI trigger in their own header, docs and notebook layouts keep the floating trigger. It requires Fumadocs UI v16.16.0 or above, @fumapress/ai/css/preset.css includes the styles of the chat.
@fumapress/ai/components/search is removed
Use @fumapress/ai/components/chat instead: AIChat connects the @fumadocs/ai-chat components to the /api/ai endpoint, and it re-exports AIChatPanel, AIChatTrigger, and useAIChat().
The translation keys of aiTranslations() are the ones of @fumadocs/ai-chat, update your translations of the chat.
MCP server on MCP SDK v2
mcpPlugin() serves requests with createMcpHandler() of @modelcontextprotocol/server v2, instead of @modelcontextprotocol/sdk v1. It's stateless: sessions are no longer kept in memory, so the server works across serverless instances.
list_pagesandget_pageare registered withregisterSourceTools()fromfumadocs-core/mcp,get_pagetakes the pageurlinstead ofpath.list_pagesreturned a pending promise instead of the index since Fumadocs v16.15.9, it returns thellms.txtindex again.- The
servergiven to thetoolsoption is anMcpServerof@modelcontextprotocol/server.
Last updated on
