diff --git a/web/src/components/AgentChatComponent.vue b/web/src/components/AgentChatComponent.vue index 73e2b2b4..ab9eac6b 100644 --- a/web/src/components/AgentChatComponent.vue +++ b/web/src/components/AgentChatComponent.vue @@ -1635,6 +1635,7 @@ const handleSendOrStop = async (payload) => { // 中断后刷新消息历史,确保显示最新的状态 try { await fetchThreadMessages({ agentId: currentAgentId.value, threadId: threadId, delay: 500 }) + fetchAgentState(currentAgentId.value, threadId) message.info('已中断对话生成') } catch (error) { console.error('刷新消息历史失败:', error) @@ -1683,6 +1684,7 @@ const handleApprovalWithStream = async (answer) => { // 异步加载历史记录,保持当前消息显示直到历史记录加载完成 fetchThreadMessages({ agentId: currentAgentId.value, threadId: threadId }).finally(() => { resetOnGoingConv(threadId) + fetchAgentState(currentAgentId.value, threadId) scrollController.scrollToBottom() }) }