dsh-sessions-manager 3.5.2 → 3.5.3
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.en.md +2 -2
- package/README.md +2 -2
- package/lib/client.js +9 -2
- package/lib/client.js.map +2 -2
- package/lib/index.js +131 -118
- package/lib/index.js.map +4 -4
- package/package.json +1 -1
- package/src/client/index.jsx +16 -3
- package/src/compat/persistence.js +2 -0
- package/src/index.js +20 -1
package/README.en.md
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
> DSH session manager: archive, move, restore, and inspect sessions from **Settings → 会话管理**; mark unread, move, and delete sessions directly from the **main sidebar**. Deleted sessions go to the recycle bin first and can be restored or permanently purged.
|
|
14
14
|
|
|
15
|
-
A persistent DSH plugin (host + browser halves) covering both the **settings panel** and the **main sidebar**, so frequent session actions don't require opening Settings. It understands both legacy header lists/`readFrom` and the new snapshot/`SessionHandle` API, enabling actions according to the current Runtime's verified capabilities.
|
|
15
|
+
A persistent DSH plugin (host + browser halves) covering both the **settings panel** and the **main sidebar**, so frequent session actions don't require opening Settings. It understands both legacy header lists/`readFrom` and the new snapshot/`SessionHandle` API, enabling actions according to the current Runtime's verified capabilities. Purge and migration paths are enabled only when they can be verified — on newer runtimes they are backed by guarded path derivation and write-ownership probes; anything unverifiable is disabled in both UI and Host to prevent false success.
|
|
16
16
|
|
|
17
17
|
## Features
|
|
18
18
|
|
|
@@ -159,7 +159,7 @@ lib/client.js pre-built client (ModuleLoader CJS handshake)
|
|
|
159
159
|
- Works in both DSH Desktop and DSH web (same host + client halves).
|
|
160
160
|
- Peer dependencies are listed in `package.json`; `react` and `@deepseek-ai/*` are provided by the DSH runtime.
|
|
161
161
|
- `0.1.2-rc.1`: the existing read, archive, recycle-bin, permanent-purge, and cross-workspace move paths remain available.
|
|
162
|
-
- `0.1.3-alpha.1`: snapshot lists and
|
|
162
|
+
- `0.1.3-alpha.1`: snapshot lists and chunked `SessionHandle` read flows are supported. Permanent purge and cross-workspace move are restored via guarded path derivation (see the behavior notes below); they degrade gracefully only when the storage root cannot be confirmed. The panel shows the effective capabilities.
|
|
163
163
|
- Unverified future runtimes expose only capabilities the plugin can safely identify; method presence alone is not presented as behavioral compatibility.
|
|
164
164
|
|
|
165
165
|
### Behavior differences and degradations under `0.1.3-alpha.1`
|
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
> DSH 会话管理器:在**设置 → 会话管理**里统一归档、移动、恢复、查看详情;在**主页侧边栏**直接标记未读、移动、删除会话。删除先进入回收站,可恢复或彻底清理。
|
|
14
14
|
|
|
15
|
-
一个 DSH 持久化插件(host + browser 双半),同时覆盖「设置面板」与「主页侧边栏」两个入口,无需打开设置即可完成高频会话操作。插件同时识别旧式 header 列表/`readFrom` 与新版 snapshot/`SessionHandle
|
|
15
|
+
一个 DSH 持久化插件(host + browser 双半),同时覆盖「设置面板」与「主页侧边栏」两个入口,无需打开设置即可完成高频会话操作。插件同时识别旧式 header 列表/`readFrom` 与新版 snapshot/`SessionHandle`,按当前 Runtime 的实际能力启用操作:删除与迁移路径必须可验证才会开放(新版 Runtime 上由守卫式路径推导与写所有权探测保障),无法验证时在界面与 Host 端同步禁用,避免假成功。
|
|
16
16
|
|
|
17
17
|
## 功能
|
|
18
18
|
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
- **冷态标题同步**:侧栏使用日志中最新的 `session/title` 修正冷启动缓存,改名后的会话无需先打开即可显示新名称。
|
|
24
24
|
- **侧栏跨工作区拖拽**:直接把会话拖到目标工作区标题即可切换工作区;目标高亮、同工作区拦截、失败反馈,并保留“更多 → 移动会话”作为键盘操作入口。
|
|
25
25
|
- **归档 / 恢复**:归档把会话从侧栏隐藏;恢复取消归档并放回原工作区分组。
|
|
26
|
-
- **移动到工作区**:任选**已有工作区**或**新建目录路径**(自动创建),新建目录支持点击 **「浏览…」**
|
|
26
|
+
- **移动到工作区**:任选**已有工作区**或**新建目录路径**(自动创建),新建目录支持点击 **「浏览…」** 调用系统目录选择窗口。会话的工作目录与日志一起迁移。旧版 Runtime(`0.1.2-rc.1`)下已打开的会话也可移动;新版 Runtime(`0.1.3-alpha.1`)为避免并发写入损坏日志,正在写入的会话会被拒绝移动,待其空闲后重试即可。
|
|
27
27
|
- **会话详情**:展开单条会话查看**磁盘占用**、**轮次 / 步骤 / 用户·助手消息 / 工具调用 / 图片附件**统计、**工具使用分布**、**搜索·抓取记录**、**write/edit 写过的文件列表**(已过滤磁盘上已不存在的路径),以及**血统**(父会话 / 子会话 / 子代理)。
|
|
28
28
|
- **导出**:详情面板底部提供两个入口——「**下载原始日志 (ZIP)**」直接走 DSH 官方 `session.export` 端点(含子会话与附件,持久化后端不支持时自动隐藏);「**导出 Markdown**」由本插件把会话渲染为人类可读对话记录(front matter + 按轮分节 + 用户 / 助手 / 工具调用摘要,流式增量不重复)。
|
|
29
29
|
- **存储占用分析**:维护栏的「存储占用」按钮按需展开,按工作区聚合会话日志的磁盘占用(占比条 + 会话数),并列出占用最大的会话 Top 10。纯只读统计,不修改任何数据;默认收起、展开时才统计,因此不会拖慢会话列表的加载。
|
package/lib/client.js
CHANGED
|
@@ -1501,9 +1501,12 @@ function installSidebarSessionMenuAug() {
|
|
|
1501
1501
|
sub.setAttribute("data-dsm-sub", "");
|
|
1502
1502
|
sub.innerHTML = '<div class="dsm-sub-loading">\u52A0\u8F7D\u5DE5\u4F5C\u533A\u2026</div>';
|
|
1503
1503
|
const r = moveBtn.getBoundingClientRect();
|
|
1504
|
-
|
|
1505
|
-
|
|
1504
|
+
const placeSub = () => {
|
|
1505
|
+
sub.style.top = Math.max(8, Math.min(Math.round(r.top - 4), window.innerHeight - sub.offsetHeight - 8)) + "px";
|
|
1506
|
+
sub.style.left = Math.max(8, Math.min(Math.round(r.right + 10), window.innerWidth - sub.offsetWidth - 8)) + "px";
|
|
1507
|
+
};
|
|
1506
1508
|
document.body.appendChild(sub);
|
|
1509
|
+
placeSub();
|
|
1507
1510
|
const closeSub = () => {
|
|
1508
1511
|
activeSubClose = null;
|
|
1509
1512
|
if (sub.parentNode) sub.remove();
|
|
@@ -1536,6 +1539,7 @@ function installSidebarSessionMenuAug() {
|
|
|
1536
1539
|
const curPath = cur ? cur.workspacePath : info.cwd || null;
|
|
1537
1540
|
if (!items.length) {
|
|
1538
1541
|
sub.innerHTML = '<div class="dsm-sub-empty">\uFF08\u6682\u65E0\u53EF\u7528\u5DE5\u4F5C\u533A\uFF09</div>';
|
|
1542
|
+
placeSub();
|
|
1539
1543
|
return;
|
|
1540
1544
|
}
|
|
1541
1545
|
sub.innerHTML = "";
|
|
@@ -1565,8 +1569,10 @@ function installSidebarSessionMenuAug() {
|
|
|
1565
1569
|
});
|
|
1566
1570
|
sub.appendChild(b);
|
|
1567
1571
|
});
|
|
1572
|
+
placeSub();
|
|
1568
1573
|
}).catch((e) => {
|
|
1569
1574
|
sub.innerHTML = '<div class="dsm-sub-err">' + escapeHtml(String(e && e.message || e)) + "</div>";
|
|
1575
|
+
placeSub();
|
|
1570
1576
|
});
|
|
1571
1577
|
};
|
|
1572
1578
|
const openDeleteConfirm = (id) => {
|
|
@@ -1663,6 +1669,7 @@ function installSidebarSessionMenuAug() {
|
|
|
1663
1669
|
viewport.appendChild(move.wrap);
|
|
1664
1670
|
viewport.appendChild(del.wrap);
|
|
1665
1671
|
viewport.insertBefore(mark.wrap, viewport.firstElementChild);
|
|
1672
|
+
window.dispatchEvent(new Event("resize"));
|
|
1666
1673
|
};
|
|
1667
1674
|
const seen = /* @__PURE__ */ new WeakSet();
|
|
1668
1675
|
const obs = new MutationObserver(() => {
|