From 1e019aa43187f2b4ee74db91a731d51bf9ab0673 Mon Sep 17 00:00:00 2001 From: ddshi <8811906+ddshi@user.noreply.gitee.com> Date: Tue, 3 Mar 2026 20:27:34 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20AI=E5=88=9B=E5=BB=BA=E5=BE=AA=E7=8E=AF?= =?UTF-8?q?=E6=8F=90=E9=86=92=E6=97=B6=E6=B7=BB=E5=8A=A0next=5Freminder=5F?= =?UTF-8?q?date=E8=AE=A1=E7=AE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.6 --- src/components/ai/FloatingAIChat.tsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/components/ai/FloatingAIChat.tsx b/src/components/ai/FloatingAIChat.tsx index fa09643..2a1f00d 100644 --- a/src/components/ai/FloatingAIChat.tsx +++ b/src/components/ai/FloatingAIChat.tsx @@ -22,6 +22,7 @@ import { } from '@tabler/icons-react'; import { api } from '../../services/api'; import { useAppStore } from '../../stores'; +import { calculateNextReminderDate } from '../../utils/repeatCalculator'; import type { AIConversation, AIParsedEvent, RepeatType, PriorityType } from '../../types'; import { notifications } from '@mantine/notifications'; @@ -124,6 +125,11 @@ export function FloatingAIChat({ onEventCreated, hidden = false }: FloatingAICha if (!parsedEvent) return; try { + // 计算下一次提醒日期 + const nextReminderDate = editForm.repeat_type !== 'none' && editForm.date + ? calculateNextReminderDate(editForm.date, editForm.repeat_type as RepeatType, undefined) + : undefined; + const eventData = { type: editForm.type, title: editForm.title, @@ -134,6 +140,7 @@ export function FloatingAIChat({ onEventCreated, hidden = false }: FloatingAICha is_holiday: editForm.is_holiday, priority: editForm.priority, reminder_times: editForm.reminder_times, + next_reminder_date: nextReminderDate, }; await api.events.create(eventData);