@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.
- package/README.en.md +8 -3
- package/README.md +6 -3
- package/client.js +24 -24
- package/lib/index.d.ts +39 -2
- package/lib/index.js +104 -17
- package/lib/index.js.map +1 -1
- package/lib/ssh.js +72 -19
- package/lib/ssh.js.map +1 -1
- package/lib/tmux.d.ts +39 -3
- package/lib/tmux.js +82 -26
- package/lib/tmux.js.map +1 -1
- package/package.json +4 -4
- package/scripts/preview/harness.js +51 -0
- package/scripts/preview/mock-host.js +7 -1
- package/scripts/preview.mjs +1 -0
|
@@ -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 ---------- */
|
package/scripts/preview.mjs
CHANGED