diff --git a/frontend/src/components/AIChatPanel.tsx b/frontend/src/components/AIChatPanel.tsx index 5602056..ed58511 100644 --- a/frontend/src/components/AIChatPanel.tsx +++ b/frontend/src/components/AIChatPanel.tsx @@ -674,7 +674,21 @@ export const AIChatPanel: React.FC = ({ if (lastUserMsgIndex >= 0) { const userMsg = historyLocal[lastUserMsgIndex]; truncateAIChatMessages(sid, userMsg.id); + + // 重置计数器(与 handleSend 保持一致) + toolCallRoundRef.current = 0; + totalToolRoundRef.current = 0; + nudgeCountRef.current = 0; + setSending(true); + + // 插入 connecting 过渡消息(波纹动画),与 handleSend 保持一致 + const connectingMsg: AIChatMessage = { + id: genId(), role: 'assistant', phase: 'connecting', content: '', + timestamp: Date.now(), loading: true + }; + addAIChatMessage(sid, connectingMsg); + const truncatedHistory = historyLocal.slice(0, lastUserMsgIndex + 1); const messagesPayload = truncatedHistory.map(m => ({ role: m.role, content: m.content, images: m.images })); diff --git a/frontend/wailsjs/runtime/package.json b/frontend/wailsjs/runtime/package.json old mode 100644 new mode 100755 diff --git a/frontend/wailsjs/runtime/runtime.d.ts b/frontend/wailsjs/runtime/runtime.d.ts old mode 100644 new mode 100755 diff --git a/frontend/wailsjs/runtime/runtime.js b/frontend/wailsjs/runtime/runtime.js old mode 100644 new mode 100755