- 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>
- 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>
- 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>