本页还没有译文
本页 16 段还没译成Français,下面显示的是英文原文。Chat UI packages
还没翻译译自英文(tanstack.com)本页 16 段都还没译
Change your import from @tanstack/ai-react-ui to @tanstack/ai-react/ui. The same move applies to Solid and Vue.
Deprecated.
@tanstack/ai-react-ui,@tanstack/ai-solid-ui, and@tanstack/ai-vue-uire-export the new/uisubpath until each package's1.0.0.npm installprints a warning. Import from/uiin new code. Svelte never published a*-uipackage. Use@tanstack/ai-svelte/ui.
- import { Chat, ChatMessages, ChatInput } from '@tanstack/ai-react-ui'
+ import { Chat, ChatMessages, ChatInput } from '@tanstack/ai-react/ui'Nothing else changes for the package move. Chat, ChatMessages, ChatMessage, ChatInput, ToolApproval, TextPart, and ThinkingPart stay on the subpath until 1.0.0. TextPart markdown plugins did change. See TextPart markdown.
useChat is not re-exported from the shim. Import it from @tanstack/ai-react, or the matching framework package.
Why
A separate *-ui package split chat UI from the framework package. Form uses createFormHook on @tanstack/react-form. Table uses createTableHook on @tanstack/react-table. Chat now sits on @tanstack/ai-react/ui for the same reason.
Minimum versions
New imports:
@tanstack/ai-react(next minor)/ui@tanstack/ai-solid(next minor)/ui@tanstack/ai-vue(next minor)/ui@tanstack/ai-svelte(next minor)/ui@tanstack/ai-preact(next minor)/ui@tanstack/ai-octane(next minor)/ui@tanstack/ai-angular(next minor)/ui@tanstack/ai-remix(next minor)/ui
Deprecated re-exports, removed in 1.0.0:
@tanstack/ai-react-ui0.9.0@tanstack/ai-solid-ui0.8.0@tanstack/ai-vue-ui0.3.0
Coexistence
Old *-ui packages and new /ui imports can live in the same app until 1.0.0. Do not mix them in one chat tree.
Typed chat UI
The /ui subpath also exports createChatHook, a typed headless chat UI that derives tool, part, and interrupt components from your chat options. It is new, not a replacement you need to move to. The components above keep working. See the React UI guide for how it fits together, and Solid, Vue, Svelte, Preact, Octane, Remix, or Angular for the other adapters.