This commit is contained in:
Aiden Cline
2026-02-18 16:49:33 -06:00
parent 8562c8dd9f
commit 92ed4fa9f0

View File

@@ -169,15 +169,16 @@ function websearch(info: ToolProps<typeof WebSearchTool>) {
function task(info: ToolProps<typeof TaskTool>) {
const input = info.part.state.input
const status = info.part.state.status
const subagent =
typeof input.subagent_type === "string" && input.subagent_type.trim().length > 0 ? input.subagent_type : "unknown"
const agent = Locale.titlecase(subagent)
const desc =
typeof input.description === "string" && input.description.trim().length > 0 ? input.description : undefined
const started = info.part.state.status === "running"
const icon = status === "error" ? "✗" : status === "running" ? "•" : "✓"
const name = desc ?? `${agent} Task`
inline({
icon: started ? "•" : "✓",
icon,
title: name,
description: desc ? `${agent} Agent` : undefined,
})