From 747331c85067592d2e8261763c0464c5abd84af9 Mon Sep 17 00:00:00 2001 From: allen2fuc Date: Tue, 19 May 2026 14:36:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86Thinking=E7=9A=84?= =?UTF-8?q?=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/src/pages/AIPage.tsx | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/client/src/pages/AIPage.tsx b/client/src/pages/AIPage.tsx index 04ace33..81faeaa 100644 --- a/client/src/pages/AIPage.tsx +++ b/client/src/pages/AIPage.tsx @@ -522,6 +522,7 @@ export default function AIPage({ variant = "page", onClose }: AIPageProps = {}) }, onDone: () => { setSending(false); + updateAssistant((m) => ({ ...m, pending: false })); // 如果是新建会话,后端首次返回时会创建 chat_id;这里拉一次会话列表补上 id const resolveAndRefresh = async () => { let id = currentChatId; @@ -809,13 +810,6 @@ export default function AIPage({ variant = "page", onClose }: AIPageProps = {}) /> ), )} - {sending && - (() => { - const last = messages[messages.length - 1]; - return last && last.kind === "chat" && last.pending ? ( - - ) : null; - })()} )} @@ -1062,9 +1056,9 @@ function MessageBubble({ aiText, msg }: { aiText: AILocale; msg: ChatUIMessage }
{msg.text ? ( {msg.text} - ) : ( + ) : msg.pending ? ( {aiText.thinking} - )} + ) : null}
)} @@ -1072,16 +1066,6 @@ function MessageBubble({ aiText, msg }: { aiText: AILocale; msg: ChatUIMessage } ); } -function TypingIndicator() { - return ( -
- - - -
- ); -} - function HistoryPanel({ aiText, chats,