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

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,17 @@
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.15] — 2026-10-02
21
+
22
+ > 归类实测反馈两连修:①改名后的条目误带「已退役」(会掉出标注词表);②HTML5 拖拽在部分 webview 不生效 → 新增**点选归类**主路径。
23
+
24
+ ### 修复
25
+
26
+ - **归类(改名)后条目误标 retired**:renameRoom 复用 merge 编排,`markMerged` 的"旧条目转退役"被带了过来——归完类的新 room 显示「已退役」并**掉出标注器词表**(listActive 过滤)。现 rename 收尾恢复先前状态(active 条目改名后仍 active);真 merge(并集语义)不受影响。红测试先行(unit + HTTP 面集成)。
27
+
28
+ ### 变更
29
+
30
+ - **点选归类为主路径**:点 room 行「归类」→ 进入挑选态(按钮变「选 hall…」,所有 hall 头虚线高亮)→ 点目标 hall 头 → 出 dryRun 预览 → 确认实跑。拖拽保留(支持的環境仍可用),但不再依赖。
20
31
  ## [0.20.0-beta.14] — 2026-10-02
21
32
 
22
33
  > 记忆卡片新增**老化权重**与**召回使用**展示,并开始为"老化权重效果统计"积累数据。口径(用户裁定):**进 topN(被注入上下文)才算被使用**;参与尝试未进 = 仅计尝试。
package/dist/client.js CHANGED
@@ -4043,6 +4043,7 @@ var __defProp = Object.defineProperty;
4043
4043
  const [preview, setPreview] = (0, import_react16.useState)(null);
4044
4044
  const [grownOpen, setGrownOpen] = (0, import_react16.useState)(false);
4045
4045
  const [dragOverHall, setDragOverHall] = (0, import_react16.useState)(null);
4046
+ const [picking, setPicking] = (0, import_react16.useState)(null);
4046
4047
  const loadAll = (0, import_react16.useCallback)(() => {
4047
4048
  rpc("dsh-memory/rooms-get", {}).then((r) => {
4048
4049
  if (r && r.ok) {
@@ -4306,16 +4307,23 @@ var __defProp = Object.defineProperty;
4306
4307
  const from = ev.dataTransfer.getData("text/dsh-room");
4307
4308
  if (from) beginReclass(from, g.hall);
4308
4309
  },
4310
+ onClick: () => {
4311
+ if (!picking || busy) return;
4312
+ const from = picking;
4313
+ setPicking(null);
4314
+ beginReclass(from, g.hall);
4315
+ },
4309
4316
  style: {
4310
4317
  display: "flex",
4311
4318
  alignItems: "center",
4312
4319
  gap: 8,
4313
4320
  padding: "5px 10px",
4314
4321
  background: "var(--dsh-mem-bg-inset)",
4315
- outline: dragOverHall === g.hall ? "2px dashed var(--dsh-mem-accent)" : void 0,
4316
- outlineOffset: dragOverHall === g.hall ? "-2px" : void 0
4322
+ outline: dragOverHall === g.hall || picking !== null ? "2px dashed var(--dsh-mem-accent)" : void 0,
4323
+ outlineOffset: dragOverHall === g.hall || picking !== null ? "-2px" : void 0,
4324
+ cursor: picking ? "pointer" : void 0
4317
4325
  },
4318
- title: hiPriv ? "拖入 room 归类到该 hall 下(major/minor;记录随迁,旧名进别名,预览后确认)" : void 0,
4326
+ title: picking ? "点击此 hall:把「" + picking + "」归入 " + g.hall + " 下(major/minor,预览后确认)" : hiPriv ? "拖入 room 归类到该 hall 下(major/minor;记录随迁,旧名进别名,预览后确认)" : void 0,
4319
4327
  children: [
4320
4328
  /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { style: { fontSize: 12, fontWeight: 600 }, children: [
4321
4329
  g.hall,
@@ -4365,7 +4373,27 @@ var __defProp = Object.defineProperty;
4365
4373
  (e.aliases ?? []).length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { style: S.muted, children: "别名: " + (e.aliases ?? []).join(", ") }) : null,
4366
4374
  /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { style: S.grow }),
4367
4375
  !hiPriv ? null : /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
4368
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("button", { type: "button", disabled: busy, title: "归类到已有 hall 下(major/minor;记录随迁)", onClick: () => beginReclass(e.slug, groups.find((gg) => gg.hall !== majorOf(e.slug))?.hall ?? ""), style: btn, children: "归类" }),
4376
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
4377
+ "button",
4378
+ {
4379
+ type: "button",
4380
+ disabled: busy,
4381
+ title: picking === e.slug ? "再点一次取消挑选;然后点击目标 hall 头完成归类" : "归类到已有 hall 下:点击后选目标 hall(记录随迁,旧名进别名)",
4382
+ onClick: () => {
4383
+ if (picking === e.slug) {
4384
+ setPicking(null);
4385
+ return;
4386
+ }
4387
+ setForm({ action: "rename", from: e.slug, to: "" });
4388
+ setPreview(null);
4389
+ setPicking(e.slug);
4390
+ setMsg(null);
4391
+ setError(null);
4392
+ },
4393
+ style: { ...btn, ...picking === e.slug ? { color: "var(--dsh-mem-accent)", borderColor: "var(--dsh-mem-accent)" } : {} },
4394
+ children: picking === e.slug ? "选 hall…" : "归类"
4395
+ }
4396
+ ),
4369
4397
  /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("button", { type: "button", disabled: busy, title: `改名(= merge 1:1 + 注册表改名)`, onClick: () => {
4370
4398
  setForm({ action: "rename", from: e.slug, to: "" });
4371
4399
  setPreview(null);
@@ -65,6 +65,11 @@ export interface RoomMergeStore extends RoomReviewStore {
65
65
  export interface RoomRegistryMerge {
66
66
  markMerged(fromSlug: string, toSlug: string): Promise<boolean>;
67
67
  renameSlug(oldSlug: string, newSlug: string): Promise<boolean>;
68
+ /** rename 收尾恢复先前状态用(active 条目改名后不掉出标注词表)。 */
69
+ bySlug?(slug: string): {
70
+ status: 'active' | 'retired';
71
+ } | undefined;
72
+ setStatus?(slug: string, status: 'active' | 'retired'): Promise<boolean>;
68
73
  }
69
74
  export interface RoomCandidate {
70
75
  id: string;
@@ -153,7 +158,9 @@ export declare function mergeRoom(io: {
153
158
  dryRun?: boolean;
154
159
  cap?: number;
155
160
  }): Promise<MergeRoomResult>;
156
- /** rename = merge 1:1 + 注册表改名(冲突时抛错提示走 merge)。 */
161
+ /** rename = merge 1:1 + 注册表改名(冲突时抛错提示走 merge)。
162
+ * 归类语义:改名**不是退役**——merge 编排的 markMerged 会把旧条目置 retired,
163
+ * 这里在改名后恢复其先前状态(active 条目改名后仍 active,不掉出标注词表)。 */
157
164
  export declare function renameRoom(io: {
158
165
  l1: RoomMergeStore;
159
166
  registry: RoomRegistryMerge;
@@ -202,11 +202,17 @@ export async function mergeRoom(io, from, to, opts = {}) {
202
202
  roomMergeRunning = false;
203
203
  }
204
204
  }
205
- /** rename = merge 1:1 + 注册表改名(冲突时抛错提示走 merge)。 */
205
+ /** rename = merge 1:1 + 注册表改名(冲突时抛错提示走 merge)。
206
+ * 归类语义:改名**不是退役**——merge 编排的 markMerged 会把旧条目置 retired,
207
+ * 这里在改名后恢复其先前状态(active 条目改名后仍 active,不掉出标注词表)。 */
206
208
  export async function renameRoom(io, from, to, opts = {}) {
209
+ const priorStatus = io.registry.bySlug?.(from)?.status ?? 'active';
207
210
  const r = await mergeRoom(io, from, to, opts);
208
- if (!r.dryRun && r.applied > 0)
211
+ if (!r.dryRun && r.applied > 0) {
209
212
  await io.registry.renameSlug(from, to);
213
+ if (priorStatus === 'active')
214
+ await io.registry.setStatus?.(to, 'active');
215
+ }
210
216
  return r;
211
217
  }
212
218
  /** 下一条待复查(供 agent 逐个过):记录摘要 + 候选 + 现有 Room 词表 + 剩余数。 */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-prime-memory",
3
- "version": "0.20.0-beta.14",
3
+ "version": "0.20.0-beta.15",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org",
6
6
  "access": "public",