diff --git a/www/app.js b/www/app.js index 1a3c758..42e311c 100644 --- a/www/app.js +++ b/www/app.js @@ -410,6 +410,11 @@ function clearCurrentChat() { function renderMessages() { if (!currentConversation) return; + // 根据消息数量显示/隐藏欢迎界面 + if (welcome) { + welcome.style.display = currentConversation.messages.length > 0 ? 'none' : 'block'; + } + messagesDiv.innerHTML = currentConversation.messages.map((msg, index) => { const isUser = msg.role === 'user'; const avatar = isUser ? '👤' : '🤖';