         const message = input.value;
            if (!message) return;

            // Clear input and disable input and send button
            input.value = '';
            disableInput();

            // Send message to WebSocket
            ws.send(JSON.stringify({ content: message, source: 'user' }));
        }

        function displayMessage(content, source) {
            const messagesContainer = document.getElementById('messages');
            const messageElement = document.createElement('div');
