fix: Text content blocks must contain non-whitespace text (#3194)

pull/3197/head
Aiden Cline 2025-10-15 13:00:26 -05:00 committed by GitHub
parent 2267ce2511
commit b2ff4be4c6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 0 deletions

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",