( taskId: string, agentId: string, setAppState: SetAppState, summary?: string, )
| 377 | } |
| 378 | |
| 379 | export function stopWorkflowAgent( |
| 380 | taskId: string, |
| 381 | agentId: string, |
| 382 | setAppState: SetAppState, |
| 383 | summary?: string, |
| 384 | ): void { |
| 385 | updateWorkflowAgent(taskId, agentId, setAppState, agent => ({ |
| 386 | ...agent, |
| 387 | status: agent.status === 'completed' ? agent.status : 'killed', |
| 388 | endTime: agent.endTime ?? Date.now(), |
| 389 | summary: summary ?? agent.summary, |
| 390 | })) |
| 391 | setWorkflowAgentController(taskId, agentId, undefined, setAppState) |
| 392 | } |
| 393 | |
| 394 | export function finalizeWorkflowTask( |
| 395 | taskId: string, |
no test coverage detected