@@ -802,6 +802,7 @@ export class Task extends EventEmitter<TaskEvents> implements TaskLike {
802802 const isMessageQueued = ! this . messageQueueService . isEmpty ( )
803803 const isStatusMutable = ! partial && isBlocking && ! isMessageQueued
804804 let statusMutationTimeouts : NodeJS . Timeout [ ] = [ ]
805+ const statusMutationTimeout = 5_000
805806
806807 if ( isStatusMutable ) {
807808 console . log ( `Task#ask will block -> type: ${ type } ` )
@@ -815,7 +816,7 @@ export class Task extends EventEmitter<TaskEvents> implements TaskLike {
815816 this . interactiveAsk = message
816817 this . emit ( RooCodeEventName . TaskInteractive , this . taskId )
817818 }
818- } , 1_000 ) ,
819+ } , statusMutationTimeout ) ,
819820 )
820821 } else if ( isResumableAsk ( type ) ) {
821822 statusMutationTimeouts . push (
@@ -826,7 +827,7 @@ export class Task extends EventEmitter<TaskEvents> implements TaskLike {
826827 this . resumableAsk = message
827828 this . emit ( RooCodeEventName . TaskResumable , this . taskId )
828829 }
829- } , 1_000 ) ,
830+ } , statusMutationTimeout ) ,
830831 )
831832 } else if ( isIdleAsk ( type ) ) {
832833 statusMutationTimeouts . push (
@@ -837,7 +838,7 @@ export class Task extends EventEmitter<TaskEvents> implements TaskLike {
837838 this . idleAsk = message
838839 this . emit ( RooCodeEventName . TaskIdle , this . taskId )
839840 }
840- } , 1_000 ) ,
841+ } , statusMutationTimeout ) ,
841842 )
842843 }
843844 } else if ( isMessageQueued ) {
@@ -846,17 +847,19 @@ export class Task extends EventEmitter<TaskEvents> implements TaskLike {
846847 const message = this . messageQueueService . dequeueMessage ( )
847848
848849 if ( message ) {
849- // Check if this is a tool approval ask that needs to be handled
850+ // Check if this is a tool approval ask that needs to be handled.
850851 if (
851852 type === "tool" ||
852853 type === "command" ||
853854 type === "browser_action_launch" ||
854855 type === "use_mcp_server"
855856 ) {
856- // For tool approvals, we need to approve first, then send the message if there's text/images
857+ // For tool approvals, we need to approve first, then send
858+ // the message if there's text/images.
857859 this . handleWebviewAskResponse ( "yesButtonClicked" , message . text , message . images )
858860 } else {
859- // For other ask types (like followup), fulfill the ask directly
861+ // For other ask types (like followup), fulfill the ask
862+ // directly.
860863 this . setMessageResponse ( message . text , message . images )
861864 }
862865 }
0 commit comments