修复会话消息实时响应的时候未正确初始化状态
This commit is contained in:
@@ -674,15 +674,15 @@ export function adaptMessageTurn(
|
|||||||
: undefined,
|
: undefined,
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
// For DB historical data, unmatched tools default to "completed"
|
// For live streaming, unmatched tools are still running.
|
||||||
// since the conversation has already ended. "input-available" (Running)
|
// For DB historical data, default to "completed" since the
|
||||||
// only makes sense for live streaming contexts.
|
// conversation has already ended.
|
||||||
adaptedContent.push({
|
adaptedContent.push({
|
||||||
type: "tool-call",
|
type: "tool-call",
|
||||||
toolCallId,
|
toolCallId,
|
||||||
toolName: block.tool_name,
|
toolName: block.tool_name,
|
||||||
input: block.input_preview,
|
input: block.input_preview,
|
||||||
state: "output-available",
|
state: isStreaming ? "input-available" : "output-available",
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user