feat: support multiple event proposals in single AI response
- 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
This commit is contained in:
@@ -31,7 +31,8 @@ export class ChatController {
|
||||
try {
|
||||
const userId = req.user!.userId;
|
||||
const { conversationId, messageId } = req.params;
|
||||
const { action, event, eventId, updates } = req.body as {
|
||||
const { proposalId, action, event, eventId, updates } = req.body as {
|
||||
proposalId: string;
|
||||
action: EventAction;
|
||||
event?: CreateEventDTO;
|
||||
eventId?: string;
|
||||
@@ -41,6 +42,7 @@ export class ChatController {
|
||||
userId,
|
||||
conversationId,
|
||||
messageId,
|
||||
proposalId,
|
||||
action,
|
||||
event,
|
||||
eventId,
|
||||
@@ -57,10 +59,12 @@ export class ChatController {
|
||||
try {
|
||||
const userId = req.user!.userId;
|
||||
const { conversationId, messageId } = req.params;
|
||||
const { proposalId } = req.body as { proposalId: string };
|
||||
const response = await this.chatService.rejectEvent(
|
||||
userId,
|
||||
conversationId,
|
||||
messageId,
|
||||
proposalId,
|
||||
);
|
||||
res.json(response);
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user