fix: task type error (#1384)

This commit is contained in:
Aiden Cline 2025-07-29 06:18:34 -05:00 committed by GitHub
parent 9cb0f21b4e
commit c165360e17
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -70,7 +70,7 @@ export const TaskTool = Tool.define("task", async () => {
metadata: {
summary: result.parts.filter((x) => x.type === "tool"),
},
output: result.parts.findLast((x) => x.type === "text")!.text,
output: result.parts.findLast((x) => x.type === "text")?.text ?? "",
}
},
}