Commit graph

3 commits

Author SHA1 Message Date
9e506279a7 Fix AI chat performance and UX
- Single JOIN query instead of N+1 selects for sessions
- Auto-create session when sending without one
- Send button enabled when typing

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-11 01:49:36 +05:30
2d61ba2afc Fix chat API to work with database
- Use sql template literals instead of unsafe queries
- Handle UUID child_id requirement properly
- Fetch messages separately to avoid GROUP BY issues

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-11 01:40:40 +05:30
c3255e82da Migrate Chat Sessions to database
- Add chat_sessions and chat_messages tables
- Create /api/chat endpoint for CRUD operations
- Update home page and /ai page to use database
- All chat history now persists across sessions and devices

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 21:13:21 +05:30