@qzsy/dsh-bridge 3.4.2 → 3.4.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/CHANGELOG.md +13 -0
- package/README.md +1 -1
- package/client/client.js +27 -0
- package/client/mobile.js +24 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# 更新日志
|
|
2
2
|
|
|
3
|
+
## [v3.4.3] - 2026-11-02
|
|
4
|
+
|
|
5
|
+
### 🐛 修复
|
|
6
|
+
|
|
7
|
+
- **模型 sheet 默认不聚焦搜索框**:宿主打开模型菜单时会自动 focus「搜索模型」,iOS 键盘随即弹起、把 sheet 顶掉一半;现在 sheet 套用后立即以及 80/260ms 内自动 `blur`,键盘不会默认弹出。
|
|
8
|
+
- **保留手动搜索**:用户主动点搜索框(`pointerdown`/`touchstart`)后不再被 blur,需要搜索时仍可正常输入。
|
|
9
|
+
- 模型数量少的场景默认直接看到完整模型列表,不再被键盘遮挡。
|
|
10
|
+
|
|
11
|
+
### 🧪 验证
|
|
12
|
+
|
|
13
|
+
- 模拟宿主自动 focus:打开后 `activeElement` 从 input 回到 BODY,sheet 正常显示,4/4 通过;用户主动 pointerdown 后 focus 保持输入框。
|
|
14
|
+
|
|
15
|
+
|
|
3
16
|
## [v3.4.2] - 2026-11-02
|
|
4
17
|
|
|
5
18
|
### 🐛 修复
|
package/README.md
CHANGED
|
@@ -48,7 +48,7 @@ dsh plugin --profile <name> add @qzsy/dsh-bridge
|
|
|
48
48
|
|
|
49
49
|
- 内容区占满屏宽,左上角「菜单」按钮打开会话 / 工作区 / 插件入口;
|
|
50
50
|
- 支持手势:左缘向右滑打开、抽屉内向左滑关闭,拖动时跟手,松手吸附;
|
|
51
|
-
- 模型切换器在手机上改为底部 sheet
|
|
51
|
+
- 模型切换器在手机上改为底部 sheet:全宽、抓手、遮罩,支持下拉/点遮罩关闭;默认不聚焦搜索框(不弹键盘),需要搜索时再点;
|
|
52
52
|
- 全面屏自动避开安全区:刘海 / 状态栏 / 底部 home indicator 不遮挡内容;
|
|
53
53
|
- 点遮罩、点会话行、按 Esc 或转回桌面宽度都会自动收起;
|
|
54
54
|
- 桌面端保持 DSH 原生布局,不受影响。
|
package/client/client.js
CHANGED
|
@@ -803,6 +803,33 @@ function setupMobileDrawer() {
|
|
|
803
803
|
portal.classList.add("qzsy-model-sheet");
|
|
804
804
|
attachModelDrag(portal);
|
|
805
805
|
ensureModelBackdrop();
|
|
806
|
+
const input = portal.querySelector('input[placeholder*="\u641C\u7D22\u6A21\u578B"], input[placeholder*="Search model"], input[type="search"], input');
|
|
807
|
+
if (input) {
|
|
808
|
+
let userIntent = false;
|
|
809
|
+
const markUserIntent = () => {
|
|
810
|
+
userIntent = true;
|
|
811
|
+
};
|
|
812
|
+
input.addEventListener("pointerdown", markUserIntent, { once: true });
|
|
813
|
+
input.addEventListener("touchstart", markUserIntent, { once: true, passive: true });
|
|
814
|
+
const blurIfAutoFocused = () => {
|
|
815
|
+
if (!input.isConnected || userIntent) return;
|
|
816
|
+
if (document.activeElement === input) {
|
|
817
|
+
try {
|
|
818
|
+
input.blur();
|
|
819
|
+
} catch {
|
|
820
|
+
}
|
|
821
|
+
}
|
|
822
|
+
};
|
|
823
|
+
const onFocus = () => {
|
|
824
|
+
if (!userIntent) blurIfAutoFocused();
|
|
825
|
+
};
|
|
826
|
+
input.addEventListener("focus", onFocus);
|
|
827
|
+
blurIfAutoFocused();
|
|
828
|
+
window.requestAnimationFrame(blurIfAutoFocused);
|
|
829
|
+
window.setTimeout(blurIfAutoFocused, 80);
|
|
830
|
+
window.setTimeout(blurIfAutoFocused, 260);
|
|
831
|
+
window.setTimeout(() => input.removeEventListener("focus", onFocus), 900);
|
|
832
|
+
}
|
|
806
833
|
window.requestAnimationFrame(() => {
|
|
807
834
|
if (!disposed && modelPortal === portal) document.body.classList.add("qzsy-model-sheet-open");
|
|
808
835
|
});
|
package/client/mobile.js
CHANGED
|
@@ -626,6 +626,30 @@ export function setupMobileDrawer() {
|
|
|
626
626
|
portal.classList.add('qzsy-model-sheet');
|
|
627
627
|
attachModelDrag(portal);
|
|
628
628
|
ensureModelBackdrop();
|
|
629
|
+
|
|
630
|
+
// 宿主菜单默认会聚焦「搜索模型」,手机上会直接弹起键盘把 sheet 顶掉一半。
|
|
631
|
+
// 移动端模型数量通常很少,默认不聚焦;用户主动点搜索框时再允许聚焦。
|
|
632
|
+
const input = portal.querySelector('input[placeholder*="搜索模型"], input[placeholder*="Search model"], input[type="search"], input');
|
|
633
|
+
if (input) {
|
|
634
|
+
let userIntent = false;
|
|
635
|
+
const markUserIntent = () => { userIntent = true; };
|
|
636
|
+
input.addEventListener('pointerdown', markUserIntent, { once: true });
|
|
637
|
+
input.addEventListener('touchstart', markUserIntent, { once: true, passive: true });
|
|
638
|
+
const blurIfAutoFocused = () => {
|
|
639
|
+
if (!input.isConnected || userIntent) return;
|
|
640
|
+
if (document.activeElement === input) {
|
|
641
|
+
try { input.blur(); } catch { /* 忽略 */ }
|
|
642
|
+
}
|
|
643
|
+
};
|
|
644
|
+
const onFocus = () => { if (!userIntent) blurIfAutoFocused(); };
|
|
645
|
+
input.addEventListener('focus', onFocus);
|
|
646
|
+
blurIfAutoFocused();
|
|
647
|
+
window.requestAnimationFrame(blurIfAutoFocused);
|
|
648
|
+
window.setTimeout(blurIfAutoFocused, 80);
|
|
649
|
+
window.setTimeout(blurIfAutoFocused, 260);
|
|
650
|
+
window.setTimeout(() => input.removeEventListener('focus', onFocus), 900);
|
|
651
|
+
}
|
|
652
|
+
|
|
629
653
|
window.requestAnimationFrame(() => {
|
|
630
654
|
if (!disposed && modelPortal === portal) document.body.classList.add('qzsy-model-sheet-open');
|
|
631
655
|
});
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qzsy/dsh-bridge",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.3",
|
|
4
4
|
"description": "DSH 远程隧道云官方客户端插件:一条命令把本机 DeepSeek Harness 接入云端隧道(设备码绑定、短期令牌、本地门禁代理、HTTP/SSE/WebSocket 反向隧道)。",
|
|
5
|
-
"releaseNotes": "【v3.4.
|
|
5
|
+
"releaseNotes": "【v3.4.3】模型 sheet 默认不弹键盘\\n• 宿主打开模型菜单会自动聚焦搜索框,iOS 键盘把 sheet 顶掉一半;现在自动 blur\\n• 模型数量少时默认直接看到完整列表;需要搜索时主动点搜索框仍可输入\\n• 立即 / 80ms / 260ms 三次兜底 blur,不误伤用户主动点击",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "lib/index.js",
|
|
8
8
|
"exports": {
|