fix(tui): show background subagent completion

This commit is contained in:
Kit Langton 2026-07-12 12:40:39 +00:00 committed by opencode-agent[bot]
commit 885c13fcee
3 changed files with 61 additions and 8 deletions

View file

@ -288,6 +288,16 @@ describe("SubagentTool", () => {
const admission = Array.from(yield* Fiber.join(admitted))[0]
expect(admission?.data.input.data.text).toContain(`<subagent id="${childID}" state="completed"`)
expect(admission?.data.input.data).toMatchObject({
description: "Background agent completed: background review",
metadata: {
source: "subagent",
childID,
agent: "reviewer",
state: "completed",
description: "background review",
},
})
const database = yield* Database.Service
yield* SessionPending.promoteSteers(database.db, events, parent.id)
const synthetic = (yield* sessions.context(parent.id)).filter((message) => message.type === "synthetic")