fix(opencode): ensure unsub(PartUpdated) is always called in TaskTool (#9992)

This commit is contained in:
Goni Zahavy 2026-01-28 08:04:43 +02:00 committed by GitHub
parent 427cc3e153
commit 63f5669eb5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -160,7 +160,10 @@ export const TaskTool = Tool.define("task", async (ctx) => {
},
parts: promptParts,
})
unsub()
.finally(() => {
unsub()
})
const messages = await Session.messages({ sessionID: session.id })
const summary = messages
.filter((x) => x.info.role === "assistant")