mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-18 23:52:42 +00:00
fix: filter messages with only step-start parts in toModelMessage (#6383)
This commit is contained in:
parent
67ebe68160
commit
b157fd10a7
2 changed files with 5 additions and 1 deletions
4
.gitignore
vendored
4
.gitignore
vendored
|
|
@ -20,3 +20,7 @@ opencode.json
|
|||
a.out
|
||||
target
|
||||
.scripts
|
||||
|
||||
# Local dev files
|
||||
opencode-dev
|
||||
logs/
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue