
                initTerminal();
            }

            updateStatus('connecting', '正在连接...');

            websocket = new WebSocket(wsUrl);

            websocket.onopen = function() {
                isConnected = true;
                updateStatus('connected', '已连接');
                document.getElementById('connect-btn').textContent = '断开';
                document.getElementById('connect-btn').onclick = disconnectConsole;

                // 只显示连接成功信�