diff --git a/src/core/Cline.ts b/src/core/Cline.ts index 140f0dcf55..be2afe6a26 100644 --- a/src/core/Cline.ts +++ b/src/core/Cline.ts @@ -89,6 +89,7 @@ export type ClineEvents = { taskStarted: [] taskPaused: [] taskUnpaused: [] + taskAskResponded: [] taskAborted: [] taskSpawned: [taskId: string] } @@ -495,6 +496,7 @@ export class Cline extends EventEmitter { this.askResponse = undefined this.askResponseText = undefined this.askResponseImages = undefined + this.emit("taskAskResponded") return result } diff --git a/src/exports/api.ts b/src/exports/api.ts index 78cf8a4eed..576ea481d4 100644 --- a/src/exports/api.ts +++ b/src/exports/api.ts @@ -42,6 +42,7 @@ export class API extends EventEmitter implements RooCodeAPI { cline.on("taskStarted", () => this.emit("taskStarted", cline.taskId)) cline.on("taskPaused", () => this.emit("taskPaused", cline.taskId)) cline.on("taskUnpaused", () => this.emit("taskUnpaused", cline.taskId)) + cline.on("taskAskResponded", () => this.emit("taskAskResponded", cline.taskId)) cline.on("taskAborted", () => this.emit("taskAborted", cline.taskId)) cline.on("taskSpawned", (taskId) => this.emit("taskSpawned", cline.taskId, taskId)) diff --git a/src/exports/roo-code.d.ts b/src/exports/roo-code.d.ts index 890abccf02..13f0bc781c 100644 --- a/src/exports/roo-code.d.ts +++ b/src/exports/roo-code.d.ts @@ -5,6 +5,7 @@ export interface RooCodeEvents { taskStarted: [taskId: string] taskPaused: [taskId: string] taskUnpaused: [taskId: string] + taskAskResponded: [taskId: string] taskAborted: [taskId: string] taskSpawned: [taskId: string, childTaskId: string] }