            messageElement.className = `message ${source}`;

            const labelElement = document.createElement('span');
            labelElement.className = 'label';
            labelElement.textContent = source;

            const contentElement = document.createElement('div');
            contentElement.className = 'content';
            contentElement.textContent = content;

            messageElement.appendChild(labelElement);
            messageElement.appendChild(contentElement);
            mes