( tracker: ProgressTracker, taskId: string, toolUseId: string | undefined, description: string, startTime: number, lastToolName: string, )
| 367 | } |
| 368 | |
| 369 | export function emitTaskProgress( |
| 370 | tracker: ProgressTracker, |
| 371 | taskId: string, |
| 372 | toolUseId: string | undefined, |
| 373 | description: string, |
| 374 | startTime: number, |
| 375 | lastToolName: string, |
| 376 | ): void { |
| 377 | const progress = getProgressUpdate(tracker) |
| 378 | emitTaskProgressEvent({ |
| 379 | taskId, |
| 380 | toolUseId, |
| 381 | description: progress.lastActivity?.activityDescription ?? description, |
| 382 | startTime, |
| 383 | totalTokens: progress.tokenCount, |
| 384 | toolUses: progress.toolUseCount, |
| 385 | lastToolName, |
| 386 | }) |
| 387 | } |
| 388 | |
| 389 | export async function classifyHandoffIfNeeded({ |
| 390 | agentMessages, |
no test coverage detected