@qzsy/dsh-bridge 3.5.2 → 3.5.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 CHANGED
@@ -1,5 +1,18 @@
1
1
  # 更新日志
2
2
 
3
+ ## [v3.5.3] - 2026-11-02
4
+
5
+ ### 🐛 修复
6
+
7
+ - **推理菜单延迟挂载也能接住**:宿主的推理菜单 portal 在过渡期可能是 0 尺寸/延迟一帧才可测量,原来只在 `MutationObserver` 触发时找一次会漏掉;现在点击「推理等级」后每 50ms 轮询、最多 1.2s,直到推理 sheet 出现。
8
+ - **推理 portal 识别放宽**:不再要求宽高 > 0,只要求 `display` 可见且 `position: fixed/absolute`,避免透明过渡期被误判为不存在。
9
+ - 清掉旧 sheet 快照和过渡遮罩的时机保持到推理 sheet 真正套用之后。
10
+
11
+ ### 🧪 验证
12
+
13
+ - 独立宿主模拟 4/4;待安装后验证真实 DSH 的完整链路。
14
+
15
+
3
16
  ## [v3.5.2] - 2026-11-02
4
17
 
5
18
  ### 🐛 修复
package/client/client.js CHANGED
@@ -682,8 +682,8 @@ function setupMobileDrawer() {
682
682
  if (!(el instanceof HTMLElement)) continue;
683
683
  if (el === modelBackdrop || el === modelClone || el.classList.contains(HEADER_CLASS) || el.classList.contains(BACKDROP_CLASS)) continue;
684
684
  if (el.hasAttribute("data-qzsy-model-sheet") || el.hasAttribute("data-qzsy-model-sheet-clone")) continue;
685
- if (!visiblePortal(el)) continue;
686
685
  const s = getComputedStyle(el);
686
+ if (s.display === "none") continue;
687
687
  if (s.position !== "fixed" && s.position !== "absolute") continue;
688
688
  const menu = el.querySelector('[role="menu"]');
689
689
  if (!menu) continue;
@@ -938,13 +938,24 @@ function setupMobileDrawer() {
938
938
  cell.click();
939
939
  } catch {
940
940
  }
941
- window.setTimeout(() => {
941
+ let reasonTries = 0;
942
+ const applyReasonPortal = () => {
942
943
  if (disposed || token !== modelAdvanceToken) return;
943
- if (!modelPortal) {
944
+ if (modelPortal && modelPortal.getAttribute("data-qzsy-model-step") === "reasoning") return;
945
+ const found = findReasoningPortal();
946
+ if (found) {
947
+ applyModelSheet(found);
948
+ return;
949
+ }
950
+ reasonTries += 1;
951
+ if (reasonTries > 24) {
944
952
  cancelAdvanceOverlay();
945
953
  clearModelSheet();
954
+ return;
946
955
  }
947
- }, 1200);
956
+ window.setTimeout(applyReasonPortal, 50);
957
+ };
958
+ window.setTimeout(applyReasonPortal, 30);
948
959
  };
949
960
  let attempts = 0;
950
961
  const pollReasonCell = () => {
package/client/mobile.js CHANGED
@@ -506,8 +506,8 @@ export function setupMobileDrawer() {
506
506
  if (!(el instanceof HTMLElement)) continue;
507
507
  if (el === modelBackdrop || el === modelClone || el.classList.contains(HEADER_CLASS) || el.classList.contains(BACKDROP_CLASS)) continue;
508
508
  if (el.hasAttribute('data-qzsy-model-sheet') || el.hasAttribute('data-qzsy-model-sheet-clone')) continue;
509
- if (!visiblePortal(el)) continue;
510
509
  const s = getComputedStyle(el);
510
+ if (s.display === 'none') continue;
511
511
  if (s.position !== 'fixed' && s.position !== 'absolute') continue;
512
512
  const menu = el.querySelector('[role="menu"]');
513
513
  if (!menu) continue;
@@ -761,14 +761,24 @@ export function setupMobileDrawer() {
761
761
  if (!cell) return;
762
762
  reasoningStep = true;
763
763
  try { cell.click(); } catch { /* 忽略 */ }
764
- window.setTimeout(() => {
764
+ let reasonTries = 0;
765
+ const applyReasonPortal = () => {
765
766
  if (disposed || token !== modelAdvanceToken) return;
766
- if (!modelPortal) {
767
- // 推理菜单没出现:撤掉 overlay,避免卡在半路
767
+ if (modelPortal && modelPortal.getAttribute('data-qzsy-model-step') === 'reasoning') return;
768
+ const found = findReasoningPortal();
769
+ if (found) {
770
+ applyModelSheet(found);
771
+ return;
772
+ }
773
+ reasonTries += 1;
774
+ if (reasonTries > 24) {
768
775
  cancelAdvanceOverlay();
769
776
  clearModelSheet();
777
+ return;
770
778
  }
771
- }, 1200);
779
+ window.setTimeout(applyReasonPortal, 50);
780
+ };
781
+ window.setTimeout(applyReasonPortal, 30);
772
782
  };
773
783
  let attempts = 0;
774
784
  const pollReasonCell = () => {
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@qzsy/dsh-bridge",
3
- "version": "3.5.2",
3
+ "version": "3.5.3",
4
4
  "description": "DSH 远程隧道云官方客户端插件:一条命令把本机 DeepSeek Harness 接入云端隧道(设备码绑定、短期令牌、本地门禁代理、HTTP/SSE/WebSocket 反向隧道)。",
5
- "releaseNotes": "【v3.5.2】模型 → 思考级别连招稳定版\\n• 不同模型:直接复用宿主保留的父菜单,点「推理等级」进入 sheet\\n• 当前模型:先收起模型子菜单,再打开父菜单进入推理等级\\n• 保持旧 sheet 快照过渡,推理 sheet 出现后清理,不再卡在半路",
5
+ "releaseNotes": "【v3.5.3】模型 → 思考级别连招完成\\n• 推理菜单延迟挂载也接得住:点击后每 50ms 轮询,直到推理 sheet 出现\\n• 识别不再要求宽高 > 0,避免透明过渡期漏掉 portal\\n• 选完模型稳定进入推理等级 sheet,选完才关闭",
6
6
  "type": "module",
7
7
  "main": "lib/index.js",
8
8
  "exports": {