dsh-zen-remote 1.1.2 → 1.1.3
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.md +26 -9
- package/docs/interface.md +5 -5
- package/lib/client.js +2094 -1875
- package/lib/index.js +21 -1
- package/lib/index.js.map +1 -1
- package/lib/types/client/client-config.d.ts +51 -0
- package/lib/types/client/client-config.d.ts.map +1 -0
- package/lib/types/client/effects/keyboard-avoid.d.ts +14 -7
- package/lib/types/client/effects/keyboard-avoid.d.ts.map +1 -1
- package/lib/types/client/effects/turn-fold.d.ts +14 -0
- package/lib/types/client/effects/turn-fold.d.ts.map +1 -1
- package/lib/types/client/styles/compat.css.d.ts +1 -1
- package/lib/types/client/styles/compat.css.d.ts.map +1 -1
- package/lib/types/client/styles/composer.css.d.ts +1 -1
- package/lib/types/client/styles/composer.css.d.ts.map +1 -1
- package/lib/types/client/styles/turn-fold.css.d.ts.map +1 -1
- package/lib/types/index.d.ts +25 -0
- package/lib/types/index.d.ts.map +1 -1
- package/package.json +11 -11
- package/scripts/check-keyboard-avoid.mjs +39 -0
- package/src/client/client-config.ts +86 -0
- package/src/client/effects/keyboard-avoid.ts +34 -14
- package/src/client/effects/turn-fold.ts +22 -17
- package/src/client/styles/compat.css.ts +33 -0
- package/src/client/styles/composer.css.ts +61 -1
- package/src/client/styles/turn-fold.css.ts +51 -8
- package/src/index.ts +35 -1
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
<p align="center">
|
|
5
5
|
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-0B7285?style=flat-square" alt="MIT"></a>
|
|
6
|
-
<img src="https://img.shields.io/badge/release-v1.1.
|
|
6
|
+
<img src="https://img.shields.io/badge/release-v1.1.3-5B4CF0?style=flat-square" alt="v1.1.3">
|
|
7
7
|
<img src="https://img.shields.io/badge/DSH-Web%20Profile-5B4CF0?style=flat-square" alt="DSH Web Profile">
|
|
8
8
|
</p>
|
|
9
9
|
|
|
@@ -27,7 +27,7 @@ dsh plugin add dsh-zen-remote
|
|
|
27
27
|
|
|
28
28
|
装完重启 `dsh web`,手机界面与网关一起生效,不需要再手写任何配置行。
|
|
29
29
|
|
|
30
|
-
> 兼容性:在 DSH `0.1.
|
|
30
|
+
> 兼容性:在 DSH `0.1.1-rc.2`(web profile)上开发并实测,最后验证 2026-08-22。
|
|
31
31
|
|
|
32
32
|
卸载:`dsh plugin remove dsh-zen-remote`(或从 profile 的 `dependencies` 与 `bundles` 里删掉那两行),重启 `dsh web` 即恢复原状;要清掉配对数据再删 `~/.dsh/lan-gate-state.json` 与 `~/.dsh/lan-gate.config.json`。
|
|
33
33
|
|
|
@@ -39,7 +39,7 @@ dsh plugin add dsh-zen-remote
|
|
|
39
39
|
```jsonc
|
|
40
40
|
{
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"dsh-zen-remote": "^1.1.
|
|
42
|
+
"dsh-zen-remote": "^1.1.3" // 本地开发换成 "link:/path/to/dsh-zen-remote"
|
|
43
43
|
},
|
|
44
44
|
"dsh": { "profile": { "bundles": [
|
|
45
45
|
"@deepseek-ai/dsh-base",
|
|
@@ -201,6 +201,23 @@ open http://127.0.0.1:3088/lan-gate/admin
|
|
|
201
201
|
|
|
202
202
|
改完重启 `dsh web`。不改服务端配置的话,单个浏览器也可以访问一次 `?mobile-nav-turn-fold=1` 自己开启(`=0` 关闭,按浏览器记忆)。
|
|
203
203
|
|
|
204
|
+
**软键盘抬升的三个校准值**。少数手机上,键盘弹出时系统压根不告诉浏览器键盘有多高(实测过:某些第三方输入法 + Chrome;小米浏览器装的 PWA 壳)。这时插件没有任何可测的信号,只能按估算把输入框抬起来。估算值是照一台报告过的机器定的,别的机器可能偏高或偏低,所以三个数都能在插件行里改:
|
|
205
|
+
|
|
206
|
+
| 配置项 | 默认 | 含义 | 允许范围 |
|
|
207
|
+
| --- | --- | --- | --- |
|
|
208
|
+
| `keyboardLiftRatio` | `0.42` | 抬升高度按屏幕高度的这个比例估算 | 0 ~ 1 |
|
|
209
|
+
| `keyboardLiftMaxPx` | `400` | 估算值的上限(像素),防止在长屏手机上把输入框顶到屏幕中间 | 0 ~ 2000 |
|
|
210
|
+
| `keyboardSafetyPadPx` | `15` | 键盘顶部再留出的一点余量,**仅安卓**。第三方输入法常常少报自己的高度(把键盘上方那条工具栏漏掉),这一点余量就是补它的 | 0 ~ 200 |
|
|
211
|
+
|
|
212
|
+
```yaml
|
|
213
|
+
- id: dsh-zen-remote
|
|
214
|
+
config:
|
|
215
|
+
keyboardLiftRatio: 0.45
|
|
216
|
+
keyboardSafetyPadPx: 30
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
怎么调:输入框抬得**不够**(还被键盘挡住一截)就调大 `keyboardLiftRatio`,一次加 0.03 试;抬得**过头**(输入框和键盘之间空出一条)就调小。只差一点点(几十像素以内、且是安卓)优先加 `keyboardSafetyPadPx`。三个值一个都不写就是现在的行为,不受影响;写超出范围的值会被自动收进上表的区间,不会把输入框顶出屏幕。正常手机走的是实测路径,这几个值对它们完全没有影响。
|
|
220
|
+
|
|
204
221
|
---
|
|
205
222
|
|
|
206
223
|
## 通知什么时候会响
|
|
@@ -266,11 +283,11 @@ open http://127.0.0.1:3088/lan-gate/admin
|
|
|
266
283
|
|
|
267
284
|
| 插件 | 移动端适配内容 | 实测版本 |
|
|
268
285
|
| --- | --- | --- |
|
|
269
|
-
| [dsh-better-sidebar](https://github.com/omdsh-dev/DSH-better-sidebar) | 会话页头部提供工作台入口按钮;面板变手机全宽抽屉并避让刘海安全区;底部居中的关闭按钮 | 0.
|
|
270
|
-
| [@nanmicoder/dsh-agent-teams](https://github.com/NanmiCoder/dsh-agent-teams) | AgentTeams 活动浮层挪到会话头部下方(原位置压住头部按钮)、会话列表页自动隐藏;子代理会话头部保留可点的父会话标题,一键切回主会话 | 0.1.
|
|
271
|
-
| [dsh-usage-stats](https://github.com/Ychris12138/dsh-usage-stats) | 用量与余额入口收进主屏 chips 行 | 0.2.
|
|
272
|
-
| [@opendsh/dsh-plugin-scheduled-tasks](https://github.com/Ceelog/dsh-plugins) | 定时任务入口收进主屏 chips 行 | 0.2.
|
|
273
|
-
| dsh-at-file | @文件引用,配合附件上传的 `@`
|
|
286
|
+
| [dsh-better-sidebar](https://github.com/omdsh-dev/DSH-better-sidebar) | 会话页头部提供工作台入口按钮;面板变手机全宽抽屉并避让刘海安全区;底部居中的关闭按钮 | 0.15.0 |
|
|
287
|
+
| [@nanmicoder/dsh-agent-teams](https://github.com/NanmiCoder/dsh-agent-teams) | AgentTeams 活动浮层挪到会话头部下方(原位置压住头部按钮)、会话列表页自动隐藏;子代理会话头部保留可点的父会话标题,一键切回主会话 | 0.1.9 |
|
|
288
|
+
| [@ychris12138/dsh-usage-stats](https://github.com/Ychris12138/dsh-usage-stats) | 用量与余额入口收进主屏 chips 行 | 0.2.9 |
|
|
289
|
+
| [@opendsh/dsh-plugin-scheduled-tasks](https://github.com/Ceelog/dsh-plugins) | 定时任务入口收进主屏 chips 行 | 0.2.3 |
|
|
290
|
+
| dsh-at-file | @文件引用,配合附件上传的 `@` 路径引用使用;它和本插件的附件 chip 读同一份草稿 token,手机端隐藏它 `.dsh-uploads/` 下那几行以免同一个文件被画两遍(缩略图 + 文件名),其余 `@` 引用不动 | 0.6.7 |
|
|
274
291
|
| [dsh-vision-toolkit](https://www.npmjs.com/package/@anionex/dsh-vision-toolkit) | 图像 Q&A/OCR,配合手机端附件上传使用 | — |
|
|
275
292
|
| [dsh-web-ui 全家桶](https://www.npmjs.com/package/@linxin666/dsh-web-ui-all) | 沿用上游 dsh-web-mobile 的兼容规则(文件树 / 预览浮层限宽居中等) | — |
|
|
276
293
|
|
|
@@ -282,7 +299,7 @@ open http://127.0.0.1:3088/lan-gate/admin
|
|
|
282
299
|
|
|
283
300
|
**iOS 26.x 独立 PWA 视口缩水**:加到主屏后视口底部会少掉一条状态栏高度,普通 Safari 标签页正常。这是 iOS 系统缺陷,缺掉的区域在文档之外,CSS 够不着;本插件做了三层缓解(浅色 manifest 背景 + 安全区补偿 + 强制重排),能减轻但不保证复原。彻底恢复只能整个 App 退出重开。
|
|
284
301
|
|
|
285
|
-
**个别环境软键盘对浏览器完全不可见,输入框抬升靠估算兜底**:部分组合(实测过:某些第三方输入法 + Chrome;小米浏览器安装的 PWA 壳)里,键盘弹出/收起时系统不把键盘高度告知页面——视口不变、无任何事件(visualViewport、VirtualKeyboard API 一并失效,均已实测排除)。插件的兜底是:聚焦后探测约 1.2
|
|
302
|
+
**个别环境软键盘对浏览器完全不可见,输入框抬升靠估算兜底**:部分组合(实测过:某些第三方输入法 + Chrome;小米浏览器安装的 PWA 壳)里,键盘弹出/收起时系统不把键盘高度告知页面——视口不变、无任何事件(visualViewport、VirtualKeyboard API 一并失效,均已实测排除)。插件的兜底是:聚焦后探测约 1.2 秒,判定「键盘不可见」就按估计高度抬升输入框(判定按浏览器记忆,之后聚焦即时抬升)。代价有两条:抬升高度是估算的,可能与实际键盘有几十像素出入;键盘收起同样无信号,输入框要等你点击或滑动输入框以外的区域才回落。正常环境完全不走这条路径,不受影响。抬升高度差得明显的话不用改代码,插件行的 `keyboardLiftRatio` / `keyboardLiftMaxPx` / `keyboardSafetyPadPx` 三个值可以照着自己的机器调,见上面「配置」一节。
|
|
286
303
|
|
|
287
304
|
**经反代访问时设置页打不开(插件配置列表空白、模型卡片报「settings are unavailable in this browser」)**:直连 `127.0.0.1:3080/3088` 正常。
|
|
288
305
|
|
package/docs/interface.md
CHANGED
|
@@ -224,11 +224,11 @@ composer 最左的回形针打开的是**手机本地**的文件选择器(iOS
|
|
|
224
224
|
|
|
225
225
|
## 兼容插件
|
|
226
226
|
|
|
227
|
-
- [dsh-better-sidebar](https://github.com/omdsh-dev/DSH-better-sidebar)(移动端全宽抽屉,本插件在会话页头部给它留入口位)——本机实测 **0.
|
|
228
|
-
- [@nanmicoder/dsh-agent-teams](https://github.com/NanmiCoder/dsh-agent-teams)(AgentTeams 活动浮层:手机端挪到会话头部下方、避开安全区,会话列表页隐藏;子代理会话头部保留可点的父会话面包屑用于切回)——本机实测 **0.1.
|
|
229
|
-
- [dsh-usage-stats](https://github.com/Ychris12138/dsh-usage-stats)(用量与余额,主屏 chips
|
|
230
|
-
- [@opendsh/dsh-plugin-scheduled-tasks](https://github.com/Ceelog/dsh-plugins)(定时任务,主屏 chips 行自动收割入口)——本机实测 **0.2.
|
|
231
|
-
- dsh-at-file(
|
|
227
|
+
- [dsh-better-sidebar](https://github.com/omdsh-dev/DSH-better-sidebar)(移动端全宽抽屉,本插件在会话页头部给它留入口位)——本机实测 **0.15.0**
|
|
228
|
+
- [@nanmicoder/dsh-agent-teams](https://github.com/NanmiCoder/dsh-agent-teams)(AgentTeams 活动浮层:手机端挪到会话头部下方、避开安全区,会话列表页隐藏;子代理会话头部保留可点的父会话面包屑用于切回)——本机实测 **0.1.9**
|
|
229
|
+
- [@ychris12138/dsh-usage-stats](https://github.com/Ychris12138/dsh-usage-stats)(用量与余额,主屏 chips 行可直接打开;旧包名 `dsh-usage-stats` 已废弃,两个名字同时留在 profile 里会因重复的 `usage-stats` 行让 DSH 起不来)——本机实测 **0.2.9**
|
|
230
|
+
- [@opendsh/dsh-plugin-scheduled-tasks](https://github.com/Ceelog/dsh-plugins)(定时任务,主屏 chips 行自动收割入口)——本机实测 **0.2.3**
|
|
231
|
+
- dsh-at-file(@文件引用;它和本插件的附件 chip 读的是同一份草稿 token,手机端会为一个上传文件同时画出缩略图和文件名两条,故隐藏它 `.dsh-uploads/` 下那几行,其余 @ 引用不动;桌面端不隐藏——那边本插件的 chip 是关掉的,它是唯一的呈现)——本机实测 **0.6.7**
|
|
232
232
|
- [dsh-vision-toolkit](https://www.npmjs.com/package/@anionex/dsh-vision-toolkit)(图像 Q&A/OCR,配合手机端附件上传使用)
|
|
233
233
|
- [dsh-web-ui 全家桶](https://www.npmjs.com/package/@linxin666/dsh-web-ui-all)(文件树 / 预览 / 任务看板 / SSH / 宠物 / 会话统计 / 远程配对 / 设置)——沿用上游兼容规则,本次未扩展
|
|
234
234
|
|