��，不清屏
                terminal.writeln('\x1b[32m✓ 连接成功\x1b[0m');
            };

            websocket.onmessage = function(event) {
                if (terminal && event.data) {
                    terminal.write(event.data);
                }
            };

            websocket.onclose = function() {
                isConnected = false;
                updateStatus('disconnected', '连接已断开');
                document.getElementById('connect-btn').textContent = '�