(t: DeepImmutable<InProcessTeammateTaskState>)
| 75 | * recent-activity summary → last activity description → 'working'. |
| 76 | */ |
| 77 | export function describeTeammateActivity(t: DeepImmutable<InProcessTeammateTaskState>): string { |
| 78 | if (t.shutdownRequested) return 'stopping'; |
| 79 | if (t.awaitingPlanApproval) return 'awaiting approval'; |
| 80 | if (t.isIdle) return 'idle'; |
| 81 | return (t.progress?.recentActivities && summarizeRecentActivities(t.progress.recentActivities)) ?? t.progress?.lastActivity?.activityDescription ?? 'working'; |
| 82 | } |
| 83 | |
| 84 | /** |
| 85 | * Returns true when BackgroundTaskStatus would render nothing because the |
no test coverage detected