dsh-round-rightclick 0.1.0 → 0.2.0

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
@@ -1,5 +1,18 @@
1
1
  # 更新记录
2
2
 
3
+ ## 0.2.0(2026-10-07)
4
+
5
+ - 修复 DSH 0.2.0 桌面上右键无响应:会话列表快照不再提供 current 字段,改为按主视图占用标记(retainedBy.mainView)确定当前会话。
6
+ - 修复分叉后无法打开子会话:宿主已移除 sessions.open,改为经主视图服务 uiWorkspace.openSession 导航。
7
+ - 宿主契约校验脚本跟进 0.2.0 的事件结构(assistant/message 文本位于 data.message.content)与分叉前缀后的 session/end-seed 标记。
8
+ - 改为免构建安装:仓库直接提交 lib/ 构建产物并移除 prepare 脚本,从 GitHub 源安装不再需要 pnpm 构建授权。
9
+
10
+ ## 0.1.1(2026-09-13)
11
+
12
+ - 圆盘直径由 240 像素调整为 200 像素,减少对对话内容的遮挡。
13
+ - README 补充 npm 安装方式,并将其设为推荐安装路径。
14
+ - 新增由 GitHub Release 触发的发布工作流,经 npm Trusted Publishing(OIDC)发布并附带 provenance。
15
+
3
16
  ## 0.1.0(2026-09-13)
4
17
 
5
18
  - 在 DSH Web 对话区域右键打开 240 像素圆盘,提供六个带图标的快捷操作。
package/README.en.md CHANGED
@@ -5,6 +5,7 @@ A radial right-click menu for DeepSeek Harness. Right-click a specific turn in t
5
5
  [简体中文](README.md) · [Changelog](CHANGELOG.md)
6
6
 
7
7
  ![Release](https://img.shields.io/github/v/release/hmr-BH/dsh-round-rightclick?display_name=tag&sort=semver)
8
+ ![npm](https://img.shields.io/npm/v/dsh-round-rightclick)
8
9
  ![License](https://img.shields.io/github/license/hmr-BH/dsh-round-rightclick)
9
10
 
10
11
  ## Why this plugin exists
@@ -40,15 +41,31 @@ Forking turn 1 produces a session containing only turn 1; forking turn 2 produce
40
41
 
41
42
  ## Install
42
43
 
43
- ### From a release tarball (recommended)
44
+ ### From npm (recommended)
44
45
 
45
- Download `dsh-round-rightclick-0.1.0.tgz` from [Releases](https://github.com/hmr-BH/dsh-round-rightclick/releases), then run:
46
+ ```sh
47
+ dsh plugin --profile web add dsh-round-rightclick
48
+ ```
49
+
50
+ Restart `dsh web` and refresh the page. The npm package ships built output, so neither pnpm nor a local build is required; a prebuilt publish does not trigger a build approval either.
51
+
52
+ ### From GitHub
46
53
 
47
54
  ```sh
48
- dsh plugin --profile web add ./dsh-round-rightclick-0.1.0.tgz
55
+ dsh plugin --profile web add github:hmr-BH/dsh-round-rightclick
49
56
  ```
50
57
 
51
- Restart `dsh web` and refresh the page. The tarball contains built output, so neither pnpm nor a local build is required.
58
+ Restart `dsh web` and refresh the page. The repo commits its built `lib/` bundles, so installing runs no build script and needs no pnpm build approval.
59
+
60
+ ### From a release tarball
61
+
62
+ Download the `.tgz` attached to the relevant [Release](https://github.com/hmr-BH/dsh-round-rightclick/releases), then run:
63
+
64
+ ```sh
65
+ dsh plugin --profile web add ./dsh-round-rightclick-<version>.tgz
66
+ ```
67
+
68
+ Restart `dsh web` and refresh the page. The tarball contains built output as well.
52
69
 
53
70
  ### From source
54
71
 
@@ -94,6 +111,8 @@ pnpm test
94
111
  node scripts/package-release.mjs
95
112
  ```
96
113
 
114
+ The built `lib/` bundles are committed for GitHub-source installs: run `pnpm run build` after touching `src/` and commit before pushing, so the repo never ships stale output.
115
+
97
116
  Code layout:
98
117
 
99
118
  ```text
package/README.md CHANGED
@@ -5,6 +5,7 @@
5
5
  [English](README.en.md) · [更新记录](CHANGELOG.md)
6
6
 
7
7
  ![版本](https://img.shields.io/github/v/release/hmr-BH/dsh-round-rightclick?display_name=tag&sort=semver)
8
+ ![npm](https://img.shields.io/npm/v/dsh-round-rightclick)
8
9
  ![许可证](https://img.shields.io/github/license/hmr-BH/dsh-round-rightclick)
9
10
 
10
11
  ## 为什么需要这个插件
@@ -40,15 +41,31 @@ DSH 的会话操作分散在页面各处。工作目录需要在侧栏中查找
40
41
 
41
42
  ## 安装
42
43
 
43
- ### Release 包安装(推荐)
44
+ ### npm 安装(推荐)
44
45
 
45
- 从 [Releases](https://github.com/hmr-BH/dsh-round-rightclick/releases) 下载 `dsh-round-rightclick-0.1.0.tgz`,然后执行:
46
+ ```sh
47
+ dsh plugin --profile web add dsh-round-rightclick
48
+ ```
49
+
50
+ 重启 `dsh web` 并刷新页面。npm 包内已含构建产物,无需安装 pnpm,也无需本地编译;预构建发布也不会触发构建授权。
51
+
52
+ ### GitHub 安装
46
53
 
47
54
  ```sh
48
- dsh plugin --profile web add ./dsh-round-rightclick-0.1.0.tgz
55
+ dsh plugin --profile web add github:hmr-BH/dsh-round-rightclick
49
56
  ```
50
57
 
51
- 重启 `dsh web` 并刷新页面。安装包内已含构建产物,无需安装 pnpm,也无需本地编译。
58
+ 重启 `dsh web` 并刷新页面。仓库内已提交 `lib/` 构建产物,安装时不需要运行构建脚本,也不会触发 pnpm 的构建授权。
59
+
60
+ ### Release 包安装
61
+
62
+ 从 [Releases](https://github.com/hmr-BH/dsh-round-rightclick/releases) 下载对应版本附带的 `.tgz`,然后执行:
63
+
64
+ ```sh
65
+ dsh plugin --profile web add ./dsh-round-rightclick-<版本>.tgz
66
+ ```
67
+
68
+ 重启 `dsh web` 并刷新页面。tarball 内同样已含构建产物。
52
69
 
53
70
  ### 源码安装
54
71
 
@@ -94,6 +111,8 @@ pnpm test
94
111
  node scripts/package-release.mjs
95
112
  ```
96
113
 
114
+ `lib/` 构建产物需要提交进仓库,GitHub 源安装直接使用它:改动 `src/` 后先运行 `pnpm run build` 再提交,避免仓库里的产物过期。
115
+
97
116
  代码结构:
98
117
 
99
118
  ```text
package/lib/client.js CHANGED
@@ -322,7 +322,7 @@ function MenuIcon({ name, size = 24 }) {
322
322
  }
323
323
 
324
324
  // src/client/menu-layout.ts
325
- var MENU_SIZE = 240;
325
+ var MENU_SIZE = 200;
326
326
  var INNER_RATIO = 0.18;
327
327
  var OUTER_RATIO = 0.47;
328
328
  var LABEL_RATIO = 0.33;
@@ -361,9 +361,16 @@ function labelPosition(index) {
361
361
 
362
362
  // src/client/RadialMenu.tsx
363
363
  var import_jsx_runtime2 = require("react/jsx-runtime");
364
+ var MAIN_VIEW_RETAIN_SOURCE = "mainView";
364
365
  var SECTORS = PIE_ACTION_IDS.map((id, index) => ({ id, clip: sectorClip(index), position: labelPosition(index) }));
366
+ function mainViewSessionId(list) {
367
+ for (const [id, row] of Object.entries(list.byId)) {
368
+ if ((row?.retainedBy?.[MAIN_VIEW_RETAIN_SOURCE] ?? 0) > 0) return id;
369
+ }
370
+ return void 0;
371
+ }
365
372
  function readState(list) {
366
- const sessionId = list.current;
373
+ const sessionId = mainViewSessionId(list);
367
374
  const row = sessionId === void 0 ? void 0 : list.byId[sessionId];
368
375
  return {
369
376
  sessionId,
@@ -705,9 +712,12 @@ function createActionDeps(ctx) {
705
712
  },
706
713
  fork: async (sessionId, atSeq) => {
707
714
  if (atSeq === void 0 || !Number.isSafeInteger(atSeq) || atSeq < 0) throw new Error("A completed turn is required");
708
- if (typeof ctx.sessions.open !== "function") throw new Error("Session navigation is unavailable");
715
+ const workspace = ctx.get?.("uiWorkspace");
716
+ if (workspace === void 0 || typeof workspace.openSession !== "function") {
717
+ throw new Error("Session navigation is unavailable");
718
+ }
709
719
  const childId = await ctx.sessions.fork({ sessionId, atSeq, increaseTitle: true });
710
- ctx.sessions.open(childId);
720
+ workspace.openSession(childId);
711
721
  },
712
722
  resolveForkTarget: (sessionId, target) => {
713
723
  const conversation = ctx.get?.("uiConversation");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-round-rightclick",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "DeepSeek Harness 圆盘快捷菜单:按轮次分叉、打断生成、复制路径与会话 ID、打开目录和导出日志。",
5
5
  "author": "hmr-BH",
6
6
  "repository": {
@@ -30,7 +30,6 @@
30
30
  ],
31
31
  "scripts": {
32
32
  "build": "node build.mjs",
33
- "prepare": "node build.mjs",
34
33
  "test": "node build.mjs && vitest run",
35
34
  "typecheck": "tsc --noEmit"
36
35
  },