(
taskId: string,
status: 'completed' | 'failed' | 'stopped',
opts?: {
toolUseId?: string
summary?: string
outputFile?: string
usage?: { total_tokens: number; tool_uses: number; duration_ms: number }
},
)
| 112 | * (Scuttle's bg-task dot, VS Code subagent panel) see the task close. |
| 113 | */ |
| 114 | export function emitTaskTerminatedSdk( |
| 115 | taskId: string, |
| 116 | status: 'completed' | 'failed' | 'stopped', |
| 117 | opts?: { |
| 118 | toolUseId?: string |
| 119 | summary?: string |
| 120 | outputFile?: string |
| 121 | usage?: { total_tokens: number; tool_uses: number; duration_ms: number } |
| 122 | }, |
| 123 | ): void { |
| 124 | enqueueSdkEvent({ |
| 125 | type: 'system', |
| 126 | subtype: 'task_notification', |
| 127 | task_id: taskId, |
| 128 | tool_use_id: opts?.toolUseId, |
| 129 | status, |
| 130 | output_file: opts?.outputFile ?? '', |
| 131 | summary: opts?.summary ?? '', |
| 132 | usage: opts?.usage, |
| 133 | }) |
| 134 | } |
no test coverage detected