@1agents/dsh-plugin-todo 0.1.6 → 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.6
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
@@ -436,39 +436,6 @@ function Chevron({ direction }) {
436
436
  const path = direction === "left" ? "M14 6l-6 6 6 6" : "M10 6l6 6-6 6";
437
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" }) });
438
438
  }
439
- function DayTimeline({ day, blocks, overdueIds, listColors, calendarColors, t, busy, onComplete, onDelete }) {
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
- 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-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
- ] }),
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}`))
470
- ] });
471
- }
472
439
  function AgendaBlocks({ blocks, overdueIds, listColors, calendarColors, t, busy, onComplete, onDelete, compact }) {
473
440
  return blocks.map((block) => {
474
441
  if (block.kind === "event") {
@@ -576,7 +543,7 @@ function AgendaPage({ t, agenda }) {
576
543
  return { year: now.getFullYear(), month: now.getMonth() };
577
544
  });
578
545
  const [viewPreference] = (0, import_react.useState)(readViewPreference);
579
- const [mode, setMode] = (0, import_react.useState)(viewPreference.mode);
546
+ const [mode] = (0, import_react.useState)("day");
580
547
  const [data, setData] = (0, import_react.useState)(null);
581
548
  const [loadedKey, setLoadedKey] = (0, import_react.useState)("");
582
549
  const [error, setError] = (0, import_react.useState)("");
@@ -820,10 +787,6 @@ function AgendaPage({ t, agenda }) {
820
787
  ] }),
821
788
  !sameDay(cursor, today) && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", className: "ia-today", onClick: () => selectDay(today), children: t("today") })
822
789
  ] }),
823
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "ia-modes", role: "group", "aria-label": t("viewMode"), children: [
824
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", "aria-pressed": mode === "day", onClick: () => setMode("day"), children: t("dayView") }),
825
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", "aria-pressed": mode === "week", onClick: () => setMode("week"), children: t("week") })
826
- ] }),
827
790
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", className: "ia-refresh", onClick: () => setRevision((value) => value + 1), disabled: busy, children: t("refresh") })
828
791
  ] }),
829
792
  auth && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", { className: "ia-auth", children: [
@@ -844,9 +807,8 @@ function AgendaPage({ t, agenda }) {
844
807
  busy && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "ios-agenda-muted", role: "status", children: t("saving") }),
845
808
  !ready && !error && !auth && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "ios-agenda-muted", children: t("loading") }),
846
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)(
847
- DayTimeline,
810
+ AgendaBlocks,
848
811
  {
849
- day: cursor,
850
812
  blocks: dayList,
851
813
  overdueIds,
852
814
  listColors,
@@ -1014,7 +976,7 @@ var css = `
1014
976
  .ia-modes { display: flex; gap: 2px; padding: 2px; border-radius: 10px; background: var(--dsw-alias-bg-layer-1); }
1015
977
  .ia-modes button { padding: 6px 10px; color: var(--dsw-alias-label-secondary); }
1016
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); }
1017
- .ia-row, .ia-compact { box-shadow: inset 3px 0 0 var(--ia-accent, transparent); }
979
+ .ia-row, .ia-compact { box-shadow: none; }
1018
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); }
1019
981
  .ia-row:hover { background: var(--dsw-alias-interactive-bg-hover); }
1020
982
  .ia-check-spacer { width: 16px; height: 16px; }
@@ -1052,16 +1014,17 @@ var css = `
1052
1014
  .ia-group-toggle:hover { background: var(--dsw-alias-interactive-bg-hover); }
1053
1015
  .ia-group-toggle strong { font-variant-numeric: tabular-nums; }
1054
1016
  .ia-group-toggle svg { flex: none; }
1055
- .ia-week-scroll { overflow-x: auto; }
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; }
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; }
1058
1020
  .ia-week-col.is-selected { background: var(--dsw-alias-interactive-bg-hover); }
1059
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); }
1060
1022
  .ia-week-head strong { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; color: var(--dsw-alias-label-primary); }
1061
1023
  .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); }
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); }
1063
1025
  .ia-compact:hover { background: var(--dsw-alias-bg-layer-1); }
1064
- .ia-compact-top { display: flex; align-items: center; gap: 6px; min-height: 18px; }
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; }
1065
1028
  .ia-compact .ia-source { display: block; font-size: 12px; }
1066
1029
  .ia-compact .ia-delete { margin-left: auto; flex: none; }
1067
1030
  .ia-board { container-type: inline-size; }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@1agents/dsh-plugin-todo",
3
- "version": "0.1.6",
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.6
110
+ dsh plugin --profile web add @1agents/dsh-plugin-todo@0.1.7
111
111
  ```
112
112
 
113
113
  装完重启 DSH,侧栏出现「日程」。本技能会由插件安装时自动放到 `~/.dsh/skills/ios-agenda/`;如果没生效,从包目录手动复制一次即可。