mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-19 16:40:48 +00:00
chore: ensure empty message isnt sent
This commit is contained in:
parent
70881b2937
commit
c996f3d847
1 changed files with 3 additions and 1 deletions
|
|
@ -476,7 +476,6 @@ export namespace MessageV2 {
|
|||
role: "assistant",
|
||||
parts: [],
|
||||
}
|
||||
result.push(assistantMessage)
|
||||
for (const part of msg.parts) {
|
||||
if (part.type === "text")
|
||||
assistantMessage.parts.push({
|
||||
|
|
@ -535,6 +534,9 @@ export namespace MessageV2 {
|
|||
})
|
||||
}
|
||||
}
|
||||
if (assistantMessage.parts.length > 0) {
|
||||
result.push(assistantMessage)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue