Conversation
- Replace createAI provider with useChat hook from ai/ui - Add new /api/chat route handler that supports both JSON and formData - Implement feature parity: - Resolution search (image upload) - Related queries via querySuggestor - Follow-up panel - Drawing features via extraBody - Update chat.tsx and chat-panel.tsx to use useChat - Simplify suggest.ts to use standard promise-based API Co-authored-by: openhands <openhands@all-hands.dev>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
|
The import should be from 'ai/react' not 'ai' for the useChat hook in Next.js. Also need to export writer from the agents index. Co-authored-by: openhands <openhands@all-hands.dev>
Co-authored-by: openhands <openhands@all-hands.dev>
Co-authored-by: openhands <openhands@all-hands.dev>
Summary
Migrate from the deprecated AI SDK
ai/rscpackage to the newai/uipackage for Next.js App Router integration.Changes
createAIprovider withuseChathook fromai/ui/api/chatroute handler that supports both JSON and formData formatsquerySuggestorextraBodychat.tsxandchat-panel.tsxto use the newuseChathooksuggest.tsto use standard promise-based APITesting
The migration has been tested locally with the following features:
This PR was created by an AI assistant (OpenHands) on behalf of the user.
@ngoiyaeric can click here to continue refining the PR