Skip to content

Commit dc302f7

Browse files
authored
Merge pull request #1670 from franekp/ask-response-event
feat(RooCodeAPI): add event that user responded to "ask" request
2 parents 5cd084d + bf49711 commit dc302f7

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed

src/core/Cline.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ export type ClineEvents = {
8989
taskStarted: []
9090
taskPaused: []
9191
taskUnpaused: []
92+
taskAskResponded: []
9293
taskAborted: []
9394
taskSpawned: [taskId: string]
9495
}
@@ -495,6 +496,7 @@ export class Cline extends EventEmitter<ClineEvents> {
495496
this.askResponse = undefined
496497
this.askResponseText = undefined
497498
this.askResponseImages = undefined
499+
this.emit("taskAskResponded")
498500
return result
499501
}
500502

src/exports/api.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ export class API extends EventEmitter<RooCodeEvents> implements RooCodeAPI {
4242
cline.on("taskStarted", () => this.emit("taskStarted", cline.taskId))
4343
cline.on("taskPaused", () => this.emit("taskPaused", cline.taskId))
4444
cline.on("taskUnpaused", () => this.emit("taskUnpaused", cline.taskId))
45+
cline.on("taskAskResponded", () => this.emit("taskAskResponded", cline.taskId))
4546
cline.on("taskAborted", () => this.emit("taskAborted", cline.taskId))
4647
cline.on("taskSpawned", (taskId) => this.emit("taskSpawned", cline.taskId, taskId))
4748

src/exports/roo-code.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ export interface RooCodeEvents {
55
taskStarted: [taskId: string]
66
taskPaused: [taskId: string]
77
taskUnpaused: [taskId: string]
8+
taskAskResponded: [taskId: string]
89
taskAborted: [taskId: string]
910
taskSpawned: [taskId: string, childTaskId: string]
1011
}

0 commit comments

Comments
 (0)