* Handle task resume prompt.
(ts: number, ask: ClineAsk, text: string)
| 576 | * Handle task resume prompt. |
| 577 | */ |
| 578 | private async handleResumeTask(ts: number, ask: ClineAsk, text: string): Promise<AskHandleResult> { |
| 579 | const isCompleted = ask === "resume_completed_task" |
| 580 | this.outputManager.output(`\n[Resume ${isCompleted ? "Completed " : ""}Task]`) |
| 581 | if (text) { |
| 582 | this.outputManager.output(` ${text}`) |
| 583 | } |
| 584 | this.outputManager.markDisplayed(ts, text || "", false) |
| 585 | |
| 586 | if (this.nonInteractive) { |
| 587 | this.outputManager.output("\n[continuing task]") |
| 588 | // Auto-resume in non-interactive mode |
| 589 | this.sendApprovalResponse(true) |
| 590 | return { handled: true, response: "yesButtonClicked" } |
| 591 | } |
| 592 | |
| 593 | try { |
| 594 | const resume = await this.promptManager.promptForYesNo("Continue with this task? (y/n): ") |
| 595 | this.sendApprovalResponse(resume) |
| 596 | return { handled: true, response: resume ? "yesButtonClicked" : "noButtonClicked" } |
| 597 | } catch { |
| 598 | this.outputManager.output("[Defaulting to: no]") |
| 599 | this.sendApprovalResponse(false) |
| 600 | return { handled: true, response: "noButtonClicked" } |
| 601 | } |
| 602 | } |
| 603 | |
| 604 | /** |
| 605 | * Handle generic approval prompts for unknown ask types. |
no test coverage detected