fix(agent): 修复工具也变成在流式输出的问题
This commit is contained in:
parent
85480dbdc0
commit
b0f21309f7
@ -825,7 +825,10 @@ const enqueueLoadingChunkForTyping = (threadId, chunk) => {
|
||||
}
|
||||
|
||||
const msg = chunk.msg || {}
|
||||
const contentChars = splitChars(msg.content)
|
||||
const msgType = String(msg.type || '').toLowerCase()
|
||||
const isToolMessage = msgType === 'tool' || msgType.includes('tool')
|
||||
const streamText = typeof chunk.response === 'string' ? chunk.response : ''
|
||||
const contentChars = !isToolMessage ? splitChars(streamText) : []
|
||||
if (contentChars.length === 0) {
|
||||
typingChunkQueue.push({ threadId, chunk, isChar: false })
|
||||
scheduleTypingRender()
|
||||
@ -838,6 +841,7 @@ const enqueueLoadingChunkForTyping = (threadId, chunk) => {
|
||||
isChar: true,
|
||||
chunk: {
|
||||
...chunk,
|
||||
response: char,
|
||||
msg: {
|
||||
...msg,
|
||||
content: char
|
||||
|
||||
Loading…
Reference in New Issue
Block a user