fix: Text content blocks must contain non-whitespace text

This commit is contained in:
Aiden Cline 2025-10-15 12:58:22 -05:00
parent e29d1d339c
commit c168466dbd

View file

@ -513,6 +513,8 @@ export namespace MessageV2 {
}
if (msg.info.role === "assistant") {
const hasEmptyTextPart = msg.parts.some((part) => part.type === "text" && part.text.trim() === "")
if (hasEmptyTextPart) continue
result.push({
id: msg.info.id,
role: "assistant",