fix: 局域网下改用页面内目录选择器

directory-picker-auto 按服务器侧事实选后端:native 要求「仅绑回环 + 非 SSH +
有显示器」。本插件让官方服务器保持回环,于是局域网部署仍被判为 native,点
「添加工作区」会在服务器本机弹原生对话框,远程操作者看不到。

按官方文档锁定 browse 这一对(host-directory-picker-browse +
client-ui-directory-picker-browse),它在页面内列出服务器目录树,可服务远程客户端。

取舍:该 seam 每进程只能挂一个后端,本地页面也会改用页面内浏览;删除 patch 里
最后三行可恢复自适应选择。README 中英双语已补充说明。
This commit is contained in:
2026-09-27 03:54:48 +08:00
parent ced05e06a3
commit fb3389971d
3 changed files with 74 additions and 6 deletions
+22
View File
@@ -87,6 +87,28 @@ credentials included. Since a device holding the tokenized link already has full
the shipped loopback isolation. Set it to `false` to restore that posture and change settings
locally through `127.0.0.1:3080` (or an `ssh -L 3080:127.0.0.1:3080 <host>` tunnel).
## The directory picker behind "Add workspace"
`directory-picker-auto` picks ONE backend at boot from **host-side** facts: `native` requires "a
loopback-only bind (an all-interfaces bind admits remote browsers no OS chooser can reach)" plus a
servable display. This bundle deliberately keeps the official webserver on loopback (the LAN is a
separate listener on 3082), so a LAN deployment still resolves to `native` — and the dialog opens on
the **server machine**, where the remote operator can neither see nor reach it.
This bundle's patch therefore pins the `browse` pair, the documented way to force an interaction
("pinning an interaction remains composing that pair directly instead of this row"):
- `@deepseek-ai/dsh-host-directory-picker-browse` (backend)
- `@deepseek-ai/dsh-client-ui-directory-picker-browse` (surface)
That backend lists the server's directory tree inside the page; upstream describes it as serving
"remote clients the dialog backend cannot".
**Tradeoff**: the seam mounts exactly one backend per process, so a **local page switches to the
in-page browser too** — there is no "native locally, in-page remotely" combination. To restore the
adaptive choice, remove the last three entries of `cordis.patch.yml` (the
`- id: directory-picker / disabled: true` entry and the `insert` block after it).
## Troubleshooting
| Symptom | Cause and fix |