submit', function(e) {
                e.preventDefault();
                var message = $('#chat-message').val();
                if (!message.trim()) return;
                
                console.log('Sending chat message:', message);
                
                fetch('/human', {
                    body: JSON.stringify({
                        text: message,
                        type: 'chat',
                        interrupt: true,
                        sessionid: parseInt(document.getElem