              });
        }

        // 显示/隐藏加载动画
        function showLoading() {
            document.getElementById('loadingSpinner').style.display = 'flex';
        }
        
        function hideLoading() {
            document.getElementById('loadingSpinner').style.display = 'none';
        }
        
        // 显示消息
        function showMessage(text, website = null) {
            const history = document.getElementById('chatHistory');
            const messageDiv = document.c