Fix AI chat conversation errors and history loading issues
- Fix CircularProgress import from correct MUI package - Fix conversationId validation by omitting null values instead of sending them - Fix conversations API Zod schema default values (string vs number mismatch) - Remove debug logging from chat error handling - AI chat conversations now work properly with authentication - Chat history loading no longer fails with validation errors 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -24,6 +24,7 @@ import {
|
||||
DialogTitle,
|
||||
DialogContent,
|
||||
DialogActions,
|
||||
CircularProgress,
|
||||
} from '@mui/material'
|
||||
import {
|
||||
Chat,
|
||||
@@ -39,7 +40,6 @@ import {
|
||||
History,
|
||||
Add,
|
||||
Delete,
|
||||
CircularProgress,
|
||||
MoreVert,
|
||||
Edit,
|
||||
} from '@mui/icons-material'
|
||||
@@ -351,7 +351,7 @@ export default function FloatingChat() {
|
||||
headers,
|
||||
body: JSON.stringify({
|
||||
message: inputMessage,
|
||||
conversationId: activeConversationId,
|
||||
...(activeConversationId && { conversationId: activeConversationId }),
|
||||
history: messages.slice(-5), // Fallback for anonymous users
|
||||
locale: locale,
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user