@1agents/dsh-plugin-todo 0.1.5 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -32,7 +32,7 @@ macOS 的隐私授权按「责任进程」判定,而不是看实际读数据
32
32
  前提:Apple 芯片的 macOS、Node.js 20 或以上、已安装的 DeepSeek Harness。提醒事项和日历只在这台 Mac 上读写。当前发布的原生程序是 arm64,Intel Mac 不能安装。
33
33
 
34
34
  ```sh
35
- dsh plugin --profile web add @1agents/dsh-plugin-todo@0.1.5
35
+ dsh plugin --profile web add @1agents/dsh-plugin-todo@0.1.7
36
36
  ```
37
37
 
38
38
  装完后重启 DSH。左侧栏「历史会话」上方出现「日程」。Host 启动时会把 MCP 登记到 `127.0.0.1:36908`。网关没在跑时,页面仍可用,Agent 搜索不到工具。当前这个对话窗口走的是 desktop profile;要在 `dsh web`(默认 `http://127.0.0.1:3080`)里看到,安装目标是 web profile。
package/dist/client.js CHANGED
@@ -93,6 +93,11 @@ var zh = {
93
93
  today: "\u4ECA\u5929",
94
94
  week: "\u672C\u5468",
95
95
  dayView: "\u65E5",
96
+ previousDay: "\u524D\u4E00\u5929",
97
+ nextDay: "\u540E\u4E00\u5929",
98
+ viewMode: "\u89C6\u56FE",
99
+ saving: "\u4FDD\u5B58\u4E2D\u2026",
100
+ cancel: "\u53D6\u6D88",
96
101
  now: "\u73B0\u5728",
97
102
  allDaySection: "\u5168\u5929",
98
103
  timedSection: "\u6709\u65F6\u95F4",
@@ -133,6 +138,11 @@ var en = {
133
138
  today: "Today",
134
139
  week: "This week",
135
140
  dayView: "Day",
141
+ previousDay: "Previous day",
142
+ nextDay: "Next day",
143
+ viewMode: "View",
144
+ saving: "Saving\u2026",
145
+ cancel: "Cancel",
136
146
  now: "Now",
137
147
  allDaySection: "All day",
138
148
  timedSection: "Timed",
@@ -292,12 +302,6 @@ function dayBlocks(day, events, reminders) {
292
302
  later.sort((left, right) => left.at - right.at || left.id.localeCompare(right.id));
293
303
  return [...timed, ...later];
294
304
  }
295
- var HOUR_START = 7;
296
- var HOUR_END = 22;
297
- var HOUR_HEIGHT = 56;
298
- function minutesOf(date) {
299
- return date.getHours() * 60 + date.getMinutes();
300
- }
301
305
  function splitDay(blocks) {
302
306
  const allDay = [];
303
307
  const timed = [];
@@ -308,26 +312,6 @@ function splitDay(blocks) {
308
312
  });
309
313
  return { allDay, timed };
310
314
  }
311
- function timelineTop(block) {
312
- const date = block.kind === "event" ? parseDate(block.event.start) : parseDate(block.reminder.due);
313
- if (!date) return 8;
314
- const minutes = Math.min(Math.max(minutesOf(date), HOUR_START * 60), HOUR_END * 60);
315
- return (minutes - HOUR_START * 60) / 60 * HOUR_HEIGHT + 4;
316
- }
317
- function placedTimed(blocks) {
318
- const lanes = [];
319
- return blocks.map((block) => {
320
- const top = timelineTop(block);
321
- let lane = lanes.findIndex((used) => top - used >= 44);
322
- if (lane < 0) {
323
- lane = lanes.length;
324
- lanes.push(top);
325
- } else {
326
- lanes[lane] = top;
327
- }
328
- return { block, top, lane, lanes: 0, laneCount: lanes.length };
329
- }).map((item, _, all) => ({ ...item, laneCount: Math.max(...all.map((entry) => entry.laneCount), 1) }));
330
- }
331
315
  function visibleRange(year, month) {
332
316
  const days = monthGrid(year, month);
333
317
  const from = days[0];
@@ -416,28 +400,32 @@ function mountSidebarEntry({ label, onOpen }) {
416
400
  button.remove();
417
401
  };
418
402
  }
419
- function AgendaRow({ compact, time, title, source, location, notes, overdue, accent, onComplete, onDelete, t, busy }) {
403
+ function AgendaRow({ compact, time, title, source, location, notes, overdue, accent, checked, onComplete, onDelete, t, busy }) {
404
+ const [expanded, setExpanded] = (0, import_react.useState)(false);
420
405
  const style = accent ? { "--ia-accent": accent } : void 0;
406
+ const titleControl = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", className: "ia-title ia-expand", "aria-expanded": expanded, onClick: () => setExpanded((value) => !value), title: title || t("untitled"), children: title || t("untitled") });
421
407
  if (compact) {
422
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("article", { className: overdue ? "ia-compact is-overdue" : "ia-compact", style, children: [
408
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("article", { className: `ia-compact${overdue ? " is-overdue" : ""}${expanded ? " is-expanded" : ""}`, style, children: [
423
409
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "ia-compact-top", children: [
424
- onComplete ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("input", { type: "checkbox", checked: false, "aria-label": t("complete"), disabled: busy, onChange: onComplete }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "ia-time", children: time }),
410
+ onComplete ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("input", { type: "checkbox", checked: Boolean(checked), "aria-label": t("complete"), disabled: busy, onChange: onComplete }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "ia-time", children: time }),
425
411
  onComplete ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "ia-time", children: time }) : null,
426
412
  onDelete ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", className: "ia-icon-btn ia-delete", "aria-label": t("remove"), disabled: busy, onClick: onDelete, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TrashIcon, {}) }) : null
427
413
  ] }),
428
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("strong", { className: "ia-title", children: title || t("untitled") }),
414
+ titleControl,
415
+ expanded && notes ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "ia-detail", children: notes }) : null,
416
+ expanded && location ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "ia-location", children: location }) : null,
429
417
  source ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "ia-source", children: source }) : null
430
418
  ] });
431
419
  }
432
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("article", { className: overdue ? "ia-row is-overdue" : "ia-row", style, children: [
433
- onComplete ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("input", { type: "checkbox", checked: false, "aria-label": t("complete"), disabled: busy, onChange: onComplete }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "ia-check-spacer" }),
420
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("article", { className: `ia-row${overdue ? " is-overdue" : ""}${expanded ? " is-expanded" : ""}`, style, children: [
421
+ onComplete ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("input", { type: "checkbox", checked: Boolean(checked), "aria-label": t("complete"), disabled: busy, onChange: onComplete }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "ia-check-spacer" }),
434
422
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "ia-time", children: time }),
435
423
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "ia-main", children: [
436
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("strong", { className: "ia-title", children: title || t("untitled") }),
437
- notes ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "ia-detail", children: notes }) : null
424
+ titleControl,
425
+ expanded && notes ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "ia-detail", children: notes }) : null
438
426
  ] }),
439
427
  source ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "ia-source", children: source }) : null,
440
- location ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "ia-location", children: location }) : null,
428
+ expanded && location ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "ia-location", children: location }) : null,
441
429
  onDelete ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", className: "ia-icon-btn ia-delete", "aria-label": t("remove"), disabled: busy, onClick: onDelete, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TrashIcon, {}) }) : null
442
430
  ] });
443
431
  }
@@ -448,36 +436,6 @@ function Chevron({ direction }) {
448
436
  const path = direction === "left" ? "M14 6l-6 6 6 6" : "M10 6l6 6-6 6";
449
437
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", { viewBox: "0 0 24 24", "aria-hidden": "true", width: "16", height: "16", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: path, fill: "none", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round" }) });
450
438
  }
451
- function DayTimeline({ day, blocks, now, overdueIds, listColors, calendarColors, t, busy, onComplete, onDelete }) {
452
- const hours = Array.from({ length: HOUR_END - HOUR_START + 1 }, (_, index) => HOUR_START + index);
453
- const showNow = sameDay(day, now);
454
- const nowMinutes = minutesOf(now);
455
- const nowTop = (nowMinutes - HOUR_START * 60) / 60 * HOUR_HEIGHT;
456
- const nowVisible = showNow && nowMinutes >= HOUR_START * 60 && nowMinutes <= HOUR_END * 60;
457
- const { allDay, timed } = splitDay(blocks);
458
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "ia-timeline", children: [
459
- allDay.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "ia-allday", children: [
460
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "ia-allday-label", children: t("allDay") }),
461
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "ia-allday-list", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AgendaBlocks, { blocks: allDay, overdueIds, listColors, calendarColors, t, busy, onComplete, onDelete }) })
462
- ] }),
463
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "ia-hours", style: { height: hours.length * HOUR_HEIGHT }, children: [
464
- hours.map((hour) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "ia-hour", style: { height: HOUR_HEIGHT }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { children: [
465
- String(hour).padStart(2, "0"),
466
- ":00"
467
- ] }) }, hour)),
468
- nowVisible && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "ia-now", style: { top: nowTop }, "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: t("now") }) }),
469
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "ia-slots", children: placedTimed(timed).map(({ block, top, lane, laneCount }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
470
- "div",
471
- {
472
- className: "ia-slot",
473
- style: { top, left: `calc(${lane / laneCount * 100}% + 4px)`, width: `calc(${100 / laneCount}% - 8px)` },
474
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AgendaBlocks, { blocks: [block], overdueIds, listColors, calendarColors, t, busy, onComplete, onDelete })
475
- },
476
- `${block.kind}:${block.id}`
477
- )) })
478
- ] })
479
- ] });
480
- }
481
439
  function AgendaBlocks({ blocks, overdueIds, listColors, calendarColors, t, busy, onComplete, onDelete, compact }) {
482
440
  return blocks.map((block) => {
483
441
  if (block.kind === "event") {
@@ -489,8 +447,8 @@ function AgendaBlocks({ blocks, overdueIds, listColors, calendarColors, t, busy,
489
447
  time: eventTimeLabel(event, day, t),
490
448
  title: event.title,
491
449
  source: event.calendar,
492
- location: compact ? "" : event.location,
493
- notes: compact ? "" : event.notes,
450
+ location: event.location,
451
+ notes: event.notes,
494
452
  accent: calendarColors.get(event.calendarId) || "",
495
453
  onDelete: () => onDelete("deleteEvent", event.id),
496
454
  t,
@@ -507,7 +465,8 @@ function AgendaBlocks({ blocks, overdueIds, listColors, calendarColors, t, busy,
507
465
  time: reminderTimeLabel(reminder),
508
466
  title: reminder.title,
509
467
  source: reminder.list,
510
- notes: compact ? "" : reminder.notes,
468
+ notes: reminder.notes,
469
+ checked: reminder.completed,
511
470
  overdue: overdueIds.has(reminder.id),
512
471
  accent: listColors.get(reminder.listId) || "",
513
472
  onComplete: () => onComplete(reminder.id),
@@ -584,7 +543,7 @@ function AgendaPage({ t, agenda }) {
584
543
  return { year: now.getFullYear(), month: now.getMonth() };
585
544
  });
586
545
  const [viewPreference] = (0, import_react.useState)(readViewPreference);
587
- const [mode, setMode] = (0, import_react.useState)(viewPreference.mode);
546
+ const [mode] = (0, import_react.useState)("day");
588
547
  const [data, setData] = (0, import_react.useState)(null);
589
548
  const [loadedKey, setLoadedKey] = (0, import_react.useState)("");
590
549
  const [error, setError] = (0, import_react.useState)("");
@@ -598,6 +557,8 @@ function AgendaPage({ t, agenda }) {
598
557
  const [eventTitle, setEventTitle] = (0, import_react.useState)("");
599
558
  const [eventStart, setEventStart] = (0, import_react.useState)("");
600
559
  const [eventEnd, setEventEnd] = (0, import_react.useState)("");
560
+ const [overdueOpen, setOverdueOpen] = (0, import_react.useState)(false);
561
+ const [undatedOpen, setUndatedOpen] = (0, import_react.useState)(false);
601
562
  const requestRef = (0, import_react.useRef)(0);
602
563
  const overdueRef = (0, import_react.useRef)(null);
603
564
  const undatedRef = (0, import_react.useRef)(null);
@@ -689,8 +650,15 @@ function AgendaPage({ t, agenda }) {
689
650
  setError(result.error?.message || t("unavailable"));
690
651
  return;
691
652
  }
653
+ const active = document.activeElement;
654
+ const row = active && active.closest ? active.closest(".ia-row, .ia-compact") : null;
655
+ const group = row && row.closest ? row.closest(".ia-group") : null;
692
656
  clear();
693
657
  setRevision((value) => value + 1);
658
+ requestAnimationFrame(() => {
659
+ const toggle = group && group.querySelector(".ia-group-toggle");
660
+ if (toggle) toggle.focus();
661
+ });
694
662
  }
695
663
  function openEvent() {
696
664
  if (!eventStart || !eventEnd) {
@@ -813,11 +781,11 @@ function AgendaPage({ t, agenda }) {
813
781
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("header", { className: "ia-board-head", children: [
814
782
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "ia-title-block", children: [
815
783
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h1", { children: mode === "week" ? weekLabel : dayHeading(cursor) }),
816
- mode === "day" && !sameDay(cursor, today) && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", className: "ia-today", onClick: () => selectDay(today), children: t("today") })
817
- ] }),
818
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "ia-modes", role: "group", "aria-label": t("week"), children: [
819
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", "aria-pressed": mode === "day", onClick: () => setMode("day"), children: t("dayView") }),
820
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", "aria-pressed": mode === "week", onClick: () => setMode("week"), children: t("week") })
784
+ mode === "day" && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "ia-day-nav", children: [
785
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", className: "ia-icon-btn", "aria-label": t("previousDay"), onClick: () => selectDay(addDays(cursor, -1)), children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Chevron, { direction: "left" }) }),
786
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", className: "ia-icon-btn", "aria-label": t("nextDay"), onClick: () => selectDay(addDays(cursor, 1)), children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Chevron, { direction: "right" }) })
787
+ ] }),
788
+ !sameDay(cursor, today) && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", className: "ia-today", onClick: () => selectDay(today), children: t("today") })
821
789
  ] }),
822
790
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", className: "ia-refresh", onClick: () => setRevision((value) => value + 1), disabled: busy, children: t("refresh") })
823
791
  ] }),
@@ -836,13 +804,12 @@ function AgendaPage({ t, agenda }) {
836
804
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", onClick: authorize, disabled: busy, children: accessBlocked(auth.reminders) || accessBlocked(auth.events) ? t("openSettings") : t("authorize") })
837
805
  ] }),
838
806
  error && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "ios-agenda-error", role: "alert", children: error }),
807
+ busy && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "ios-agenda-muted", role: "status", children: t("saving") }),
839
808
  !ready && !error && !auth && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "ios-agenda-muted", children: t("loading") }),
840
809
  ready && !auth && mode === "day" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("section", { className: "ia-day-list", children: dayList.length ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
841
- DayTimeline,
810
+ AgendaBlocks,
842
811
  {
843
- day: cursor,
844
812
  blocks: dayList,
845
- now: /* @__PURE__ */ new Date(),
846
813
  overdueIds,
847
814
  listColors,
848
815
  calendarColors,
@@ -855,26 +822,33 @@ function AgendaPage({ t, agenda }) {
855
822
  }
856
823
  ) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "ios-agenda-empty", children: t("emptyDay") }) }),
857
824
  ready && !auth && mode === "week" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "ia-week-scroll", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "ia-week", children: weekDays.map((day) => {
858
- const blocks = dayBlocks(day, events, reminders);
825
+ const { allDay, timed } = splitDay(dayBlocks(day, events, reminders));
826
+ const renderItems = (items) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AgendaBlocks, { compact: true, blocks: items, overdueIds, listColors, calendarColors, t, busy, onComplete: (id) => submit("completeReminder", { id, completed: true }, () => {
827
+ }), onDelete: (method, id) => submit(method, { id }, () => {
828
+ }) });
859
829
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", { className: sameDay(day, cursor) ? "ia-week-col is-selected" : "ia-week-col", children: [
860
830
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", { type: "button", className: sameDay(day, today) ? "ia-week-head is-today" : "ia-week-head", onClick: () => selectDay(day), children: [
861
831
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: weekdayShort(day) }),
862
832
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("strong", { children: day.getDate() })
863
833
  ] }),
864
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AgendaBlocks, { compact: true, blocks, overdueIds, listColors, calendarColors, t, busy, onComplete: (id) => submit("completeReminder", { id, completed: true }, () => {
865
- }), onDelete: (method, id) => submit(method, { id }, () => {
866
- }) })
834
+ allDay.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "ia-allday", children: renderItems(allDay) }),
835
+ timed.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "ia-week-list", children: renderItems(timed) })
867
836
  ] }, dayKey(day));
868
837
  }) }) }),
869
838
  ready && !auth && overdueItems.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", { className: "ia-group", ref: overdueRef, children: [
870
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", { children: t("overdue") }),
871
- overdueItems.map((item) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
839
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", { type: "button", className: "ia-group-toggle", "aria-expanded": overdueOpen, onClick: () => setOverdueOpen((value) => !value), children: [
840
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: t("overdue") }),
841
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("strong", { children: overdueItems.length }),
842
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Chevron, { direction: overdueOpen ? "left" : "right" })
843
+ ] }),
844
+ overdueOpen && overdueItems.map((item) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
872
845
  AgendaRow,
873
846
  {
874
847
  time: overdueTimeLabel(item),
875
848
  title: item.title,
876
849
  source: item.list,
877
850
  notes: item.notes,
851
+ checked: item.completed,
878
852
  overdue: true,
879
853
  accent: listColors.get(item.listId) || "",
880
854
  onComplete: () => submit("completeReminder", { id: item.id, completed: true }, () => {
@@ -888,14 +862,19 @@ function AgendaPage({ t, agenda }) {
888
862
  ))
889
863
  ] }),
890
864
  ready && !auth && undatedItems.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", { className: "ia-group", ref: undatedRef, children: [
891
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", { children: t("undated") }),
892
- undatedItems.map((item) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
865
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", { type: "button", className: "ia-group-toggle", "aria-expanded": undatedOpen, onClick: () => setUndatedOpen((value) => !value), children: [
866
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: t("undated") }),
867
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("strong", { children: undatedItems.length }),
868
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Chevron, { direction: undatedOpen ? "left" : "right" })
869
+ ] }),
870
+ undatedOpen && undatedItems.map((item) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
893
871
  AgendaRow,
894
872
  {
895
873
  time: "",
896
874
  title: item.title,
897
875
  source: item.list,
898
876
  notes: item.notes,
877
+ checked: item.completed,
899
878
  accent: listColors.get(item.listId) || "",
900
879
  onComplete: () => submit("completeReminder", { id: item.id, completed: true }, () => {
901
880
  }),
@@ -936,7 +915,13 @@ function AgendaPage({ t, agenda }) {
936
915
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("input", { "aria-label": t("titleField"), value: eventTitle, placeholder: t("newEvent"), onChange: (event) => setEventTitle(event.target.value) }),
937
916
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("input", { "aria-label": t("start"), type: "datetime-local", value: eventStart, onChange: (event) => setEventStart(event.target.value) }),
938
917
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("input", { "aria-label": t("end"), type: "datetime-local", value: eventEnd, onChange: (event) => setEventEnd(event.target.value) }),
939
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "submit", disabled: busy || !eventTitle.trim() || !eventStart || !eventEnd, children: t("add") })
918
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "submit", disabled: busy || !eventTitle.trim() || !eventStart || !eventEnd, children: t("add") }),
919
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", onClick: () => {
920
+ setEventOpen(false);
921
+ setEventTitle("");
922
+ setEventStart("");
923
+ setEventEnd("");
924
+ }, children: t("cancel") })
940
925
  ] })
941
926
  ] })
942
927
  ] })
@@ -984,15 +969,15 @@ var css = `
984
969
  .ia-swatch { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--ia-swatch, var(--dsw-alias-label-secondary)); }
985
970
  .ia-board { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
986
971
  .ia-board-scroll { flex: 1; min-height: 0; overflow: auto; padding: 16px 24px 8px; }
987
- .ia-board-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 12px; margin-bottom: 8px; padding-bottom: 12px; background: var(--dsw-alias-bg-base); }
972
+ .ia-board-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 12px; margin-bottom: 10px; padding-bottom: 12px; border-bottom: 1px solid var(--dsw-alias-border-default); background: var(--dsw-alias-bg-base); }
988
973
  .ia-title-block { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
989
974
  .ia-board-head h1 { margin: 0; min-width: 0; font-size: 22px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
990
975
  .ia-today { flex: none; color: var(--dsw-alias-state-business-primary); border-color: transparent; background: var(--dsw-alias-bg-layer-1); }
991
976
  .ia-modes { display: flex; gap: 2px; padding: 2px; border-radius: 10px; background: var(--dsw-alias-bg-layer-1); }
992
977
  .ia-modes button { padding: 6px 10px; color: var(--dsw-alias-label-secondary); }
993
978
  .ia-modes button[aria-pressed="true"] { background: var(--dsw-alias-bg-base); color: var(--dsw-alias-label-primary); box-shadow: inset 0 0 0 1px var(--dsw-alias-border-default); }
994
- .ia-row, .ia-compact { box-shadow: inset 3px 0 0 var(--ia-accent, transparent); }
995
- .ia-row { display: grid; grid-template-columns: 16px 9.5rem minmax(0, 1fr) auto auto auto; gap: 12px; align-items: center; padding: 8px 10px; border-radius: 8px; }
979
+ .ia-row, .ia-compact { box-shadow: none; }
980
+ .ia-row { display: grid; grid-template-columns: 16px 7.5rem minmax(0, 1fr) auto auto auto; gap: 12px; align-items: center; padding: 10px; border-radius: 6px; border: 1px solid var(--dsw-alias-border-default); background: var(--dsw-alias-bg-layer-1); }
996
981
  .ia-row:hover { background: var(--dsw-alias-interactive-bg-hover); }
997
982
  .ia-check-spacer { width: 16px; height: 16px; }
998
983
  .ia-time { font-variant-numeric: tabular-nums; color: var(--dsw-alias-label-secondary); white-space: nowrap; }
@@ -1005,34 +990,60 @@ var css = `
1005
990
  .ia-row:hover .ia-delete, .ia-compact:hover .ia-delete, .ia-delete:focus-visible { opacity: 1; }
1006
991
  .ia-delete:hover { color: var(--ia-danger); }
1007
992
  .is-overdue .ia-time { color: var(--ia-danger); }
1008
- .ia-day-list { min-height: 240px; }
993
+ .ia-day-list { min-height: 100px; }
994
+ .ia-day-nav { display: flex; flex: none; gap: 2px; }
995
+ .ia-time-group { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 12px; padding: 6px 0; }
996
+ .ia-time-label { padding-top: 14px; font-size: 12px; color: var(--dsw-alias-label-secondary); font-variant-numeric: tabular-nums; }
997
+ .ia-time-items { display: grid; gap: 8px; min-width: 0; padding-left: 14px; border-left: 1px solid var(--dsw-alias-border-default); }
998
+ .ia-now-line { display: flex; align-items: center; gap: 8px; padding: 6px 0 2px 14px; }
999
+ .ia-now-line::before { content: ''; flex: 1; border-top: 1px solid var(--ia-danger); }
1000
+ .ia-now-line span { font-size: 11px; color: var(--ia-danger); white-space: nowrap; }
1001
+ .ia-time-items .ia-row { grid-template-columns: 16px minmax(0, 1fr) auto; gap: 8px 12px; background: var(--dsw-alias-bg-layer-1); border: 1px solid var(--dsw-alias-border-default); border-radius: 8px; }
1002
+ .ia-time-items .ia-row > input, .ia-time-items .ia-check-spacer { grid-column: 1; grid-row: 1; }
1003
+ .ia-time-items .ia-row > .ia-time { grid-column: 2; grid-row: 1; }
1004
+ .ia-time-items .ia-row > .ia-main { grid-column: 2; grid-row: 2; }
1005
+ .ia-time-items .ia-row > .ia-source, .ia-time-items .ia-row > .ia-location { grid-column: 2; max-width: 100%; }
1006
+ .ia-time-items .ia-row > .ia-delete { grid-column: 3; grid-row: 1; }
1007
+ .ia-time-items .ia-title { white-space: normal; overflow-wrap: anywhere; line-height: 1.5; }
1009
1008
  .ios-agenda-empty { margin: 48px 0; text-align: center; color: var(--dsw-alias-label-secondary); }
1010
1009
  .ia-timeline { position: relative; }
1011
- .ia-allday { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 8px; margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--dsw-alias-border-default); }
1012
- .ia-allday-label { padding-top: 8px; color: var(--dsw-alias-label-secondary); font-size: 12px; }
1013
- .ia-hours { position: relative; margin-left: 52px; }
1014
- .ia-hour { position: relative; border-top: 1px solid var(--dsw-alias-border-default); }
1015
- .ia-hour span { position: absolute; left: -52px; top: -8px; width: 44px; color: var(--dsw-alias-label-secondary); font-size: 11px; font-variant-numeric: tabular-nums; text-align: right; }
1016
- .ia-now { position: absolute; left: -52px; right: 0; z-index: 1; border-top: 1px solid var(--ia-danger); pointer-events: none; }
1017
- .ia-now span { position: absolute; left: 0; top: -16px; color: var(--ia-danger); font-size: 11px; }
1018
- .ia-slots { position: absolute; inset: 0 0 0 8px; }
1019
- .ia-slot { position: absolute; }
1020
- .ia-slot .ia-row { background: var(--dsw-alias-bg-layer-1); }
1021
- .ia-group { margin-top: 22px; scroll-margin-top: 64px; }
1022
- .ia-group h2 { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--dsw-alias-label-secondary); }
1023
- .ia-week-scroll { overflow-x: auto; }
1024
- .ia-week { display: grid; grid-template-columns: repeat(7, minmax(160px, 1fr)); gap: 8px; min-width: 100%; }
1025
- .ia-week-col { min-width: 0; padding: 8px; border-radius: 10px; background: var(--dsw-alias-bg-layer-1); }
1026
- .ia-week-col.is-selected { box-shadow: inset 0 0 0 1.5px var(--dsw-alias-state-business-primary); }
1027
- .ia-week-head { display: flex; justify-content: space-between; width: 100%; margin-bottom: 8px; border: none; background: transparent; cursor: pointer; padding: 2px 2px 6px; color: var(--dsw-alias-label-secondary); }
1028
- .ia-week-head strong { color: var(--dsw-alias-label-primary); }
1029
- .ia-week-head.is-today strong { color: var(--dsw-alias-state-business-primary); }
1030
- .ia-compact { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 6px 4px; border-radius: 8px; }
1031
- .ia-compact:hover { background: var(--dsw-alias-interactive-bg-hover); }
1032
- .ia-compact-top { display: flex; align-items: center; gap: 6px; min-height: 18px; }
1033
- .ia-compact .ia-title, .ia-compact .ia-source { display: block; }
1034
- .ia-compact .ia-source { font-size: 12px; }
1035
- .ia-compact .ia-delete { position: absolute; top: 2px; right: 0; }
1010
+ .ia-allday { display: grid; gap: 8px; padding-bottom: 8px; margin-bottom: 8px; border-bottom: 1px solid var(--dsw-alias-border-default); }
1011
+ .ia-week-list { display: grid; gap: 8px; min-width: 0; }
1012
+ .ia-group { margin-top: 18px; padding-top: 14px; scroll-margin-top: 64px; border-top: 1px solid var(--dsw-alias-border-default); }
1013
+ .ia-group-toggle { display: flex; align-items: center; gap: 8px; width: 100%; margin-bottom: 10px; padding: 4px 2px; border: none; background: transparent; border-radius: 6px; cursor: pointer; color: var(--dsw-alias-label-secondary); font-size: 13px; font-weight: 600; text-align: left; }
1014
+ .ia-group-toggle:hover { background: var(--dsw-alias-interactive-bg-hover); }
1015
+ .ia-group-toggle strong { font-variant-numeric: tabular-nums; }
1016
+ .ia-group-toggle svg { flex: none; }
1017
+ .ia-week-scroll { min-width: 0; max-width: 100%; overflow-x: auto; }
1018
+ .ia-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; width: 100%; }
1019
+ .ia-week-col { min-width: 0; overflow: hidden; padding: 4px; border-radius: 8px; background: transparent; }
1020
+ .ia-week-col.is-selected { background: var(--dsw-alias-interactive-bg-hover); }
1021
+ .ia-week-head { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 4px 2px 8px; border: none; border-bottom: 1px solid var(--dsw-alias-border-default); background: transparent; cursor: pointer; color: var(--dsw-alias-label-secondary); }
1022
+ .ia-week-head strong { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; color: var(--dsw-alias-label-primary); }
1023
+ .ia-week-head.is-today strong { background: var(--dsw-alias-state-business-primary); color: var(--dsw-alias-bg-base); }
1024
+ .ia-compact { display: flex; flex-direction: column; gap: 4px; width: 100%; min-width: 0; margin-bottom: 8px; padding: 8px; overflow: hidden; border: 1px solid var(--dsw-alias-border-default); border-radius: 6px; background: var(--dsw-alias-bg-layer-1); }
1025
+ .ia-compact:hover { background: var(--dsw-alias-bg-layer-1); }
1026
+ .ia-compact-top { display: flex; align-items: center; gap: 6px; min-width: 0; min-height: 18px; }
1027
+ .ia-compact .ia-time, .ia-compact .ia-source, .ia-compact .ia-title { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
1028
+ .ia-compact .ia-source { display: block; font-size: 12px; }
1029
+ .ia-compact .ia-delete { margin-left: auto; flex: none; }
1030
+ .ia-board { container-type: inline-size; }
1031
+ .ios-agenda .ia-expand { padding: 0; border: none; background: transparent; text-align: left; cursor: pointer; color: inherit; font-weight: 600; }
1032
+ .ia-expand:hover { text-decoration: underline; text-underline-offset: 3px; }
1033
+ .ia-row.is-expanded .ia-title, .ia-row.is-expanded .ia-detail, .ia-compact.is-expanded .ia-title, .ia-compact.is-expanded .ia-detail, .ia-compact.is-expanded .ia-location { white-space: pre-wrap; overflow-wrap: anywhere; -webkit-line-clamp: unset; }
1034
+ .ia-row .ia-source { max-width: 7rem; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
1035
+ .ia-row .ia-time { font-size: 13px; }
1036
+ .ia-row:focus-within .ia-delete, .ia-compact:focus-within .ia-delete { opacity: 1; }
1037
+ @container (max-width: 700px) {
1038
+ .ia-week { grid-template-columns: repeat(2, minmax(0, 1fr)); }
1039
+ .ia-week-col:last-child { grid-column: 1 / -1; }
1040
+ .ia-row { grid-template-columns: 16px minmax(0, 1fr) auto; gap: 8px; }
1041
+ .ia-row > .ia-time { grid-column: 2; grid-row: 1; }
1042
+ .ia-row > .ia-main { grid-column: 2; grid-row: 2; }
1043
+ .ia-row > .ia-source, .ia-row > .ia-location { grid-column: 2; }
1044
+ .ia-row > .ia-delete { grid-column: 3; grid-row: 1; }
1045
+ }
1046
+ @media (hover: none) { .ia-delete { opacity: 1; } }
1036
1047
  .ia-composer, .ia-event-form { display: flex; gap: 8px; align-items: center; padding: 10px 24px 12px; }
1037
1048
  .ia-composer { border-top: 1px solid var(--dsw-alias-border-default); background: var(--dsw-alias-bg-base); }
1038
1049
  .ia-event-form { flex-wrap: wrap; padding-top: 0; }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@1agents/dsh-plugin-todo",
3
- "version": "0.1.5",
3
+ "version": "0.1.7",
4
4
  "description": "管理本机已同步的系统提醒事项和日历。页面在 DSH,工具在 dreammate-node MCP。",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -107,7 +107,7 @@ dreammate-node cli invoke --agent http://127.0.0.1:36908 --service mcp-ios-agend
107
107
  ## 6. 安装与升级
108
108
 
109
109
  ```sh
110
- dsh plugin --profile web add @1agents/dsh-plugin-todo@0.1.5
110
+ dsh plugin --profile web add @1agents/dsh-plugin-todo@0.1.7
111
111
  ```
112
112
 
113
113
  装完重启 DSH,侧栏出现「日程」。本技能会由插件安装时自动放到 `~/.dsh/skills/ios-agenda/`;如果没生效,从包目录手动复制一次即可。