dsh-round-rightclick 0.1.1 → 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,12 @@
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
+
3
10
  ## 0.1.1(2026-09-13)
4
11
 
5
12
  - 圆盘直径由 240 像素调整为 200 像素,减少对对话内容的遮挡。
package/README.en.md CHANGED
@@ -49,6 +49,14 @@ dsh plugin --profile web add dsh-round-rightclick
49
49
 
50
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
51
 
52
+ ### From GitHub
53
+
54
+ ```sh
55
+ dsh plugin --profile web add github:hmr-BH/dsh-round-rightclick
56
+ ```
57
+
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
+
52
60
  ### From a release tarball
53
61
 
54
62
  Download the `.tgz` attached to the relevant [Release](https://github.com/hmr-BH/dsh-round-rightclick/releases), then run:
@@ -103,6 +111,8 @@ pnpm test
103
111
  node scripts/package-release.mjs
104
112
  ```
105
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
+
106
116
  Code layout:
107
117
 
108
118
  ```text
package/README.md CHANGED
@@ -49,6 +49,14 @@ dsh plugin --profile web add dsh-round-rightclick
49
49
 
50
50
  重启 `dsh web` 并刷新页面。npm 包内已含构建产物,无需安装 pnpm,也无需本地编译;预构建发布也不会触发构建授权。
51
51
 
52
+ ### GitHub 安装
53
+
54
+ ```sh
55
+ dsh plugin --profile web add github:hmr-BH/dsh-round-rightclick
56
+ ```
57
+
58
+ 重启 `dsh web` 并刷新页面。仓库内已提交 `lib/` 构建产物,安装时不需要运行构建脚本,也不会触发 pnpm 的构建授权。
59
+
52
60
  ### Release 包安装
53
61
 
54
62
  从 [Releases](https://github.com/hmr-BH/dsh-round-rightclick/releases) 下载对应版本附带的 `.tgz`,然后执行:
@@ -103,6 +111,8 @@ pnpm test
103
111
  node scripts/package-release.mjs
104
112
  ```
105
113
 
114
+ `lib/` 构建产物需要提交进仓库,GitHub 源安装直接使用它:改动 `src/` 后先运行 `pnpm run build` 再提交,避免仓库里的产物过期。
115
+
106
116
  代码结构:
107
117
 
108
118
  ```text
package/lib/client.js CHANGED
@@ -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.1",
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
  },