fix: filter messages with only step-start parts in toModelMessage (#6383)

This commit is contained in:
Cole Leavitt
2025-12-29 13:58:11 -07:00
committed by GitHub
parent 67ebe68160
commit b157fd10a7
2 changed files with 5 additions and 1 deletions

4
.gitignore vendored
View File

@@ -20,3 +20,7 @@ opencode.json
a.out
target
.scripts
# Local dev files
opencode-dev
logs/

View File

@@ -539,7 +539,7 @@ export namespace MessageV2 {
}
}
return convertToModelMessages(result.filter((msg) => msg.parts.length > 0))
return convertToModelMessages(result.filter((msg) => msg.parts.some((part) => part.type !== "step-start")))
}
export const stream = fn(Identifier.schema("session"), async function* (sessionID) {