(taskId: string, progress: AgentProgress, setAppState: SetAppState)
| 337 | * results are not clobbered by progress updates from assistant messages. |
| 338 | */ |
| 339 | export function updateAgentProgress(taskId: string, progress: AgentProgress, setAppState: SetAppState): void { |
| 340 | updateTaskState<LocalAgentTaskState>(taskId, setAppState, task => { |
| 341 | if (task.status !== 'running') { |
| 342 | return task; |
| 343 | } |
| 344 | const existingSummary = task.progress?.summary; |
| 345 | return { |
| 346 | ...task, |
| 347 | progress: existingSummary ? { |
| 348 | ...progress, |
| 349 | summary: existingSummary |
| 350 | } : progress |
| 351 | }; |
| 352 | }); |
| 353 | } |
| 354 | |
| 355 | /** |
| 356 | * Update the background summary for an agent task. |
nothing calls this directly
no test coverage detected