@1agents/dsh-plugin-todo 0.1.5 → 0.1.6
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 +1 -1
- package/dist/client.js +149 -101
- package/package.json +1 -1
- package/skills/ios-agenda/SKILL.md +1 -1
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.
|
|
35
|
+
dsh plugin --profile web add @1agents/dsh-plugin-todo@0.1.6
|
|
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 ? "
|
|
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:
|
|
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
|
-
|
|
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 ? "
|
|
433
|
-
onComplete ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("input", { type: "checkbox", checked:
|
|
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
|
-
|
|
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,34 +436,37 @@ 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,
|
|
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;
|
|
439
|
+
function DayTimeline({ day, blocks, overdueIds, listColors, calendarColors, t, busy, onComplete, onDelete }) {
|
|
457
440
|
const { allDay, timed } = splitDay(blocks);
|
|
441
|
+
const groups = [];
|
|
442
|
+
timed.forEach((block) => {
|
|
443
|
+
const date = parseDate(block.kind === "event" ? block.event.start : block.reminder.due);
|
|
444
|
+
const label = date && sameDay(date, day) ? clock(date) : t("continues");
|
|
445
|
+
const previous = groups[groups.length - 1];
|
|
446
|
+
if (previous && block.at - previous.at < 45 * 6e4) {
|
|
447
|
+
previous.items.push(block);
|
|
448
|
+
return;
|
|
449
|
+
}
|
|
450
|
+
groups.push({ at: block.at, label, items: [block] });
|
|
451
|
+
});
|
|
452
|
+
const renderBlocks = (items) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AgendaBlocks, { blocks: items, overdueIds, listColors, calendarColors, t, busy, onComplete, onDelete });
|
|
453
|
+
const now = /* @__PURE__ */ new Date();
|
|
454
|
+
let nowGroup = -1;
|
|
455
|
+
if (sameDay(day, now)) {
|
|
456
|
+
nowGroup = groups.findIndex((group, index) => group.at <= now.getTime() && (groups[index + 1]?.at ?? Infinity) > now.getTime());
|
|
457
|
+
}
|
|
458
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-
|
|
460
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "ia-
|
|
461
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "ia-
|
|
459
|
+
allDay.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "ia-time-group", children: [
|
|
460
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "ia-time-label", children: t("allDay") }),
|
|
461
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "ia-time-items", children: renderBlocks(allDay) })
|
|
462
462
|
] }),
|
|
463
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
":
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
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
|
-
] })
|
|
463
|
+
groups.map((group, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
|
|
464
|
+
index === nowGroup && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "ia-now-line", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: t("now") }) }),
|
|
465
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "ia-time-group", children: [
|
|
466
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "ia-time-label", children: group.label }),
|
|
467
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "ia-time-items", children: renderBlocks(group.items) })
|
|
468
|
+
] })
|
|
469
|
+
] }, `${group.at}:${group.label}`))
|
|
479
470
|
] });
|
|
480
471
|
}
|
|
481
472
|
function AgendaBlocks({ blocks, overdueIds, listColors, calendarColors, t, busy, onComplete, onDelete, compact }) {
|
|
@@ -489,8 +480,8 @@ function AgendaBlocks({ blocks, overdueIds, listColors, calendarColors, t, busy,
|
|
|
489
480
|
time: eventTimeLabel(event, day, t),
|
|
490
481
|
title: event.title,
|
|
491
482
|
source: event.calendar,
|
|
492
|
-
location:
|
|
493
|
-
notes:
|
|
483
|
+
location: event.location,
|
|
484
|
+
notes: event.notes,
|
|
494
485
|
accent: calendarColors.get(event.calendarId) || "",
|
|
495
486
|
onDelete: () => onDelete("deleteEvent", event.id),
|
|
496
487
|
t,
|
|
@@ -507,7 +498,8 @@ function AgendaBlocks({ blocks, overdueIds, listColors, calendarColors, t, busy,
|
|
|
507
498
|
time: reminderTimeLabel(reminder),
|
|
508
499
|
title: reminder.title,
|
|
509
500
|
source: reminder.list,
|
|
510
|
-
notes:
|
|
501
|
+
notes: reminder.notes,
|
|
502
|
+
checked: reminder.completed,
|
|
511
503
|
overdue: overdueIds.has(reminder.id),
|
|
512
504
|
accent: listColors.get(reminder.listId) || "",
|
|
513
505
|
onComplete: () => onComplete(reminder.id),
|
|
@@ -598,6 +590,8 @@ function AgendaPage({ t, agenda }) {
|
|
|
598
590
|
const [eventTitle, setEventTitle] = (0, import_react.useState)("");
|
|
599
591
|
const [eventStart, setEventStart] = (0, import_react.useState)("");
|
|
600
592
|
const [eventEnd, setEventEnd] = (0, import_react.useState)("");
|
|
593
|
+
const [overdueOpen, setOverdueOpen] = (0, import_react.useState)(false);
|
|
594
|
+
const [undatedOpen, setUndatedOpen] = (0, import_react.useState)(false);
|
|
601
595
|
const requestRef = (0, import_react.useRef)(0);
|
|
602
596
|
const overdueRef = (0, import_react.useRef)(null);
|
|
603
597
|
const undatedRef = (0, import_react.useRef)(null);
|
|
@@ -689,8 +683,15 @@ function AgendaPage({ t, agenda }) {
|
|
|
689
683
|
setError(result.error?.message || t("unavailable"));
|
|
690
684
|
return;
|
|
691
685
|
}
|
|
686
|
+
const active = document.activeElement;
|
|
687
|
+
const row = active && active.closest ? active.closest(".ia-row, .ia-compact") : null;
|
|
688
|
+
const group = row && row.closest ? row.closest(".ia-group") : null;
|
|
692
689
|
clear();
|
|
693
690
|
setRevision((value) => value + 1);
|
|
691
|
+
requestAnimationFrame(() => {
|
|
692
|
+
const toggle = group && group.querySelector(".ia-group-toggle");
|
|
693
|
+
if (toggle) toggle.focus();
|
|
694
|
+
});
|
|
694
695
|
}
|
|
695
696
|
function openEvent() {
|
|
696
697
|
if (!eventStart || !eventEnd) {
|
|
@@ -813,9 +814,13 @@ function AgendaPage({ t, agenda }) {
|
|
|
813
814
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("header", { className: "ia-board-head", children: [
|
|
814
815
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "ia-title-block", children: [
|
|
815
816
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h1", { children: mode === "week" ? weekLabel : dayHeading(cursor) }),
|
|
816
|
-
mode === "day" &&
|
|
817
|
+
mode === "day" && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "ia-day-nav", children: [
|
|
818
|
+
/* @__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" }) }),
|
|
819
|
+
/* @__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" }) })
|
|
820
|
+
] }),
|
|
821
|
+
!sameDay(cursor, today) && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", className: "ia-today", onClick: () => selectDay(today), children: t("today") })
|
|
817
822
|
] }),
|
|
818
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "ia-modes", role: "group", "aria-label": t("
|
|
823
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "ia-modes", role: "group", "aria-label": t("viewMode"), children: [
|
|
819
824
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", "aria-pressed": mode === "day", onClick: () => setMode("day"), children: t("dayView") }),
|
|
820
825
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", "aria-pressed": mode === "week", onClick: () => setMode("week"), children: t("week") })
|
|
821
826
|
] }),
|
|
@@ -836,13 +841,13 @@ function AgendaPage({ t, agenda }) {
|
|
|
836
841
|
/* @__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
842
|
] }),
|
|
838
843
|
error && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "ios-agenda-error", role: "alert", children: error }),
|
|
844
|
+
busy && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "ios-agenda-muted", role: "status", children: t("saving") }),
|
|
839
845
|
!ready && !error && !auth && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "ios-agenda-muted", children: t("loading") }),
|
|
840
846
|
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
847
|
DayTimeline,
|
|
842
848
|
{
|
|
843
849
|
day: cursor,
|
|
844
850
|
blocks: dayList,
|
|
845
|
-
now: /* @__PURE__ */ new Date(),
|
|
846
851
|
overdueIds,
|
|
847
852
|
listColors,
|
|
848
853
|
calendarColors,
|
|
@@ -855,26 +860,33 @@ function AgendaPage({ t, agenda }) {
|
|
|
855
860
|
}
|
|
856
861
|
) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "ios-agenda-empty", children: t("emptyDay") }) }),
|
|
857
862
|
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
|
|
863
|
+
const { allDay, timed } = splitDay(dayBlocks(day, events, reminders));
|
|
864
|
+
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 }, () => {
|
|
865
|
+
}), onDelete: (method, id) => submit(method, { id }, () => {
|
|
866
|
+
}) });
|
|
859
867
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", { className: sameDay(day, cursor) ? "ia-week-col is-selected" : "ia-week-col", children: [
|
|
860
868
|
/* @__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
869
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: weekdayShort(day) }),
|
|
862
870
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("strong", { children: day.getDate() })
|
|
863
871
|
] }),
|
|
864
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
865
|
-
|
|
866
|
-
}) })
|
|
872
|
+
allDay.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "ia-allday", children: renderItems(allDay) }),
|
|
873
|
+
timed.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "ia-week-list", children: renderItems(timed) })
|
|
867
874
|
] }, dayKey(day));
|
|
868
875
|
}) }) }),
|
|
869
876
|
ready && !auth && overdueItems.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", { className: "ia-group", ref: overdueRef, children: [
|
|
870
|
-
/* @__PURE__ */ (0, import_jsx_runtime.
|
|
871
|
-
|
|
877
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", { type: "button", className: "ia-group-toggle", "aria-expanded": overdueOpen, onClick: () => setOverdueOpen((value) => !value), children: [
|
|
878
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: t("overdue") }),
|
|
879
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("strong", { children: overdueItems.length }),
|
|
880
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Chevron, { direction: overdueOpen ? "left" : "right" })
|
|
881
|
+
] }),
|
|
882
|
+
overdueOpen && overdueItems.map((item) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
872
883
|
AgendaRow,
|
|
873
884
|
{
|
|
874
885
|
time: overdueTimeLabel(item),
|
|
875
886
|
title: item.title,
|
|
876
887
|
source: item.list,
|
|
877
888
|
notes: item.notes,
|
|
889
|
+
checked: item.completed,
|
|
878
890
|
overdue: true,
|
|
879
891
|
accent: listColors.get(item.listId) || "",
|
|
880
892
|
onComplete: () => submit("completeReminder", { id: item.id, completed: true }, () => {
|
|
@@ -888,14 +900,19 @@ function AgendaPage({ t, agenda }) {
|
|
|
888
900
|
))
|
|
889
901
|
] }),
|
|
890
902
|
ready && !auth && undatedItems.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", { className: "ia-group", ref: undatedRef, children: [
|
|
891
|
-
/* @__PURE__ */ (0, import_jsx_runtime.
|
|
892
|
-
|
|
903
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", { type: "button", className: "ia-group-toggle", "aria-expanded": undatedOpen, onClick: () => setUndatedOpen((value) => !value), children: [
|
|
904
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: t("undated") }),
|
|
905
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("strong", { children: undatedItems.length }),
|
|
906
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Chevron, { direction: undatedOpen ? "left" : "right" })
|
|
907
|
+
] }),
|
|
908
|
+
undatedOpen && undatedItems.map((item) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
893
909
|
AgendaRow,
|
|
894
910
|
{
|
|
895
911
|
time: "",
|
|
896
912
|
title: item.title,
|
|
897
913
|
source: item.list,
|
|
898
914
|
notes: item.notes,
|
|
915
|
+
checked: item.completed,
|
|
899
916
|
accent: listColors.get(item.listId) || "",
|
|
900
917
|
onComplete: () => submit("completeReminder", { id: item.id, completed: true }, () => {
|
|
901
918
|
}),
|
|
@@ -936,7 +953,13 @@ function AgendaPage({ t, agenda }) {
|
|
|
936
953
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("input", { "aria-label": t("titleField"), value: eventTitle, placeholder: t("newEvent"), onChange: (event) => setEventTitle(event.target.value) }),
|
|
937
954
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("input", { "aria-label": t("start"), type: "datetime-local", value: eventStart, onChange: (event) => setEventStart(event.target.value) }),
|
|
938
955
|
/* @__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") })
|
|
956
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "submit", disabled: busy || !eventTitle.trim() || !eventStart || !eventEnd, children: t("add") }),
|
|
957
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", onClick: () => {
|
|
958
|
+
setEventOpen(false);
|
|
959
|
+
setEventTitle("");
|
|
960
|
+
setEventStart("");
|
|
961
|
+
setEventEnd("");
|
|
962
|
+
}, children: t("cancel") })
|
|
940
963
|
] })
|
|
941
964
|
] })
|
|
942
965
|
] })
|
|
@@ -984,7 +1007,7 @@ var css = `
|
|
|
984
1007
|
.ia-swatch { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--ia-swatch, var(--dsw-alias-label-secondary)); }
|
|
985
1008
|
.ia-board { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
|
|
986
1009
|
.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:
|
|
1010
|
+
.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
1011
|
.ia-title-block { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
|
|
989
1012
|
.ia-board-head h1 { margin: 0; min-width: 0; font-size: 22px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
990
1013
|
.ia-today { flex: none; color: var(--dsw-alias-state-business-primary); border-color: transparent; background: var(--dsw-alias-bg-layer-1); }
|
|
@@ -992,7 +1015,7 @@ var css = `
|
|
|
992
1015
|
.ia-modes button { padding: 6px 10px; color: var(--dsw-alias-label-secondary); }
|
|
993
1016
|
.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
1017
|
.ia-row, .ia-compact { box-shadow: inset 3px 0 0 var(--ia-accent, transparent); }
|
|
995
|
-
.ia-row { display: grid; grid-template-columns: 16px
|
|
1018
|
+
.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
1019
|
.ia-row:hover { background: var(--dsw-alias-interactive-bg-hover); }
|
|
997
1020
|
.ia-check-spacer { width: 16px; height: 16px; }
|
|
998
1021
|
.ia-time { font-variant-numeric: tabular-nums; color: var(--dsw-alias-label-secondary); white-space: nowrap; }
|
|
@@ -1005,34 +1028,59 @@ var css = `
|
|
|
1005
1028
|
.ia-row:hover .ia-delete, .ia-compact:hover .ia-delete, .ia-delete:focus-visible { opacity: 1; }
|
|
1006
1029
|
.ia-delete:hover { color: var(--ia-danger); }
|
|
1007
1030
|
.is-overdue .ia-time { color: var(--ia-danger); }
|
|
1008
|
-
.ia-day-list { min-height:
|
|
1031
|
+
.ia-day-list { min-height: 100px; }
|
|
1032
|
+
.ia-day-nav { display: flex; flex: none; gap: 2px; }
|
|
1033
|
+
.ia-time-group { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 12px; padding: 6px 0; }
|
|
1034
|
+
.ia-time-label { padding-top: 14px; font-size: 12px; color: var(--dsw-alias-label-secondary); font-variant-numeric: tabular-nums; }
|
|
1035
|
+
.ia-time-items { display: grid; gap: 8px; min-width: 0; padding-left: 14px; border-left: 1px solid var(--dsw-alias-border-default); }
|
|
1036
|
+
.ia-now-line { display: flex; align-items: center; gap: 8px; padding: 6px 0 2px 14px; }
|
|
1037
|
+
.ia-now-line::before { content: ''; flex: 1; border-top: 1px solid var(--ia-danger); }
|
|
1038
|
+
.ia-now-line span { font-size: 11px; color: var(--ia-danger); white-space: nowrap; }
|
|
1039
|
+
.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; }
|
|
1040
|
+
.ia-time-items .ia-row > input, .ia-time-items .ia-check-spacer { grid-column: 1; grid-row: 1; }
|
|
1041
|
+
.ia-time-items .ia-row > .ia-time { grid-column: 2; grid-row: 1; }
|
|
1042
|
+
.ia-time-items .ia-row > .ia-main { grid-column: 2; grid-row: 2; }
|
|
1043
|
+
.ia-time-items .ia-row > .ia-source, .ia-time-items .ia-row > .ia-location { grid-column: 2; max-width: 100%; }
|
|
1044
|
+
.ia-time-items .ia-row > .ia-delete { grid-column: 3; grid-row: 1; }
|
|
1045
|
+
.ia-time-items .ia-title { white-space: normal; overflow-wrap: anywhere; line-height: 1.5; }
|
|
1009
1046
|
.ios-agenda-empty { margin: 48px 0; text-align: center; color: var(--dsw-alias-label-secondary); }
|
|
1010
1047
|
.ia-timeline { position: relative; }
|
|
1011
|
-
.ia-allday { display: grid;
|
|
1012
|
-
.ia-
|
|
1013
|
-
.ia-
|
|
1014
|
-
.ia-
|
|
1015
|
-
.ia-
|
|
1016
|
-
.ia-
|
|
1017
|
-
.ia-
|
|
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); }
|
|
1048
|
+
.ia-allday { display: grid; gap: 8px; padding-bottom: 8px; margin-bottom: 8px; border-bottom: 1px solid var(--dsw-alias-border-default); }
|
|
1049
|
+
.ia-week-list { display: grid; gap: 8px; min-width: 0; }
|
|
1050
|
+
.ia-group { margin-top: 18px; padding-top: 14px; scroll-margin-top: 64px; border-top: 1px solid var(--dsw-alias-border-default); }
|
|
1051
|
+
.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; }
|
|
1052
|
+
.ia-group-toggle:hover { background: var(--dsw-alias-interactive-bg-hover); }
|
|
1053
|
+
.ia-group-toggle strong { font-variant-numeric: tabular-nums; }
|
|
1054
|
+
.ia-group-toggle svg { flex: none; }
|
|
1023
1055
|
.ia-week-scroll { overflow-x: auto; }
|
|
1024
|
-
.ia-week { display: grid; grid-template-columns: repeat(7, minmax(
|
|
1025
|
-
.ia-week-col { min-width: 0; padding:
|
|
1026
|
-
.ia-week-col.is-selected {
|
|
1027
|
-
.ia-week-head { display: flex; justify-content: space-between; width: 100%;
|
|
1028
|
-
.ia-week-head strong { color: var(--dsw-alias-label-primary); }
|
|
1029
|
-
.ia-week-head.is-today strong {
|
|
1030
|
-
.ia-compact {
|
|
1031
|
-
.ia-compact:hover { background: var(--dsw-alias-
|
|
1056
|
+
.ia-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; width: 100%; }
|
|
1057
|
+
.ia-week-col { min-width: 0; padding: 4px; border-radius: 8px; background: transparent; }
|
|
1058
|
+
.ia-week-col.is-selected { background: var(--dsw-alias-interactive-bg-hover); }
|
|
1059
|
+
.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); }
|
|
1060
|
+
.ia-week-head strong { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; color: var(--dsw-alias-label-primary); }
|
|
1061
|
+
.ia-week-head.is-today strong { background: var(--dsw-alias-state-business-primary); color: var(--dsw-alias-bg-base); }
|
|
1062
|
+
.ia-compact { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; padding: 8px; border: 1px solid var(--dsw-alias-border-default); border-left: 3px solid var(--ia-accent, var(--dsw-alias-border-default)); border-radius: 6px; background: var(--dsw-alias-bg-layer-1); }
|
|
1063
|
+
.ia-compact:hover { background: var(--dsw-alias-bg-layer-1); }
|
|
1032
1064
|
.ia-compact-top { display: flex; align-items: center; gap: 6px; min-height: 18px; }
|
|
1033
|
-
.ia-compact .ia-
|
|
1034
|
-
.ia-compact .ia-
|
|
1035
|
-
.ia-
|
|
1065
|
+
.ia-compact .ia-source { display: block; font-size: 12px; }
|
|
1066
|
+
.ia-compact .ia-delete { margin-left: auto; flex: none; }
|
|
1067
|
+
.ia-board { container-type: inline-size; }
|
|
1068
|
+
.ios-agenda .ia-expand { padding: 0; border: none; background: transparent; text-align: left; cursor: pointer; color: inherit; font-weight: 600; }
|
|
1069
|
+
.ia-expand:hover { text-decoration: underline; text-underline-offset: 3px; }
|
|
1070
|
+
.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; }
|
|
1071
|
+
.ia-row .ia-source { max-width: 7rem; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
|
|
1072
|
+
.ia-row .ia-time { font-size: 13px; }
|
|
1073
|
+
.ia-row:focus-within .ia-delete, .ia-compact:focus-within .ia-delete { opacity: 1; }
|
|
1074
|
+
@container (max-width: 700px) {
|
|
1075
|
+
.ia-week { grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
|
1076
|
+
.ia-week-col:last-child { grid-column: 1 / -1; }
|
|
1077
|
+
.ia-row { grid-template-columns: 16px minmax(0, 1fr) auto; gap: 8px; }
|
|
1078
|
+
.ia-row > .ia-time { grid-column: 2; grid-row: 1; }
|
|
1079
|
+
.ia-row > .ia-main { grid-column: 2; grid-row: 2; }
|
|
1080
|
+
.ia-row > .ia-source, .ia-row > .ia-location { grid-column: 2; }
|
|
1081
|
+
.ia-row > .ia-delete { grid-column: 3; grid-row: 1; }
|
|
1082
|
+
}
|
|
1083
|
+
@media (hover: none) { .ia-delete { opacity: 1; } }
|
|
1036
1084
|
.ia-composer, .ia-event-form { display: flex; gap: 8px; align-items: center; padding: 10px 24px 12px; }
|
|
1037
1085
|
.ia-composer { border-top: 1px solid var(--dsw-alias-border-default); background: var(--dsw-alias-bg-base); }
|
|
1038
1086
|
.ia-event-form { flex-wrap: wrap; padding-top: 0; }
|
package/package.json
CHANGED
|
@@ -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.
|
|
110
|
+
dsh plugin --profile web add @1agents/dsh-plugin-todo@0.1.6
|
|
111
111
|
```
|
|
112
112
|
|
|
113
113
|
装完重启 DSH,侧栏出现「日程」。本技能会由插件安装时自动放到 `~/.dsh/skills/ios-agenda/`;如果没生效,从包目录手动复制一次即可。
|