From 1e5b20294c2c24a15442646be4acdc847ba3eae6 Mon Sep 17 00:00:00 2001 From: hubian <908234780@qq.com> Date: Sat, 25 Apr 2026 23:33:07 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=89=93=E5=BC=80=E5=8E=86=E5=8F=B2?= =?UTF-8?q?=E5=AF=B9=E8=AF=9D=E6=97=B6=E6=98=BE=E7=A4=BA=E5=8E=86=E5=8F=B2?= =?UTF-8?q?=E6=B6=88=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - renderMessages 函数添加 welcome 显示控制 - 有消息时隐藏欢迎界面,无消息时显示 --- www/app.js | 5 +++++ 1 file changed, 5 insertions(+) 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 ? '👤' : '🤖';