发现和使用优秀的技能扩展
使用Vercel AI SDK v6构建React聊天界面。涵盖useChat/useCompletion/useObject钩子、消息部分结构、工具审批工作流以及18种UI错误解决方案。防止React严格模式、并发请求、陈旧闭包和工具审批边缘情况的文档化问题。
适用场景:实现AI聊天UI、从v5迁移到v6、排查“useChat解析流失败”“陈旧的body值”“React最大更新深度”“无法读取未定义的属性(读取'state')”或工具审批工作流错误。
Build React chat interfaces with Vercel AI SDK v6. Covers useChat/useCompletion/useObject hooks, message parts structure, tool approval workflows, and 18 UI error solutions. Prevents documented issues with React Strict Mode, concurrent requests, stale closures, and tool approval edge cases.
Use when: implementing AI chat UIs, migrating v5→v6, troubleshooting "useChat failed to parse stream", "stale body values", "React maximum update depth", "Cannot read properties of undefined (reading 'state')", or tool approval workflow errors.