File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,9 @@ export type TaskProviderEvents = {
5757 [ RooCodeEventName . TaskInteractive ] : [ taskId : string ]
5858 [ RooCodeEventName . TaskResumable ] : [ taskId : string ]
5959 [ RooCodeEventName . TaskIdle ] : [ taskId : string ]
60+
61+ // Subtask Lifecycle
62+ [ RooCodeEventName . TaskSpawned ] : [ taskId : string ]
6063}
6164
6265/**
Original file line number Diff line number Diff line change @@ -84,6 +84,7 @@ const mockCline = {
8484 consecutiveMistakeCount : 0 ,
8585 isPaused : false ,
8686 pausedModeSlug : "ask" ,
87+ taskId : "mock-parent-task-id" ,
8788 providerRef : {
8889 deref : vi . fn ( ( ) => ( {
8990 getState : vi . fn ( ( ) => ( { customModes : [ ] , mode : "ask" } ) ) ,
@@ -157,7 +158,7 @@ describe("newTaskTool", () => {
157158 )
158159
159160 // Verify side effects
160- expect ( mockCline . emit ) . toHaveBeenCalledWith ( "taskSpawned" , expect . any ( String ) ) // Assuming initCline returns a mock task ID
161+ expect ( mockCline . emit ) . toHaveBeenCalledWith ( "taskSpawned" , " mock-subtask-id" )
161162 expect ( mockCline . isPaused ) . toBe ( true )
162163 expect ( mockCline . emit ) . toHaveBeenCalledWith ( "taskPaused" )
163164 expect ( mockPushToolResult ) . toHaveBeenCalledWith ( expect . stringContaining ( "Successfully created new task" ) )
You can’t perform that action at this time.
0 commit comments