- Change proposedChange to proposedChanges array in ChatMessage type - Add unique id and individual respondedAction to each ProposedEventChange - Implement arrow navigation UI for multiple proposals with "Event X von Y" counter - Add updateProposalResponse() method for per-proposal confirm/reject tracking - GPTAdapter now collects multiple tool call results into proposals array - Add RRULE documentation to system prompt (separate events for different times) - Fix RRULE parsing to strip RRULE: prefix if present - Add log summarization for large args (conversationHistory, existingEvents) - Keep proposedChanges logged in full for debugging AI issues
22 lines
437 B
TypeScript
22 lines
437 B
TypeScript
import {
|
|
CalendarEvent,
|
|
ChatMessage,
|
|
ProposedEventChange,
|
|
} from "@caldav/shared";
|
|
|
|
export interface AIContext {
|
|
userId: string;
|
|
conversationHistory: ChatMessage[];
|
|
existingEvents: CalendarEvent[];
|
|
currentDate: Date;
|
|
}
|
|
|
|
export interface AIResponse {
|
|
content: string;
|
|
proposedChanges?: ProposedEventChange[];
|
|
}
|
|
|
|
export interface AIProvider {
|
|
processMessage(message: string, context: AIContext): Promise<AIResponse>;
|
|
}
|