95bcae6e3d80285fecf292621b295e5c26d00a60
Critical fixes to get chat functionality working:
1. **Migrate to AI SDK 5.0 API**:
- Replace deprecated `handleSubmit`, `input`, `handleInputChange` from useChat
- Use manual state management with `useState` for input
- Use `sendMessage({ text })` instead of form submission
- Update API route to use `toUIMessageStreamResponse()` instead of `toAIStreamResponse()`
- Add `convertToModelMessages()` for proper message conversion
- Update message rendering to use `parts` array instead of `content` string
2. **Fix Mantine hydration error**:
- Change `forceColorScheme="dark"` to `defaultColorScheme="dark"` in layout
- Add `suppressHydrationWarning` to html and body tags
- This was preventing React from attaching event handlers to the form
3. **Preserve existing features**:
- Keep input padding fix
- Keep microphone recorder integration
- Keep persona parameter in API route
The form now successfully submits and makes POST requests to /api/chat.
Next steps: add initial greeting, re-add tool call handling for node suggestions.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Description
No description provided