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