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,