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:
andupetcu
2025-09-22 12:20:35 +03:00
parent 382fb93de2
commit 6295c15755
2 changed files with 4 additions and 4 deletions

View File

@@ -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,
}),