dsh-code-server-app 0.3.63 → 0.3.65

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 CHANGED
@@ -23,7 +23,7 @@ A static profile plugin (npm package with host + client bundle) that ships the *
23
23
 
24
24
  | DSH version | Carrier | Entry points |
25
25
  |---|---|---|
26
- | **>= 0.1.5-alpha.1** (has `sidebarRight` / `sidebarRightTabs`) | **Right-sidebar tab** (kind `code-server`, chip `Code Server`), which also **claims file addresses** (see below) | ① DSH's own **produced-file chips / presented-file card previews / inline file names in prose** (since 0.2.5, via the official `openFile` → file address → this tab); ② the **Code Server box** on the sidebar's guide ("开始") page; ③ Settings → Plugins → Code Server → **"Open in right sidebar"** |
26
+ | **rc line** `0.1.5-rc.x` (latest `0.1.5-rc.3` = npm `latest`/`next`)**and alpha line** `>= 0.1.6-alpha.2` (latest `0.1.7-alpha.1`) — detected by the presence of `sidebarRight` / `sidebarRightTabs`, never by version comparison | **Right-sidebar tab** (kind `code-server`, chip `Code Server`), which also **claims file addresses** (see below) | ① DSH's own **produced-file chips / presented-file card previews / inline file names in prose** (since 0.2.5, via the official `openFile` → file address → this tab); ② the **Code Server box** on the sidebar's guide ("开始") page; ③ Settings → Plugins → Code Server → **"Open in right sidebar"** |
27
27
  | older (no sidebar service) | **Unsupported**: nothing but one notice on the settings page | none (Settings → Plugins → Code Server shows an upgrade notice) |
28
28
 
29
29
  - Detection: first a synchronous `ctx.get('sidebarRightTabs') / ctx.get('sidebarRight')` probe; because the services may come up after this plugin, `ctx.inject(['sidebarRightTabs','sidebarRight'], …)` is awaited and a **2.5 s timeout marks the DSH as legacy** (no version comparison, and the plugin's own activation is never blocked).
@@ -465,7 +465,7 @@ data call changes; the caller stays as it is).
465
465
  > Since 0.2.3 this plugin no longer supports older DSH versions.
466
466
  > The right-sidebar plugin services `sidebarRightTabs` / `sidebarRight` were not detected, so the plugin exposes no
467
467
  > entry point at all (the old floating ball and floating window have been removed) and will not start the IDE in the
468
- > background. Upgrade DSH to a version with the right sidebar (>= 0.1.5-alpha.1): Code Server then appears as a
468
+ > background. Upgrade DSH to the rc line (0.1.5-rc.x) or the alpha line from 0.1.6-alpha.2 on: Code Server then appears as a
469
469
  > right-sidebar tab, this page shows the full settings again, and no reinstall is needed — a page refresh is enough.
470
470
 
471
471
  - **No other UI**: no `shell.overlay` registration (floating ball), no file-address claim, no resident preload.
@@ -481,8 +481,8 @@ data call changes; the caller stays as it is).
481
481
 
482
482
  - code-server's workspace **follows the active DSH session/workspace**: switching sessions/workspaces while the IDE is open moves code-server to the new directory
483
483
  (resolution order: current session cwd → session's `workspace.path` → workspace of the most recently active session → first workspace.path;
484
- **where "the current session" comes from depends on the DSH version**: ≥ 0.1.6-alpha.2 reads the session-scoped standard prop `sessionId`,
485
- ≤ 0.1.6-alpha.1 falls back to `current` on the session-list snapshot — see the 0.3.48 bullet below; the logic is inlined in `lib/client.js`
484
+ **where "the current session" comes from depends on the DSH version**: the alpha line (≥ 0.1.6-alpha.2) reads the session-scoped standard prop `sessionId`,
485
+ the rc line (≤ 0.1.5-rc.3) falls back to `current` on the session-list snapshot — see the 0.3.48 bullet below; the logic is inlined in `lib/client.js`
486
486
  (the "workspace resolution" section) and the contract for both shapes is pinned by `scripts/test-client-bundle-cwd.mjs` directly against the entry file);
487
487
  the opened directory is shown inside code-server (`?folder=<cwd>`, the page reloads when following a switch);
488
488
  implementation note: the iframe `src` must carry `?folder=<cwd>` — code-server's front-end remembers the "last workspace" and restores it by itself;
@@ -692,11 +692,11 @@ pnpm test:bridge-extension # extension-side pure logic (dirty buffers, diagnos
692
692
  pnpm test:ask-dialog # ask-dialog wiring: no artifacts/build chain left, the host's four ask routes, the extension only reporting editor state, the four approval constraints, the bridge's safety invariants
693
693
  pnpm test:launcher-routes # launcher HTTP surface (spawns a real process; slow)
694
694
  pnpm test:workspace-switch # switching workspaces does not restart the process
695
- pnpm test:workspace-cwd # "current workspace directory" resolution (DSH 0.1.6-alpha.2 sessionId vs. the older current)
695
+ pnpm test:workspace-cwd # "current workspace directory" resolution (alpha line: sessionId vs. rc line: the snapshot's current)
696
696
  pnpm test:client-cwd # the same contract, but asserted against the **client entry** lib/client.js
697
697
  pnpm test:client-tabs # "one code-server tab on the DSH side": a new tab closes the old one in the same pane
698
698
  pnpm test:client-entry # client-entry guard: classic script + factory wrapper, require whitelist, src/ gone, parity with lib/claim-types.js
699
- pnpm test:client-seat # which seat the settings card uses: plugins.bundle.config (DSH ≥ 0.1.6-alpha.2) vs settings.plugin.item (≤ alpha.1)
699
+ pnpm test:client-seat # which seat the settings card uses: plugins.bundle.config (alpha line >= 0.1.6-alpha.2) vs settings.plugin.item (rc line <= 0.1.5-rc.3)
700
700
  pnpm test:fullscreen # opening the tab goes fullscreen
701
701
  pnpm test:vendored # repack table ↔ plugin dependency table (no npm: aliases, no aggregator)
702
702
  pnpm test:installed # install smoke: assert on what was **installed into a profile**
@@ -1259,7 +1259,7 @@ in. Apache-2.0 grants no trademark rights; this project does not use "Continue"
1259
1259
  - **`serve: dsh` shares DSH's origin**, so the iframe is not sandboxed there (same-origin plus `allow-same-origin` is
1260
1260
  escapable by the frame itself); in `loopback` mode the iframe is cross-origin and `sandbox` stays as real protection.
1261
1261
  - **Single instance across sessions**: one shared IDE per host; switching cwd only re-navigates the workbench (since 0.2.12 no process restart, so the old directory's background terminals are not collected).
1262
- - **Older DSH versions are unsupported (since 0.2.3)**: on a DSH without `sidebarRightTabs` / `sidebarRight` the plugin
1262
+ - **Older DSH versions are unsupported (since 0.2.3).** Exactly two lines are supported (converged 2026-09-22): the **rc line** `0.1.5-rc.x` (old seat + `current` on the snapshot) and the **alpha line** `>= 0.1.6-alpha.2` (new seat + the `sessionId` standard prop). Earlier alphas (`0.1.5-alpha.x`, `0.1.6-alpha.1`) are **not separate targets** — they share the rc line's shapes, so the code happens to work, but they are not verified. Detail: on a DSH without `sidebarRightTabs` / `sidebarRight` the plugin
1263
1263
  offers nothing but an upgrade notice on the settings page; older-DSH users should stay on `0.2.2`
1264
1264
  (`dsh plugin --profile web add dsh-code-server-app@0.2.2`).
1265
1265
  - **Sidebar tab switching** (no longer reloads since 0.2.2): DSH's right sidebar renders only the active tab's body, and
package/README.md CHANGED
@@ -27,11 +27,11 @@
27
27
  > 公式都一致,而且**不可能**版本错配),授权也在同一个对话框里就地处理 —— 详见
28
28
  > 「与 DSH 的协同:编辑器桥」。整条链上**没有任何构建步骤**。
29
29
 
30
- ## UI 载体与 DSH 版本要求(0.2.3 起只支持带右侧栏的 DSH)
30
+ ## UI 载体与 DSH 支持范围(0.2.3 起只支持带右侧栏的 DSH;2026-09-22 收敛为下面两条线)
31
31
 
32
32
  | DSH 版本 | 载体 | 入口 |
33
33
  |---|---|---|
34
- | **≥ 0.1.5-alpha.1**(有 `sidebarRight` / `sidebarRightTabs` 服务) | **右侧栏标签**(kind=`code-server`,标签名 `Code Server`),并**认领文件地址**(见下) | ① **DSH 官方的产物 chip / 「交付」卡片预览 / 正文里的文件名**(0.2.5 起,走官方 `openFile` → 文件地址 → 本 tab);② 右侧栏「开始」页的 **Code Server 入口框**;③ 设置 → 插件 → Code Server → **「在右侧栏打开」** |
34
+ | **rc 线** `0.1.5-rc.x`(最新 `0.1.5-rc.3` = npm `latest`/`next`)**与 alpha 线** `≥ 0.1.6-alpha.2`(最新 `0.1.7-alpha.1`)—— 判据是**有没有** `sidebarRight` / `sidebarRightTabs` 服务,不按版本号硬判 | **右侧栏标签**(kind=`code-server`,标签名 `Code Server`),并**认领文件地址**(见下) | ① **DSH 官方的产物 chip / 「交付」卡片预览 / 正文里的文件名**(0.2.5 起,走官方 `openFile` → 文件地址 → 本 tab);② 右侧栏「开始」页的 **Code Server 入口框**;③ 设置 → 插件 → Code Server → **「在右侧栏打开」** |
35
35
  | 更早(无右侧栏服务) | **不受支持**:除设置页的一条提示外**不提供任何入口** | 无(设置 → 插件 → Code Server 显示升级提示) |
36
36
 
37
37
  - 检测方式:先 `ctx.get('sidebarRightTabs') / ctx.get('sidebarRight')` 同步探测;
@@ -417,7 +417,7 @@ seq,并且 `/sync` 回应里带 `lastSeq`(高水位),扩展据此自查游标是
417
417
  > **Code Server** — 当前 DSH 版本不受支持(缺少右侧栏服务)
418
418
  > 本插件自 0.2.3 起不再兼容旧版 DSH。
419
419
  > 未检测到右侧栏插件服务 sidebarRightTabs / sidebarRight,因此插件不提供任何入口(旧版的悬浮球与浮动窗口已移除),
420
- > 也不会后台启动 IDE。升级 DSH 到带右侧栏的版本(≥ 0.1.5-alpha.1)后,Code Server 会出现在右侧栏标签里,
420
+ > 也不会后台启动 IDE。升级 DSH 到 rc 线(0.1.5-rc.x)或 0.1.6-alpha.2 起的 alpha 线后,Code Server 会出现在右侧栏标签里,
421
421
  > 本页同时显示完整设置项;升级后无需重装本插件,刷新页面即可。
422
422
 
423
423
  - **没有任何其他 UI**:不注册 `shell.overlay`(悬浮球)、不认领文件地址、不做常驻预热。
@@ -433,8 +433,8 @@ seq,并且 `/sync` 回应里带 `lastSeq`(高水位),扩展据此自查游标是
433
433
 
434
434
  - code-server 服务目录**跟随活动工作区/会话**:打开期间切换 DSH 会话/工作区,code-server 自动切到新目录
435
435
  (解析优先级:当前会话 cwd → 会话所属 `workspace.path` → 最近活跃会话所属 workspace → 首个 workspace.path;
436
- **"当前会话"的信源随 DSH 版本而变**:≥ 0.1.6-alpha.2 读会话作用域标准 prop `sessionId`,
437
- ≤ 0.1.6-alpha.1 退回会话列表快照上的 `current` —— 详见下面 0.3.48 那条;纯逻辑内联在 `lib/client.js`
436
+ **"当前会话"的信源随支持线而变**:alpha 线(≥ 0.1.6-alpha.2)读会话作用域标准 prop `sessionId`,
437
+ rc 线(≤ 0.1.5-rc.3)退回会话列表快照上的 `current` —— 详见下面 0.3.48 那条;纯逻辑内联在 `lib/client.js`
438
438
  的"工作区解析"段,两版形状的契约由 `scripts/test-client-bundle-cwd.mjs` 直接对**入口**钉住);
439
439
  打开目录显示在 code-server 页面内(`?folder=<cwd>`,跟随切换时页面自动重新加载);
440
440
  实现要点:iframe src 必须带 `?folder=<cwd>`——code-server 前端会记住“最近工作区”并自行恢复,
@@ -550,12 +550,12 @@ pnpm test:bridge-extension # 编辑器桥扩展侧纯逻辑:未保存缓冲区
550
550
  pnpm test:ask-dialog # 「问 DSH」对话框的接线:没有产物/构建链了、宿主 4 条 ask 路由、扩展只上报编辑器状态、授权四条、桥的安全不变式
551
551
  pnpm test:launcher-routes # launcher 的 HTTP 面(起真进程,较慢)
552
552
  pnpm test:workspace-switch # 切工作区不重启进程
553
- pnpm test:workspace-cwd # "当前工作区目录"解析:DSH 0.1.6-alpha.2(sessionId)与旧版(current)两套形状
553
+ pnpm test:workspace-cwd # "当前工作区目录"解析:alpha 线(≥0.1.6-alpha.2,sessionId)与 rc 线(≤0.1.5-rc.3,current)两套形状
554
554
  pnpm test:client-cwd # 同一件事但直接对**客户端入口** lib/client.js 验(注册出来的 body 真发不发 cwd、URL 带不带 folder)
555
555
  pnpm test:client-tabs # "DSH 侧只留一个 code-server 标签页":新标签挂载时收掉同窗格旧标签(跨窗格/不可见时不动)
556
556
  pnpm test:client-entry # 客户端入口守卫:经典脚本+工厂包装、require 白名单(= DSH 模块表种子词)、src/ 已消失、与 lib/claim-types.js 逐字一致
557
557
  pnpm test:ask-panel # 「问 DSH」对话框面板(0.3.59 起手写):注入机制已下线、视图白名单、注入 CSS 的选择器/var() 安全、六种条目与授权卡片、三条消息落点、拿不到官方部件时的降级
558
- pnpm test:client-seat # 设置卡住哪个座位:插件页 plugins.bundle.config(DSH ≥ 0.1.6-alpha.2)vs settings.plugin.item(≤ alpha.1;新版已退役)
558
+ pnpm test:client-seat # 设置卡住哪个座位:alpha 线用插件页 plugins.bundle.config(≥ 0.1.6-alpha.2)vs rc 线用 settings.plugin.item(≤ 0.1.5-rc.3;alpha 线已退役)
559
559
  pnpm test:fullscreen # 打开标签即全屏
560
560
  pnpm test:vendored # 重打包表 ↔ 插件依赖表一致(无 npm: 别名 / 无聚合包 / vendored.json 进了 files)
561
561
  pnpm test:dsh-resolve # 部署位置表:各平台全局装布局(npm --prefix / nvm / pnpm global / %APPDATA%)都能找到 DSH 部署
@@ -1019,8 +1019,8 @@ host 探测顺序:`@jinsiyu/dshcs-vscode-server/vscode`(**0.2.0+ 正式布局**)
1019
1019
 
1020
1020
  | DSH | 座位 | 长什么样 |
1021
1021
  |---|---|---|
1022
- | **≥ 0.1.6-alpha.2** | `plugins.bundle.config`,**键 = 包名** `dsh-code-server-app` | 插件页 → 找到 `dsh-code-server-app` → 打开该插件页面,设置区在**描述与各行之间**(页面自己画标题/图标/面包屑,我们只出表单 + 保存控件) |
1023
- | ≤ 0.1.6-alpha.1 | `settings.plugin.item`(key `code-server`) | 设置 → 插件 → Code Server 的自绘可折叠卡片(该插槽在新版**已退役**) |
1022
+ | **alpha 线 ≥ 0.1.6-alpha.2**(最新 0.1.7-alpha.1) | `plugins.bundle.config`,**键 = 包名** `dsh-code-server-app` | 插件页 → 找到 `dsh-code-server-app` → 打开该插件页面,设置区在**描述与各行之间**(页面自己画标题/图标/面包屑,我们只出表单 + 保存控件) |
1023
+ | **rc 线 ≤ 0.1.5-rc.3**(最新 rc 仍是这一支) | `settings.plugin.item`(key `code-server`) | 设置 → 插件 → Code Server 的自绘可折叠卡片(该插槽在新版**已退役**) |
1024
1024
 
1025
1025
  > 为什么必须跟着搬:上游 agent note《插件页上的插件配置》把配置从设置页搬到插件页,并**删掉了
1026
1026
  > `settings.plugin.item`**;插件页只在 `ledger.bundles.has(包名)` 时才渲染那块区域 —— 键写错或还用旧座位,
@@ -1215,6 +1215,7 @@ FIM(Beta)端点,提示词形态由其官方文档与本机实测确定)。标准
1215
1215
  `loopback` 模式跨源,`sandbox` 作为真防护保留。
1216
1216
  - **跨会话单实例**:host 级共享一份 IDE;切换 cwd 只换 workbench 目录(0.2.12 起不重启进程,旧目录的后台终端不会被收走)。
1217
1217
  - **旧版 DSH 不受支持(0.2.3 起)**:没有 `sidebarRightTabs`/`sidebarRight` 的 DSH 上,除设置页一条升级提示外无任何入口;
1218
+ 支持范围**只有两条线**(2026-09-22 收敛):rc 线 `0.1.5-rc.x`(旧座位 + 快照上的 `current`)与 alpha 线 `≥ 0.1.6-alpha.2`(新座位 + `sessionId` 标准 prop);更早的 alpha(`0.1.5-alpha.x`、`0.1.6-alpha.1`)**不单独支持** —— 形状与 rc 线相同,所以代码走得通,但不作为验证目标。
1218
1219
  旧版用户请留在 `0.2.2`(`dsh plugin --profile web add dsh-code-server-app@0.2.2`)。
1219
1220
  - **侧栏标签切换**(0.2.2 起不再重载):DSH 右侧栏只渲染当前激活标签的 body,React 卸载会移走 iframe;
1220
1221
  插件把 iframe 收成单例常驻面,用 `Element.moveBefore()`(状态保持型原子移动)在停靠位与文档级停放区之间搬,
package/lib/client.js CHANGED
@@ -14,6 +14,14 @@
14
14
  * ④ 各段落原来的顶层标识符现在共享同一作用域 —— 新增顶层名字时先搜一遍别撞名
15
15
  * (var/function 撞名是**静默覆盖**,不会报错)。
16
16
  *
17
+ * DSH 支持范围(2026-09-22 收敛;判据一律是**能力是否被声明**,不做版本号比较):
18
+ * · rc 线 0.1.5-rc.x(最新 0.1.5-rc.3 = npm latest/next)
19
+ * 旧座位 `settings.plugin.item` + 会话列表快照上的 `current`
20
+ * · alpha 线 ≥ 0.1.6-alpha.2(最新 0.1.7-alpha.1)
21
+ * 新座位 `plugins.bundle.config` + 会话作用域标准 prop `sessionId`
22
+ * 更早的 alpha(0.1.5-alpha.x、0.1.6-alpha.1)形状与 rc 线相同 —— 代码天然走得通,但**不作为目标**,
23
+ * 也不为它们写任何专门分支。本文件里凡出现"哪一版"的说法,都按这两条线命名。
24
+ *
17
25
  * 段落(按依赖顺序):地址语法 → 工作区解析 → 常驻面 → 全屏动作 → 认领类型(与 lib/claim-types.js
18
26
  * 同源的一致性副本)→ 插件主体。
19
27
  */
@@ -126,9 +134,9 @@ function resolveFilePath(parsed, cwd) {
126
134
  // —— 解析"当前工作区目录"(决定 workbench 用哪个 `?folder=` 打开)
127
135
  //
128
136
  // 为什么单独成模块:这段逻辑的真实输入是 **DSH 客户端 store 的形状**,而它随 DSH 版本变过 ——
129
- // · DSH ≤ 0.1.6-alpha.1:`SessionListState` 带 `current`(选中的会话 id 就挂在会话列表快照上,
137
+ // · rc 线(≤ 0.1.5-rc.3,最新 rc 仍是这样):`SessionListState` 带 `current`(选中的会话 id 挂在快照上,
130
138
  // 老写法 `useSessions(s => s).current` 即"当前会话");
131
- // · DSH ≥ 0.1.6-alpha.2:`current` 被移出列表 store(上游 refactor 的注释:view selection remains
139
+ // · alpha 线(≥ 0.1.6-alpha.2,含最新 0.1.7-alpha.1):`current` 被移出列表 store(上游 refactor 注释:view selection remains
132
140
  // outside the Controller;快照只剩 `{ ids, byId, phase, subagentsByParent, jobsBySession }`),
133
141
  // 会话作用域插槽改为用标准 prop `sessionId` 告诉 body"你是哪个会话的" —— 官方自己的右侧栏标签
134
142
  // 就是这么读 cwd 的(ui-deliverables 的 ReviewTab:`useSessions(s => s.byId[sessionId]?.cwd)`)。
@@ -149,7 +157,7 @@ function cwdOf(sessions, sessionId) {
149
157
  return typeof row.cwd === 'string' && row.cwd !== '' ? row.cwd : undefined
150
158
  }
151
159
 
152
- /** 工作区表里"包含该会话"的那个工作区的路径(DSH ≤ 0.1.6-alpha.1 的 currentAddress 语义由它兜底)。 */
160
+ /** 工作区表里"包含该会话"的那个工作区的路径(rc 线的 currentAddress 语义由它兜底)。 */
153
161
  function pathHoldingSession(workspaces, sessionId) {
154
162
  if (workspaces == null || !Array.isArray(workspaces.items)) return undefined
155
163
  if (typeof sessionId !== 'string' || sessionId === '') return undefined
@@ -763,7 +771,7 @@ function intersects(list, group) {
763
771
  // 数据通道:同源 fetch DSH Connection 的共享 /api(status / start / stop / setup / open-file / ui-mode;
764
772
  // web 走 webServer 的 /api 前缀,desktop 走 IPC 帧管道 → 插件不依赖 webServer)。
765
773
  //
766
- // UI 载体只有右侧栏标签(需要 sidebarRightTabs / sidebarRight 服务,DSH ≥ 0.1.5-alpha.1):
774
+ // UI 载体只有右侧栏标签(需要 sidebarRightTabs / sidebarRight 服务;rc 线与 alpha 线都有):
767
775
  // 一段 ctx.sidebarRightTabs.register({ id, kind, priority, patterns, canOpen, title, guide })
768
776
  // → guide 页入口框;并通过 patterns 认领 `dsh-resource://file/**` 文件地址,成为官方 openFile
769
777
  // (产物 chip / "交付"卡片预览 / 正文提及)与任何 openResource(fileAddress) 的落点。
@@ -816,8 +824,8 @@ let React = require('react')
816
824
  }
817
825
 
818
826
  // ---------- 标准 prop 里的会话/工作区快照 ----------
819
- // 取哪条路、退到哪条路**全在本文件的工作区解析段**(纯函数):DSH ≤ 0.1.6-alpha.1 的
820
- // `SessionListState.current` 在 0.1.6-alpha.2 被移出列表 store,会话作用域插槽改用标准 prop
827
+ // 取哪条路、退到哪条路**全在本文件的工作区解析段**(纯函数):rc 线(≤ 0.1.5-rc.3)的
828
+ // `SessionListState.current` 在 alpha 线(≥ 0.1.6-alpha.2)被移出列表 store,会话作用域插槽改用标准 prop
821
829
  // `sessionId` 标识当前会话 —— 只认旧形状会让 cwd 静默变成 undefined(IDE 以空工作区启动)。
822
830
  /** 服务缺失时的占位选择器:**hook 调用次数必须恒定**(React 按位置对账),
823
831
  * 否则"服务晚到"的那一次渲染会抛 "Rendered more hooks than during the previous render"。 */
@@ -958,7 +966,7 @@ let React = require('react')
958
966
  document.head.appendChild(tag)
959
967
  }
960
968
 
961
- // ---------- 右侧栏标签(DSH ≥ 0.1.5-alpha.1:ctx.sidebarRightTabs / ctx.sidebarRight) ----------
969
+ // ---------- 右侧栏标签(rc 线与 alpha 线都有:ctx.sidebarRightTabs / ctx.sidebarRight) ----------
962
970
  // 二段式注册:类型定义进 sidebarRightTabs,body 进 keyed 插槽 sidebar.right.pane.tab。
963
971
  // 服务始终不就绪(旧版 DSH)→ 判定 legacy:只留设置页提示(见 internalApply)。
964
972
  var CS_KIND = 'code-server'
@@ -1069,7 +1077,7 @@ let React = require('react')
1069
1077
  var navigation = tab.navigation
1070
1078
  var revision = navigation != null && typeof navigation.revision === 'number' ? navigation.revision : 0
1071
1079
  // 地址:文件 tab 可能来自会话树里的别的会话,故优先用地址里的 sessionId 对齐工作区;
1072
- // 页面 tab 用**会话作用域标准 prop** `sessionId`(DSH ≥ 0.1.6-alpha.2 的当前会话信源,
1080
+ // 页面 tab 用**会话作用域标准 prop** `sessionId`(alpha 线 ≥ 0.1.6-alpha.2 的当前会话信源,
1073
1081
  // 老版的 `useSessions().current` 已被上游移除 —— 详见本文件的工作区解析段)。
1074
1082
  var address = navigation != null && typeof navigation.address === 'string' ? navigation.address : ''
1075
1083
  var parsed = isPageAddress(address) ? null : parseFileAddress(address)
@@ -1248,9 +1256,9 @@ let React = require('react')
1248
1256
  // ---------- 设置(参照 auto-open-web 的自绘卡片模式) ----------
1249
1257
  // 数据通道:settingsScope(官方 settings 域,命名空间 code-server)—— 两个座位共用。
1250
1258
  // 座位(0.3.50 起两条腿都注册,谁被声明谁生效):
1251
- // · `plugins.bundle.config`(DSH ≥ 0.1.6-alpha.2):插件页按**包名**派发的配置区,页面自带
1259
+ // · `plugins.bundle.config`(alpha 线 ≥ 0.1.6-alpha.2,含最新 0.1.7-alpha.1):插件页按**包名**派发的配置区,页面自带
1252
1260
  // 标题/面包屑,我们只出表单 + 保存控件(seat='bundle-config');
1253
- // · `settings.plugin.item`(DSH ≤ 0.1.6-alpha.1):设置页里自绘的可折叠卡片(已在新版退役)。
1261
+ // · `settings.plugin.item`(rc 线 ≤ 0.1.5-rc.3,最新 rc 仍在用):设置页里自绘的可折叠卡片(alpha 线已退役)。
1254
1262
  var CARD_CSS =
1255
1263
  '.dshcs-card{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-3);border-radius:12px;list-style:none;transition:border-color .16s,background .16s}' +
1256
1264
  '.dshcs-card:hover{border-color:var(--dsw-alias-label-dimmed,var(--dsw-alias-border-l2))}' +
@@ -1468,7 +1476,7 @@ let React = require('react')
1468
1476
  React.createElement('div', { className: 'dshcs-hint', style: { marginTop: 0 } },
1469
1477
  '未检测到右侧栏插件服务 sidebarRightTabs / sidebarRight,因此插件不提供任何入口'
1470
1478
  + '(旧版的悬浮球与浮动窗口已移除),也不会后台启动 IDE。'
1471
- + '\n升级 DSH 到带右侧栏的版本(≥ 0.1.5-alpha.1)后,Code Server 会出现在右侧栏标签里,'
1479
+ + '\n升级 DSH 到 rc 线(0.1.5-rc.x)或 0.1.6-alpha.2 起的 alpha 线后,Code Server 会出现在右侧栏标签里,'
1472
1480
  + '本页同时显示完整设置项;升级后无需重装本插件,刷新页面即可。'
1473
1481
  )
1474
1482
  )
@@ -1724,7 +1732,7 @@ let React = require('react')
1724
1732
  : '当前浏览器不支持 Element.moveBefore(Chromium <133)→ 常驻不可用,切标签仍会整页重载(升级浏览器后自动生效)')
1725
1733
  )
1726
1734
  ]
1727
- // ---- 插件页的配置区(DSH ≥ 0.1.6-alpha.2)----
1735
+ // ---- 插件页的配置区(alpha 线 ≥ 0.1.6-alpha.2)----
1728
1736
  // 上游把插件设置从"设置 → 插件"搬到**插件页**:页面自己画标题/图标/面包屑,把
1729
1737
  // `plugins.bundle.config`(按包名为键)渲染在描述与行之间,只问 `view: 'page'`。
1730
1738
  // 所以这里不再套可折叠卡片(标题会与页面标题重复),只出表单 + 自己的保存控件
@@ -1751,7 +1759,7 @@ let React = require('react')
1751
1759
  }
1752
1760
  return React.createElement(csCard, {
1753
1761
  title: 'Code Server',
1754
- description: '入口:右侧栏标签(DSH ≥ 0.1.5-alpha.1);认领类型决定哪些文件交给 Code Server 打开',
1762
+ description: '入口:右侧栏标签(需 DSH 带 sidebarRight/sidebarRightTabs,即 rc 线或 0.1.6-alpha.2 起的 alpha 线);认领类型决定哪些文件交给 Code Server 打开',
1755
1763
  state: state,
1756
1764
  unsavedLabel: '未保存', readOnlyLabel: '本部署的设置为只读。',
1757
1765
  saveFailedLabel: '本部署没有接受这些值,已保留供你修改。',
@@ -2859,21 +2867,21 @@ let React = require('react')
2859
2867
  }).catch(function () { /* 首次失败由后续轮询补救 */ })
2860
2868
 
2861
2869
  // ---- 设置:两条腿都注册,谁被声明谁生效(两次注册不会同时出现) ----
2862
- // ① 插件页的配置区(DSH ≥ 0.1.6-alpha.2):`settings.plugin.item` 退役,上游把插件配置搬到
2870
+ // ① 插件页的配置区(alpha 线 ≥ 0.1.6-alpha.2,含最新 0.1.7-alpha.1):`settings.plugin.item` 退役,上游把插件配置搬到
2863
2871
  // 插件页 —— 键是**包名**(页面按 `pkg.name` 派发),只问 `view: 'page'`。插件页只在
2864
2872
  // `ledger.bundles.has(包名)` 时才渲染那一块,所以键写错就等于"设置又不见了"。
2865
2873
  slots.inject('plugins.bundle.config', () => slots.register(
2866
2874
  { name: 'plugins.bundle.config', key: PKG_NAME, inject: function () { return { scope: scope } } },
2867
2875
  BundleConfigEntry
2868
2876
  ))
2869
- // ② 设置页里的插件卡片(DSH ≤ 0.1.6-alpha.1;也是极旧 DSH 里唯一的提示出口)。
2877
+ // ② 设置页里的插件卡片(rc 线 ≤ 0.1.5-rc.3,最新 rc 仍在用;也是没有右侧栏服务的旧 DSH 里唯一的提示出口)。
2870
2878
  // `slots.inject` 只在插槽真被声明时才回调 ⇒ 新 DSH 上这一条自然不生效。
2871
2879
  slots.inject('settings.plugin.item', () => slots.register(
2872
2880
  { name: 'settings.plugin.item', key: 'code-server', label: 'Code Server', inject: function () { return { scope: scope } } },
2873
2881
  csSettingsPage
2874
2882
  ))
2875
2883
 
2876
- // ---- 能力探测:只有带右侧栏服务(DSH ≥ 0.1.5-alpha.1)才注册可用 UI;探测不到就只留设置页提示 ----
2884
+ // ---- 能力探测:只有带右侧栏服务(sidebarRightTabs/sidebarRight;rc 线与 alpha 线都有)才注册可用 UI;探测不到就只留设置页提示 ----
2877
2885
  var modernSettled = false
2878
2886
 
2879
2887
  function onModernUi(sctx, via) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-code-server-app",
3
- "version": "0.3.63",
3
+ "version": "0.3.65",
4
4
  "description": "VS Code (from a code-server release) inside DSH: a right-sidebar tab driven by the plugin's own launcher over the in-process VS Code server (lib/launcher.mjs), plus an editor bridge (assets/extensions/dshcs-editor-bridge) that gives the agent what only the editor knows (unsaved buffers, language-server diagnostics, the active selection) and lets editor gestures drive the session. The bridge is completely read-only: all four of its routes (/health, /sync, /old, /event) are reads. Asking DSH from the editor opens a floating dialog inside the DSH page (draggable, resizable, bottom-right): the plugin's client half sends the question as user input (POST /api/code-server/ask/send) and renders that session's new content with DSH's own Markdown renderer - the same @deepseek-ai/dsh-client-ui-primitives instance the UI uses, required from the page's module table, so typography, highlighting and math match the interface and a renderer version mismatch is impossible. Thinking appears as collapsed rows and approval requests (writing outside the workspace / running commands) can be answered in place: whole-plugin write route POST /api/code-server/ask/approve, constrained to pending in-process requests and the outcomes allowed-once/rejected; dialog-first for 5 minutes, handed back to the official card the moment the dialog closes, never auto-approved. There is no build step anywhere: lib/client.js (client half including the dialog panel) and the extension are committed hand-written source, devDependencies holds a single test-only entry, and the published package carries no frontend bundle. Also: the tab claims DSH file addresses (dsh-resource://file/**) by file type (setting claimExtensions), so produced-file chips, delivered-file previews and inline prose mentions open in the workbench; the IDE is a resident surface moved with Element.moveBefore instead of being remounted, so switching sidebar tabs does not reload it; opening the tab switches the right sidebar to fullscreen by default (setting fullscreenOnOpen); a workspace switch re-navigates the workbench with the new ?folder= without restarting the IDE process. Requires a DSH with the right-sidebar services (sidebarRightTabs/sidebarRight, >= 0.1.5-alpha.1); older DSH versions only get an upgrade notice on the settings page. Two serving modes: loopback port (default) or same-origin mount on DSH's own webServer (/code-server, protected by ctx.connection.requestRejection). The diff the bridge opens always has the real pre-write text on the left, taken from result.value.before in tools/post-execute into a bounded snapshot cache and fetched by opaque key over the read-only GET /old, so files that are not open in the editor work too. No code-server Node layer, no argon2, no C++ toolchain.",
5
5
  "homepage": "https://github.com/jinsiyu/dsh-code-server-app",
6
6
  "repository": {
@@ -3,7 +3,7 @@
3
3
  "vscodeVersion": "1.138.0",
4
4
  "productPath": "stable-59c988c744a240b05b039f57b856a5312f19d5b1",
5
5
  "layout": "vscode-only",
6
- "preparedAt": "2026-09-22T02:29:14.118Z",
6
+ "preparedAt": "2026-09-22T09:29:00.445Z",
7
7
  "source": "registry",
8
8
  "node": "v24.20.0",
9
9
  "platform": "linux",