File tree Expand file tree Collapse file tree 3 files changed +14
-0
lines changed Expand file tree Collapse file tree 3 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -169,6 +169,10 @@ export class ClineProvider implements vscode.WebviewViewProvider {
169169 return this . clineStack . length
170170 }
171171
172+ public getCurrentTaskStack ( ) : string [ ] {
173+ return this . clineStack . map ( ( cline ) => cline . taskId )
174+ }
175+
172176 // remove the current task/cline instance (at the top of the stack), ao this task is finished
173177 // and resume the previous task/cline instance (if it exists)
174178 // this is used when a sub task is finished and the parent task needs to be resumed
Original file line number Diff line number Diff line change @@ -80,4 +80,8 @@ export class API extends EventEmitter<RooCodeEvents> implements RooCodeAPI {
8080 public getMessages ( taskId : string ) {
8181 return this . history . getMessages ( taskId )
8282 }
83+
84+ public getCurrentTaskStack ( ) : string [ ] {
85+ return this . provider . getCurrentTaskStack ( )
86+ }
8387}
Original file line number Diff line number Diff line change @@ -62,6 +62,12 @@ export interface RooCodeAPI extends EventEmitter<RooCodeEvents> {
6262 * @returns An array of ClineMessage objects.
6363 */
6464 getMessages ( taskId : string ) : ClineMessage [ ]
65+
66+ /**
67+ * Returns the current task stack.
68+ * @returns An array of task IDs.
69+ */
70+ getCurrentTaskStack ( ) : string [ ]
6571}
6672
6773export type ClineAsk =
You can’t perform that action at this time.
0 commit comments