dsh-prime-memory 0.20.0-beta.15 → 0.20.0-beta.16

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/CHANGELOG.md CHANGED
@@ -17,6 +17,14 @@
17
17
  - **建议状态(`longtask-hint-get`)以纯端点提供**:判定 = 上下文占用达 `contextThresholdPct` 或 todo 漂移达 `driftThreshold`(部署配置可调);配合 `longtask-compress-tail` 作手动压缩入口。
18
18
  - **撤下浮动球 UI(`client/src/longtask-fab.ts`;beta.1 起曾随包发布)**:悬浮建议面板的归属本在 context-compression 侧(「建议启动压缩」是其领域),pm 属误载——2026-10-02 用户裁定撤下。撤下不违座位契约(settings.section 恰一个 + 输入栏 pill,body 单例不占座位),但全应用级 overlay 会与其他插件的悬浮 UI 抢占屏幕角落;长任务开关与手动压缩入口待长任务定版时落记忆设置分节。
19
19
  - **`session-mode-set` 的 `mode` 转为可选**:与 `longTask` 二选一必传——纯切长任务开关不再被迫发送档位(旧客户端恒传 mode,行为不变)。响应 `mode` 改回当前生效值。
20
+ ## [0.20.0-beta.16] — 2026-10-02
21
+
22
+ > **自生长未注册 slug 直接归入 hall**:底部「自生长未注册」区的每个 chip 现在可拖到 hall 头上——收编 + 归为其子类一步完成。
23
+
24
+ ### 新增
25
+
26
+ - **grown chip 拖拽/点选归类**:把未注册 slug(如 `git-commits`)拖到 hall 头(或点 chip 上「归」按钮进入挑选态,再点目标 hall)→ dryRun 预览 → 确认实跑。语义 = **原地收编(from,source=grown)→ rename 到 `hall/子类`**:记录 tags 随迁、旧名进目标别名、条目 active 且不戴 ⭐(收编身份)。落回自己 hall 的两级 slug(如 `dsh-plugin/xxx`)= 原地收编。
27
+ - 组合顺序钉死在集成测试(markMered 对未注册 from 会早退——必须先收编 from 再 rename);execMerge 对未注册 from 自动补收编。
20
28
  ## [0.20.0-beta.15] — 2026-10-02
21
29
 
22
30
  > 归类实测反馈两连修:①改名后的条目误带「已退役」(会掉出标注词表);②HTML5 拖拽在部分 webview 不生效 → 新增**点选归类**主路径。
package/dist/client.js CHANGED
@@ -4132,7 +4132,12 @@ var __defProp = Object.defineProperty;
4132
4132
  return;
4133
4133
  }
4134
4134
  if (majorOf(from) === hall) {
4135
- setMsg(`${from} 已在 ${hall} 下。`);
4135
+ if (registry.some((e) => e.slug === from)) {
4136
+ setMsg(`${from} 已在 ${hall} 下。`);
4137
+ return;
4138
+ }
4139
+ setPicking(null);
4140
+ void adopt(from);
4136
4141
  return;
4137
4142
  }
4138
4143
  const f = { action: "rename", from, to: `${hall}/${suffixOf(from)}` };
@@ -4142,6 +4147,13 @@ var __defProp = Object.defineProperty;
4142
4147
  };
4143
4148
  const execMerge = () => run(async () => {
4144
4149
  if (!preview) return;
4150
+ if (preview.action === "rename" && !registry.some((e) => e.slug === preview.from)) {
4151
+ const rr = await rpc("dsh-memory/room-register", { slug: preview.from, source: "grown" });
4152
+ if (!rr || !rr.ok) {
4153
+ setError(rr && rr.error ? rr.error.message : "收编源失败");
4154
+ return;
4155
+ }
4156
+ }
4145
4157
  const r = await rpc("dsh-memory/room-admin", { action: preview.action, from: preview.from, to: preview.to, dryRun: false });
4146
4158
  if (r && r.ok) {
4147
4159
  setMsg(String(r.value?.notice ?? "完成"));
@@ -4462,8 +4474,41 @@ var __defProp = Object.defineProperty;
4462
4474
  ] }),
4463
4475
  /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { style: S.muted, children: "(只在 tags 里涌现,不在词表 —— 收编后标注器才会优先挂靠)" }),
4464
4476
  grownOpen ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { style: { display: "flex", flexWrap: "wrap", gap: 6, alignItems: "center", marginTop: 6 }, children: grownOnly.map((r) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { style: { display: "inline-flex", alignItems: "center", gap: 4 }, children: [
4465
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { style: { ...btn, cursor: "default", borderRadius: 999, padding: "2px 8px" }, title: "自生长 slug(未注册)", children: r.room + " · " + r.count }),
4466
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("button", { type: "button", disabled: !hiPriv || busy, title: "收编进注册表(source=grown)", onClick: () => adopt(r.room), style: { ...btn, color: "var(--dsh-mem-accent)", borderColor: "var(--dsh-mem-accent)", opacity: !hiPriv || busy ? 0.5 : 1 }, children: "收编" })
4477
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
4478
+ "span",
4479
+ {
4480
+ style: { ...btn, cursor: hiPriv && !busy ? "grab" : "default", borderRadius: 999, padding: "2px 8px" },
4481
+ draggable: hiPriv && !busy,
4482
+ onDragStart: (ev) => {
4483
+ ev.dataTransfer.setData("text/dsh-room", r.room);
4484
+ ev.dataTransfer.effectAllowed = "move";
4485
+ },
4486
+ title: hiPriv && !busy ? "自生长 slug(未注册)——拖到某个 hall 头上 = 收编并归为其子类" : "自生长 slug(未注册)",
4487
+ children: r.room + " · " + r.count
4488
+ }
4489
+ ),
4490
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("button", { type: "button", disabled: !hiPriv || busy, title: "收编进注册表(source=grown,原地)", onClick: () => adopt(r.room), style: { ...btn, color: "var(--dsh-mem-accent)", borderColor: "var(--dsh-mem-accent)", opacity: !hiPriv || busy ? 0.5 : 1 }, children: "收编" }),
4491
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
4492
+ "button",
4493
+ {
4494
+ type: "button",
4495
+ disabled: !hiPriv || busy,
4496
+ title: "归类到已有 hall 下:点击后选目标 hall(收编+子类一步,记录随迁)",
4497
+ onClick: () => {
4498
+ if (picking === r.room) {
4499
+ setPicking(null);
4500
+ return;
4501
+ }
4502
+ setForm({ action: "rename", from: r.room, to: "" });
4503
+ setPreview(null);
4504
+ setPicking(r.room);
4505
+ setMsg(null);
4506
+ setError(null);
4507
+ },
4508
+ style: { ...btn, opacity: !hiPriv || busy ? 0.5 : 1, ...picking === r.room ? { color: "var(--dsh-mem-accent)", borderColor: "var(--dsh-mem-accent)" } : {} },
4509
+ children: picking === r.room ? "选 hall…" : "归"
4510
+ }
4511
+ )
4467
4512
  ] }, r.room)) }) : null
4468
4513
  ] }) : null
4469
4514
  ] });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-prime-memory",
3
- "version": "0.20.0-beta.15",
3
+ "version": "0.20.0-beta.16",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org",
6
6
  "access": "public",