mirror of
https://github.com/sst/opencode.git
synced 2025-12-23 10:11:41 +00:00
fix: Text content blocks must contain non-whitespace text
This commit is contained in:
parent
e29d1d339c
commit
c168466dbd
1 changed files with 2 additions and 0 deletions
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue