From c165360e17d54e8c1f428dafbc700b8eae5dc3cf Mon Sep 17 00:00:00 2001 From: Aiden Cline <63023139+rekram1-node@users.noreply.github.com> Date: Tue, 29 Jul 2025 06:18:34 -0500 Subject: [PATCH] fix: task type error (#1384) --- packages/opencode/src/tool/task.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/opencode/src/tool/task.ts b/packages/opencode/src/tool/task.ts index 6d78daf7..f245c777 100644 --- a/packages/opencode/src/tool/task.ts +++ b/packages/opencode/src/tool/task.ts @@ -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 ?? "", } }, }