feat(schedule): 待办提醒推送、行事历仅展示提醒与管理 API
单次提醒 worker 投递、local 时间写入校验、未来 7 天提醒列表与忽略/批量删除;行事历去掉事项重复展示。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+9
-3
@@ -221,11 +221,17 @@ export function createMindSpaceService(pool, options = {}) {
|
||||
let schedule = null;
|
||||
if (scheduleService) {
|
||||
try {
|
||||
const [todayTodoItems, digestSubscriptions] = await withOptionalTimeout(
|
||||
const [todayTodoItems, upcomingItems, upcomingReminders, digestSubscriptions] = await withOptionalTimeout(
|
||||
Promise.all([
|
||||
typeof scheduleService.listTodayTodoItems === 'function'
|
||||
? scheduleService.listTodayTodoItems({ userId })
|
||||
: Promise.resolve([]),
|
||||
typeof scheduleService.listUpcomingItems === 'function'
|
||||
? scheduleService.listUpcomingItems({ userId })
|
||||
: Promise.resolve([]),
|
||||
typeof scheduleService.listUpcomingReminders === 'function'
|
||||
? scheduleService.listUpcomingReminders({ userId })
|
||||
: Promise.resolve([]),
|
||||
typeof scheduleService.listDigestSubscriptions === 'function'
|
||||
? scheduleService.listDigestSubscriptions({
|
||||
userId,
|
||||
@@ -236,9 +242,9 @@ export function createMindSpaceService(pool, options = {}) {
|
||||
: Promise.resolve([]),
|
||||
]),
|
||||
1000,
|
||||
[[], []],
|
||||
[[], [], [], []],
|
||||
);
|
||||
schedule = { todayTodoItems, digestSubscriptions };
|
||||
schedule = { todayTodoItems, upcomingItems, upcomingReminders, digestSubscriptions };
|
||||
} catch {
|
||||
schedule = null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user