(part: ToolPart)
| 395 | } |
| 396 | |
| 397 | function toolStatus(part: ToolPart): string { |
| 398 | if (part.tool !== "task") { |
| 399 | return `running ${part.tool}` |
| 400 | } |
| 401 | |
| 402 | const state = part.state as { |
| 403 | input?: { |
| 404 | description?: unknown |
| 405 | subagent_type?: unknown |
| 406 | } |
| 407 | } |
| 408 | const desc = state.input?.description |
| 409 | if (typeof desc === "string" && desc.trim()) { |
| 410 | return `running ${desc.trim()}` |
| 411 | } |
| 412 | |
| 413 | const type = state.input?.subagent_type |
| 414 | if (typeof type === "string" && type.trim()) { |
| 415 | return `running ${type.trim()}` |
| 416 | } |
| 417 | |
| 418 | return "running task" |
| 419 | } |
| 420 | |
| 421 | // Returns true if we can flush this part's text to scrollback. |
| 422 | // |
no outgoing calls
no test coverage detected