@hyzyn/dsh-tty 0.22.0 → 0.22.2

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.
@@ -242,6 +242,8 @@
242
242
  return
243
243
  }
244
244
  window.__mockLog.push('in:' + msg.t)
245
+ // D79:留完整帧(不只类型)——「后台标签不得发出退化尺寸的 resize」这类断言要读 cols/rows
246
+ window.__mockFrames.push(msg)
245
247
  const sid = msg.sid
246
248
  if (msg.t === 'spawn' || msg.t === 'ssh') {
247
249
  if (!SESSIONS.some((s) => s.sid === sid)) SESSIONS.push({ sid, attachable: true, kind: msg.t === 'ssh' ? 'ssh' : 'local', tmux: msg.persistName })
@@ -262,9 +264,12 @@
262
264
  return
263
265
  }
264
266
  if (msg.t === 'sessions') {
267
+ // D79 夹具:`window.__PREVIEW_AGENT_SESSIONS` = 真实宿主推的「agent 开的会话」
268
+ // (owner:'agent',客户端采纳成标签但不 switchTab ⇒ 它一直在后台)。
269
+ const agentSessions = Array.isArray(window.__PREVIEW_AGENT_SESSIONS) ? window.__PREVIEW_AGENT_SESSIONS : []
265
270
  const list = window.__PREVIEW_AT_LIMIT
266
271
  ? [{ sid: 'other-1', attachable: true }, { sid: 'other-2', attachable: true }, { sid: 'other-3', attachable: true }, { sid: 'other-4', attachable: true }]
267
- : SESSIONS.slice()
272
+ : SESSIONS.slice().concat(agentSessions)
268
273
  setTimeout(() => this._deliver({ t: 'sessions', list }), 5)
269
274
  return
270
275
  }
@@ -341,6 +346,7 @@
341
346
  }
342
347
  window.__mockSockets = []
343
348
  window.__mockLog = []
349
+ window.__mockFrames = []
344
350
  window.WebSocket = MockSocket
345
351
 
346
352
  /* ---------- module loader ---------- */
@@ -88,6 +88,7 @@ const SCENARIOS = [
88
88
  ['dock-pane', '终端面板右侧挂载位(ttyPanel 骨架)'],
89
89
  ['dock-pane-bottom', '底部挂载位 + 终端重排(视口钉底)'],
90
90
  ['docker-dock', '连接栏「容器」→ docker 面板挂进右侧 dock(终端不被盖住)'],
91
+ ['resize-hidden', '后台标签的 PTY 不得被压成 2×2(D79)'],
91
92
  ]
92
93
 
93
94
  if (flags.has('--list')) {