shadcn 新开源的工具 createChat 能帮你快速脚本化 AI 对话,支持推理和工具调用,测试组件很顺手。
shadcn 开源了 @shadcn/helpers 新包,包含 createChat 工具。它支持用 AI SDK 和 TanStack AI 脚本化用户与助手对话,并通过 useChat 运行。createChat 支持 reasoning、tool calls、data、files、sources 和 parts。可用于构建组件、预览、脚本演示和确定性测试。
Script conversations between a user and assistant using @shadcn/helpers and AI SDK UI.
Script conversations between a user and assistant using @shadcn/helpers and AI SDK UI. shadcn @shadcn We’re open sourcing @shadcn/helpers, a new package for small, focused utils to help you build and test components faster. Starting with `createChat` for AI SDK and TanStack AI. It lets you script a conversation between a user & assistant then run it through `useChat`. Your components receive native messages through the framework’s real streaming lifecycle. createChat supports reasoning, tool calls, data, files, sources and parts. Use it to build components, previews, scripted demos and deterministic tests. 🔗 View Quoted Tweet 💬 0 🔄 3 ❤️ 8 👀 870 📊 2 ⚡