(part: ToolPart, sessionID: string)
| 309 | } |
| 310 | |
| 311 | function taskTab(part: ToolPart, sessionID: string): FooterSubagentTab { |
| 312 | const label = Locale.titlecase(text(part.state.input.subagent_type) ?? "general") |
| 313 | const description = text(part.state.input.description) ?? stateTitle(part) ?? inputLabel(part.state.input) ?? "" |
| 314 | |
| 315 | return { |
| 316 | sessionID, |
| 317 | partID: part.id, |
| 318 | callID: part.callID, |
| 319 | label, |
| 320 | description, |
| 321 | status: taskStatus(part), |
| 322 | background: metadata(part, "background") === true, |
| 323 | title: stateTitle(part), |
| 324 | toolCalls: num(metadata(part, "toolcalls")) ?? num(metadata(part, "toolCalls")) ?? num(metadata(part, "calls")), |
| 325 | lastUpdatedAt: stateUpdatedAt(part), |
| 326 | } |
| 327 | } |
| 328 | |
| 329 | function taskSessionID(part: ToolPart) { |
| 330 | return text(metadata(part, "sessionId")) ?? text(metadata(part, "sessionID")) |
no test coverage detected