extend chat model with CRUD actions for event changes

- Add ProposedEventChange type with create/update/delete actions
- Replace proposedEvent with proposedChange in ChatMessage
- Add currentDate to AIContext for time-aware AI responses
- Add AI test endpoint for development (/api/ai/test)
- Fix MongoUserRepository type safety with explicit toUser mapping
- Update CLAUDE.md documentation
This commit is contained in:
2026-01-03 19:37:27 +01:00
parent 105a9a4980
commit e553103470
7 changed files with 82 additions and 34 deletions

View File

@@ -1,14 +1,15 @@
import { CalendarEvent, ChatMessage, CreateEventDTO } from '@caldav/shared';
import { CalendarEvent, ChatMessage, ProposedEventChange } from '@caldav/shared';
export interface AIContext {
userId: string;
conversationHistory: ChatMessage[];
existingEvents: CalendarEvent[];
currentDate: Date;
}
export interface AIResponse {
content: string;
proposedEvent?: CreateEventDTO;
proposedChange?: ProposedEventChange;
}
export interface AIProvider {