dsh-session-manager 0.1.0 → 0.1.1
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 +18 -5
- package/lib/client.js +5 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# dsh-session-manager — 会话管理器(删除 + 归档管理)
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/dsh-session-manager)
|
|
4
|
+
[](https://github.com/hkkz9522/dsh-session-manager)
|
|
5
|
+
[](https://github.com/hkkz9522/dsh-session-manager/actions/workflows/ci.yml)
|
|
6
|
+
|
|
3
7
|
为 DeepSeek Harness Web 增加两件官方缺失的能力:
|
|
4
8
|
|
|
5
9
|
1. **删除对话**(删除前二次确认):物理删除会话 —— 停止并销毁对应 agent、清空
|
|
@@ -11,10 +15,10 @@
|
|
|
11
15
|
|
|
12
16
|
## 特性
|
|
13
17
|
|
|
14
|
-
- 🗑
|
|
15
|
-
- 📦 **归档 /
|
|
16
|
-
- 📋
|
|
17
|
-
|
|
18
|
+
- 🗑 **删除会话**:会话头部「删除会话…」按钮 + 管理面板每行删除,全部带二次确认
|
|
19
|
+
- 📦 **归档 / 移出归档**:会话头部按钮 + 管理面板逐行操作
|
|
20
|
+
- 📋 **会话管理面板**(侧边栏底部入口):全部 / 未归档 / 已归档 过滤(已归档会话
|
|
21
|
+
侧边栏默认不可见,只有这里能找回),每行「打开 / 归档 / 移出归档 / 删除」
|
|
18
22
|
- 🏷 状态徽标:已归档 / 运行中 / 当前会话;相对时间与工作区目录
|
|
19
23
|
- ⚠️ 删除确认弹窗展示会话标题与“不可撤销”警告;会话运行中会提示“删除将立即中断它”
|
|
20
24
|
|
|
@@ -65,7 +69,16 @@ dev_inject_plugin {"dir": "<仓库目录绝对路径>"}
|
|
|
65
69
|
加载期失败;删除 / 移出归档用到了少数 rc.6 未公开的内部结构(已做防御性访问),
|
|
66
70
|
若未来版本重构这些内部实现,会表现为运行时操作报错而非崩溃,按报错适配即可。
|
|
67
71
|
- `peerDependencies` 仅声明 `cordis` 范围,不硬编码 DSH 版本。
|
|
68
|
-
- 建议升级后自检一次:新建空白会话并删除(端到端 30
|
|
72
|
+
- 建议升级后自检一次:新建空白会话并删除(端到端 30 秒),或运行
|
|
73
|
+
`node scripts/smoke-test.mjs`(对两个 host 端点的只读冒烟检查,不触碰真实会话)。
|
|
74
|
+
|
|
75
|
+
## 开发与维护
|
|
76
|
+
|
|
77
|
+
- **无构建步骤**:`lib/` 即运行时产物(host 为 ESM,client 为 loader factory 格式手写 bundle)。
|
|
78
|
+
- **冒烟测试**:`node scripts/smoke-test.mjs [baseUrl]`(需运行中的 dsh web)。
|
|
79
|
+
- **CI**(`.github/workflows/ci.yml`):`node --check` 两个文件 + `npm pack --dry-run`
|
|
80
|
+
校验发布包内容。
|
|
81
|
+
- 变更记录见 [CHANGELOG.md](./CHANGELOG.md)。
|
|
69
82
|
|
|
70
83
|
## 实现说明
|
|
71
84
|
|
package/lib/client.js
CHANGED
|
@@ -334,9 +334,13 @@ window.__ModuleLoader__.load({
|
|
|
334
334
|
const archived = useMemo(() => new Set(archivedIds), [archivedIds]);
|
|
335
335
|
|
|
336
336
|
const rows = useMemo(() => {
|
|
337
|
+
// Hide subagent sessions and blank workspace placeholders (the
|
|
338
|
+
// "New Session" seat DSH regenerates per workspace on reconnect) —
|
|
339
|
+
// mirror the sidebar's sessionVisible rule: blank rows show only
|
|
340
|
+
// when they are the current session.
|
|
337
341
|
const all = list.ids
|
|
338
342
|
.map((id) => list.byId[id])
|
|
339
|
-
.filter((s) => s !== void 0 && s.origin !== "subagent");
|
|
343
|
+
.filter((s) => s !== void 0 && s.origin !== "subagent" && (!s.blank || s.id === list.current));
|
|
340
344
|
if (filter === "active") return all.filter((s) => !archived.has(s.id));
|
|
341
345
|
if (filter === "archived") return all.filter((s) => archived.has(s.id));
|
|
342
346
|
return all;
|