fix: use binary WebSocket frames for SSH PTY output

SSH PTY output contains non-UTF-8 bytes (terminal escape sequences).
Sending as TextMessage caused WebSocket decode errors. Switch to
BinaryMessage and handle arraybuffer on the client side.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-25 22:30:24 +09:00
parent 1563091de1
commit 08d97b3f89
2 changed files with 3 additions and 2 deletions

View File

@@ -72,8 +72,9 @@
sendResize();
};
ws.binaryType = 'arraybuffer';
ws.onmessage = (e) => {
term.write(e.data);
term.write(new Uint8Array(e.data));
};
ws.onclose = () => {