MCPcopy Create free account
hub / github.com/Zoo-Code-Org/Zoo-Code / handleResumeTask

Method handleResumeTask

apps/cli/src/agent/ask-dispatcher.ts:578–602  ·  view source on GitHub ↗

* Handle task resume prompt.

(ts: number, ask: ClineAsk, text: string)

Source from the content-addressed store, hash-verified

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.

Callers 2

handleIdleAskMethod · 0.95
handleResumableAskMethod · 0.95

Calls 4

sendApprovalResponseMethod · 0.95
outputMethod · 0.80
markDisplayedMethod · 0.80
promptForYesNoMethod · 0.80

Tested by

no test coverage detected