From a3def9702bc2f8ee03740f3bbada21201e8f2026 Mon Sep 17 00:00:00 2001 From: hubian <908234780@qq.com> Date: Tue, 14 Apr 2026 10:33:11 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=8E=86=E5=8F=B2=E6=B6=88=E6=81=AF?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E5=9B=BE=E7=89=87/=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E5=8D=A0=E4=BD=8D=E7=AC=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/index.html | 40 ++++++++++++++++++++++++++++++++-------- 1 file changed, 32 insertions(+), 8 deletions(-) diff --git a/templates/index.html b/templates/index.html index 0687c9f..f776a65 100644 --- a/templates/index.html +++ b/templates/index.html @@ -410,19 +410,43 @@ html += ''; div.innerHTML = html; - // 如果是用户消息且有搜索结果,在设置innerHTML后追加 + // 如果是用户消息且有额外数据(搜索结果、图片、文件),在设置innerHTML后追加 if (role === 'user' && extraData) { console.log('Processing extraData for user message:', extraData); - console.log('search_results exists:', extraData.search_results); + const bodyDiv = div.querySelector('.message-body'); + + // 处理图片 + if (extraData.images && extraData.images.length > 0) { + let imagesHtml = '