@@ -223,7 +223,7 @@ export class ClineProvider implements vscode.WebviewViewProvider {
223223 // remove the last cline instance from the stack (this is the finished sub task)
224224 await this . removeClineFromStack ( )
225225 // resume the last cline instance in the stack (if it exists - this is the 'parnt' calling task)
226- this . getCurrentCline ( ) ?. resumePausedTask ( lastMessage )
226+ this . getCurrentCline ( ) ?. resumePausedTask ( `new_task finished successfully! ${ lastMessage } ` )
227227 } catch ( error ) {
228228 this . log ( `Error in finishSubTask: ${ error . message } ` )
229229 throw error
@@ -925,6 +925,11 @@ export class ClineProvider implements vscode.WebviewViewProvider {
925925 case "clearTask" :
926926 // newTask will start a new task with a given task text, while clear task resets the current session and allows for a new task to be started
927927 await this . removeClineFromStack ( )
928+ // resume previouse task with subtask failed error
929+ this . getCurrentCline ( ) ?. resumePausedTask (
930+ `new_task finished with an error!, it was stopped and canceled by the user.` ,
931+ )
932+
928933 await this . postStateToWebview ( )
929934 break
930935 case "didShowAnnouncement" :
@@ -2083,6 +2088,10 @@ export class ClineProvider implements vscode.WebviewViewProvider {
20832088 // remove task from stack if it's the current task
20842089 if ( id === this . getCurrentCline ( ) ?. taskId ) {
20852090 await this . removeClineWithIdFromStack ( id )
2091+ // resume previouse task with subtask failed error
2092+ this . getCurrentCline ( ) ?. resumePausedTask (
2093+ `new_task finished with an error!, it was stopped and delted by the user.` ,
2094+ )
20862095 }
20872096
20882097 // delete task from the task history state
0 commit comments