dsh-code-server-app 0.3.49 → 0.3.51

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
@@ -85,10 +85,20 @@ This plugin registers:
85
85
  - `*` — claim every other type too (catch-all);
86
86
  - `py` — claim `.py`;
87
87
  - `!md` — do **not** claim `.md` (**exclusion wins** over both an explicit claim and `*`);
88
- - **default** `*;!md;!markdown;!html;!htm;!png;!jpg;!jpeg;!gif;!webp;!bmp;!ico;!svg;!pdf`
89
- — the four categories DSH's own preview renders well (markdown / html / images / PDF) stay with it, everything
90
- else (code, json/yaml, txt, logs, extension-less files such as `Makefile`, unknown extensions) goes to the IDE;
88
+ - **default (since 0.3.51)** excludes three groups:
89
+ ① the four categories DSH's own preview renders well — `md markdown html htm png jpg jpeg gif webp bmp ico svg pdf`;
90
+ ② **executables and binary artifacts** — `exe com msi msix msixbundle appx appxbundle dll sys scr cpl ocx drv efi mui`,
91
+ `obj o a lib pdb class jar pyc pyo wasm node`, `so dylib ko elf bin out`, `apk ipa deb rpm dmg iso img cab`;
92
+ ③ **Office and layout documents** — `doc docx docm dot dotx dotm docb rtf odt`, `xls xlsx xlsm xlsb xlt xltx xltm xla xlam ods`,
93
+ `ppt pptx pptm pot potx potm pps ppsx ppam odp`, `vsd vsdx vssx vstx vsdm vssm vstm one onetoc2 mpt mpp pub msg xps oxps odg`.
94
+ Everything else (code, json/yaml, txt, logs, extension-less files such as `Makefile`, unknown extensions) goes to the IDE;
91
95
  an empty box claims no files at all (page tabs only).
96
+ - **The test is "does an editor make sense here", not "can it be executed"**: text-shaped scripts
97
+ (`bat` `cmd` `ps1` `sh` `py` `js`…) and `csv` / `tsv` **still go to the IDE**.
98
+ - **To re-enable a group**: put the short whitelist `*;!md;!markdown;!html;!htm;!png;!jpg;!jpeg;!gif;!webp;!bmp;!ico;!svg;!pdf`
99
+ back into the box (Office and executables return to the IDE, the preview-friendly ones stay with DSH).
100
+ - The three lists are exported constants (`PREVIEW_FRIENDLY_EXTENSIONS` / `EXECUTABLE_EXTENSIONS` / `OFFICE_EXTENSIONS`);
101
+ the default is their union, and the card's "actual rule" summary names "executables, Office documents".
92
102
  - Three practical shapes: a plain whitelist (`py;ts`, no `*` → nothing else is claimed), catch-all (`*`),
93
103
  and catch-all plus exclusions (the default).
94
104
  - Grammar, default and parsing all live in `lib/claim-types.js` (the host's `Config` default and the client's
@@ -884,7 +894,7 @@ persisted via the official settings domain (`settingsScope`, namespace `code-ser
884
894
 
885
895
  | Key | Default | Description |
886
896
  |---|---|---|
887
- | `claimExtensions` | `*;!md;!markdown;!html;!htm;!png;!jpg;!jpeg;!gif;!webp;!bmp;!ico;!svg;!pdf` | **Claim types** (0.2.11, replaces 0.2.5's `fileOpenScope`): decides by extension which files go to VS Code, semicolon-separated; `*` claims every other type, `!ext` excludes (exclusion wins). The default leaves the four categories DSH's preview renders well (markdown/html/images/PDF) to DSH and sends everything else to the IDE; an empty value claims nothing. **Scope (session vs absolute) is no longer distinguished** |
897
+ | `claimExtensions` | `*` + three exclusion groups (preview-friendly / executables / Office; full lists in the "Claim types" section) | **Claim types** (0.2.11, replaces 0.2.5's `fileOpenScope`): decides by extension which files go to VS Code, semicolon-separated; `*` claims every other type, `!ext` excludes (exclusion wins). The default leaves the four categories DSH's preview renders well (markdown/html/images/PDF) to DSH and sends everything else to the IDE; an empty value claims nothing. **Scope (session vs absolute) is no longer distinguished** |
888
898
  | `fullscreenOnOpen` | `true` | **Fullscreen on open** (0.2.9): opening the Code Server tab (including clicking a file) switches the right sidebar to fullscreen (fills the window); off keeps DSH's default push mode (side by side with the conversation). Only the moment of opening is affected — a manual "Exit fullscreen" is never fought back |
889
899
  | `keepResident` | `true` | **Resident in background**: on, the host preloads the IDE into a parked surface right after start — switching tabs or collapsing the sidebar never reloads it and the first open needs no cold start; off loads it only when the panel is opened (saves memory) |
890
900
 
package/README.md CHANGED
@@ -96,9 +96,19 @@ DSH 用**资源地址**命名文件,`openFile` 只负责把地址交给右侧栏
96
96
  - `*` = 其余类型也认领(兜底);
97
97
  - `py` = 认领 `.py`;
98
98
  - `!md` = 不认领 `.md`(**排除优先**于认领与 `*`);
99
- - **默认** `*;!md;!markdown;!html;!htm;!png;!jpg;!jpeg;!gif;!webp;!bmp;!ico;!svg;!pdf`
100
- = DSH 自带预览渲染得好的四类(markdown / html / 图片 / PDF)留给它,其余(代码、json/yaml、txt、日志、
101
- 无扩展名如 `Makefile`、未知扩展名)都进 IDE;清空文本框 = 不认领任何文件(只保留页面 tab)。
99
+ - **默认(0.3.51 起)** 排除三组:
100
+ ① DSH 预览渲染得好的四类 —— `md markdown html htm png jpg jpeg gif webp bmp ico svg pdf`;
101
+ ② **可执行文件与二进制产物** —— `exe com msi msix msixbundle appx appxbundle dll sys scr cpl ocx drv efi mui`、
102
+ `obj o a lib pdb class jar pyc pyo wasm node`、`so dylib ko elf bin out`、`apk ipa deb rpm dmg iso img cab`;
103
+ ③ **Office 与版式文档** —— `doc docx docm dot dotx dotm docb rtf odt`、`xls xlsx xlsm xlsb xlt xltx xltm xla xlam ods`、
104
+ `ppt pptx pptm pot potx potm pps ppsx ppam odp`、`vsd vsdx vssx vstx vsdm vssm vstm one onetoc2 mpt mpp pub msg xps oxps odg`。
105
+ 其余(代码、json/yaml、txt、日志、无扩展名如 `Makefile`、未知扩展名)都进 IDE;清空文本框 = 不认领任何文件(只保留页面 tab)。
106
+ - **判据是"进编辑器有没有意义",不是"能不能被执行"**:文本形态的脚本(`bat` `cmd` `ps1` `sh` `py` `js`…)
107
+ 与 `csv` / `tsv` **仍然进 IDE** —— 它们是可编辑的文本。
108
+ - **想放开某一组**:把文本框换回短白名单 `*;!md;!markdown;!html;!htm;!png;!jpg;!jpeg;!gif;!webp;!bmp;!ico;!svg;!pdf`
109
+ 即可(Office 与可执行文件重新进 IDE,预览友好那几类仍留给 DSH)。
110
+ - 三组清单是导出的常量(`PREVIEW_FRIENDLY_EXTENSIONS` / `EXECUTABLE_EXTENSIONS` / `OFFICE_EXTENSIONS`),
111
+ 默认值就是它们的并集;设置卡里的「实际规则」摘要会点名"含可执行文件、Office 文档"。
102
112
  - 三种实际形态:纯白名单(`py;ts`,无 `*` → 其余不认领)、兜底(`*`)、兜底加排除(默认)。
103
113
  - 语法、默认值与解析都在 `lib/claim-types.js`(host 的 `Config` 默认值与客户端 `canOpen` 共用同一份,
104
114
  随包发布,不会两边漂移);单测 `scripts/test-claim-types.mjs`。
@@ -464,6 +474,7 @@ pnpm test:launcher-routes # launcher 的 HTTP 面(起真进程,较慢)
464
474
  pnpm test:workspace-switch # 切工作区不重启进程
465
475
  pnpm test:workspace-cwd # "当前工作区目录"解析:DSH 0.1.6-alpha.2(sessionId)与旧版(current)两套形状
466
476
  pnpm test:client-cwd # 同一件事但直接对**构建产物** lib/client.js 验(注册出来的 body 真发不发 cwd、URL 带不带 folder;先跑 build:client)
477
+ pnpm test:client-seat # 设置卡住哪个座位:插件页 plugins.bundle.config(DSH ≥ 0.1.6-alpha.2)vs settings.plugin.item(≤ alpha.1;新版已退役)
467
478
  pnpm test:fullscreen # 打开标签即全屏
468
479
  pnpm test:vendored # 重打包表 ↔ 插件依赖表一致(无 npm: 别名 / 无聚合包 / vendored.json 进了 files)
469
480
  pnpm test:dsh-resolve # 部署位置表:各平台全局装布局(npm --prefix / nvm / pnpm global / %APPDATA%)都能找到 DSH 部署
@@ -864,14 +875,24 @@ host 探测顺序:`@jinsiyu/dshcs-vscode-server/vscode`(**0.2.0+ 正式布局**)
864
875
  插件包内 `vendor/vscode` > 插件包内 `vendor/code-server`(开发期)。旧安装根
865
876
  `<profile>\.code-server-app` 只在启动日志里提示可删除,不再被使用。
866
877
 
867
- ## 设置卡片(设置 → 插件 → Code Server)
878
+ ## 设置卡片(0.3.50 起:插件页;更早:设置 → 插件 → Code Server)
879
+
880
+ **位置随 DSH 版本而变**(两条腿都注册,谁被声明谁生效,不会出现两份):
881
+
882
+ | DSH | 座位 | 长什么样 |
883
+ |---|---|---|
884
+ | **≥ 0.1.6-alpha.2** | `plugins.bundle.config`,**键 = 包名** `dsh-code-server-app` | 插件页 → 找到 `dsh-code-server-app` → 打开该插件页面,设置区在**描述与各行之间**(页面自己画标题/图标/面包屑,我们只出表单 + 保存控件) |
885
+ | ≤ 0.1.6-alpha.1 | `settings.plugin.item`(key `code-server`) | 设置 → 插件 → Code Server 的自绘可折叠卡片(该插槽在新版**已退役**) |
886
+
887
+ > 为什么必须跟着搬:上游 agent note《插件页上的插件配置》把配置从设置页搬到插件页,并**删掉了
888
+ > `settings.plugin.item`**;插件页只在 `ledger.bundles.has(包名)` 时才渲染那块区域 —— 键写错或还用旧座位,
889
+ > 表现是**设置卡静默消失**(无报错、无日志)。回归:`pnpm test:client-seat`(对构建产物验两个座位与两种视图)。
868
890
 
869
- 参照 dsh-auto-open-web 的自绘卡片模式,注册在 `settings.plugin.item` 插槽,
870
891
  数据经官方 settings 域(`settingsScope`,命名空间 `code-server`)持久化到官方 settings 文档:
871
892
 
872
893
  | 键 | 默认 | 说明 |
873
894
  |---|---|---|
874
- | `claimExtensions` | `*;!md;!markdown;!html;!htm;!png;!jpg;!jpeg;!gif;!webp;!bmp;!ico;!svg;!pdf` | **认领类型**(0.2.11,取代 0.2.5 的 `fileOpenScope`):按扩展名决定哪些文件交给 VS Code,分号分隔;`*` = 其余类型也认领,`!ext` = 不认领(排除优先)。默认把 DSH 预览渲染得好的四类(markdown/html/图片/PDF)留给它,其余全进 IDE;清空 = 不认领任何文件。**不再区分 session/absolute 作用域** |
895
+ | `claimExtensions` | `*` + 三组排除(预览友好 / 可执行文件 / Office 文档;完整清单见「认领类型」一节) | **认领类型**(0.2.11,取代 0.2.5 的 `fileOpenScope`):按扩展名决定哪些文件交给 VS Code,分号分隔;`*` = 其余类型也认领,`!ext` = 不认领(排除优先)。默认把 DSH 预览渲染得好的四类(markdown/html/图片/PDF)**以及可执行文件(0.3.51)与 Office 文档(0.3.51)**留给 DSH,其余全进 IDE;清空 = 不认领任何文件。**不再区分 session/absolute 作用域** |
875
896
  | `fullscreenOnOpen` | `true` | **打开即全屏**(0.2.9):打开 Code Server 标签(含点开文件)时自动把右侧栏切到全屏(铺满窗口);关闭则保持 DSH 默认的 push(与对话并排)。只影响打开那一刻,用户点「退出全屏」不会被抢回去 |
876
897
  | `keepResident` | `true` | **后台常驻**:开启后宿主启动即把 IDE 预加载到"停放区",切标签/收起侧栏不重载、首次打开免等待;关闭则只在打开面板时加载(省内存) |
877
898
 
@@ -12,7 +12,7 @@
12
12
  | react | 18.3.1 | MIT |
13
13
  | react-dom | 18.3.1 | MIT |
14
14
 
15
- 生成时间:2026-09-17T16:48:16.348Z
15
+ 生成时间:2026-09-18T11:22:52.142Z
16
16
  渲染器:@deepseek-ai/dsh-client-ui-primitives@0.1.6-alpha.1(DSH 部署的界面版本:未知)
17
17
  设计令牌:@deepseek-ai/dsh-client-ui-theme@0.1.6-alpha.1(11 段)
18
18
  KaTeX:已打包(公式排版与 DSH 界面一致)
@@ -18,11 +18,61 @@
18
18
  */
19
19
 
20
20
  /**
21
- * 默认策略:**DSH 自带预览渲染得好的类型留给它**(markdown / html / 图片 / PDF 四类),
22
- * 其余(代码、json/yaml/toml、txt、日志、无扩展名、其它未知扩展名)全部进 IDE。
23
- * 未认领的类型没有"没渲染器"的风险(DSH 预览对任何扩展名都有兜底),反之未知扩展名进 IDE 更实用。
21
+ * 默认策略(0.3.51 起三组):
22
+ * ① **DSH 自带预览渲染得好的类型留给它**(markdown / html / 图片 / PDF);
23
+ * ② **可执行文件与二进制产物不认领**(用户 2026-09-18 要求):它们不是文本,进编辑器只会看到
24
+ * "二进制/乱码",没有编辑价值;
25
+ * ③ **Office / 版式文档不认领**(同一要求):都是 zip/OLE 二进制容器,同理。
26
+ * 其余(代码、json/yaml/toml、txt、日志、无扩展名、其它未知扩展名)仍全部进 IDE —— 未认领的类型
27
+ * 没有"没渲染器"的风险(DSH 预览对任何扩展名都有兜底),反之未知扩展名进 IDE 更实用。
28
+ *
29
+ * 想放开某一组(例如仍希望 Office 文档进 IDE):把设置卡的「认领类型」改回
30
+ * `*;!md;!markdown;!html;!htm;!png;!jpg;!jpeg;!gif;!webp;!bmp;!ico;!svg;!pdf` 即可。
24
31
  */
25
- export const DEFAULT_CLAIM_EXTENSIONS = '*;!md;!markdown;!html;!htm;!png;!jpg;!jpeg;!gif;!webp;!bmp;!ico;!svg;!pdf'
32
+
33
+ /** ① 预览友好的类型(DSH 自带预览比"进 IDE 当文本看"更好)。 */
34
+ export const PREVIEW_FRIENDLY_EXTENSIONS = [
35
+ 'md', 'markdown', 'html', 'htm', 'png', 'jpg', 'jpeg', 'gif', 'webp', 'bmp', 'ico', 'svg', 'pdf',
36
+ ]
37
+
38
+ /**
39
+ * ② 可执行文件与二进制产物。
40
+ * **文本形态的脚本刻意不在其中**(bat/cmd/ps1/sh/py/js…):它们是可编辑的文本,继续进 IDE。
41
+ * 判据统一是"进编辑器有没有意义",而不是"能不能被执行"。
42
+ */
43
+ export const EXECUTABLE_EXTENSIONS = [
44
+ // Windows:可执行程序 / 安装包 / 系统与驱动组件
45
+ 'exe', 'com', 'msi', 'msix', 'msixbundle', 'appx', 'appxbundle', 'dll', 'sys', 'scr', 'cpl', 'ocx', 'drv', 'efi', 'mui',
46
+ // 编译与中间产物
47
+ 'obj', 'o', 'a', 'lib', 'pdb', 'class', 'jar', 'pyc', 'pyo', 'wasm', 'node',
48
+ // POSIX:动态库 / 可执行 / 内核模块
49
+ 'so', 'dylib', 'ko', 'elf', 'bin', 'out',
50
+ // 打包体(读不了也装不上)
51
+ 'apk', 'ipa', 'deb', 'rpm', 'dmg', 'iso', 'img', 'cab',
52
+ ]
53
+
54
+ /**
55
+ * ③ Office / 版式文档(zip / OLE 二进制容器)。
56
+ * `csv` / `tsv` **不在此列** —— 它们是纯文本,进 IDE 反而有用(只是 Excel 也能开)。
57
+ */
58
+ export const OFFICE_EXTENSIONS = [
59
+ // Word
60
+ 'doc', 'docx', 'docm', 'dot', 'dotx', 'dotm', 'docb', 'rtf', 'odt',
61
+ // Excel
62
+ 'xls', 'xlsx', 'xlsm', 'xlsb', 'xlt', 'xltx', 'xltm', 'xla', 'xlam', 'ods',
63
+ // PowerPoint
64
+ 'ppt', 'pptx', 'pptm', 'pot', 'potx', 'potm', 'pps', 'ppsx', 'ppam', 'odp',
65
+ // Visio / OneNote / Project / Publisher / 版式文档
66
+ 'vsd', 'vsdx', 'vssx', 'vstx', 'vsdm', 'vssm', 'vstm', 'one', 'onetoc2', 'mpt', 'mpp', 'pub', 'msg', 'xps', 'oxps', 'odg',
67
+ ]
68
+
69
+ /** 默认策略文本:`*` + 三组排除(同一份事实来源,host 的 Config 默认值与 client 的 canOpen 共用)。 */
70
+ export const DEFAULT_CLAIM_EXTENSIONS = ['*']
71
+ .concat(PREVIEW_FRIENDLY_EXTENSIONS)
72
+ .concat(EXECUTABLE_EXTENSIONS)
73
+ .concat(OFFICE_EXTENSIONS)
74
+ .map(function (token, index) { return index === 0 ? token : '!' + token })
75
+ .join(';')
26
76
 
27
77
  /** 分隔符:分号为主,逗号/空白/换行也接受(用户手抄时不该因为标点被坑)。 */
28
78
  const SEPARATORS = /[;,\s]+/
@@ -126,7 +176,22 @@ export function describeClaimPolicy(text) {
126
176
  var parts = []
127
177
  if (policy.all) parts.push('其余类型全部认领')
128
178
  if (policy.allow.length > 0) parts.push('指定认领 ' + policy.allow.length + ' 项')
129
- if (policy.deny.length > 0) parts.push('排除 ' + policy.deny.length + ' 项')
179
+ if (policy.deny.length > 0) {
180
+ // 把"排除了哪几组"说出来:默认值里可执行文件与 Office 各占几十项,只报总数看不出重点。
181
+ var groups = []
182
+ if (intersects(policy.deny, EXECUTABLE_EXTENSIONS)) groups.push('可执行文件')
183
+ if (intersects(policy.deny, OFFICE_EXTENSIONS)) groups.push('Office 文档')
184
+ parts.push('排除 ' + policy.deny.length + ' 项' + (groups.length > 0 ? '(含' + groups.join('、') + ')' : ''))
185
+ }
130
186
  if (parts.length === 0) return '不认领任何文件(只有页面标签)'
131
187
  return parts.join(' · ')
132
188
  }
189
+
190
+ /** 两个列表有没有交集(摘要用;两侧都可能很长,用 Set 查)。 */
191
+ function intersects(list, group) {
192
+ var set = new Set(group)
193
+ for (var i = 0; i < list.length; i += 1) {
194
+ if (set.has(list[i])) return true
195
+ }
196
+ return false
197
+ }
package/lib/client.js CHANGED
@@ -1,5 +1,5 @@
1
1
  window.__ModuleLoader__.load({id:'dsh-code-server-app',factory:function(require){var module={exports:{}};var exports=module.exports;
2
- var G=Object.defineProperty;var Ie=Object.getOwnPropertyDescriptor;var je=Object.getOwnPropertyNames;var De=Object.prototype.hasOwnProperty;var ze=(e,r)=>{for(var n in r)G(e,n,{get:r[n],enumerable:!0})},Pe=(e,r,n,t)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of je(r))!De.call(e,a)&&a!==n&&G(e,a,{get:()=>r[a],enumerable:!(t=Ie(r,a))||t.enumerable});return e};var _e=e=>Pe(G({},"__esModule",{value:!0}),e);var jr={};ze(jr,{apply:()=>Tr,inject:()=>Rr,name:()=>Ir});module.exports=_e(jr);var ae="dsh-resource://file/",He="sidebar://";function Y(e){return typeof e=="string"&&e.startsWith(He)}function _(e){if(typeof e!="string"||!e.startsWith(ae))return null;for(var r=e.length,n=0;n<e.length;n+=1){var t=e.charAt(n);if(t==="?"||t==="#"){r=n;break}}var a=e.slice(ae.length,r).split("/"),l=a.shift();try{if(l==="session"){var o=a.shift();return o===void 0||o===""||a.length===0?null:{scope:"session",sessionId:decodeURIComponent(o),path:se(a)}}if(l==="absolute"){var d=a[0]===""&&a.length>1,p=d?a.slice(1):a,f=se(p);return(f===""||f.charAt(0)==="/")&&!d?null:d?{scope:"absolute",path:"//"+f}:f===""?null:{scope:"absolute",path:ie(f)?f:"/"+f}}}catch(x){return null}return null}function se(e){for(var r=[],n=0;n<e.length;n+=1)r.push(decodeURIComponent(e[n]));return r.join("/")}function ie(e){return/^[A-Za-z]:($|\/)/.test(e)}function Ue(e){return typeof e!="string"||e===""?!1:e.charAt(0)==="/"?!0:ie(e)}function le(e){var r=_(e);if(r===null)return"";var n=r.path.replace(/[/\\]+$/,""),t=Math.max(n.lastIndexOf("/"),n.lastIndexOf("\\")),a=t===-1?n:n.slice(t+1);return a}function oe(e,r){if(e===null||e==null)return null;var n=typeof e.path=="string"?e.path:"";if(n==="")return null;if(Ue(n))return n;if(typeof r!="string"||r==="")return null;var t=r.indexOf("\\")!==-1?"\\":"/",a=r.replace(/[\\/]+$/,"");return a+t+(t==="\\"?n.replace(/\//g,"\\"):n)}var M="*;!md;!markdown;!html;!htm;!png;!jpg;!jpeg;!gif;!webp;!bmp;!ico;!svg;!pdf",Be=/[;,\s]+/;function Fe(e){return String(e).replace(/!\s+/g,"!").split(Be)}function We(e){var r=typeof e=="string"?e.trim():"";if(r==="")return"";var n=r.charAt(0)==="!",t=n?r.slice(1).trim():r;return t==="*"?n?"!*":"*":(t.slice(0,2)==="*."?t=t.slice(2):t.charAt(0)==="."&&(t=t.slice(1)),t=t.toLowerCase(),t===""?"":n?"!"+t:t)}function A(e){if(typeof e!="string")return"";for(var r=Fe(e),n=[],t=0;t<r.length;t+=1){var a=We(r[t]);a===""||a==="!*"||n.indexOf(a)===-1&&n.push(a)}return n.join(";")}function H(e){for(var r=A(e),n=r===""?[]:r.split(";"),t=!1,a=[],l=[],o=0;o<n.length;o+=1){var d=n[o];if(d==="*"){t=!0;continue}d.charAt(0)==="!"?l.push(d.slice(1)):a.push(d)}return{all:t,allow:a,deny:l}}function Ge(e){if(typeof e!="string"||e==="")return"";var r=e.replace(/[/\\]+$/,""),n=Math.max(r.lastIndexOf("/"),r.lastIndexOf("\\"));n!==-1&&(r=r.slice(n+1));var t=r.lastIndexOf(".");return t<=0?"":r.slice(t+1).toLowerCase()}function Ye(e,r){if(r==null)return!1;var n=Ge(e);return n!==""&&r.deny.indexOf(n)!==-1?!1:n!==""&&r.allow.indexOf(n)!==-1?!0:r.all===!0}function de(e,r){return e===null||e==null?!1:Ye(e.path,r)}function ce(e){var r=H(e),n=[];return r.all&&n.push("\u5176\u4F59\u7C7B\u578B\u5168\u90E8\u8BA4\u9886"),r.allow.length>0&&n.push("\u6307\u5B9A\u8BA4\u9886 "+r.allow.length+" \u9879"),r.deny.length>0&&n.push("\u6392\u9664 "+r.deny.length+" \u9879"),n.length===0?"\u4E0D\u8BA4\u9886\u4EFB\u4F55\u6587\u4EF6(\u53EA\u6709\u9875\u9762\u6807\u7B7E)":n.join(" \xB7 ")}var Qe="[data-sidebar-right-panel]",Je='[data-sidebar-right-mode="fullscreen"]';function ue(e){if(e==null||typeof e.closest!="function")return"no-root";var r,n;try{if(r=e.closest(Qe),r==null||typeof r.querySelector!="function")return"no-panel";n=r.querySelector(Je)}catch(t){return"lookup-failed"}if(n==null||typeof n.click!="function")return"no-control";try{n.click()}catch(t){return"click-failed"}return"clicked"}function fe(e,r){if(!(e==null||e.byId==null)&&!(typeof r!="string"||r==="")){var n=e.byId[r];if(n!=null)return typeof n.cwd=="string"&&n.cwd!==""?n.cwd:void 0}}function Q(e,r){if(!(e==null||!Array.isArray(e.items))&&!(typeof r!="string"||r===""))for(var n=0;n<e.items.length;n+=1){var t=e.items[n];if(!(t==null||!Array.isArray(t.sessionIds))&&t.sessionIds.indexOf(r)!==-1&&typeof t.path=="string"&&t.path!=="")return t.path}}function J(e){var r=e==null?{}:e,n=r.sessions==null?null:r.sessions,t=r.workspaces==null?null:r.workspaces,a=typeof r.sessionId=="string"&&r.sessionId!==""?r.sessionId:void 0,l=fe(n,a);if(l!==void 0)return l;var o=n==null?void 0:n.current,d=fe(n,o);if(d!==void 0)return d;var p=Q(t,a);if(p!==void 0)return p;var f=Q(t,typeof o=="string"?o:void 0);if(f!==void 0)return f;var x=n!=null&&Array.isArray(n.ids)?n.ids[0]:void 0,v=Q(t,typeof x=="string"?x:void 0);if(v!==void 0)return v;if(t!=null&&Array.isArray(t.items)&&t.recentWorkspaceId!==void 0)for(var w=0;w<t.items.length;w+=1){var c=t.items[w];if(!(c==null||c.workspaceId!==t.recentWorkspaceId)&&typeof c.path=="string"&&c.path!=="")return c.path}if(t!=null&&Array.isArray(t.items)&&t.items.length>0){var m=t.items[0];if(m!=null&&typeof m.path=="string"&&m.path!=="")return m.path}}var R=typeof Element!="undefined"&&typeof Element.prototype.moveBefore=="function",Ze=-2e4,s={park:null,frame:null,currentSrc:null,sameOrigin:null,owner:null,lastRect:null,parkStrategy:"offscreen",degraded:!1,preloaded:!1,nudgeCount:0,nudgeEnabled:!0,lastNudgeAt:0,listeners:new Set};function Z(){return{ready:s.frame!==null,docked:s.owner!==null,owner:s.owner,src:s.currentSrc,sameOrigin:s.sameOrigin,parkStrategy:s.parkStrategy,degraded:s.degraded,preloaded:s.preloaded,supportsMoveBefore:R,nudgeCount:s.nudgeCount,lastNudgeAt:s.lastNudgeAt}}function I(){var e=Z();s.listeners.forEach(function(r){try{r(e)}catch(n){}})}function pe(e){return s.listeners.add(e),function(){s.listeners.delete(e)}}function ve(){return Z()}function Xe(e){e!=="offscreen"&&e!=="behind"||s.parkStrategy!==e&&(s.parkStrategy=e,s.frame!==null&&s.owner===null&&X(),I())}function Ke(){return s.parkStrategy}function Ve(){var e=s.lastRect;e!==null&&(s.park.style.width=Math.max(1,Math.round(e.width))+"px",s.park.style.height=Math.max(1,Math.round(e.height))+"px")}function X(){if(s.park!==null){if(Ve(),s.parkStrategy==="behind"&&s.lastRect!==null){s.park.style.left=Math.round(s.lastRect.left)+"px",s.park.style.top=Math.round(s.lastRect.top)+"px",s.park.style.visibility="visible",s.park.style.zIndex="0";return}s.park.style.left=Ze+"px",s.park.style.top="0px",s.park.style.visibility="hidden",s.park.style.zIndex="0"}}function he(){s.frame!==null&&(s.frame.setAttribute("inert",""),s.frame.setAttribute("aria-hidden","true"))}function qe(){s.frame!==null&&(s.frame.removeAttribute("inert"),s.frame.removeAttribute("aria-hidden"))}function $e(){var e=document.createElement("div");e.className="dshcs-park",e.setAttribute("data-dshcs-park",""),e.setAttribute("aria-hidden","true");var r=document.createElement("iframe");return r.className="dshcs-frame",r.setAttribute("title","code-server"),r.setAttribute("allow","clipboard-read; clipboard-write"),r.setAttribute("data-dshcs-resident",""),r.src="about:blank",e.appendChild(r),document.body.appendChild(e),s.park=e,s.frame=r,s.currentSrc="about:blank",s.owner=null,X(),he(),r}function er(e){var r=s.frame;if(r!==null){var n=s.sameOrigin!==e;!n&&r.hasAttribute("data-dshcs-attrs")||(e===!0?r.removeAttribute("sandbox"):e===!1&&r.setAttribute("sandbox","allow-scripts allow-same-origin allow-forms allow-modals allow-popups allow-pointer-lock allow-clipboard-read allow-clipboard-write"),r.setAttribute("data-dshcs-attrs",e===!0?"same-origin":"cross-origin"),s.sameOrigin=e)}}function K(e){var r=e||{};return s.frame===null&&$e(),typeof r.sameOrigin=="boolean"&&er(r.sameOrigin),typeof r.src=="string"&&r.src!==""&&r.src!==s.currentSrc&&rr(r.src),s.frame}function rr(e){s.frame===null||typeof e!="string"||e===""||e===s.currentSrc||(s.currentSrc=e,s.frame.src=e,I())}function me(){var e=s.frame;if(s.nudgeEnabled!==!0||e===null||e.isConnected!==!0)return!1;var r=e.style.display;return e.style.display="none",e.offsetHeight,e.style.display=r,s.nudgeCount+=1,s.lastNudgeAt=Date.now(),!0}function nr(e){return s.nudgeEnabled=e!==!1,s.nudgeEnabled}function ge(e){if(s.frame!==null){if(R)try{e.moveBefore(s.frame,null);return}catch(r){s.degraded=!0,s.lastMoveError=(r&&r.name?r.name+": ":"")+(r&&r.message?r.message:String(r))}else s.degraded=!0;e.appendChild(s.frame)}}function V(e,r){if(!(s.frame===null||e==null)){var n=s.owner===null,t=e.getBoundingClientRect();t.width>=1&&t.height>=1&&(s.lastRect={left:t.left,top:t.top,width:t.width,height:t.height}),s.owner=r===void 0?null:r,qe(),s.park.setAttribute("aria-hidden","true"),ge(e),n&&me(),I()}}function j(e){s.frame!==null&&(e!==void 0&&s.owner!==e||(s.owner=null,X(),he(),s.park.setAttribute("aria-hidden","true"),ge(s.park),I()))}function q(e){var r=e||{};return K(r),s.owner===null&&(typeof r.src=="string"&&r.src!==""&&(s.preloaded=!0),j()),s.frame}function tr(){s.park!==null&&s.park.parentNode!==null&&s.park.parentNode.removeChild(s.park),s.park=null,s.frame=null,s.currentSrc=null,s.sameOrigin=null,s.owner=null,s.lastRect=null,s.degraded=!1,s.preloaded=!1,s.nudgeCount=0,s.lastNudgeAt=0,I()}typeof window!="undefined"&&(window.__dshcsSurface={snapshot:Z,setParkStrategy:Xe,getParkStrategy:Ke,preload:q,dock:V,park:j,nudge:me,setNudgeEnabled:nr,destroy:tr});var i=require("react"),re=new Set,D={status:null,busy:!1,sidebarUi:"unknown",sidebarRegisterFailed:!1};function O(e){D=Object.assign({},D,e),re.forEach(function(r){r()})}function ar(e){return re.add(e),function(){re.delete(e)}}function sr(){return D}function te(){return i.useSyncExternalStore(ar,sr)}var ir="/api",lr="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiB2aWV3Qm94PSIwIDAgMTQ3IDE0NyIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8c3R5bGU+QG1lZGlhIChwcmVmZXJzLWNvbG9yLXNjaGVtZTogZGFyaykgeyogeyBmaWxsOiB3aGl0ZTsgfX08L3N0eWxlPgogIDxwYXRoIGQ9Im00Mi40MjE0LDM5LjY1NWMtMjQuNDA1NywwIC00Mi4xNTU0LDEzLjE3MjEgLTQyLjE1NTQsMzMuODQ1YzAsMjAuNTgxNCAxOC40ODkyLDMzLjg0NSA0Mi4xNTU0LDMzLjg0NWMyMy42NjYyLDAgMzguMTgwMywtMTEuNjE3MSAzOC43MzQ5LC0yOC43MjI1bC0yMS4wNzc3LC0wLjQ1NzRjLTAuOTI0NCw5LjMzMDMgLTkuMTA1OSwxNS4xODQ1IC0xNy42NTcyLDE1LjE4NDVjLTExLjc0MDYsMCAtMjAuNDMwNiwtNy41OTIyIC0yMC40MzA2LC0xOS44NDk2YzAsLTEyLjI1NzQgOC42OSwtMTkuOTg2OCAyMC40MzA2LC0yMC4yMTU1YzguNTUxMywtMC4xODMgMTYuOTE3Nyw1Ljk0NTcgMTcuNDcyMywxNS4yNzZsMjEuMDc3NywtMC42NDAzYy0wLjQ2MjIsLTE2LjgzMTEgLTE0LjE0NDIsLTI4LjI2NTIgLTM4LjU1LC0yOC4yNjUyem00OC44NDQ2LDJsNTUuNDY4LDBsMCw2NC4wMzExbC01NS40NjgsMGwwLC02NC4wMzExeiIgY2xpcC1ydWxlPSJldmVub2RkIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz4KPC9zdmc+Cg==";async function y(e,r){var n={method:r===void 0?"GET":"POST",headers:{}};r!==void 0&&(n.headers["content-type"]="application/json",n.body=JSON.stringify(r));var t=await fetch(ir+e,n),a=await t.text(),l=null;try{l=a===""?null:JSON.parse(a)}catch(o){l=null}return t.ok?l!==null?l:{ok:!1,error:"invalid JSON response"}:{ok:!1,error:"HTTP "+t.status+(l!==null&&l.error!==void 0?": "+l.error:"")}}function be(){}function Oe(e){var r=typeof e.useSessions=="function"?e.useSessions:be,n=typeof e.useWorkspaces=="function"?e.useWorkspaces:be;return{sessions:r(function(t){return t}),workspaces:n(function(t){return t})}}function Le(e,r){if(e==null||typeof e.url!="string"||e.url==="")return null;var n=e.pid!=null?String(e.pid):e.startedAt!=null?String(e.startedAt):"0",t=e.url+"?s="+encodeURIComponent(n),a=typeof r=="string"&&r!==""?r:e!=null&&e.cwd!=null?e.cwd:null;if(a==null||a==="")return t;var l=a.replace(/\\/g,"/"),o=l;return(/^[A-Za-z]:\//.test(l)||l.charCodeAt(0)!==47)&&(o="/"+l),t+"&folder="+encodeURIComponent(o)}function or(e){var r=e.status,n=e.pageUrl,t=e.reloadTick,a=e.owner,l=i.useRef(null),o=r!=null&&r.ok===!0&&r.running===!0,d=r!=null&&r.status==="starting",p=r!=null&&r.ok===!1,f=r!=null&&r.serve==="dsh";if(i.useLayoutEffect(function(){if(!o||n===null){j(a);return}K({src:n,sameOrigin:f}),l.current!==null&&V(l.current,a)},[o,n,f,t,a]),i.useLayoutEffect(function(){return function(){j(a)}},[a]),o&&n!==null)return i.createElement("div",{ref:l,className:"dshcs-slot","data-code-server-slot":a!=null?a:"code-server"});if(d)return i.createElement("div",{className:"dshcs-loading"},"\u6B63\u5728\u542F\u52A8 code-server\u2026");var x=p&&r!=null&&r.error?r.error:"code-server \u672A\u8FD0\u884C",v=f?"\u5F53\u524D\u4EE5 DSH \u540C\u6E90\u8DEF\u5F84 "+(r!=null&&r.url||"/code-server/")+" \u63D0\u4F9B(\u65E0\u72EC\u7ACB\u7AEF\u53E3)\u3002":"\u5F53\u524D\u4EE5\u72EC\u7ACB\u56DE\u73AF\u7AEF\u53E3\u63D0\u4F9B(\u7AEF\u53E3 "+(r!=null&&r.port!=null?r.port:"\u968F\u673A")+" + \u8DEF\u5F84\u4EE4\u724C;\u8981\u5728\u65B0\u6807\u7B7E\u9875\u6253\u5F00,\u590D\u5236\u8BBE\u7F6E\u5361\u91CC\u7684\u5B8C\u6574\u5730\u5740 \u2014\u2014 \u7F3A\u4E86\u4EE4\u724C\u90A3\u6BB5\u4F1A 404)\u3002",w=R?"\u5E38\u9A7B\u9762:\u53EF\u7528(\u5207\u6807\u7B7E/\u6536\u8D77\u4FA7\u680F\u4E0D\u91CD\u8F7D)\u3002":"\u5E38\u9A7B\u9762:\u5F53\u524D\u6D4F\u89C8\u5668\u4E0D\u652F\u6301 Element.moveBefore \u2014\u2014 \u5207\u6807\u7B7E\u4F1A\u6574\u9875\u91CD\u8F7D(\u5347\u7EA7\u6D4F\u89C8\u5668\u540E\u81EA\u52A8\u53EF\u7528)\u3002";return i.createElement("div",{className:"dshcs-empty"},i.createElement("div",{className:"dshcs-emptybox"},i.createElement("div",null,p?"code-server \u542F\u52A8\u5931\u8D25":"code-server \u672A\u8FD0\u884C"),i.createElement("pre",{className:"dshcs-error"},x),i.createElement("p",{className:"dshcs-hint"},"VS Code \u6811\u968F\u63D2\u4EF6\u5305\u5185\u7F6E\u3001\u5C31\u5730\u8FD0\u884C(\u65E0\u9700\u5168\u5C40\u5B89\u88C5\u3001\u65E0\u9700\u8054\u7F51\u5B89\u88C5\u3001\u65E0\u300C\u5B89\u88C5\u73AF\u5883\u300D\u6B65\u9AA4);\u5185\u90E8\u4F9D\u8D56\u4E0E\u9884\u7F16\u8BD1\u539F\u751F\u6A21\u5757\u7531\u5305\u7BA1\u7406\u5668\u5728\u5B89\u88C5\u63D2\u4EF6\u65F6\u4E00\u5E76\u88C5\u597D(\u65E0\u9700 C++ \u5DE5\u5177\u94FE)\u3002\u82E5\u6B64\u5904\u957F\u671F\u672A\u8FD0\u884C,\u8BF7\u67E5\u770B DSH host \u65E5\u5FD7\u91CC\u7684 [code-server] \u8F93\u51FA(\u6216\u5728\u8BBE\u7F6E\u5361\u7247\u91CC\u5207\u6362\u300C\u540E\u53F0\u5E38\u9A7B\u300D\u89E6\u53D1\u4E00\u6B21\u542F\u52A8)\u3002"+v+w)))}function dr(e){var r=te(),n=r.status,t=n!=null&&n.ok===!0&&n.running===!0,a=n!=null&&n.keepResident===!0,l=Oe(e!=null?e:{}),o=J({sessions:l.sessions,workspaces:l.workspaces}),d=t?Le(n,o):null;return i.useEffect(function(){!a||!t||d===null||q({src:d,sameOrigin:n!=null&&n.serve==="dsh"})},[a,t,d,n!=null?n.serve:null]),null}var cr=".dshcs-frame{display:block;position:absolute;inset:0;z-index:1;width:100%;height:100%;border:0;background:var(--dsw-alias-bg-base,#fff)}.dshcs-tabroot{position:relative;display:flex;flex-direction:column;width:100%;height:100%;min-width:0;min-height:0;background:var(--dsw-alias-bg-base,#fff)}.dshcs-slot{position:relative;display:block;width:100%;height:100%;min-width:0;min-height:0;overflow:hidden;background:var(--dsw-alias-bg-base,#fff)}.dshcs-park{position:fixed;left:-20000px;top:0;width:320px;height:200px;overflow:hidden;pointer-events:none;z-index:0;visibility:hidden;contain:strict}.dshcs-loading{position:absolute;inset:0;z-index:2;display:grid;place-items:center;background:var(--dsw-alias-bg-base,#fff);color:var(--dsw-alias-label-tertiary,#7d8798);font-size:13px}.dshcs-empty{position:relative;z-index:2;flex:1;display:flex;align-items:center;justify-content:center;padding:44px 24px 24px}.dshcs-emptybox{max-width:560px;text-align:left;background:var(--dsw-alias-bg-layer-2,#f7f8fb);border:1px solid var(--dsw-alias-border-l2,#dfe3eb);border-radius:12px;padding:16px 18px}.dshcs-error{color:var(--dsw-alias-label-error,#d92d20);white-space:pre-wrap;word-break:break-all;font-family:ui-monospace,Consolas,monospace;font-size:12px;margin:8px 0 0}.dshcs-hint{color:var(--dsw-alias-label-tertiary,#7d8798);font-size:12px;margin:6px 0 0}.dshcs-legacy{color:var(--dsw-alias-label-warning,#b54708);font-size:12px;font-weight:600;margin:0 0 6px}",ye="dsh-code-server/styles";typeof document!="undefined"&&document.querySelector("style[data-dshcs="+JSON.stringify(ye)+"]")===null&&(U=document.createElement("style"),U.setAttribute("data-dshcs",ye),U.textContent=cr,document.head.appendChild(U));var U,xe="code-server",we="dsh-code-server-app",ur=2500,fr=1e4,pr=1500;function vr(e){var r=e!=null&&typeof e.size=="number"?e.size:16;return i.createElement("img",{src:lr,alt:"","aria-hidden":!0,draggable:!1,className:e!=null?e.className:void 0,style:{width:r,height:r,display:"block",objectFit:"contain",WebkitUserDrag:"none",userSelect:"none"}})}var hr=H("");function mr(){var e=D.status;return e==null||typeof e.claimExtensions!="string"?hr:H(e.claimExtensions)}function gr(e){var r=e.useTabInfo(),n=r.tab,t=te(),a=t.status,l=n.navigation,o=l!=null&&typeof l.revision=="number"?l.revision:0,d=l!=null&&typeof l.address=="string"?l.address:"",p=Y(d)?null:_(d),f=Oe(e),x=p!=null&&typeof p.sessionId=="string"?p.sessionId:void 0,v=J({sessions:f.sessions,workspaces:f.workspaces,sessionId:x!==void 0?x:e.sessionId}),w=i.useRef(!1),c=oe(p,v),m=l!=null&&l.params!=null&&typeof l.params.line=="number"?l.params.line:null,g=i.useRef(void 0),[S,F]=i.useState(0),z=i.useRef(null),L=i.useRef(!1),W=r.tab!=null&&r.tab.visible===!0,P=r.sidebar!=null&&r.sidebar.fullscreen===!0,k=a!=null&&a.fullscreenOnOpen!==!1;return i.useLayoutEffect(function(){if(!W){L.current=!1;return}if(!(!k||P||L.current)){L.current=!0;var C=ue(z.current);C!=="clicked"&&console.warn("[code-server] \u672A\u80FD\u81EA\u52A8\u5207\u5230\u5168\u5C4F\u53F3\u4FA7\u680F("+C+");\u672C\u6B21\u6253\u5F00\u4FDD\u6301\u539F\u6A21\u5F0F")}},[W,P,k]),i.useEffect(function(){if(!(typeof v!="string"||v==="")&&g.current!==v){var C=g.current!==void 0;g.current=v;var E=!1;return y("/code-server/start",{cwd:v}).then(function(h){E||(O({status:h}),C&&h!=null&&h.ok===!0&&h.running===!0&&F(function(b){return b+1}))}).catch(function(){}),function(){E=!0}}},[v]),i.useEffect(function(){typeof v=="string"&&v!==""||w.current||(w.current=!0,console.warn("[code-server] \u672A\u80FD\u89E3\u6790\u5F53\u524D\u5DE5\u4F5C\u533A\u76EE\u5F55(\u4F1A\u8BDD\u65E0 cwd / \u6807\u51C6 prop \u65E0 sessionId / \u5DE5\u4F5C\u533A\u8868\u4E5F\u6CA1\u5339\u914D\u4E0A):\u672C\u6B21\u4E0D\u5411\u5BBF\u4E3B\u53D1\u9001 cwd,IDE \u4F1A\u4EE5\u7A7A\u5DE5\u4F5C\u533A\u6253\u5F00"))},[v]),i.useEffect(function(){y("/code-server/status").then(function(E){E!=null&&O({status:E})}).catch(function(){});var C=window.setInterval(function(){y("/code-server/status").then(function(E){O({status:E})}).catch(function(){})},3e3);return function(){window.clearInterval(C)}},[]),i.useEffect(function(){c!==null&&y("/code-server/open-file",m===null?{file:c}:{file:c,line:m}).catch(function(){})},[o,c,m]),i.createElement("div",{className:"dshcs-tabroot","data-code-server-tab":"body",ref:z},i.createElement(or,{status:a,pageUrl:Le(a,v),reloadTick:S,owner:"tab:"+n.id}))}function $(e,r){if(e==null)return null;var n=e[r];if(n!=null)return n;if(typeof e.get=="function"){var t=e.get(r);if(t!=null)return t}return null}function br(e){var r=$(e,"sidebarRightTabs"),n=$(e,"sidebarRight");if(r==null||n==null)return console.error("[code-server] \u53F3\u4FA7\u680F\u670D\u52A1\u4E0A\u4E0B\u6587\u4E0D\u53EF\u89C1(sidebarRightTabs="+(r!=null)+", sidebarRight="+(n!=null)+"):\u8DF3\u8FC7\u4FA7\u680F\u6CE8\u518C"),!1;var t=$(e,"slots");if(e.effect(function(){return r.register({id:we,kind:xe,priority:"extension",patterns:["dsh-resource://file/**"],canOpen:function(a){return de(_(a),mr())},title:function(a){if(Y(a)||a===void 0||a===null||a==="")return"Code Server";var l=le(a);return l===""?"Code Server":l},guide:[{order:20,title:function(){return"Code Server"},description:function(){return"\u5728\u53F3\u4FA7\u680F\u6807\u7B7E\u91CC\u8FD0\u884C VS Code \u7F51\u9875\u7248,\u8DDF\u968F\u5F53\u524D\u4F1A\u8BDD\u5DE5\u4F5C\u533A;\u4EA7\u7269/\u4EA4\u4ED8\u6587\u4EF6\u70B9\u51FB\u540E\u5728\u6B64\u6253\u5F00\u3002"},icon:vr}]})},"code-server: sidebar tab type"),t!=null)e.effect(function(){return t.inject("sidebar.right.pane.tab",function(){return t.register({name:"sidebar.right.pane.tab",key:we},gr)})},"code-server: sidebar tab body");else return console.error("[code-server] slots \u670D\u52A1\u4E0D\u53EF\u89C1:\u4FA7\u680F\u6807\u7B7E body \u672A\u6CE8\u518C"),!1;return e.effect(function(){return function(){O({sidebarUi:"unknown"})}},"code-server: sidebar mode reset"),console.log("[code-server] right-sidebar tab registered (kind="+xe+")"),!0}var yr=".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}.dshcs-card:hover{border-color:var(--dsw-alias-label-dimmed,var(--dsw-alias-border-l2))}.dshcs-cardOpen{background:var(--dsw-alias-bg-layer-2);border-color:var(--dsw-alias-label-dimmed,var(--dsw-alias-border-l2))}.dshcs-cardHeader{appearance:none;width:100%;font:inherit;color:inherit;text-align:left;cursor:pointer;background:0 0;border:0;border-radius:12px;align-items:center;gap:12px;padding:14px 16px;display:flex}.dshcs-cardHeader:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:-2px}.dshcs-cardHeadText{flex-direction:column;flex:1;gap:4px;min-width:0;display:flex}.dshcs-cardName{color:var(--dsw-alias-label-primary);font-size:15px;font-weight:600;line-height:1.4}.dshcs-cardDescription{color:var(--dsw-alias-label-tertiary,var(--dsw-alias-label-secondary));font-size:13px;line-height:1.5}.dshcs-cardChevron{color:var(--dsw-alias-label-tertiary,var(--dsw-alias-label-secondary));flex:none;transition:transform .16s;display:inline-flex}.dshcs-cardChevronOpen{transform:rotate(180deg)}.dshcs-cardBody{border-top:1px solid var(--dsw-alias-border-l2);margin:0 16px;padding-bottom:8px}.dshcs-cardReadOnly{color:var(--dsw-alias-label-tertiary,var(--dsw-alias-label-secondary));margin:12px 0 0;font-size:12px;line-height:1.5}.dshcs-pending{white-space:nowrap;background:var(--dsw-alias-bg-module-platform,var(--dsw-alias-bg-layer-2));color:var(--dsw-alias-label-secondary);border-radius:999px;flex:none;padding:1px 8px;font-size:11px;font-weight:500;line-height:17px}.dshcs-cardFooter{border-top:1px solid var(--dsw-alias-border-l2);justify-content:flex-end;align-items:center;gap:8px;padding:12px 0 4px;display:flex}.dshcs-cardFailed{min-width:0;color:var(--dsw-alias-label-error,var(--dsw-alias-state-error-primary));flex:1;margin:0;font-size:12px;line-height:1.5}.dshcs-cbtn{appearance:none;font:inherit;cursor:pointer;border-radius:8px;padding:5px 14px;font-size:13px;line-height:1.5;border:1px solid transparent;transition:color .12s ease,background .12s ease}.dshcs-cbtn:disabled{opacity:.4;cursor:default}.dshcs-cbtn:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:1px}.dshcs-cbtnOutline{border-color:var(--dsw-alias-border-l2);color:var(--dsw-alias-label-secondary);background:0 0}.dshcs-cbtnOutline:hover:not(:disabled){color:var(--dsw-alias-label-primary);background:var(--dsw-alias-interactive-bg-hover,transparent)}.dshcs-cbtnPrimary{background:var(--dsw-alias-label-primary);color:var(--dsw-alias-bg-layer-3);border-color:var(--dsw-alias-label-primary);font-weight:600}.dshcs-cbtnPrimary:hover:not(:disabled){filter:brightness(.95)}.dshcs-cbtnPrimary:active:not(:disabled){filter:brightness(.9)}.dshcs-field{flex-direction:column;gap:6px;padding:12px 0;display:flex}.dshcs-field+.dshcs-field{border-top:1px solid var(--dsw-alias-border-l2)}.dshcs-fieldHead{align-items:center;gap:8px;display:flex}.dshcs-fieldLabel{min-width:0;color:var(--dsw-alias-label-primary);flex:1;font-size:13px;font-weight:500;line-height:1.5}.dshcs-card .dshcs-hint{color:var(--dsw-alias-label-tertiary,var(--dsw-alias-label-secondary));margin:0;font-size:12px;line-height:1.5}.dshcs-check{display:flex;align-items:center;gap:8px;cursor:pointer}.dshcs-check input{accent-color:var(--dsw-alias-brand-primary);width:15px;height:15px;margin:0;flex:none}.dshcs-check input:disabled{cursor:default}.dshcs-text{display:flex}.dshcs-text input{font:12px/1.5 ui-monospace,Consolas,monospace;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-3,transparent);border:1px solid var(--dsw-alias-border-l2);border-radius:8px;padding:5px 8px;width:100%;min-width:0}.dshcs-text input:disabled{opacity:.5;cursor:default}.dshcs-text input:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:-1px}.dshcs-badges{align-items:center;gap:8px;display:inline-flex}.dshcs-badge{white-space:nowrap;background:var(--dsw-alias-bg-module-platform,var(--dsw-alias-bg-layer-2));color:var(--dsw-alias-label-secondary);border-radius:999px;padding:1px 8px;font-size:11px;font-weight:500;line-height:17px}.dshcs-reset{font:inherit;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;padding:0;font-size:12px;line-height:1.5}.dshcs-reset:hover:not(:disabled){color:var(--dsw-alias-label-primary)}.dshcs-reset:disabled{cursor:default}",xr="dsh-code-server/Card.module.css";function wr(e,r){if(typeof document!="undefined"&&document.querySelector("style[data-plugin-css="+JSON.stringify(e)+"]")===null){var n=document.createElement("style");n.dataset.plugin="dsh-code-server",n.dataset.pluginCss=e,n.textContent=r,document.head.appendChild(n)}}wr(xr,yr);function kr(e){return i.createElement("svg",{width:14,height:14,viewBox:"0 0 14 14",fill:"none","aria-hidden":!0,className:e.className},i.createElement("path",{d:"M3.5 5.25L7 8.75L10.5 5.25",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}))}function ke(e){return i.createElement("button",{type:"button",className:"dshcs-cbtn "+(e.variant==="primary"?"dshcs-cbtnPrimary":"dshcs-cbtnOutline"),disabled:e.disabled===!0,onClick:e.onClick},e.children)}function Ee(e){return i.createElement("label",{className:"dshcs-check"},i.createElement("input",{type:"checkbox",checked:e.checked===!0,disabled:e.disabled===!0,onChange:function(r){e.onChange(r.target.checked)}}),i.createElement("span",{className:"dshcs-hint"},e.children))}function Er(e){return i.createElement("label",{className:"dshcs-text"},i.createElement("input",{type:"text",value:e.value,disabled:e.disabled===!0,spellCheck:!1,autoComplete:"off",placeholder:e.placeholder,onChange:function(r){e.onChange(r.target.value)}}))}function ee(e){var r=[];return e.overridden===!0&&(r.push(i.createElement("span",{className:"dshcs-badge"},e.overriddenLabel)),r.push(i.createElement("button",{type:"button",className:"dshcs-reset",disabled:e.disabled===!0,onClick:e.onReset},e.resetLabel))),r.length===0?null:i.createElement("span",{className:"dshcs-badges"},...r)}function Se(e){var[r,n]=i.useState(e.defaultOpen===!0),t=e.state;if(t==null||t.available!==!0)return null;var a=e.title,l=e.noticeOnly===!0,o=t.dirty!==!0||t.invalid===!0||t.saving===!0;return i.createElement("li",{className:"dshcs-card"+(r?" dshcs-cardOpen":"")},i.createElement("button",{type:"button",className:"dshcs-cardHeader","aria-expanded":r,onClick:function(){n(!r)}},i.createElement("span",{className:"dshcs-cardHeadText"},i.createElement("span",{className:"dshcs-cardName"},a),i.createElement("span",{className:"dshcs-cardDescription"},e.description)),t.dirty===!0?i.createElement("span",{className:"dshcs-pending"},e.unsavedLabel):null,i.createElement(kr,{className:"dshcs-cardChevron"+(r?" dshcs-cardChevronOpen":"")})),r===!0?i.createElement("div",{className:"dshcs-cardBody"},l===!0?null:t.writable!==!0?i.createElement("p",{className:"dshcs-cardReadOnly",role:"status"},e.readOnlyLabel):null,e.children,l===!0?null:i.createElement("div",{className:"dshcs-cardFooter"},t.failed===!0?i.createElement("p",{className:"dshcs-cardFailed",role:"status"},e.saveFailedLabel):null,i.createElement(ke,{disabled:t.dirty!==!0||t.saving===!0,onClick:e.onDiscard},e.discardLabel),i.createElement(ke,{variant:"primary",disabled:o,onClick:e.onSave},t.saving===!0?e.savingLabel:e.saveLabel))):null)}function Sr(e){try{let k=function(){y("/code-server/status").then(function(h){h!=null&&typeof h=="object"&&O({status:h})}).catch(function(){})};var r=e.scope,[n,t]=i.useState(function(){return r!==void 0?r.getSnapshot():null}),[a,l]=i.useState(null),[o,d]=i.useState(!1),[p,f]=i.useState(!1),x=te(),[v,w]=i.useState(ve());if(i.useEffect(function(){return pe(function(h){w(h)})},[]),i.useEffect(function(){if(r===void 0||typeof r.subscribe!="function")return;function h(){try{t(r.getSnapshot())}catch(Dr){}}var b=r.subscribe(h);return function(){typeof b=="function"&&b()}},[r]),r===void 0)return console.error("[code-server] card scope missing"),null;if(n==null||n.status!=="ready")return n!=null&&n.status==="unavailable"&&console.warn("[code-server] settings scope unavailable:",n.status),null;var c=n.value!==void 0&&n.value!==null?n.value:{},m=n.user,g={keepResident:c.keepResident!==!1,claimExtensions:typeof c.claimExtensions=="string"?c.claimExtensions:M,fullscreenOnOpen:c.fullscreenOnOpen!==!1};if(x!=null&&x.sidebarUi==="legacy")return i.createElement(Se,{title:"Code Server",description:"\u5F53\u524D DSH \u7248\u672C\u4E0D\u53D7\u652F\u6301(\u7F3A\u5C11\u53F3\u4FA7\u680F\u670D\u52A1)",defaultOpen:!0,noticeOnly:!0,state:{available:!0,writable:!1,dirty:!1,invalid:!1,saving:!1,failed:!1}},i.createElement("div",{className:"dshcs-field"},i.createElement("div",{className:"dshcs-legacy"},"\u672C\u63D2\u4EF6\u81EA 0.2.3 \u8D77\u4E0D\u518D\u517C\u5BB9\u65E7\u7248 DSH\u3002"),i.createElement("div",{className:"dshcs-hint",style:{marginTop:0}},`\u672A\u68C0\u6D4B\u5230\u53F3\u4FA7\u680F\u63D2\u4EF6\u670D\u52A1 sidebarRightTabs / sidebarRight,\u56E0\u6B64\u63D2\u4EF6\u4E0D\u63D0\u4F9B\u4EFB\u4F55\u5165\u53E3(\u65E7\u7248\u7684\u60AC\u6D6E\u7403\u4E0E\u6D6E\u52A8\u7A97\u53E3\u5DF2\u79FB\u9664),\u4E5F\u4E0D\u4F1A\u540E\u53F0\u542F\u52A8 IDE\u3002
3
- \u5347\u7EA7 DSH \u5230\u5E26\u53F3\u4FA7\u680F\u7684\u7248\u672C(\u2265 0.1.5-alpha.1)\u540E,Code Server \u4F1A\u51FA\u73B0\u5728\u53F3\u4FA7\u680F\u6807\u7B7E\u91CC,\u672C\u9875\u540C\u65F6\u663E\u793A\u5B8C\u6574\u8BBE\u7F6E\u9879;\u5347\u7EA7\u540E\u65E0\u9700\u91CD\u88C5\u672C\u63D2\u4EF6,\u5237\u65B0\u9875\u9762\u5373\u53EF\u3002`)));var S=m!=null&&Object.prototype.hasOwnProperty.call(m,"keepResident"),F=m!=null&&Object.prototype.hasOwnProperty.call(m,"claimExtensions"),z=m!=null&&Object.prototype.hasOwnProperty.call(m,"fullscreenOnOpen"),L=a!==null&&(a.keepResident!==g.keepResident||A(a.claimExtensions)!==A(g.claimExtensions)||a.fullscreenOnOpen!==g.fullscreenOnOpen),W=!L||o,P={available:!0,writable:n.writable,dirty:L,invalid:!1,saving:o,failed:p};async function C(){if(L&&!o){d(!0),f(!1);try{var h=a!==null?a:g;await e.scope.set("keepResident",h.keepResident===!0),await e.scope.set("claimExtensions",A(h.claimExtensions)),await e.scope.set("fullscreenOnOpen",h.fullscreenOnOpen===!0),l(null),k()}catch(b){f(!0)}d(!1)}}async function E(){if(!(o||n.writable!==!0)){d(!0),f(!1);try{typeof e.scope.unset=="function"?(await e.scope.unset("keepResident"),await e.scope.unset("claimExtensions"),await e.scope.unset("fullscreenOnOpen")):(await e.scope.set("keepResident",c.keepResident===void 0||c.keepResident===null?!0:c.keepResident),await e.scope.set("claimExtensions",typeof c.claimExtensions=="string"?A(c.claimExtensions):M),await e.scope.set("fullscreenOnOpen",c.fullscreenOnOpen===void 0||c.fullscreenOnOpen===null?!0:c.fullscreenOnOpen)),l(null),k()}catch(h){f(!0)}d(!1)}}return i.createElement(Se,{title:"Code Server",description:"\u5165\u53E3:\u53F3\u4FA7\u680F\u6807\u7B7E(DSH \u2265 0.1.5-alpha.1);\u8BA4\u9886\u7C7B\u578B\u51B3\u5B9A\u54EA\u4E9B\u6587\u4EF6\u4EA4\u7ED9 Code Server \u6253\u5F00",state:P,unsavedLabel:"\u672A\u4FDD\u5B58",readOnlyLabel:"\u672C\u90E8\u7F72\u7684\u8BBE\u7F6E\u4E3A\u53EA\u8BFB\u3002",saveFailedLabel:"\u672C\u90E8\u7F72\u6CA1\u6709\u63A5\u53D7\u8FD9\u4E9B\u503C\uFF0C\u5DF2\u4FDD\u7559\u4F9B\u4F60\u4FEE\u6539\u3002",discardLabel:"\u653E\u5F03\u4FEE\u6539",saveLabel:"\u4FDD\u5B58",savingLabel:"\u4FDD\u5B58\u4E2D\u2026",onSave:C,onDiscard:function(){l(null),f(!1)}},i.createElement("div",{className:"dshcs-field"},i.createElement("div",{className:"dshcs-fieldHead"},i.createElement("span",{className:"dshcs-fieldLabel"},"\u8BA4\u9886\u7C7B\u578B(\u6309\u6269\u5C55\u540D,\u5206\u53F7\u5206\u9694)"),F===!0?i.createElement(ee,{overridden:!0,disabled:n.writable!==!0,overriddenLabel:"\u5DF2\u8986\u76D6",resetLabel:"\u6062\u590D\u9ED8\u8BA4",onReset:function(){E()}}):null),i.createElement(Er,{value:a!==null?a.claimExtensions:g.claimExtensions,disabled:n.writable!==!0,placeholder:M,onChange:function(h){l(function(b){return Object.assign({},b!==null?b:g,{claimExtensions:h})}),f(!1)}}),i.createElement("div",{className:"dshcs-hint",style:{marginTop:4}},"\u5199\u6269\u5C55\u540D(\u4E0D\u5E26\u70B9,\u5927\u5C0F\u5199\u968F\u610F);`*` = \u5176\u4F59\u7C7B\u578B\u4E5F\u8BA4\u9886;`!ext` = \u4E0D\u8BA4\u9886(\u6392\u9664\u4F18\u5148)\u3002\u4E0D\u518D\u533A\u5206\u4F1A\u8BDD\u5185/\u7EDD\u5BF9\u8DEF\u5F84 \u2014\u2014 \u6240\u6709 `dsh-resource://file/**` \u4E00\u89C6\u540C\u4EC1,\u672A\u8BA4\u9886\u7684\u843D\u56DE DSH \u81EA\u5E26\u9884\u89C8\u3002"),i.createElement("div",{className:"dshcs-hint",style:{marginTop:2}},"\u5B9E\u9645\u89C4\u5219:"+ce(a!==null?a.claimExtensions:g.claimExtensions)+(A(a!==null?a.claimExtensions:g.claimExtensions)!==(a!==null?a.claimExtensions:g.claimExtensions)?"(\u4FDD\u5B58\u540E\u5F52\u4E00\u5316)":"")+" \xB7 \u9ED8\u8BA4 "+M)),i.createElement("div",{className:"dshcs-field"},i.createElement("div",{className:"dshcs-fieldHead"},i.createElement("span",{className:"dshcs-fieldLabel"},"\u6253\u5F00\u5373\u5168\u5C4F(\u53F3\u4FA7\u680F\u94FA\u6EE1\u7A97\u53E3)"),z===!0?i.createElement(ee,{overridden:!0,disabled:n.writable!==!0,overriddenLabel:"\u5DF2\u8986\u76D6",resetLabel:"\u6062\u590D\u9ED8\u8BA4",onReset:function(){E()}}):null),i.createElement(Ee,{checked:a!==null?a.fullscreenOnOpen:g.fullscreenOnOpen,disabled:n.writable!==!0,onChange:function(h){l(function(b){return Object.assign({},b!==null?b:g,{fullscreenOnOpen:h===!0})}),f(!1)}},'\u6253\u5F00 Code Server \u6807\u7B7E(\u542B\u70B9\u5F00\u4EA7\u7269/\u4EA4\u4ED8\u6587\u4EF6)\u65F6,\u81EA\u52A8\u628A\u53F3\u4FA7\u680F\u4ECE"\u4E0E\u5BF9\u8BDD\u5E76\u6392"\u5207\u5230\u5168\u5C4F;\u60F3\u540C\u65F6\u770B\u5BF9\u8BDD\u5C31\u5173\u6389\u5B83,\u6216\u968F\u65F6\u70B9\u53F3\u4FA7\u680F\u7684\u300C\u9000\u51FA\u5168\u5C4F\u300D\u2014\u2014 \u672C\u6B21\u6253\u5F00\u4E0D\u4F1A\u88AB\u62A2\u56DE\u53BB'),i.createElement("div",{className:"dshcs-hint",style:{marginTop:4}},'\u53EA\u5F71\u54CD"\u6253\u5F00\u90A3\u4E00\u523B":\u5207\u8D70\u518D\u5207\u56DE\u3001\u518D\u6B21\u6253\u5F00\u6587\u4EF6 tab \u4F1A\u91CD\u65B0\u5207\u5168\u5C4F;DSH \u672A\u5411\u63D2\u4EF6\u5F00\u653E\u6A21\u5F0F\u63A5\u53E3,\u672C\u9879\u7531\u70B9\u51FB\u53F3\u4FA7\u680F\u81EA\u8EAB\u7684\u300C\u5168\u5C4F\u300D\u6309\u94AE\u5B9E\u73B0\u3002')),i.createElement("div",{className:"dshcs-field"},i.createElement("div",{className:"dshcs-fieldHead"},i.createElement("span",{className:"dshcs-fieldLabel"},"\u540E\u53F0\u5E38\u9A7B(\u5207\u6807\u7B7E\u4E0D\u91CD\u8F7D)"),S===!0?i.createElement(ee,{overridden:!0,disabled:n.writable!==!0,overriddenLabel:"\u5DF2\u8986\u76D6",resetLabel:"\u6062\u590D\u9ED8\u8BA4",onReset:function(){E()}}):null),i.createElement(Ee,{checked:a!==null?a.keepResident:g.keepResident,disabled:n.writable!==!0,onChange:function(h){l(function(b){return Object.assign({},b!==null?b:g,{keepResident:h===!0})}),f(!1)}},'\u5F00\u542F\u540E\u5BBF\u4E3B\u542F\u52A8\u5373\u628A IDE \u52A0\u8F7D\u5230\u540E\u53F0"\u505C\u653E\u533A":\u5207\u6362\u53F3\u4FA7\u680F\u6807\u7B7E\u3001\u6536\u8D77/\u5C55\u5F00\u4FA7\u680F\u3001\u62D6\u6210\u6D6E\u52A8\u7A97\u53E3\u90FD\u4E0D\u518D\u91CD\u8F7D,\u9996\u6B21\u6253\u5F00\u514D\u7B49\u5F85;\u5173\u95ED\u5219\u53EA\u5728\u6253\u5F00\u9762\u677F\u65F6\u52A0\u8F7D(\u7701\u5185\u5B58)'),i.createElement("div",{className:"dshcs-hint",style:{marginTop:4}},R?"\u5E38\u9A7B\u9762:"+(v.docked?"\u5DF2\u505C\u9760":v.ready?"\u5DF2\u505C\u653E(\u540E\u53F0\u8FD0\u884C\u4E2D)":"\u672A\u542F\u52A8")+(v.degraded?" \xB7 \u672C\u6B21\u53D1\u751F\u8FC7\u964D\u7EA7\u91CD\u8F7D":""):"\u5F53\u524D\u6D4F\u89C8\u5668\u4E0D\u652F\u6301 Element.moveBefore(Chromium <133)\u2192 \u5E38\u9A7B\u4E0D\u53EF\u7528,\u5207\u6807\u7B7E\u4ECD\u4F1A\u6574\u9875\u91CD\u8F7D(\u5347\u7EA7\u6D4F\u89C8\u5668\u540E\u81EA\u52A8\u751F\u6548)")))}catch(k){return console.error("[code-server] card render error:",k!=null&&k.message!==void 0?k.message:String(k)),null}}var Ce=900,u={rev:-1,open:!1,mounted:!1,pending:null,el:null,body:null,title:null,timer:null,loading:!1};function Cr(e){if(!(e===null||typeof e!="object")){if(e.type==="ready"){T(!0);return}if(e.type==="ask"&&typeof e.text=="string"){y("/code-server/ask/send",{text:e.text,mode:u.pending===null?void 0:u.pending.mode}).then(function(r){u.rev=-1,T(!0)}).catch(function(){});return}if(e.type==="approve"&&typeof e.id=="string"){y("/code-server/ask/approve",{id:e.id,outcome:e.outcome}).then(function(r){r!=null&&r.ok===!1&&B(r.error||"\u6388\u6743\u63D0\u4EA4\u5931\u8D25"),u.rev=-1,T(!0)}).catch(function(r){B("\u6388\u6743\u63D0\u4EA4\u5931\u8D25:"+String(r&&r.message?r.message:r))});return}e.type==="close"&&Ae()}}function T(e){if(u.el!==null){var r=window.__DSHCS_ASK_PUSH__;typeof r=="function"?r(u.pending):e===!0&&setTimeout(function(){T(!1)},120)}}function B(e){console.warn("[code-server] ask dialog:",e)}function Ae(){u.open=!1,u.el!==null&&(u.el.style.display="none"),y("/code-server/ask/close",{}).catch(function(){})}function Te(){if(u.el===null){var e=document.createElement("div");e.className="dshcs-dialog",e.setAttribute("data-dshcs-dialog","ask"),e.style.cssText=["position:fixed","right:24px","bottom:24px","width:460px","height:600px","min-width:320px","min-height:280px","max-width:96vw","max-height:92vh","resize:both","overflow:hidden","display:none","z-index:2147483000","border-radius:10px","box-shadow:0 18px 48px rgba(0,0,0,.45)","border:1px solid var(--dsw-alias-border-l2, rgba(128,128,128,.4))","background:var(--dsw-alias-bg-base, var(--vscode-editor-background, #1e1e1e))"].join(";");var r=document.createElement("div");r.style.cssText="display:flex;align-items:center;gap:8px;padding:6px 10px;cursor:move;border-bottom:1px solid var(--dsw-alias-border-l1, rgba(128,128,128,.3));font:var(--dsw-font-markdown-base, 13px/20px sans-serif)";var n=document.createElement("span");n.textContent="DSH \u5BF9\u8BDD",n.style.cssText="font-weight:600;flex:none";var t=document.createElement("span");t.style.cssText="flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--dsw-alias-label-tertiary, rgba(128,128,128,.9));font-size:12px";var a=document.createElement("button");a.type="button",a.textContent="\u2715",a.title="\u5173\u95ED",a.setAttribute("aria-label","\u5173\u95ED"),a.style.cssText="flex:none;border:0;background:transparent;color:inherit;cursor:pointer;font-size:13px;line-height:1;padding:2px 6px;border-radius:4px",a.addEventListener("click",function(){Ae()}),r.appendChild(n),r.appendChild(t),r.appendChild(a);var l=document.createElement("div");l.className="dshcs-panel",l.setAttribute("data-dshcs-ask-root",""),l.style.cssText="height:calc(100% - 33px);overflow:hidden",e.appendChild(r),e.appendChild(l),document.body.appendChild(e),u.el=e,u.body=l,u.title=t;var o=null;r.addEventListener("pointerdown",function(d){if(d.target!==a){var p=e.getBoundingClientRect();o={x:d.clientX,y:d.clientY,left:p.left,top:p.top},e.style.right="auto",e.style.bottom="auto",e.style.left=p.left+"px",e.style.top=p.top+"px";try{r.setPointerCapture(d.pointerId)}catch(f){}}}),r.addEventListener("pointermove",function(d){o!==null&&(e.style.left=Math.max(0,Math.min(window.innerWidth-80,o.left+(d.clientX-o.x)))+"px",e.style.top=Math.max(0,Math.min(window.innerHeight-40,o.top+(d.clientY-o.y)))+"px")}),r.addEventListener("pointerup",function(){o=null})}}var Me="dshcs.ask.bundle",Nr=900*1e3,N=null;function ne(){try{var e=window.sessionStorage.getItem(Me);if(e==null)return null;var r=JSON.parse(e);return r==null||typeof r.js!="string"||typeof r.css!="string"||Date.now()-Number(r.at||0)>Nr?null:{css:r.css,js:r.js}}catch(n){return null}}function Re(e){try{window.sessionStorage.setItem(Me,JSON.stringify({at:Date.now(),css:e.css,js:e.js}))}catch(r){}}function Or(){if(!(N!==null||u.mounted)){var e=ne();if(e!==null){N=e;return}y("/code-server/ask/bundle").then(function(r){r==null||r.ok!==!0||(N={css:r.css,js:r.js},Re(N),console.log("[code-server] ask bundle preloaded ("+Math.round((r.js.length+r.css.length)/1024)+"KB)"))}).catch(function(){})}}function Lr(){if(!(u.mounted||u.loading)){u.loading=!0;var e=N!==null?Promise.resolve(N):ne()!==null?Promise.resolve(ne()):y("/code-server/ask/bundle");e.then(function(r){u.loading=!1;var n=r;if(N===null&&r!=null&&r.ok===!0&&(n={css:r.css,js:r.js},N=n,Re(n)),n==null||typeof n.js!="string"){B(n!=null&&n.error?n.error:"\u9762\u677F\u4EA7\u7269\u4E0D\u53EF\u7528");return}if(Te(),document.getElementById("dshcs-ask-style")===null){var t=document.createElement("style");t.id="dshcs-ask-style",t.textContent=n.css,document.head.appendChild(t)}window.__DSHCS_HOST__="dsh",window.__DSHCS_MOUNT__=u.body,window.acquireVsCodeApi=function(){return{postMessage:Cr}};var a=document.createElement("script");a.textContent=n.js,document.head.appendChild(a),u.mounted=!0,setTimeout(function(){T(!0)},60)}).catch(function(r){u.loading=!1,B("\u9762\u677F\u4EA7\u7269\u52A0\u8F7D\u5931\u8D25:"+String(r&&r.message?r.message:r))})}}function Ne(){y("/code-server/ask/state?rev="+u.rev).then(function(e){e==null||e.ok!==!0||e.changed===!0&&(u.rev=typeof e.rev=="number"?e.rev:-1,u.pending=e,e.open===!0?(Te(),u.el.style.display="block",u.title!==null&&(u.title.textContent=e.contextText||"\u6765\u81EA\u7F16\u8F91\u5668"),u.open=!0,Lr(),u.mounted&&T(!0)):u.el!==null&&(u.el.style.display="none",u.open=!1))}).catch(function(){})}function Ar(){u.timer===null&&(u.timer=setInterval(Ne,Ce),setTimeout(Ne,800),setTimeout(Or,3e3),console.log("[code-server] ask dialog poller started (every "+Ce+"ms)"))}function Tr(e){try{Mr(e),Ar()}catch(r){console.error("[code-server] apply failed:",r&&r.stack?r.stack:String(r));try{document.title="CS-ERR "+(r&&r.message||String(r))}catch(n){}}}function Mr(e){var r=e.get("slots");if(r===void 0){console.error("[code-server] slots service unavailable");return}var n=e.settingsScope,t=null;if(n!==void 0&&typeof n.bind=="function")t=n.bind({namespace:"code-server"});else{console.error("[code-server] settingsScope unavailable (inject missing?); settings card disabled");return}y("/code-server/status").then(function(c){O({status:c})}).catch(function(){}),r.inject("settings.plugin.item",()=>r.register({name:"settings.plugin.item",key:"code-server",label:"Code Server",inject:function(){return{scope:t}}},Sr));var a=!1;function l(c,m){if(!a){a=!0,x();var g=!1;try{g=br(c)}catch(S){console.error("[code-server] sidebar tab registration failed:",S!=null&&S.message!=null?S.message:String(S))}D.sidebarUi==="legacy"&&(console.log("[code-server] \u53F3\u4FA7\u680F\u670D\u52A1\u665A\u5230(\u7ECF "+m+"):\u64A4\u9500\u65E7\u7248 DSH \u5224\u5B9A"),y("/code-server/ui-mode",{sidebar:!0}).catch(function(){})),O({sidebarUi:"modern",sidebarRegisterFailed:g!==!0}),r.inject("shell.overlay",()=>r.register({name:"shell.overlay",id:"code-server",order:70,label:"Code Server"},S=>i.createElement(dr,S))),console.log("[code-server] client registered via "+m+": sidebar tab="+g+"(claims dsh-resource://file/**) + resident preload + settings card")}}function o(c){O({sidebarUi:"legacy"}),console.warn("[code-server] \u672A\u63A2\u6D4B\u5230\u53F3\u4FA7\u680F\u670D\u52A1(sidebarRightTabs/sidebarRight): \u672C\u63D2\u4EF6\u81EA 0.2.3 \u8D77\u4E0D\u518D\u517C\u5BB9\u65E7\u7248 DSH \u2014\u2014 \u9664\u300C\u8BBE\u7F6E \u2192 \u63D2\u4EF6 \u2192 Code Server\u300D\u7684\u63D0\u793A\u5916\u4E0D\u63D0\u4F9B\u4EFB\u4F55\u5165\u53E3,\u4E5F\u4E0D\u9884\u70ED IDE\u3002\u8BF7\u5347\u7EA7 DSH\u3002"),c===!0&&y("/code-server/ui-mode",{sidebar:!1}).catch(function(){})}var d=null,p=null,f=null;function x(){d!==null&&(clearTimeout(d),d=null),p!==null&&(clearTimeout(p),p=null),f!==null&&(clearTimeout(f),f=null)}var v=!1;try{typeof e.inject=="function"&&(v=!0,e.inject(["sidebarRightTabs","sidebarRight"],function(c){l(c,"inject")}))}catch(c){console.warn("[code-server] sidebar inject failed:",c!=null&&c.message!=null?c.message:String(c))}var w=typeof e.get=="function"&&e.get("sidebarRightTabs")!==void 0&&e.get("sidebarRight")!==void 0;if(w){f=setTimeout(function(){a||(console.warn("[code-server] ctx.inject \u672A\u5728 1.5s \u5185\u56DE\u8C03,\u6539\u7528\u540C\u6B65\u670D\u52A1\u6CE8\u518C\u4FA7\u680F"),l(e,"sync-fallback"))},pr);return}if(v!==!0){o(!0);return}d=setTimeout(function(){a||o(!1)},ur),p=setTimeout(function(){a||o(!0)},fr)}var Rr=["slots","settingsScope"],Ir="code-server";
2
+ var X=Object.defineProperty;var _e=Object.getOwnPropertyDescriptor;var He=Object.getOwnPropertyNames;var Ue=Object.prototype.hasOwnProperty;var Be=(e,r)=>{for(var n in r)X(e,n,{get:r[n],enumerable:!0})},Fe=(e,r,n,t)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of He(r))!Ue.call(e,a)&&a!==n&&X(e,a,{get:()=>r[a],enumerable:!(t=_e(r,a))||t.enumerable});return e};var We=e=>Fe(X({},"__esModule",{value:!0}),e);var Fr={};Be(Fr,{apply:()=>_r,inject:()=>Ur,name:()=>Br});module.exports=We(Fr);var ie="dsh-resource://file/",Ge="sidebar://";function Q(e){return typeof e=="string"&&e.startsWith(Ge)}function U(e){if(typeof e!="string"||!e.startsWith(ie))return null;for(var r=e.length,n=0;n<e.length;n+=1){var t=e.charAt(n);if(t==="?"||t==="#"){r=n;break}}var a=e.slice(ie.length,r).split("/"),l=a.shift();try{if(l==="session"){var o=a.shift();return o===void 0||o===""||a.length===0?null:{scope:"session",sessionId:decodeURIComponent(o),path:le(a)}}if(l==="absolute"){var c=a[0]===""&&a.length>1,p=c?a.slice(1):a,f=le(p);return(f===""||f.charAt(0)==="/")&&!c?null:c?{scope:"absolute",path:"//"+f}:f===""?null:{scope:"absolute",path:oe(f)?f:"/"+f}}}catch(x){return null}return null}function le(e){for(var r=[],n=0;n<e.length;n+=1)r.push(decodeURIComponent(e[n]));return r.join("/")}function oe(e){return/^[A-Za-z]:($|\/)/.test(e)}function Ye(e){return typeof e!="string"||e===""?!1:e.charAt(0)==="/"?!0:oe(e)}function ce(e){var r=U(e);if(r===null)return"";var n=r.path.replace(/[/\\]+$/,""),t=Math.max(n.lastIndexOf("/"),n.lastIndexOf("\\")),a=t===-1?n:n.slice(t+1);return a}function de(e,r){if(e===null||e==null)return null;var n=typeof e.path=="string"?e.path:"";if(n==="")return null;if(Ye(n))return n;if(typeof r!="string"||r==="")return null;var t=r.indexOf("\\")!==-1?"\\":"/",a=r.replace(/[\\/]+$/,"");return a+t+(t==="\\"?n.replace(/\//g,"\\"):n)}var Xe=["md","markdown","html","htm","png","jpg","jpeg","gif","webp","bmp","ico","svg","pdf"],fe=["exe","com","msi","msix","msixbundle","appx","appxbundle","dll","sys","scr","cpl","ocx","drv","efi","mui","obj","o","a","lib","pdb","class","jar","pyc","pyo","wasm","node","so","dylib","ko","elf","bin","out","apk","ipa","deb","rpm","dmg","iso","img","cab"],pe=["doc","docx","docm","dot","dotx","dotm","docb","rtf","odt","xls","xlsx","xlsm","xlsb","xlt","xltx","xltm","xla","xlam","ods","ppt","pptx","pptm","pot","potx","potm","pps","ppsx","ppam","odp","vsd","vsdx","vssx","vstx","vsdm","vssm","vstm","one","onetoc2","mpt","mpp","pub","msg","xps","oxps","odg"],I=["*"].concat(Xe).concat(fe).concat(pe).map(function(e,r){return r===0?e:"!"+e}).join(";"),Qe=/[;,\s]+/;function Je(e){return String(e).replace(/!\s+/g,"!").split(Qe)}function Ze(e){var r=typeof e=="string"?e.trim():"";if(r==="")return"";var n=r.charAt(0)==="!",t=n?r.slice(1).trim():r;return t==="*"?n?"!*":"*":(t.slice(0,2)==="*."?t=t.slice(2):t.charAt(0)==="."&&(t=t.slice(1)),t=t.toLowerCase(),t===""?"":n?"!"+t:t)}function A(e){if(typeof e!="string")return"";for(var r=Je(e),n=[],t=0;t<r.length;t+=1){var a=Ze(r[t]);a===""||a==="!*"||n.indexOf(a)===-1&&n.push(a)}return n.join(";")}function B(e){for(var r=A(e),n=r===""?[]:r.split(";"),t=!1,a=[],l=[],o=0;o<n.length;o+=1){var c=n[o];if(c==="*"){t=!0;continue}c.charAt(0)==="!"?l.push(c.slice(1)):a.push(c)}return{all:t,allow:a,deny:l}}function Ke(e){if(typeof e!="string"||e==="")return"";var r=e.replace(/[/\\]+$/,""),n=Math.max(r.lastIndexOf("/"),r.lastIndexOf("\\"));n!==-1&&(r=r.slice(n+1));var t=r.lastIndexOf(".");return t<=0?"":r.slice(t+1).toLowerCase()}function Ve(e,r){if(r==null)return!1;var n=Ke(e);return n!==""&&r.deny.indexOf(n)!==-1?!1:n!==""&&r.allow.indexOf(n)!==-1?!0:r.all===!0}function ve(e,r){return e===null||e==null?!1:Ve(e.path,r)}function me(e){var r=B(e),n=[];if(r.all&&n.push("\u5176\u4F59\u7C7B\u578B\u5168\u90E8\u8BA4\u9886"),r.allow.length>0&&n.push("\u6307\u5B9A\u8BA4\u9886 "+r.allow.length+" \u9879"),r.deny.length>0){var t=[];ue(r.deny,fe)&&t.push("\u53EF\u6267\u884C\u6587\u4EF6"),ue(r.deny,pe)&&t.push("Office \u6587\u6863"),n.push("\u6392\u9664 "+r.deny.length+" \u9879"+(t.length>0?"(\u542B"+t.join("\u3001")+")":""))}return n.length===0?"\u4E0D\u8BA4\u9886\u4EFB\u4F55\u6587\u4EF6(\u53EA\u6709\u9875\u9762\u6807\u7B7E)":n.join(" \xB7 ")}function ue(e,r){for(var n=new Set(r),t=0;t<e.length;t+=1)if(n.has(e[t]))return!0;return!1}var qe="[data-sidebar-right-panel]",$e='[data-sidebar-right-mode="fullscreen"]';function he(e){if(e==null||typeof e.closest!="function")return"no-root";var r,n;try{if(r=e.closest(qe),r==null||typeof r.querySelector!="function")return"no-panel";n=r.querySelector($e)}catch(t){return"lookup-failed"}if(n==null||typeof n.click!="function")return"no-control";try{n.click()}catch(t){return"click-failed"}return"clicked"}function ge(e,r){if(!(e==null||e.byId==null)&&!(typeof r!="string"||r==="")){var n=e.byId[r];if(n!=null)return typeof n.cwd=="string"&&n.cwd!==""?n.cwd:void 0}}function J(e,r){if(!(e==null||!Array.isArray(e.items))&&!(typeof r!="string"||r===""))for(var n=0;n<e.items.length;n+=1){var t=e.items[n];if(!(t==null||!Array.isArray(t.sessionIds))&&t.sessionIds.indexOf(r)!==-1&&typeof t.path=="string"&&t.path!=="")return t.path}}function Z(e){var r=e==null?{}:e,n=r.sessions==null?null:r.sessions,t=r.workspaces==null?null:r.workspaces,a=typeof r.sessionId=="string"&&r.sessionId!==""?r.sessionId:void 0,l=ge(n,a);if(l!==void 0)return l;var o=n==null?void 0:n.current,c=ge(n,o);if(c!==void 0)return c;var p=J(t,a);if(p!==void 0)return p;var f=J(t,typeof o=="string"?o:void 0);if(f!==void 0)return f;var x=n!=null&&Array.isArray(n.ids)?n.ids[0]:void 0,v=J(t,typeof x=="string"?x:void 0);if(v!==void 0)return v;if(t!=null&&Array.isArray(t.items)&&t.recentWorkspaceId!==void 0)for(var w=0;w<t.items.length;w+=1){var d=t.items[w];if(!(d==null||d.workspaceId!==t.recentWorkspaceId)&&typeof d.path=="string"&&d.path!=="")return d.path}if(t!=null&&Array.isArray(t.items)&&t.items.length>0){var m=t.items[0];if(m!=null&&typeof m.path=="string"&&m.path!=="")return m.path}}var R=typeof Element!="undefined"&&typeof Element.prototype.moveBefore=="function",er=-2e4,s={park:null,frame:null,currentSrc:null,sameOrigin:null,owner:null,lastRect:null,parkStrategy:"offscreen",degraded:!1,preloaded:!1,nudgeCount:0,nudgeEnabled:!0,lastNudgeAt:0,listeners:new Set};function K(){return{ready:s.frame!==null,docked:s.owner!==null,owner:s.owner,src:s.currentSrc,sameOrigin:s.sameOrigin,parkStrategy:s.parkStrategy,degraded:s.degraded,preloaded:s.preloaded,supportsMoveBefore:R,nudgeCount:s.nudgeCount,lastNudgeAt:s.lastNudgeAt}}function j(){var e=K();s.listeners.forEach(function(r){try{r(e)}catch(n){}})}function be(e){return s.listeners.add(e),function(){s.listeners.delete(e)}}function ye(){return K()}function rr(e){e!=="offscreen"&&e!=="behind"||s.parkStrategy!==e&&(s.parkStrategy=e,s.frame!==null&&s.owner===null&&V(),j())}function nr(){return s.parkStrategy}function tr(){var e=s.lastRect;e!==null&&(s.park.style.width=Math.max(1,Math.round(e.width))+"px",s.park.style.height=Math.max(1,Math.round(e.height))+"px")}function V(){if(s.park!==null){if(tr(),s.parkStrategy==="behind"&&s.lastRect!==null){s.park.style.left=Math.round(s.lastRect.left)+"px",s.park.style.top=Math.round(s.lastRect.top)+"px",s.park.style.visibility="visible",s.park.style.zIndex="0";return}s.park.style.left=er+"px",s.park.style.top="0px",s.park.style.visibility="hidden",s.park.style.zIndex="0"}}function xe(){s.frame!==null&&(s.frame.setAttribute("inert",""),s.frame.setAttribute("aria-hidden","true"))}function ar(){s.frame!==null&&(s.frame.removeAttribute("inert"),s.frame.removeAttribute("aria-hidden"))}function sr(){var e=document.createElement("div");e.className="dshcs-park",e.setAttribute("data-dshcs-park",""),e.setAttribute("aria-hidden","true");var r=document.createElement("iframe");return r.className="dshcs-frame",r.setAttribute("title","code-server"),r.setAttribute("allow","clipboard-read; clipboard-write"),r.setAttribute("data-dshcs-resident",""),r.src="about:blank",e.appendChild(r),document.body.appendChild(e),s.park=e,s.frame=r,s.currentSrc="about:blank",s.owner=null,V(),xe(),r}function ir(e){var r=s.frame;if(r!==null){var n=s.sameOrigin!==e;!n&&r.hasAttribute("data-dshcs-attrs")||(e===!0?r.removeAttribute("sandbox"):e===!1&&r.setAttribute("sandbox","allow-scripts allow-same-origin allow-forms allow-modals allow-popups allow-pointer-lock allow-clipboard-read allow-clipboard-write"),r.setAttribute("data-dshcs-attrs",e===!0?"same-origin":"cross-origin"),s.sameOrigin=e)}}function q(e){var r=e||{};return s.frame===null&&sr(),typeof r.sameOrigin=="boolean"&&ir(r.sameOrigin),typeof r.src=="string"&&r.src!==""&&r.src!==s.currentSrc&&lr(r.src),s.frame}function lr(e){s.frame===null||typeof e!="string"||e===""||e===s.currentSrc||(s.currentSrc=e,s.frame.src=e,j())}function we(){var e=s.frame;if(s.nudgeEnabled!==!0||e===null||e.isConnected!==!0)return!1;var r=e.style.display;return e.style.display="none",e.offsetHeight,e.style.display=r,s.nudgeCount+=1,s.lastNudgeAt=Date.now(),!0}function or(e){return s.nudgeEnabled=e!==!1,s.nudgeEnabled}function ke(e){if(s.frame!==null){if(R)try{e.moveBefore(s.frame,null);return}catch(r){s.degraded=!0,s.lastMoveError=(r&&r.name?r.name+": ":"")+(r&&r.message?r.message:String(r))}else s.degraded=!0;e.appendChild(s.frame)}}function $(e,r){if(!(s.frame===null||e==null)){var n=s.owner===null,t=e.getBoundingClientRect();t.width>=1&&t.height>=1&&(s.lastRect={left:t.left,top:t.top,width:t.width,height:t.height}),s.owner=r===void 0?null:r,ar(),s.park.setAttribute("aria-hidden","true"),ke(e),n&&we(),j()}}function D(e){s.frame!==null&&(e!==void 0&&s.owner!==e||(s.owner=null,V(),xe(),s.park.setAttribute("aria-hidden","true"),ke(s.park),j()))}function ee(e){var r=e||{};return q(r),s.owner===null&&(typeof r.src=="string"&&r.src!==""&&(s.preloaded=!0),D()),s.frame}function cr(){s.park!==null&&s.park.parentNode!==null&&s.park.parentNode.removeChild(s.park),s.park=null,s.frame=null,s.currentSrc=null,s.sameOrigin=null,s.owner=null,s.lastRect=null,s.degraded=!1,s.preloaded=!1,s.nudgeCount=0,s.lastNudgeAt=0,j()}typeof window!="undefined"&&(window.__dshcsSurface={snapshot:K,setParkStrategy:rr,getParkStrategy:nr,preload:ee,dock:$,park:D,nudge:we,setNudgeEnabled:or,destroy:cr});var i=require("react"),te=new Set,z={status:null,busy:!1,sidebarUi:"unknown",sidebarRegisterFailed:!1};function L(e){z=Object.assign({},z,e),te.forEach(function(r){r()})}function dr(e){return te.add(e),function(){te.delete(e)}}function ur(){return z}function se(){return i.useSyncExternalStore(dr,ur)}var fr="/api",pr="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiB2aWV3Qm94PSIwIDAgMTQ3IDE0NyIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8c3R5bGU+QG1lZGlhIChwcmVmZXJzLWNvbG9yLXNjaGVtZTogZGFyaykgeyogeyBmaWxsOiB3aGl0ZTsgfX08L3N0eWxlPgogIDxwYXRoIGQ9Im00Mi40MjE0LDM5LjY1NWMtMjQuNDA1NywwIC00Mi4xNTU0LDEzLjE3MjEgLTQyLjE1NTQsMzMuODQ1YzAsMjAuNTgxNCAxOC40ODkyLDMzLjg0NSA0Mi4xNTU0LDMzLjg0NWMyMy42NjYyLDAgMzguMTgwMywtMTEuNjE3MSAzOC43MzQ5LC0yOC43MjI1bC0yMS4wNzc3LC0wLjQ1NzRjLTAuOTI0NCw5LjMzMDMgLTkuMTA1OSwxNS4xODQ1IC0xNy42NTcyLDE1LjE4NDVjLTExLjc0MDYsMCAtMjAuNDMwNiwtNy41OTIyIC0yMC40MzA2LC0xOS44NDk2YzAsLTEyLjI1NzQgOC42OSwtMTkuOTg2OCAyMC40MzA2LC0yMC4yMTU1YzguNTUxMywtMC4xODMgMTYuOTE3Nyw1Ljk0NTcgMTcuNDcyMywxNS4yNzZsMjEuMDc3NywtMC42NDAzYy0wLjQ2MjIsLTE2LjgzMTEgLTE0LjE0NDIsLTI4LjI2NTIgLTM4LjU1LC0yOC4yNjUyem00OC44NDQ2LDJsNTUuNDY4LDBsMCw2NC4wMzExbC01NS40NjgsMGwwLC02NC4wMzExeiIgY2xpcC1ydWxlPSJldmVub2RkIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz4KPC9zdmc+Cg==";async function y(e,r){var n={method:r===void 0?"GET":"POST",headers:{}};r!==void 0&&(n.headers["content-type"]="application/json",n.body=JSON.stringify(r));var t=await fetch(fr+e,n),a=await t.text(),l=null;try{l=a===""?null:JSON.parse(a)}catch(o){l=null}return t.ok?l!==null?l:{ok:!1,error:"invalid JSON response"}:{ok:!1,error:"HTTP "+t.status+(l!==null&&l.error!==void 0?": "+l.error:"")}}function Ee(){}function Me(e){var r=typeof e.useSessions=="function"?e.useSessions:Ee,n=typeof e.useWorkspaces=="function"?e.useWorkspaces:Ee;return{sessions:r(function(t){return t}),workspaces:n(function(t){return t})}}function Ie(e,r){if(e==null||typeof e.url!="string"||e.url==="")return null;var n=e.pid!=null?String(e.pid):e.startedAt!=null?String(e.startedAt):"0",t=e.url+"?s="+encodeURIComponent(n),a=typeof r=="string"&&r!==""?r:e!=null&&e.cwd!=null?e.cwd:null;if(a==null||a==="")return t;var l=a.replace(/\\/g,"/"),o=l;return(/^[A-Za-z]:\//.test(l)||l.charCodeAt(0)!==47)&&(o="/"+l),t+"&folder="+encodeURIComponent(o)}function vr(e){var r=e.status,n=e.pageUrl,t=e.reloadTick,a=e.owner,l=i.useRef(null),o=r!=null&&r.ok===!0&&r.running===!0,c=r!=null&&r.status==="starting",p=r!=null&&r.ok===!1,f=r!=null&&r.serve==="dsh";if(i.useLayoutEffect(function(){if(!o||n===null){D(a);return}q({src:n,sameOrigin:f}),l.current!==null&&$(l.current,a)},[o,n,f,t,a]),i.useLayoutEffect(function(){return function(){D(a)}},[a]),o&&n!==null)return i.createElement("div",{ref:l,className:"dshcs-slot","data-code-server-slot":a!=null?a:"code-server"});if(c)return i.createElement("div",{className:"dshcs-loading"},"\u6B63\u5728\u542F\u52A8 code-server\u2026");var x=p&&r!=null&&r.error?r.error:"code-server \u672A\u8FD0\u884C",v=f?"\u5F53\u524D\u4EE5 DSH \u540C\u6E90\u8DEF\u5F84 "+(r!=null&&r.url||"/code-server/")+" \u63D0\u4F9B(\u65E0\u72EC\u7ACB\u7AEF\u53E3)\u3002":"\u5F53\u524D\u4EE5\u72EC\u7ACB\u56DE\u73AF\u7AEF\u53E3\u63D0\u4F9B(\u7AEF\u53E3 "+(r!=null&&r.port!=null?r.port:"\u968F\u673A")+" + \u8DEF\u5F84\u4EE4\u724C;\u8981\u5728\u65B0\u6807\u7B7E\u9875\u6253\u5F00,\u590D\u5236\u8BBE\u7F6E\u5361\u91CC\u7684\u5B8C\u6574\u5730\u5740 \u2014\u2014 \u7F3A\u4E86\u4EE4\u724C\u90A3\u6BB5\u4F1A 404)\u3002",w=R?"\u5E38\u9A7B\u9762:\u53EF\u7528(\u5207\u6807\u7B7E/\u6536\u8D77\u4FA7\u680F\u4E0D\u91CD\u8F7D)\u3002":"\u5E38\u9A7B\u9762:\u5F53\u524D\u6D4F\u89C8\u5668\u4E0D\u652F\u6301 Element.moveBefore \u2014\u2014 \u5207\u6807\u7B7E\u4F1A\u6574\u9875\u91CD\u8F7D(\u5347\u7EA7\u6D4F\u89C8\u5668\u540E\u81EA\u52A8\u53EF\u7528)\u3002";return i.createElement("div",{className:"dshcs-empty"},i.createElement("div",{className:"dshcs-emptybox"},i.createElement("div",null,p?"code-server \u542F\u52A8\u5931\u8D25":"code-server \u672A\u8FD0\u884C"),i.createElement("pre",{className:"dshcs-error"},x),i.createElement("p",{className:"dshcs-hint"},"VS Code \u6811\u968F\u63D2\u4EF6\u5305\u5185\u7F6E\u3001\u5C31\u5730\u8FD0\u884C(\u65E0\u9700\u5168\u5C40\u5B89\u88C5\u3001\u65E0\u9700\u8054\u7F51\u5B89\u88C5\u3001\u65E0\u300C\u5B89\u88C5\u73AF\u5883\u300D\u6B65\u9AA4);\u5185\u90E8\u4F9D\u8D56\u4E0E\u9884\u7F16\u8BD1\u539F\u751F\u6A21\u5757\u7531\u5305\u7BA1\u7406\u5668\u5728\u5B89\u88C5\u63D2\u4EF6\u65F6\u4E00\u5E76\u88C5\u597D(\u65E0\u9700 C++ \u5DE5\u5177\u94FE)\u3002\u82E5\u6B64\u5904\u957F\u671F\u672A\u8FD0\u884C,\u8BF7\u67E5\u770B DSH host \u65E5\u5FD7\u91CC\u7684 [code-server] \u8F93\u51FA(\u6216\u5728\u8BBE\u7F6E\u5361\u7247\u91CC\u5207\u6362\u300C\u540E\u53F0\u5E38\u9A7B\u300D\u89E6\u53D1\u4E00\u6B21\u542F\u52A8)\u3002"+v+w)))}function mr(e){var r=se(),n=r.status,t=n!=null&&n.ok===!0&&n.running===!0,a=n!=null&&n.keepResident===!0,l=Me(e!=null?e:{}),o=Z({sessions:l.sessions,workspaces:l.workspaces}),c=t?Ie(n,o):null;return i.useEffect(function(){!a||!t||c===null||ee({src:c,sameOrigin:n!=null&&n.serve==="dsh"})},[a,t,c,n!=null?n.serve:null]),null}var hr=".dshcs-frame{display:block;position:absolute;inset:0;z-index:1;width:100%;height:100%;border:0;background:var(--dsw-alias-bg-base,#fff)}.dshcs-tabroot{position:relative;display:flex;flex-direction:column;width:100%;height:100%;min-width:0;min-height:0;background:var(--dsw-alias-bg-base,#fff)}.dshcs-slot{position:relative;display:block;width:100%;height:100%;min-width:0;min-height:0;overflow:hidden;background:var(--dsw-alias-bg-base,#fff)}.dshcs-park{position:fixed;left:-20000px;top:0;width:320px;height:200px;overflow:hidden;pointer-events:none;z-index:0;visibility:hidden;contain:strict}.dshcs-loading{position:absolute;inset:0;z-index:2;display:grid;place-items:center;background:var(--dsw-alias-bg-base,#fff);color:var(--dsw-alias-label-tertiary,#7d8798);font-size:13px}.dshcs-empty{position:relative;z-index:2;flex:1;display:flex;align-items:center;justify-content:center;padding:44px 24px 24px}.dshcs-emptybox{max-width:560px;text-align:left;background:var(--dsw-alias-bg-layer-2,#f7f8fb);border:1px solid var(--dsw-alias-border-l2,#dfe3eb);border-radius:12px;padding:16px 18px}.dshcs-error{color:var(--dsw-alias-label-error,#d92d20);white-space:pre-wrap;word-break:break-all;font-family:ui-monospace,Consolas,monospace;font-size:12px;margin:8px 0 0}.dshcs-hint{color:var(--dsw-alias-label-tertiary,#7d8798);font-size:12px;margin:6px 0 0}.dshcs-legacy{color:var(--dsw-alias-label-warning,#b54708);font-size:12px;font-weight:600;margin:0 0 6px}",Se="dsh-code-server/styles";typeof document!="undefined"&&document.querySelector("style[data-dshcs="+JSON.stringify(Se)+"]")===null&&(F=document.createElement("style"),F.setAttribute("data-dshcs",Se),F.textContent=hr,document.head.appendChild(F));var F,Ce="code-server",Ne="dsh-code-server-app",gr="dsh-code-server-app",br="\u5728\u53F3\u4FA7\u680F\u6807\u7B7E\u91CC\u8FD0\u884C VS Code \u7F51\u9875\u7248,\u8DDF\u968F\u5F53\u524D\u4F1A\u8BDD\u5DE5\u4F5C\u533A;\u8BA4\u9886\u7C7B\u578B\u3001\u6253\u5F00\u5373\u5168\u5C4F\u3001\u540E\u53F0\u5E38\u9A7B\u90FD\u5728\u8FD9\u91CC\u8BBE\u3002",yr=2500,xr=1e4,wr=1500;function kr(e){var r=e!=null&&typeof e.size=="number"?e.size:16;return i.createElement("img",{src:pr,alt:"","aria-hidden":!0,draggable:!1,className:e!=null?e.className:void 0,style:{width:r,height:r,display:"block",objectFit:"contain",WebkitUserDrag:"none",userSelect:"none"}})}var Er=B("");function Sr(){var e=z.status;return e==null||typeof e.claimExtensions!="string"?Er:B(e.claimExtensions)}function Cr(e){var r=e.useTabInfo(),n=r.tab,t=se(),a=t.status,l=n.navigation,o=l!=null&&typeof l.revision=="number"?l.revision:0,c=l!=null&&typeof l.address=="string"?l.address:"",p=Q(c)?null:U(c),f=Me(e),x=p!=null&&typeof p.sessionId=="string"?p.sessionId:void 0,v=Z({sessions:f.sessions,workspaces:f.workspaces,sessionId:x!==void 0?x:e.sessionId}),w=i.useRef(!1),d=de(p,v),m=l!=null&&l.params!=null&&typeof l.params.line=="number"?l.params.line:null,h=i.useRef(void 0),[E,Y]=i.useState(0),P=i.useRef(null),C=i.useRef(!1),_=r.tab!=null&&r.tab.visible===!0,H=r.sidebar!=null&&r.sidebar.fullscreen===!0,M=a!=null&&a.fullscreenOnOpen!==!1;return i.useLayoutEffect(function(){if(!_){C.current=!1;return}if(!(!M||H||C.current)){C.current=!0;var b=he(P.current);b!=="clicked"&&console.warn("[code-server] \u672A\u80FD\u81EA\u52A8\u5207\u5230\u5168\u5C4F\u53F3\u4FA7\u680F("+b+");\u672C\u6B21\u6253\u5F00\u4FDD\u6301\u539F\u6A21\u5F0F")}},[_,H,M]),i.useEffect(function(){if(!(typeof v!="string"||v==="")&&h.current!==v){var b=h.current!==void 0;h.current=v;var S=!1;return y("/code-server/start",{cwd:v}).then(function(N){S||(L({status:N}),b&&N!=null&&N.ok===!0&&N.running===!0&&Y(function(g){return g+1}))}).catch(function(){}),function(){S=!0}}},[v]),i.useEffect(function(){typeof v=="string"&&v!==""||w.current||(w.current=!0,console.warn("[code-server] \u672A\u80FD\u89E3\u6790\u5F53\u524D\u5DE5\u4F5C\u533A\u76EE\u5F55(\u4F1A\u8BDD\u65E0 cwd / \u6807\u51C6 prop \u65E0 sessionId / \u5DE5\u4F5C\u533A\u8868\u4E5F\u6CA1\u5339\u914D\u4E0A):\u672C\u6B21\u4E0D\u5411\u5BBF\u4E3B\u53D1\u9001 cwd,IDE \u4F1A\u4EE5\u7A7A\u5DE5\u4F5C\u533A\u6253\u5F00"))},[v]),i.useEffect(function(){y("/code-server/status").then(function(S){S!=null&&L({status:S})}).catch(function(){});var b=window.setInterval(function(){y("/code-server/status").then(function(S){L({status:S})}).catch(function(){})},3e3);return function(){window.clearInterval(b)}},[]),i.useEffect(function(){d!==null&&y("/code-server/open-file",m===null?{file:d}:{file:d,line:m}).catch(function(){})},[o,d,m]),i.createElement("div",{className:"dshcs-tabroot","data-code-server-tab":"body",ref:P},i.createElement(vr,{status:a,pageUrl:Ie(a,v),reloadTick:E,owner:"tab:"+n.id}))}function re(e,r){if(e==null)return null;var n=e[r];if(n!=null)return n;if(typeof e.get=="function"){var t=e.get(r);if(t!=null)return t}return null}function Nr(e){var r=re(e,"sidebarRightTabs"),n=re(e,"sidebarRight");if(r==null||n==null)return console.error("[code-server] \u53F3\u4FA7\u680F\u670D\u52A1\u4E0A\u4E0B\u6587\u4E0D\u53EF\u89C1(sidebarRightTabs="+(r!=null)+", sidebarRight="+(n!=null)+"):\u8DF3\u8FC7\u4FA7\u680F\u6CE8\u518C"),!1;var t=re(e,"slots");if(e.effect(function(){return r.register({id:Ne,kind:Ce,priority:"extension",patterns:["dsh-resource://file/**"],canOpen:function(a){return ve(U(a),Sr())},title:function(a){if(Q(a)||a===void 0||a===null||a==="")return"Code Server";var l=ce(a);return l===""?"Code Server":l},guide:[{order:20,title:function(){return"Code Server"},description:function(){return"\u5728\u53F3\u4FA7\u680F\u6807\u7B7E\u91CC\u8FD0\u884C VS Code \u7F51\u9875\u7248,\u8DDF\u968F\u5F53\u524D\u4F1A\u8BDD\u5DE5\u4F5C\u533A;\u4EA7\u7269/\u4EA4\u4ED8\u6587\u4EF6\u70B9\u51FB\u540E\u5728\u6B64\u6253\u5F00\u3002"},icon:kr}]})},"code-server: sidebar tab type"),t!=null)e.effect(function(){return t.inject("sidebar.right.pane.tab",function(){return t.register({name:"sidebar.right.pane.tab",key:Ne},Cr)})},"code-server: sidebar tab body");else return console.error("[code-server] slots \u670D\u52A1\u4E0D\u53EF\u89C1:\u4FA7\u680F\u6807\u7B7E body \u672A\u6CE8\u518C"),!1;return e.effect(function(){return function(){L({sidebarUi:"unknown"})}},"code-server: sidebar mode reset"),console.log("[code-server] right-sidebar tab registered (kind="+Ce+")"),!0}var Or=".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}.dshcs-card:hover{border-color:var(--dsw-alias-label-dimmed,var(--dsw-alias-border-l2))}.dshcs-cardOpen{background:var(--dsw-alias-bg-layer-2);border-color:var(--dsw-alias-label-dimmed,var(--dsw-alias-border-l2))}.dshcs-cardHeader{appearance:none;width:100%;font:inherit;color:inherit;text-align:left;cursor:pointer;background:0 0;border:0;border-radius:12px;align-items:center;gap:12px;padding:14px 16px;display:flex}.dshcs-cardHeader:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:-2px}.dshcs-cardHeadText{flex-direction:column;flex:1;gap:4px;min-width:0;display:flex}.dshcs-cardName{color:var(--dsw-alias-label-primary);font-size:15px;font-weight:600;line-height:1.4}.dshcs-cardDescription{color:var(--dsw-alias-label-tertiary,var(--dsw-alias-label-secondary));font-size:13px;line-height:1.5}.dshcs-cardChevron{color:var(--dsw-alias-label-tertiary,var(--dsw-alias-label-secondary));flex:none;transition:transform .16s;display:inline-flex}.dshcs-cardChevronOpen{transform:rotate(180deg)}.dshcs-cardBody{border-top:1px solid var(--dsw-alias-border-l2);margin:0 16px;padding-bottom:8px}.dshcs-cardReadOnly{color:var(--dsw-alias-label-tertiary,var(--dsw-alias-label-secondary));margin:12px 0 0;font-size:12px;line-height:1.5}.dshcs-pending{white-space:nowrap;background:var(--dsw-alias-bg-module-platform,var(--dsw-alias-bg-layer-2));color:var(--dsw-alias-label-secondary);border-radius:999px;flex:none;padding:1px 8px;font-size:11px;font-weight:500;line-height:17px}.dshcs-cardFooter{border-top:1px solid var(--dsw-alias-border-l2);justify-content:flex-end;align-items:center;gap:8px;padding:12px 0 4px;display:flex}.dshcs-cardFailed{min-width:0;color:var(--dsw-alias-label-error,var(--dsw-alias-state-error-primary));flex:1;margin:0;font-size:12px;line-height:1.5}.dshcs-cbtn{appearance:none;font:inherit;cursor:pointer;border-radius:8px;padding:5px 14px;font-size:13px;line-height:1.5;border:1px solid transparent;transition:color .12s ease,background .12s ease}.dshcs-cbtn:disabled{opacity:.4;cursor:default}.dshcs-cbtn:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:1px}.dshcs-cbtnOutline{border-color:var(--dsw-alias-border-l2);color:var(--dsw-alias-label-secondary);background:0 0}.dshcs-cbtnOutline:hover:not(:disabled){color:var(--dsw-alias-label-primary);background:var(--dsw-alias-interactive-bg-hover,transparent)}.dshcs-cbtnPrimary{background:var(--dsw-alias-label-primary);color:var(--dsw-alias-bg-layer-3);border-color:var(--dsw-alias-label-primary);font-weight:600}.dshcs-cbtnPrimary:hover:not(:disabled){filter:brightness(.95)}.dshcs-cbtnPrimary:active:not(:disabled){filter:brightness(.9)}.dshcs-field{flex-direction:column;gap:6px;padding:12px 0;display:flex}.dshcs-field+.dshcs-field{border-top:1px solid var(--dsw-alias-border-l2)}.dshcs-fieldHead{align-items:center;gap:8px;display:flex}.dshcs-fieldLabel{min-width:0;color:var(--dsw-alias-label-primary);flex:1;font-size:13px;font-weight:500;line-height:1.5}.dshcs-card .dshcs-hint{color:var(--dsw-alias-label-tertiary,var(--dsw-alias-label-secondary));margin:0;font-size:12px;line-height:1.5}.dshcs-check{display:flex;align-items:center;gap:8px;cursor:pointer}.dshcs-check input{accent-color:var(--dsw-alias-brand-primary);width:15px;height:15px;margin:0;flex:none}.dshcs-check input:disabled{cursor:default}.dshcs-text{display:flex}.dshcs-text input{font:12px/1.5 ui-monospace,Consolas,monospace;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-3,transparent);border:1px solid var(--dsw-alias-border-l2);border-radius:8px;padding:5px 8px;width:100%;min-width:0}.dshcs-text input:disabled{opacity:.5;cursor:default}.dshcs-text input:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:-1px}.dshcs-badges{align-items:center;gap:8px;display:inline-flex}.dshcs-badge{white-space:nowrap;background:var(--dsw-alias-bg-module-platform,var(--dsw-alias-bg-layer-2));color:var(--dsw-alias-label-secondary);border-radius:999px;padding:1px 8px;font-size:11px;font-weight:500;line-height:17px}.dshcs-reset{font:inherit;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;padding:0;font-size:12px;line-height:1.5}.dshcs-reset:hover:not(:disabled){color:var(--dsw-alias-label-primary)}.dshcs-reset:disabled{cursor:default}.dshcs-cfgpage{display:flex;flex-direction:column;gap:0}.dshcs-cfgfoot{justify-content:flex-end;align-items:center;gap:8px;padding:12px 0 4px;display:flex}",Lr="dsh-code-server/Card.module.css";function Ar(e,r){if(typeof document!="undefined"&&document.querySelector("style[data-plugin-css="+JSON.stringify(e)+"]")===null){var n=document.createElement("style");n.dataset.plugin="dsh-code-server",n.dataset.pluginCss=e,n.textContent=r,document.head.appendChild(n)}}Ar(Lr,Or);function Tr(e){return i.createElement("svg",{width:14,height:14,viewBox:"0 0 14 14",fill:"none","aria-hidden":!0,className:e.className},i.createElement("path",{d:"M3.5 5.25L7 8.75L10.5 5.25",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}))}function W(e){return i.createElement("button",{type:"button",className:"dshcs-cbtn "+(e.variant==="primary"?"dshcs-cbtnPrimary":"dshcs-cbtnOutline"),disabled:e.disabled===!0,onClick:e.onClick},e.children)}function Oe(e){return i.createElement("label",{className:"dshcs-check"},i.createElement("input",{type:"checkbox",checked:e.checked===!0,disabled:e.disabled===!0,onChange:function(r){e.onChange(r.target.checked)}}),i.createElement("span",{className:"dshcs-hint"},e.children))}function Mr(e){return i.createElement("label",{className:"dshcs-text"},i.createElement("input",{type:"text",value:e.value,disabled:e.disabled===!0,spellCheck:!1,autoComplete:"off",placeholder:e.placeholder,onChange:function(r){e.onChange(r.target.value)}}))}function ne(e){var r=[];return e.overridden===!0&&(r.push(i.createElement("span",{className:"dshcs-badge"},e.overriddenLabel)),r.push(i.createElement("button",{type:"button",className:"dshcs-reset",disabled:e.disabled===!0,onClick:e.onReset},e.resetLabel))),r.length===0?null:i.createElement("span",{className:"dshcs-badges"},...r)}function Le(e){var[r,n]=i.useState(e.defaultOpen===!0),t=e.state;if(t==null||t.available!==!0)return null;var a=e.title,l=e.noticeOnly===!0,o=t.dirty!==!0||t.invalid===!0||t.saving===!0;return i.createElement("li",{className:"dshcs-card"+(r?" dshcs-cardOpen":"")},i.createElement("button",{type:"button",className:"dshcs-cardHeader","aria-expanded":r,onClick:function(){n(!r)}},i.createElement("span",{className:"dshcs-cardHeadText"},i.createElement("span",{className:"dshcs-cardName"},a),i.createElement("span",{className:"dshcs-cardDescription"},e.description)),t.dirty===!0?i.createElement("span",{className:"dshcs-pending"},e.unsavedLabel):null,i.createElement(Tr,{className:"dshcs-cardChevron"+(r?" dshcs-cardChevronOpen":"")})),r===!0?i.createElement("div",{className:"dshcs-cardBody"},l===!0?null:t.writable!==!0?i.createElement("p",{className:"dshcs-cardReadOnly",role:"status"},e.readOnlyLabel):null,e.children,l===!0?null:i.createElement("div",{className:"dshcs-cardFooter"},t.failed===!0?i.createElement("p",{className:"dshcs-cardFailed",role:"status"},e.saveFailedLabel):null,i.createElement(W,{disabled:t.dirty!==!0||t.saving===!0,onClick:e.onDiscard},e.discardLabel),i.createElement(W,{variant:"primary",disabled:o,onClick:e.onSave},t.saving===!0?e.savingLabel:e.saveLabel))):null)}function Re(e){try{let b=function(){y("/code-server/status").then(function(g){g!=null&&typeof g=="object"&&L({status:g})}).catch(function(){})};var r=e.scope,[n,t]=i.useState(function(){return r!==void 0?r.getSnapshot():null}),[a,l]=i.useState(null),[o,c]=i.useState(!1),[p,f]=i.useState(!1),x=se(),[v,w]=i.useState(ye());if(i.useEffect(function(){return be(function(g){w(g)})},[]),i.useEffect(function(){if(r===void 0||typeof r.subscribe!="function")return;function g(){try{t(r.getSnapshot())}catch(Wr){}}var k=r.subscribe(g);return function(){typeof k=="function"&&k()}},[r]),r===void 0)return console.error("[code-server] card scope missing"),null;if(n==null||n.status!=="ready")return n!=null&&n.status==="unavailable"&&console.warn("[code-server] settings scope unavailable:",n.status),null;var d=n.value!==void 0&&n.value!==null?n.value:{},m=n.user,h={keepResident:d.keepResident!==!1,claimExtensions:typeof d.claimExtensions=="string"?d.claimExtensions:I,fullscreenOnOpen:d.fullscreenOnOpen!==!1};if(x!=null&&x.sidebarUi==="legacy")return i.createElement(Le,{title:"Code Server",description:"\u5F53\u524D DSH \u7248\u672C\u4E0D\u53D7\u652F\u6301(\u7F3A\u5C11\u53F3\u4FA7\u680F\u670D\u52A1)",defaultOpen:!0,noticeOnly:!0,state:{available:!0,writable:!1,dirty:!1,invalid:!1,saving:!1,failed:!1}},i.createElement("div",{className:"dshcs-field"},i.createElement("div",{className:"dshcs-legacy"},"\u672C\u63D2\u4EF6\u81EA 0.2.3 \u8D77\u4E0D\u518D\u517C\u5BB9\u65E7\u7248 DSH\u3002"),i.createElement("div",{className:"dshcs-hint",style:{marginTop:0}},`\u672A\u68C0\u6D4B\u5230\u53F3\u4FA7\u680F\u63D2\u4EF6\u670D\u52A1 sidebarRightTabs / sidebarRight,\u56E0\u6B64\u63D2\u4EF6\u4E0D\u63D0\u4F9B\u4EFB\u4F55\u5165\u53E3(\u65E7\u7248\u7684\u60AC\u6D6E\u7403\u4E0E\u6D6E\u52A8\u7A97\u53E3\u5DF2\u79FB\u9664),\u4E5F\u4E0D\u4F1A\u540E\u53F0\u542F\u52A8 IDE\u3002
3
+ \u5347\u7EA7 DSH \u5230\u5E26\u53F3\u4FA7\u680F\u7684\u7248\u672C(\u2265 0.1.5-alpha.1)\u540E,Code Server \u4F1A\u51FA\u73B0\u5728\u53F3\u4FA7\u680F\u6807\u7B7E\u91CC,\u672C\u9875\u540C\u65F6\u663E\u793A\u5B8C\u6574\u8BBE\u7F6E\u9879;\u5347\u7EA7\u540E\u65E0\u9700\u91CD\u88C5\u672C\u63D2\u4EF6,\u5237\u65B0\u9875\u9762\u5373\u53EF\u3002`)));var E=m!=null&&Object.prototype.hasOwnProperty.call(m,"keepResident"),Y=m!=null&&Object.prototype.hasOwnProperty.call(m,"claimExtensions"),P=m!=null&&Object.prototype.hasOwnProperty.call(m,"fullscreenOnOpen"),C=a!==null&&(a.keepResident!==h.keepResident||A(a.claimExtensions)!==A(h.claimExtensions)||a.fullscreenOnOpen!==h.fullscreenOnOpen),_=!C||o,H={available:!0,writable:n.writable,dirty:C,invalid:!1,saving:o,failed:p};async function S(){if(C&&!o){c(!0),f(!1);try{var g=a!==null?a:h;await e.scope.set("keepResident",g.keepResident===!0),await e.scope.set("claimExtensions",A(g.claimExtensions)),await e.scope.set("fullscreenOnOpen",g.fullscreenOnOpen===!0),l(null),b()}catch(k){f(!0)}c(!1)}}async function N(){if(!(o||n.writable!==!0)){c(!0),f(!1);try{typeof e.scope.unset=="function"?(await e.scope.unset("keepResident"),await e.scope.unset("claimExtensions"),await e.scope.unset("fullscreenOnOpen")):(await e.scope.set("keepResident",d.keepResident===void 0||d.keepResident===null?!0:d.keepResident),await e.scope.set("claimExtensions",typeof d.claimExtensions=="string"?A(d.claimExtensions):I),await e.scope.set("fullscreenOnOpen",d.fullscreenOnOpen===void 0||d.fullscreenOnOpen===null?!0:d.fullscreenOnOpen)),l(null),b()}catch(g){f(!0)}c(!1)}}var M=[i.createElement("div",{className:"dshcs-field"},i.createElement("div",{className:"dshcs-fieldHead"},i.createElement("span",{className:"dshcs-fieldLabel"},"\u8BA4\u9886\u7C7B\u578B(\u6309\u6269\u5C55\u540D,\u5206\u53F7\u5206\u9694)"),Y===!0?i.createElement(ne,{overridden:!0,disabled:n.writable!==!0,overriddenLabel:"\u5DF2\u8986\u76D6",resetLabel:"\u6062\u590D\u9ED8\u8BA4",onReset:function(){N()}}):null),i.createElement(Mr,{value:a!==null?a.claimExtensions:h.claimExtensions,disabled:n.writable!==!0,placeholder:I,onChange:function(g){l(function(k){return Object.assign({},k!==null?k:h,{claimExtensions:g})}),f(!1)}}),i.createElement("div",{className:"dshcs-hint",style:{marginTop:4}},"\u5199\u6269\u5C55\u540D(\u4E0D\u5E26\u70B9,\u5927\u5C0F\u5199\u968F\u610F);`*` = \u5176\u4F59\u7C7B\u578B\u4E5F\u8BA4\u9886;`!ext` = \u4E0D\u8BA4\u9886(\u6392\u9664\u4F18\u5148)\u3002\u4E0D\u518D\u533A\u5206\u4F1A\u8BDD\u5185/\u7EDD\u5BF9\u8DEF\u5F84 \u2014\u2014 \u6240\u6709 `dsh-resource://file/**` \u4E00\u89C6\u540C\u4EC1,\u672A\u8BA4\u9886\u7684\u843D\u56DE DSH \u81EA\u5E26\u9884\u89C8\u3002"),i.createElement("div",{className:"dshcs-hint",style:{marginTop:2}},"\u9ED8\u8BA4\u6392\u9664\u4E09\u7C7B:DSH \u9884\u89C8\u6E32\u67D3\u5F97\u597D\u7684 markdown/html/\u56FE\u7247/PDF\u3001**\u53EF\u6267\u884C\u6587\u4EF6\u4E0E\u4E8C\u8FDB\u5236\u4EA7\u7269**(exe/dll/msi/jar/so\u2026)\u3001**Office \u4E0E\u7248\u5F0F\u6587\u6863**(docx/xlsx/pptx/vsdx\u2026)\u3002\u6587\u672C\u5F62\u6001\u7684\u811A\u672C(bat/cmd/ps1/sh/py)\u4E0E csv/tsv \u4ECD\u8FDB IDE\u3002"),i.createElement("div",{className:"dshcs-hint",style:{marginTop:2}},"\u5B9E\u9645\u89C4\u5219:"+me(a!==null?a.claimExtensions:h.claimExtensions)+(A(a!==null?a.claimExtensions:h.claimExtensions)!==(a!==null?a.claimExtensions:h.claimExtensions)?"(\u4FDD\u5B58\u540E\u5F52\u4E00\u5316)":"")+" \xB7 \u9ED8\u8BA4 "+I)),i.createElement("div",{className:"dshcs-field"},i.createElement("div",{className:"dshcs-fieldHead"},i.createElement("span",{className:"dshcs-fieldLabel"},"\u6253\u5F00\u5373\u5168\u5C4F(\u53F3\u4FA7\u680F\u94FA\u6EE1\u7A97\u53E3)"),P===!0?i.createElement(ne,{overridden:!0,disabled:n.writable!==!0,overriddenLabel:"\u5DF2\u8986\u76D6",resetLabel:"\u6062\u590D\u9ED8\u8BA4",onReset:function(){N()}}):null),i.createElement(Oe,{checked:a!==null?a.fullscreenOnOpen:h.fullscreenOnOpen,disabled:n.writable!==!0,onChange:function(g){l(function(k){return Object.assign({},k!==null?k:h,{fullscreenOnOpen:g===!0})}),f(!1)}},'\u6253\u5F00 Code Server \u6807\u7B7E(\u542B\u70B9\u5F00\u4EA7\u7269/\u4EA4\u4ED8\u6587\u4EF6)\u65F6,\u81EA\u52A8\u628A\u53F3\u4FA7\u680F\u4ECE"\u4E0E\u5BF9\u8BDD\u5E76\u6392"\u5207\u5230\u5168\u5C4F;\u60F3\u540C\u65F6\u770B\u5BF9\u8BDD\u5C31\u5173\u6389\u5B83,\u6216\u968F\u65F6\u70B9\u53F3\u4FA7\u680F\u7684\u300C\u9000\u51FA\u5168\u5C4F\u300D\u2014\u2014 \u672C\u6B21\u6253\u5F00\u4E0D\u4F1A\u88AB\u62A2\u56DE\u53BB'),i.createElement("div",{className:"dshcs-hint",style:{marginTop:4}},'\u53EA\u5F71\u54CD"\u6253\u5F00\u90A3\u4E00\u523B":\u5207\u8D70\u518D\u5207\u56DE\u3001\u518D\u6B21\u6253\u5F00\u6587\u4EF6 tab \u4F1A\u91CD\u65B0\u5207\u5168\u5C4F;DSH \u672A\u5411\u63D2\u4EF6\u5F00\u653E\u6A21\u5F0F\u63A5\u53E3,\u672C\u9879\u7531\u70B9\u51FB\u53F3\u4FA7\u680F\u81EA\u8EAB\u7684\u300C\u5168\u5C4F\u300D\u6309\u94AE\u5B9E\u73B0\u3002')),i.createElement("div",{className:"dshcs-field"},i.createElement("div",{className:"dshcs-fieldHead"},i.createElement("span",{className:"dshcs-fieldLabel"},"\u540E\u53F0\u5E38\u9A7B(\u5207\u6807\u7B7E\u4E0D\u91CD\u8F7D)"),E===!0?i.createElement(ne,{overridden:!0,disabled:n.writable!==!0,overriddenLabel:"\u5DF2\u8986\u76D6",resetLabel:"\u6062\u590D\u9ED8\u8BA4",onReset:function(){N()}}):null),i.createElement(Oe,{checked:a!==null?a.keepResident:h.keepResident,disabled:n.writable!==!0,onChange:function(g){l(function(k){return Object.assign({},k!==null?k:h,{keepResident:g===!0})}),f(!1)}},'\u5F00\u542F\u540E\u5BBF\u4E3B\u542F\u52A8\u5373\u628A IDE \u52A0\u8F7D\u5230\u540E\u53F0"\u505C\u653E\u533A":\u5207\u6362\u53F3\u4FA7\u680F\u6807\u7B7E\u3001\u6536\u8D77/\u5C55\u5F00\u4FA7\u680F\u3001\u62D6\u6210\u6D6E\u52A8\u7A97\u53E3\u90FD\u4E0D\u518D\u91CD\u8F7D,\u9996\u6B21\u6253\u5F00\u514D\u7B49\u5F85;\u5173\u95ED\u5219\u53EA\u5728\u6253\u5F00\u9762\u677F\u65F6\u52A0\u8F7D(\u7701\u5185\u5B58)'),i.createElement("div",{className:"dshcs-hint",style:{marginTop:4}},R?"\u5E38\u9A7B\u9762:"+(v.docked?"\u5DF2\u505C\u9760":v.ready?"\u5DF2\u505C\u653E(\u540E\u53F0\u8FD0\u884C\u4E2D)":"\u672A\u542F\u52A8")+(v.degraded?" \xB7 \u672C\u6B21\u53D1\u751F\u8FC7\u964D\u7EA7\u91CD\u8F7D":""):"\u5F53\u524D\u6D4F\u89C8\u5668\u4E0D\u652F\u6301 Element.moveBefore(Chromium <133)\u2192 \u5E38\u9A7B\u4E0D\u53EF\u7528,\u5207\u6807\u7B7E\u4ECD\u4F1A\u6574\u9875\u91CD\u8F7D(\u5347\u7EA7\u6D4F\u89C8\u5668\u540E\u81EA\u52A8\u751F\u6548)"))];return e.seat==="bundle-config"?i.createElement("div",{className:"dshcs-cfgpage","data-code-server-config":"page"},n.writable!==!0?i.createElement("p",{className:"dshcs-cardReadOnly",role:"status"},"\u672C\u90E8\u7F72\u7684\u8BBE\u7F6E\u4E3A\u53EA\u8BFB\u3002"):null,...M,p===!0?i.createElement("p",{className:"dshcs-cardFailed",role:"status"},"\u672C\u90E8\u7F72\u6CA1\u6709\u63A5\u53D7\u8FD9\u4E9B\u503C\uFF0C\u5DF2\u4FDD\u7559\u4F9B\u4F60\u4FEE\u6539\u3002"):null,i.createElement("div",{className:"dshcs-cfgfoot"},i.createElement(W,{disabled:!C||o,onClick:function(){l(null),f(!1)}},"\u653E\u5F03\u4FEE\u6539"),i.createElement(W,{variant:"primary",disabled:_,onClick:function(){S()}},o===!0?"\u4FDD\u5B58\u4E2D\u2026":"\u4FDD\u5B58"))):i.createElement(Le,{title:"Code Server",description:"\u5165\u53E3:\u53F3\u4FA7\u680F\u6807\u7B7E(DSH \u2265 0.1.5-alpha.1);\u8BA4\u9886\u7C7B\u578B\u51B3\u5B9A\u54EA\u4E9B\u6587\u4EF6\u4EA4\u7ED9 Code Server \u6253\u5F00",state:H,unsavedLabel:"\u672A\u4FDD\u5B58",readOnlyLabel:"\u672C\u90E8\u7F72\u7684\u8BBE\u7F6E\u4E3A\u53EA\u8BFB\u3002",saveFailedLabel:"\u672C\u90E8\u7F72\u6CA1\u6709\u63A5\u53D7\u8FD9\u4E9B\u503C\uFF0C\u5DF2\u4FDD\u7559\u4F9B\u4F60\u4FEE\u6539\u3002",discardLabel:"\u653E\u5F03\u4FEE\u6539",saveLabel:"\u4FDD\u5B58",savingLabel:"\u4FDD\u5B58\u4E2D\u2026",onSave:S,onDiscard:function(){l(null),f(!1)}},...M)}catch(b){return console.error("[code-server] card render error:",b!=null&&b.message!==void 0?b.message:String(b)),null}}function Ir(e){return e!=null&&e.view==="summary"?br:i.createElement(Re,Object.assign({},e,{seat:"bundle-config"}))}var Ae=900,u={rev:-1,open:!1,mounted:!1,pending:null,el:null,body:null,title:null,timer:null,loading:!1};function Rr(e){if(!(e===null||typeof e!="object")){if(e.type==="ready"){T(!0);return}if(e.type==="ask"&&typeof e.text=="string"){y("/code-server/ask/send",{text:e.text,mode:u.pending===null?void 0:u.pending.mode}).then(function(r){u.rev=-1,T(!0)}).catch(function(){});return}if(e.type==="approve"&&typeof e.id=="string"){y("/code-server/ask/approve",{id:e.id,outcome:e.outcome}).then(function(r){r!=null&&r.ok===!1&&G(r.error||"\u6388\u6743\u63D0\u4EA4\u5931\u8D25"),u.rev=-1,T(!0)}).catch(function(r){G("\u6388\u6743\u63D0\u4EA4\u5931\u8D25:"+String(r&&r.message?r.message:r))});return}e.type==="close"&&je()}}function T(e){if(u.el!==null){var r=window.__DSHCS_ASK_PUSH__;typeof r=="function"?r(u.pending):e===!0&&setTimeout(function(){T(!1)},120)}}function G(e){console.warn("[code-server] ask dialog:",e)}function je(){u.open=!1,u.el!==null&&(u.el.style.display="none"),y("/code-server/ask/close",{}).catch(function(){})}function De(){if(u.el===null){var e=document.createElement("div");e.className="dshcs-dialog",e.setAttribute("data-dshcs-dialog","ask"),e.style.cssText=["position:fixed","right:24px","bottom:24px","width:460px","height:600px","min-width:320px","min-height:280px","max-width:96vw","max-height:92vh","resize:both","overflow:hidden","display:none","z-index:2147483000","border-radius:10px","box-shadow:0 18px 48px rgba(0,0,0,.45)","border:1px solid var(--dsw-alias-border-l2, rgba(128,128,128,.4))","background:var(--dsw-alias-bg-base, var(--vscode-editor-background, #1e1e1e))"].join(";");var r=document.createElement("div");r.style.cssText="display:flex;align-items:center;gap:8px;padding:6px 10px;cursor:move;border-bottom:1px solid var(--dsw-alias-border-l1, rgba(128,128,128,.3));font:var(--dsw-font-markdown-base, 13px/20px sans-serif)";var n=document.createElement("span");n.textContent="DSH \u5BF9\u8BDD",n.style.cssText="font-weight:600;flex:none";var t=document.createElement("span");t.style.cssText="flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--dsw-alias-label-tertiary, rgba(128,128,128,.9));font-size:12px";var a=document.createElement("button");a.type="button",a.textContent="\u2715",a.title="\u5173\u95ED",a.setAttribute("aria-label","\u5173\u95ED"),a.style.cssText="flex:none;border:0;background:transparent;color:inherit;cursor:pointer;font-size:13px;line-height:1;padding:2px 6px;border-radius:4px",a.addEventListener("click",function(){je()}),r.appendChild(n),r.appendChild(t),r.appendChild(a);var l=document.createElement("div");l.className="dshcs-panel",l.setAttribute("data-dshcs-ask-root",""),l.style.cssText="height:calc(100% - 33px);overflow:hidden",e.appendChild(r),e.appendChild(l),document.body.appendChild(e),u.el=e,u.body=l,u.title=t;var o=null;r.addEventListener("pointerdown",function(c){if(c.target!==a){var p=e.getBoundingClientRect();o={x:c.clientX,y:c.clientY,left:p.left,top:p.top},e.style.right="auto",e.style.bottom="auto",e.style.left=p.left+"px",e.style.top=p.top+"px";try{r.setPointerCapture(c.pointerId)}catch(f){}}}),r.addEventListener("pointermove",function(c){o!==null&&(e.style.left=Math.max(0,Math.min(window.innerWidth-80,o.left+(c.clientX-o.x)))+"px",e.style.top=Math.max(0,Math.min(window.innerHeight-40,o.top+(c.clientY-o.y)))+"px")}),r.addEventListener("pointerup",function(){o=null})}}var ze="dshcs.ask.bundle",jr=900*1e3,O=null;function ae(){try{var e=window.sessionStorage.getItem(ze);if(e==null)return null;var r=JSON.parse(e);return r==null||typeof r.js!="string"||typeof r.css!="string"||Date.now()-Number(r.at||0)>jr?null:{css:r.css,js:r.js}}catch(n){return null}}function Pe(e){try{window.sessionStorage.setItem(ze,JSON.stringify({at:Date.now(),css:e.css,js:e.js}))}catch(r){}}function Dr(){if(!(O!==null||u.mounted)){var e=ae();if(e!==null){O=e;return}y("/code-server/ask/bundle").then(function(r){r==null||r.ok!==!0||(O={css:r.css,js:r.js},Pe(O),console.log("[code-server] ask bundle preloaded ("+Math.round((r.js.length+r.css.length)/1024)+"KB)"))}).catch(function(){})}}function zr(){if(!(u.mounted||u.loading)){u.loading=!0;var e=O!==null?Promise.resolve(O):ae()!==null?Promise.resolve(ae()):y("/code-server/ask/bundle");e.then(function(r){u.loading=!1;var n=r;if(O===null&&r!=null&&r.ok===!0&&(n={css:r.css,js:r.js},O=n,Pe(n)),n==null||typeof n.js!="string"){G(n!=null&&n.error?n.error:"\u9762\u677F\u4EA7\u7269\u4E0D\u53EF\u7528");return}if(De(),document.getElementById("dshcs-ask-style")===null){var t=document.createElement("style");t.id="dshcs-ask-style",t.textContent=n.css,document.head.appendChild(t)}window.__DSHCS_HOST__="dsh",window.__DSHCS_MOUNT__=u.body,window.acquireVsCodeApi=function(){return{postMessage:Rr}};var a=document.createElement("script");a.textContent=n.js,document.head.appendChild(a),u.mounted=!0,setTimeout(function(){T(!0)},60)}).catch(function(r){u.loading=!1,G("\u9762\u677F\u4EA7\u7269\u52A0\u8F7D\u5931\u8D25:"+String(r&&r.message?r.message:r))})}}function Te(){y("/code-server/ask/state?rev="+u.rev).then(function(e){e==null||e.ok!==!0||e.changed===!0&&(u.rev=typeof e.rev=="number"?e.rev:-1,u.pending=e,e.open===!0?(De(),u.el.style.display="block",u.title!==null&&(u.title.textContent=e.contextText||"\u6765\u81EA\u7F16\u8F91\u5668"),u.open=!0,zr(),u.mounted&&T(!0)):u.el!==null&&(u.el.style.display="none",u.open=!1))}).catch(function(){})}function Pr(){u.timer===null&&(u.timer=setInterval(Te,Ae),setTimeout(Te,800),setTimeout(Dr,3e3),console.log("[code-server] ask dialog poller started (every "+Ae+"ms)"))}function _r(e){try{Hr(e),Pr()}catch(r){console.error("[code-server] apply failed:",r&&r.stack?r.stack:String(r));try{document.title="CS-ERR "+(r&&r.message||String(r))}catch(n){}}}function Hr(e){var r=e.get("slots");if(r===void 0){console.error("[code-server] slots service unavailable");return}var n=e.settingsScope,t=null;if(n!==void 0&&typeof n.bind=="function")t=n.bind({namespace:"code-server"});else{console.error("[code-server] settingsScope unavailable (inject missing?); settings card disabled");return}y("/code-server/status").then(function(d){L({status:d})}).catch(function(){}),r.inject("plugins.bundle.config",()=>r.register({name:"plugins.bundle.config",key:gr,inject:function(){return{scope:t}}},Ir)),r.inject("settings.plugin.item",()=>r.register({name:"settings.plugin.item",key:"code-server",label:"Code Server",inject:function(){return{scope:t}}},Re));var a=!1;function l(d,m){if(!a){a=!0,x();var h=!1;try{h=Nr(d)}catch(E){console.error("[code-server] sidebar tab registration failed:",E!=null&&E.message!=null?E.message:String(E))}z.sidebarUi==="legacy"&&(console.log("[code-server] \u53F3\u4FA7\u680F\u670D\u52A1\u665A\u5230(\u7ECF "+m+"):\u64A4\u9500\u65E7\u7248 DSH \u5224\u5B9A"),y("/code-server/ui-mode",{sidebar:!0}).catch(function(){})),L({sidebarUi:"modern",sidebarRegisterFailed:h!==!0}),r.inject("shell.overlay",()=>r.register({name:"shell.overlay",id:"code-server",order:70,label:"Code Server"},E=>i.createElement(mr,E))),console.log("[code-server] client registered via "+m+": sidebar tab="+h+"(claims dsh-resource://file/**) + resident preload + settings card")}}function o(d){L({sidebarUi:"legacy"}),console.warn("[code-server] \u672A\u63A2\u6D4B\u5230\u53F3\u4FA7\u680F\u670D\u52A1(sidebarRightTabs/sidebarRight): \u672C\u63D2\u4EF6\u81EA 0.2.3 \u8D77\u4E0D\u518D\u517C\u5BB9\u65E7\u7248 DSH \u2014\u2014 \u9664\u300C\u8BBE\u7F6E \u2192 \u63D2\u4EF6 \u2192 Code Server\u300D\u7684\u63D0\u793A\u5916\u4E0D\u63D0\u4F9B\u4EFB\u4F55\u5165\u53E3,\u4E5F\u4E0D\u9884\u70ED IDE\u3002\u8BF7\u5347\u7EA7 DSH\u3002"),d===!0&&y("/code-server/ui-mode",{sidebar:!1}).catch(function(){})}var c=null,p=null,f=null;function x(){c!==null&&(clearTimeout(c),c=null),p!==null&&(clearTimeout(p),p=null),f!==null&&(clearTimeout(f),f=null)}var v=!1;try{typeof e.inject=="function"&&(v=!0,e.inject(["sidebarRightTabs","sidebarRight"],function(d){l(d,"inject")}))}catch(d){console.warn("[code-server] sidebar inject failed:",d!=null&&d.message!=null?d.message:String(d))}var w=typeof e.get=="function"&&e.get("sidebarRightTabs")!==void 0&&e.get("sidebarRight")!==void 0;if(w){f=setTimeout(function(){a||(console.warn("[code-server] ctx.inject \u672A\u5728 1.5s \u5185\u56DE\u8C03,\u6539\u7528\u540C\u6B65\u670D\u52A1\u6CE8\u518C\u4FA7\u680F"),l(e,"sync-fallback"))},wr);return}if(v!==!0){o(!0);return}c=setTimeout(function(){a||o(!1)},yr),p=setTimeout(function(){a||o(!0)},xr)}var Ur=["slots","settingsScope"],Br="code-server";
4
4
  return module.exports;}});
5
5
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-code-server-app",
3
- "version": "0.3.49",
3
+ "version": "0.3.51",
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). Since 0.3.0 the bundle also ships an editor bridge (assets/extensions/dshcs-editor-bridge): a read-only channel between the in-tree VS Code extension host and DSH, giving the agent what only the editor knows (unsaved buffers, language-server diagnostics, the active selection) and letting editor gestures drive the session. Since 0.3.22 the ask panel renders that session's new content with DSH's own Markdown renderer (pinned to the deployed DSH UI version); since 0.3.23 it is a full-width dialog with collapsible thinking rows and can answer approval requests in place — the bridge's only non-read-only route (POST /approve, constrained to pending in-process requests and the outcomes allowed-once/rejected; panel-first for 5 minutes, handed back to the official card the moment the panel closes). The tab claims DSH file addresses (dsh-resource://file/**) by file type (setting claimExtensions), so the product's own 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 no longer reloads it. Opening the tab switches the right sidebar to fullscreen by default (setting fullscreenOnOpen). Following a workspace switch is lightweight: the workbench re-navigates with the new ?folder= and the IDE process is not restarted (since 0.2.12). Requires a DSH with the right-sidebar services (sidebarRightTabs/sidebarRight, >= 0.1.5-alpha.1); older DSH versions get a single upgrade notice on the settings page and no other UI. Two serving modes: loopback port (default) or same-origin mount on DSH's own webServer (/code-server, protected by ctx.connection.requestRejection). No code-server Node layer, no argon2, no C++ toolchain.",
5
5
  "homepage": "https://github.com/jinsiyu/dsh-code-server-app",
6
6
  "repository": {
@@ -190,6 +190,7 @@
190
190
  "test:workspace-switch": "node scripts/test-workspace-switch.mjs",
191
191
  "test:workspace-cwd": "node scripts/test-workspace-cwd.mjs",
192
192
  "test:client-cwd": "node scripts/test-client-bundle-cwd.mjs",
193
+ "test:client-seat": "node scripts/test-client-settings-seat.mjs",
193
194
  "test:dsh-resolve": "node scripts/test-dsh-resolve.mjs",
194
195
  "test:bridge-routes": "node scripts/test-bridge-routes.mjs",
195
196
  "test:bridge-extension": "node scripts/test-bridge-extension.mjs",
@@ -3,7 +3,7 @@
3
3
  "vscodeVersion": "1.137.0",
4
4
  "productPath": "stable-b11dabdaca0d3369986975be285db92c8795cea5",
5
5
  "layout": "vscode-only",
6
- "preparedAt": "2026-09-17T16:48:15.827Z",
6
+ "preparedAt": "2026-09-18T11:22:51.430Z",
7
7
  "source": "registry",
8
8
  "node": "v24.20.0",
9
9
  "platform": "linux",