From c6bdfb15cc55eae8a7ed8378392b8f1d787b819f Mon Sep 17 00:00:00 2001 From: hubian <908234780@qq.com> Date: Sun, 26 Apr 2026 21:33:01 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=80=9D=E8=80=83=E5=86=85=E5=AE=B9?= =?UTF-8?q?=E6=AD=A3=E7=A1=AE=E6=98=BE=E7=A4=BA=20-=20=E5=88=A4=E6=96=ADth?= =?UTF-8?q?inking=E5=AD=97=E6=AE=B5=E5=AD=98=E5=9C=A8=E8=80=8C=E9=9D=9E?= =?UTF-8?q?=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- www/app.js | 7 ++++--- www/index.html | 6 +++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/www/app.js b/www/app.js index f3bc6e3..b3d3cea 100644 --- a/www/app.js +++ b/www/app.js @@ -1165,9 +1165,10 @@ function renderMessages() { // 思考内容块(仅AI消息) let thinkingHtml = ''; - if (!isUser && msg.thinking) { - // 判断是否是当前正在生成的消息(有thinking且content为空或很短) + if (!isUser && 'thinking' in msg) { + // 判断是否是当前正在生成的消息(有thinking字段且正在加载) const isGenerating = index === currentConversation.messages.length - 1 && isLoading && enableThinking; + // 思考进行中且没有正式内容时展开 const expandedClass = isGenerating && !msg.content ? 'expanded' : ''; thinkingHtml = ` @@ -1177,7 +1178,7 @@ function renderMessages() { 思考过程 -
${renderMarkdown(msg.thinking)}
+
${renderMarkdown(msg.thinking || '思考中...')}
`; } diff --git a/www/index.html b/www/index.html index da7e1ed..49ccc13 100644 --- a/www/index.html +++ b/www/index.html @@ -8,12 +8,12 @@ AI助手 - +
- - + + \ No newline at end of file