mirror of
https://github.com/sst/opencode.git
synced 2025-12-23 10:11:41 +00:00
fix task tool ui disappearing once done
This commit is contained in:
parent
ffa5689885
commit
baaff81a06
1 changed files with 5 additions and 1 deletions
|
|
@ -75,10 +75,14 @@ export const TaskTool = Tool.define("task", async () => {
|
|||
],
|
||||
})
|
||||
unsub()
|
||||
let all
|
||||
all = await Session.messages(session.id)
|
||||
all = all.filter((x) => x.info.role === "assistant")
|
||||
all = all.flatMap((msg) => msg.parts.filter((x: any) => x.type === "tool") as MessageV2.ToolPart[])
|
||||
return {
|
||||
title: params.description,
|
||||
metadata: {
|
||||
summary: result.parts.filter((x: any) => x.type === "tool"),
|
||||
summary: all,
|
||||
},
|
||||
output: (result.parts.findLast((x: any) => x.type === "text") as any)?.text ?? "",
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue