fix(chat): 刷新对话状态以确保消息历史的准确性
This commit is contained in:
parent
3babd9be54
commit
ce46df5dea
@ -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()
|
||||
})
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user