From 3b5b34012f02de2e1fbfe78b9159dfc524a1ee25 Mon Sep 17 00:00:00 2001 From: Wojciech Kordalski Date: Sat, 15 Mar 2025 12:05:55 +0100 Subject: [PATCH] Expose task IDs on the Cline stack --- src/core/webview/ClineProvider.ts | 4 ++++ src/exports/api.ts | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/core/webview/ClineProvider.ts b/src/core/webview/ClineProvider.ts index 87f33dc418..67bb03d585 100644 --- a/src/core/webview/ClineProvider.ts +++ b/src/core/webview/ClineProvider.ts @@ -169,6 +169,10 @@ export class ClineProvider implements vscode.WebviewViewProvider { return this.clineStack.length } + public getCurrentTaskStack(): string[] { + return this.clineStack.map((cline) => cline.taskId) + } + // remove the current task/cline instance (at the top of the stack), ao this task is finished // and resume the previous task/cline instance (if it exists) // this is used when a sub task is finished and the parent task needs to be resumed diff --git a/src/exports/api.ts b/src/exports/api.ts index 91817fcc58..9590f9cbf8 100644 --- a/src/exports/api.ts +++ b/src/exports/api.ts @@ -79,4 +79,8 @@ export class API extends EventEmitter implements RooCodeAPI { public getMessages(taskId: string) { return this.history.getMessages(taskId) } + + public getCurrentTaskStack(): string[] { + return this.provider.getCurrentTaskStack() + } }