fix(web): 修复普通流式发送时用户消息延迟显示
在 legacy 流式发送路径中补齐本地乐观用户消息,避免消息发送后等待历史刷新才出现在对话中。
This commit is contained in:
parent
a031cf0b56
commit
f87b763b7b
@ -1412,6 +1412,12 @@ const handleSendMessage = async ({ image } = {}) => {
|
||||
|
||||
threadState.isStreaming = true
|
||||
resetOnGoingConv(threadId)
|
||||
const requestId = createClientRequestId()
|
||||
insertOptimisticHumanMessage(threadState, {
|
||||
requestId,
|
||||
text,
|
||||
imageContent
|
||||
})
|
||||
threadState.streamAbortController = new AbortController()
|
||||
|
||||
try {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user