dsh-session-manager 0.5.4 → 0.6.2
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 +23 -0
- package/README.local-workflow.md +52 -0
- package/README.md +11 -1
- package/README.zh.md +11 -3
- package/lib/annotation-store.js +1 -1
- package/lib/client.js +1481 -148
- package/lib/compat/dsh-adapter.js +55 -0
- package/lib/index.js +83 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,27 @@
|
|
|
1
1
|
|
|
2
|
+
## 0.6.2 — 2026-10-02
|
|
3
|
+
|
|
4
|
+
- **fix(ui)**: 修复删除当前打开的会话后未自动跳转的问题:删除当前会话时显式调用 `ctx.uiWorkspace.clearMain()` 并回退触发新建会话,使界面正确跳转到新建会话欢迎视图,与会话归档行为保持一致。
|
|
5
|
+
- **fix(css)**: 修复无作用域全局样式覆盖宿主组件的缺陷(Issue #21):移除未带前缀的全局规则选择器 `[role=tooltip]`, `.bubble`, `[class*=bubble]`, `.tooltip`,仅保留插件作用域 `.sm-tooltip`,避免给 DSH 官方消息气泡强加 1px 边框;将 tooltip 浮层 z-index 调降回官方 Toast 档位(1100)。
|
|
6
|
+
- **fix(ui)**: 优化顶部标题栏动作按钮排列与显示(归档按钮置于首位、图标垂直居中对齐、紧凑折叠菜单定位保持跟随)。
|
|
7
|
+
- **feat(update)**: add self-update checking and installation workflow:
|
|
8
|
+
- Header 🐋 (Whale) icon button: checks for updates against the npm registry with indicator badge / red dot notification when a new version is released.
|
|
9
|
+
- Update Dialog (`UpdateDialog`): modal overlay displaying current and latest versions, check progress, and one-click update via the DSH Plugin Manager `installBundle()`.
|
|
10
|
+
- Update state management (`UpdateStore`): unified state machine (`idle`, `checking`, `available`, `updating`, `done`, `error`) with development overrides (`window.__DSH_SM_TEST_UPDATE__`).
|
|
11
|
+
- Host update endpoints: `GET /session-manager/api/update/check` and `POST /session-manager/api/update/install`.
|
|
12
|
+
- **feat(settings)**: add Settings Card (`SessionManagerSettingsCard`) registered in DSH Settings under `settings.plugin.item` (`key: "dsh-session-manager"`):
|
|
13
|
+
- Displays current version, latest version, inline check/update buttons, auto-check for updates toggle, and GitHub repository link.
|
|
14
|
+
- **Install Source (Registry)**: add a registry source dropdown allowing users to select between **npm official registry** (`registry.npmjs.org`, default) and **China mainland mirror** (`registry.npmmirror.com`). Both check and install requests flow directly through the selected registry and the preference is persisted in `localStorage`.
|
|
15
|
+
- **feat(ui)**: responsive Header layout enhancements:
|
|
16
|
+
- Header actions use Container Queries (`@container (max-width: 720px)` and `@container (max-width: 520px)`): automatically transitions between full labels, 32×32 icon-only compact mode, and secondary action overflow menu (`⋯`).
|
|
17
|
+
- Surface buttons: `.sm-headerBtn` styled with opaque background tokens for consistent visibility across light/dark themes.
|
|
18
|
+
- Danger button: unified red text/border resting state and filled red hover state.
|
|
19
|
+
- **fix(ui)**: overlay root, stacking context, and footer fixes:
|
|
20
|
+
- Dedicated Overlay Root (`#dsh-session-manager-overlay-root`) ensures dialogs break out of ancestor stacking contexts (fixing issue #19).
|
|
21
|
+
- Dynamic z-index layering (`nextDialogZ()`) ensures dialogs stack properly above panels and other overlays.
|
|
22
|
+
- Footer action (`FooterAction`): renders directly as native buttons in wide/rail modes, avoiding double container wrappers and layout overflow (fixing issue #20).
|
|
23
|
+
- **test**: comprehensive test suite expansion: added coverage for semver comparisons, UpdateStore state machine, UpdateDialog, Settings Card, responsive header layout, registry source switching, Host update endpoints, delete-current-session navigation and regression guards (338 tests total).
|
|
24
|
+
|
|
2
25
|
## 0.5.4 — 2026-09-30
|
|
3
26
|
|
|
4
27
|
- **docs**: update project description and metadata to reflect official Web UI and Desktop app support; clarify client synchronization, install profiles, and runtime requirements.
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# AI Dev Workflow Template
|
|
2
|
+
|
|
3
|
+
核心关系:
|
|
4
|
+
```text
|
|
5
|
+
AGENTS.md = Agent 统一入口
|
|
6
|
+
.ai/ = 工作流和项目知识的唯一事实来源
|
|
7
|
+
.codex/ = 由脚本从 .ai/skills 生成的 Codex Skill 转发层(不要手改)
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
## 新项目第一次使用
|
|
11
|
+
复制到项目根目录后,先让 AI 初始化:
|
|
12
|
+
- `.ai/architecture.md`
|
|
13
|
+
- `.ai/safety.md`
|
|
14
|
+
- `.ai/project-commands.md`
|
|
15
|
+
|
|
16
|
+
推荐启动指令:
|
|
17
|
+
```text
|
|
18
|
+
先不要开始开发。
|
|
19
|
+
请读取 AGENTS.md 和当前项目,帮我初始化 .ai 下的项目知识和验证规则。
|
|
20
|
+
重点完善:
|
|
21
|
+
- .ai/architecture.md
|
|
22
|
+
- .ai/safety.md
|
|
23
|
+
- .ai/project-commands.md
|
|
24
|
+
只写能够从当前项目确认的事实;不确定的地方标记“待确认”,不要猜。
|
|
25
|
+
填写完成后把每个文件头部的「最后核对日期」改成今天。
|
|
26
|
+
暂时不要修改业务代码。
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
## 常用 Skill
|
|
31
|
+
- requirements-grill
|
|
32
|
+
- regression-fix
|
|
33
|
+
- code-review
|
|
34
|
+
- high-risk-review
|
|
35
|
+
- release-check
|
|
36
|
+
|
|
37
|
+
## 维护 Skill
|
|
38
|
+
只改 `.ai/skills/<name>/SKILL.md`,然后重新生成转发层(PowerShell 7):
|
|
39
|
+
```powershell
|
|
40
|
+
.\sync-codex-skills.ps1 # 生成 / 更新 .codex/skills,删除已不存在的 skill
|
|
41
|
+
.\sync-codex-skills.ps1 -Check # 只比对不写入,有漂移则报错
|
|
42
|
+
```
|
|
43
|
+
生成文件带日期标记;内容未变时不会重写,可重复运行。
|
|
44
|
+
|
|
45
|
+
## 本地忽略(仅 Git 仓库需要)
|
|
46
|
+
PowerShell 7,在主仓库根目录运行:
|
|
47
|
+
```powershell
|
|
48
|
+
.\setup-local-workflow.ps1
|
|
49
|
+
```
|
|
50
|
+
脚本会校验 `.git` 是真实的仓库根目录(不是 worktree / submodule 的 `.git` 文件),写入 `.git/info/exclude`,然后自动执行一次 `sync-codex-skills.ps1`。非 Git 仓库不需要运行;运行了会直接报错退出,不会写任何东西。
|
|
51
|
+
|
|
52
|
+
然后运行 `git status` 确认本地 AI 文件未进入待提交列表。
|
package/README.md
CHANGED
|
@@ -42,6 +42,12 @@ Verified with the current official DSH Web UI and Desktop app. Both environments
|
|
|
42
42
|
- Non-destructive actions (archive / unarchive / favorite / unfavorite / review / unreview / add-tags / clear-tags / set-priority / move / preset-migrate) fire immediately and report per-session results in a **result dialog** with **Success / Failed / Skipped** groups and a one-click **Retry failed** that re-arms the failed IDs into the selection.
|
|
43
43
|
- Destructive actions (**delete session**) first open a **preview dialog** listing the targeted sessions, then show a progress bar, then a per-id result dialog.
|
|
44
44
|
|
|
45
|
+
### 1.4 Plugin updates and settings
|
|
46
|
+
|
|
47
|
+
- **Self-update check**: A 🐋 (Whale) icon button in the session manager panel header checks for updates and displays a notification dot when a new version is available. Click to open the update dialog with current and latest versions, and one-click update via the DSH Plugin Manager.
|
|
48
|
+
- **Settings Card**: Registered under DSH Settings (`settings.plugin.item`). Displays current version, latest version, inline check/update buttons, an auto-check toggle, and GitHub repository link.
|
|
49
|
+
- **Install Source (Registry)**: Select between **npm official registry** (`registry.npmjs.org`, default) and **China mainland mirror** (`registry.npmmirror.com`) in the Settings Card. Check for updates and download packages directly from the selected registry.
|
|
50
|
+
|
|
45
51
|
## 2 UI entry points
|
|
46
52
|
|
|
47
53
|
### 2.1 Title bar
|
|
@@ -56,6 +62,10 @@ Open the **Session manager** panel from the bottom of DSH's sidebar to browse ev
|
|
|
56
62
|
|
|
57
63
|
The **Batch process** button in the session manager panel header is the entry point: click it once to enter batch process (row checkboxes appear, the **Select all in filter / Clear selection** pair and the bulk action bar show up); click it again to exit batch process.
|
|
58
64
|
|
|
65
|
+
### 2.4 Settings Card
|
|
66
|
+
|
|
67
|
+
Navigate to DSH Settings -> Plugins -> Session Manager to inspect versions, switch between npm official and China mainland mirror registries, toggle auto-update checks, or trigger updates.
|
|
68
|
+
|
|
59
69
|
## 3 Installation
|
|
60
70
|
|
|
61
71
|
### 3.1 Install from Plugins
|
|
@@ -120,7 +130,7 @@ DSH versions are shown above plugin versions; each column represents a tested ve
|
|
|
120
130
|
|
|
121
131
|
| v0.2.0-rc.2 | v0.1.7-rc.2 | v0.1.7-rc.1 |
|
|
122
132
|
| --- | --- | --- |
|
|
123
|
-
| 0.5.4 | 0.5.3 | 0.5.2 |
|
|
133
|
+
| 0.6.2, 0.5.4 | 0.5.3 | 0.5.2 |
|
|
124
134
|
|
|
125
135
|
| v0.1.6-alpha.2 | v0.1.5-rc.2 | v0.1.5-rc.1 |
|
|
126
136
|
| --- | --- | --- |
|
package/README.zh.md
CHANGED
|
@@ -40,6 +40,12 @@ DeepSeek Harness 会话管理插件:支持删除、归档、跨工作区移动
|
|
|
40
40
|
- **变更操作**:**添加标签 / 清空标签 / 设置优先级 / 移动至工作区 / 迁移预设 / 删除会话**。
|
|
41
41
|
- **执行流程**:非破坏性操作(归档 / 取消归档 / 收藏 / 取消收藏 / 待回看 / 取消待看 / 添加标签 / 清空标签 / 设置优先级 / 移动至工作区 / 迁移预设)立即执行,结果按会话逐条展示在 **结果对话框** 的 **成功 / 失败 / 跳过** 分组里,并提供 **重试失败项** 一键把失败 ID 重新加入选中;破坏性操作(**删除会话**)先弹 **预览对话框** 列出受影响的会话,再显示进度条,最后给出逐条结果。
|
|
42
42
|
|
|
43
|
+
### 1.4 插件更新与设置卡片
|
|
44
|
+
|
|
45
|
+
- **检查更新**:会话管理窗口顶部增加 🐋(鲸鱼)图标按钮,点击可检查新版本并在有更新时展示小红点提示;点击弹出更新窗口,展示当前版本与最新版本,支持一键调用插件管理器安装更新。
|
|
46
|
+
- **设置卡片**:注册在 DSH 设置的插件配置页(`settings.plugin.item`)。展示当前安装版本、最新版本状态、卡片内检查更新与更新按钮、自动检查偏好开关以及 GitHub 仓库链接。
|
|
47
|
+
- **安装源选择**:在设置卡片中可随时切换安装源,可选 **npm 官方源**(`registry.npmjs.org`,默认)与 **中国大陆镜像源**(`registry.npmmirror.com`);检查更新与版本下载将直接请求所选源。
|
|
48
|
+
|
|
43
49
|
## 2 UI入口
|
|
44
50
|
|
|
45
51
|
### 2.1 标题栏入口
|
|
@@ -54,6 +60,10 @@ DeepSeek Harness 会话管理插件:支持删除、归档、跨工作区移动
|
|
|
54
60
|
|
|
55
61
|
会话管理窗口顶部的 **批量处理** 按钮即是入口:点一下进入批量模式,行左侧出现复选框,工具栏出现 **全选当前筛选 / 清空选择** 和 **批量按钮区**;再点一次退出批量模式。
|
|
56
62
|
|
|
63
|
+
### 2.4 设置卡片入口
|
|
64
|
+
|
|
65
|
+
在 DSH 设置中进入插件设置页(会话管理),可查看版本信息、切换 npm 官方源或中国大陆镜像源、开启/关闭自动检查更新,或手动检查并更新。
|
|
66
|
+
|
|
57
67
|
## 3 安装
|
|
58
68
|
|
|
59
69
|
### 3.1 从插件安装
|
|
@@ -118,18 +128,16 @@ DSH 版本在上,插件版本在下;每列表示一组已测试的版本组
|
|
|
118
128
|
|
|
119
129
|
| v0.2.0-rc.2 | v0.1.7-rc.2 | v0.1.7-rc.1 |
|
|
120
130
|
| --- | --- | --- |
|
|
121
|
-
| 0.5.4 | 0.5.3 | 0.5.2 |
|
|
131
|
+
| 0.6.2, 0.5.4 | 0.5.3 | 0.5.2 |
|
|
122
132
|
|
|
123
133
|
| v0.1.6-alpha.2 | v0.1.5-rc.2 | v0.1.5-rc.1 |
|
|
124
134
|
| --- | --- | --- |
|
|
125
135
|
| 0.5.1 | 0.4.11 | 0.4.10, 0.4.9, 0.4.7 |
|
|
126
136
|
|
|
127
|
-
| 0.1.3-alpha.2 | v0.1.2-rc.1 | v0.1.0-rc.7 |
|
|
128
137
|
| v0.1.3-alpha.2 | v0.1.2-rc.1 | v0.1.0-rc.7 |
|
|
129
138
|
| --- | --- | --- |
|
|
130
139
|
| 0.4.6, 0.4.4, 0.4.1 | 0.4.0 | 0.1.2, 0.1.1, 0.1.0 |
|
|
131
140
|
|
|
132
|
-
以上版本组合已在官方 Web UI 和 Desktop 客户端中完成测试。其他版本组合可能同样兼容,但未逐一验证。
|
|
133
141
|
以上版本组合已在官方 Web UI 或 Desktop 客户端中完成测试。其他版本组合可能同样兼容,但未逐一验证。
|
|
134
142
|
|
|
135
143
|
使用独立 DSH CLI / runtime 时,需要 Node.js 22.15+(22.x)或 24+,以提供内置 Zstd 支持。官方 Desktop 客户端单独携带并管理与其版本匹配的 runtime。
|
package/lib/annotation-store.js
CHANGED
|
@@ -46,7 +46,7 @@ export function normalizeAnnotationPatch(patch) {
|
|
|
46
46
|
return out;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
export function createAnnotationStore(directory, { io = fs, lockWaitMs =
|
|
49
|
+
export function createAnnotationStore(directory, { io = fs, lockWaitMs = 3000 } = {}) {
|
|
50
50
|
if (typeof directory !== "string" || !directory) throw fail("无法定位会话标记目录", "annotations-unavailable");
|
|
51
51
|
const root = resolve(directory);
|
|
52
52
|
const path = join(root, "annotations.v1.json");
|