refactor: improve AI event handling and conflict display in chat
- AI fetches events on-demand via callbacks for better efficiency - Add conflict detection with warning display when proposing overlapping events - Improve event search and display in chat interface - Load full chat history for display while limiting AI context
This commit is contained in:
@@ -5,11 +5,13 @@ import {
|
||||
CreateEventDTO,
|
||||
GetMessagesOptions,
|
||||
UpdateMessageDTO,
|
||||
ConflictingEvent,
|
||||
} from "@calchat/shared";
|
||||
|
||||
export interface ChatRepository {
|
||||
// Conversations
|
||||
getConversationsByUser(userId: string): Promise<Conversation[]>;
|
||||
getConversationById(conversationId: string): Promise<Conversation | null>;
|
||||
createConversation(userId: string): Promise<Conversation>;
|
||||
|
||||
// Messages (cursor-based pagination)
|
||||
@@ -38,5 +40,8 @@ export interface ChatRepository {
|
||||
messageId: string,
|
||||
proposalId: string,
|
||||
event: CreateEventDTO,
|
||||
conflictingEvents?: ConflictingEvent[],
|
||||
): Promise<ChatMessage | null>;
|
||||
|
||||
getMessageById(messageId: string): Promise<ChatMessage | null>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user