(appState: AppState)
| 218 | * Used to determine if we should wait before sending shutdown prompts. |
| 219 | */ |
| 220 | export function hasWorkingInProcessTeammates(appState: AppState): boolean { |
| 221 | for (const task of Object.values(appState.tasks)) { |
| 222 | if ( |
| 223 | task.type === 'in_process_teammate' && |
| 224 | task.status === 'running' && |
| 225 | !task.isIdle |
| 226 | ) { |
| 227 | return true |
| 228 | } |
| 229 | } |
| 230 | return false |
| 231 | } |
| 232 | |
| 233 | /** |
| 234 | * Returns a promise that resolves when all working in-process teammates become idle. |