import { ChatMessage, ProposedEventChange, ExpandedEvent, CalendarEvent, } from "@calchat/shared"; export interface AIContext { userId: string; conversationHistory: ChatMessage[]; currentDate: Date; // Callback to load events from a specific date range // Returns ExpandedEvent[] with occurrenceStart/occurrenceEnd for recurring events fetchEventsInRange: ( startDate: Date, endDate: Date, ) => Promise; // Callback to search events by title searchEvents: (query: string) => Promise; // Callback to fetch a single event by ID fetchEventById: (eventId: string) => Promise; } export interface AIResponse { content: string; proposedChanges?: ProposedEventChange[]; } export interface AIProvider { processMessage(message: string, context: AIContext): Promise; }