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

@@ -14,8 +14,8 @@ const createConversationSchema = z.object({
const getConversationsSchema = z.object({
language: z.enum(['ro', 'en']).optional(),
limit: z.string().transform(Number).pipe(z.number().min(1).max(50)).optional().default(20),
offset: z.string().transform(Number).pipe(z.number().min(0)).optional().default(0),
limit: z.string().transform(Number).pipe(z.number().min(1).max(50)).optional().default('20'),
offset: z.string().transform(Number).pipe(z.number().min(0)).optional().default('0'),
})
// GET /api/chat/conversations - List user's conversations