jinsiyu/dsh-code-server-app ↗★ 0
dsh-code-server-app
Integrate code-server (VS Code in the browser) into DSH Web: sidebar action + fullscreen overlay, host-side process lifecycle over a /code-server JSON API.
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:jinsiyu/dsh-code-server-app说明文档
阅读完整 README ↗2) 一次性前置:批准插件 postinstall 许可(pnpm 只认宿主根配置,无包内声明路径)
cd C:\Users\User.dsh\profiles\web pnpm approve-builds dsh-code-server-app # 交互选 yes;失败时手动编辑 pnpm-workspace.yaml
> 若 `approve-builds` 不接受 file: spec(提示 unknown),把 `pnpm-workspace.yaml` 的
> `allowBuilds` 中 `dsh-code-server-app@file:...tgz`改为 `true`
> (等价于交互批准,仅此一次;之后安装无需再次处理)。
```powershell
## 配置(cordis.patch.yml 的 `config`,均有默认值)
| 键 | 默认 | 说明 |
|---|---|---|
| `bin` | `code-server`(占位) | 启动优先级:本配置显式 `bin` > `
\.code-server-app`(专用目录,自动以 node 运行)> 插件包内 `node_modules`> profile 顶层(hoisted)> PATH 中的 `code-server`。都不存在时启动报错并给出安装指引 |
| `host` | `127.0.0.1` | 绑定地址;`auth: none` 仅允许回环(localhost/127.0.0.1/::1) |
| `port` | `8090` | 端口;被占用时启动失败并给出诊断(不自动换端口) |
| `auth` | `none` | `none` \| `password`;非回环 host 自动要求 password |
| `passwordToken` | `''` | password 模式的 token(经 `PASSWORD` 环境变量传给 code-server) |
| `userDataDir` | `$DSH_HOME/code-server/user-data` | 用户数据隔离目录 |
| `extensionsDir` | `$DSH_HOME/code-server/extensions` | 扩展目录 |
| `readyTimeoutMs` | `60000` | /healthz 就绪探测超时 |
用户级覆盖示例(写在 `$DSH_HOME/profiles/web/cordis.patch.yml`,应使用 `- id: code-server` 行覆盖):
```yaml
- id: code-server
config:
port: 8091
# 显式指定(覆盖依赖安装探测):全局安装的 shim,或任意 entry.js
bin: C:\Users\User\AppData\Roaming\npm\code-server.cmd