Skip to content

Commit b2ff4be

Browse files
authored
fix: Text content blocks must contain non-whitespace text (#3194)
1 parent 2267ce2 commit b2ff4be

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎packages/opencode/src/session/message-v2.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -513,6 +513,8 @@ export namespace MessageV2 {
513513
}
514514

515515
if (msg.info.role === "assistant") {
516+
const hasEmptyTextPart = msg.parts.some((part) => part.type === "text" && part.text.trim() === "")
517+
if (hasEmptyTextPart) continue
516518
result.push({
517519
id: msg.info.id,
518520
role: "assistant",

0 commit comments

Comments
 (0)