( agentName: string, appState: AppState, )
| 31 | * @returns Task ID if found, undefined otherwise |
| 32 | */ |
| 33 | export function findInProcessTeammateTaskId( |
| 34 | agentName: string, |
| 35 | appState: AppState, |
| 36 | ): string | undefined { |
| 37 | for (const task of Object.values(appState.tasks)) { |
| 38 | if ( |
| 39 | isInProcessTeammateTask(task) && |
| 40 | task.identity.agentName === agentName |
| 41 | ) { |
| 42 | return task.id |
| 43 | } |
| 44 | } |
| 45 | return undefined |
| 46 | } |
| 47 | |
| 48 | /** |
| 49 | * Set awaitingPlanApproval state for an in-process teammate. |
no test coverage detected