Skip to content

Commit f6b995c

Browse files
committed
chore: format code
1 parent 8d37369 commit f6b995c

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

packages/opencode/src/tool/task.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ export const TaskTool = Tool.define("task", async () => {
3131
const session = params.session_id
3232
? await Session.get(params.session_id)
3333
: await Session.create({
34-
parentID: ctx.sessionID,
35-
title: params.description + ` (@${agent.name} subagent)`,
36-
})
34+
parentID: ctx.sessionID,
35+
title: params.description + ` (@${agent.name} subagent)`,
36+
})
3737
const msg = await MessageV2.get({ sessionID: ctx.sessionID, messageID: ctx.messageID })
3838
if (msg.info.role !== "assistant") throw new Error("Not an assistant message")
3939

@@ -96,9 +96,11 @@ export const TaskTool = Tool.define("task", async () => {
9696
all = all.filter((x) => x.info.role === "assistant")
9797
all = all.flatMap((msg) => msg.parts.filter((x: any) => x.type === "tool") as MessageV2.ToolPart[])
9898
const text = (result.parts.findLast((x: any) => x.type === "text") as any)?.text ?? ""
99-
const output = text ? `${text}
99+
const output = text
100+
? `${text}
100101
101-
[task-session:${session.id}]` : `[task-session:${session.id}]`
102+
[task-session:${session.id}]`
103+
: `[task-session:${session.id}]`
102104
return {
103105
title: params.description,
104106
metadata: {

0 commit comments

Comments
 (0)