* Handle idle asks (completion_result, api_req_failed, etc.). * These indicate the task has stopped.
(ts: number, ask: ClineAsk, text: string)
| 214 | * These indicate the task has stopped. |
| 215 | */ |
| 216 | private async handleIdleAsk(ts: number, ask: ClineAsk, text: string): Promise<AskHandleResult> { |
| 217 | switch (ask) { |
| 218 | case "completion_result": |
| 219 | // Task complete - nothing to do here, TaskCompleted event handles it |
| 220 | return { handled: true } |
| 221 | |
| 222 | case "api_req_failed": |
| 223 | return await this.handleApiFailedRetry(ts, text) |
| 224 | |
| 225 | case "mistake_limit_reached": |
| 226 | return await this.handleMistakeLimitReached(ts, text) |
| 227 | |
| 228 | case "resume_completed_task": |
| 229 | return await this.handleResumeTask(ts, ask, text) |
| 230 | |
| 231 | case "auto_approval_max_req_reached": |
| 232 | return await this.handleAutoApprovalMaxReached(ts, text) |
| 233 | |
| 234 | default: |
| 235 | return { handled: false } |
| 236 | } |
| 237 | } |
| 238 | |
| 239 | /** |
| 240 | * Handle resumable asks (resume_task). |
no test coverage detected