diff --git a/src/exports/api.ts b/src/exports/api.ts index 19f1784676..42b4b1d4bf 100644 --- a/src/exports/api.ts +++ b/src/exports/api.ts @@ -133,14 +133,14 @@ export class API extends EventEmitter implements RooCodeAPI { } public async resumeTask(taskId: string): Promise { - const { historyItem } = await this.provider.getTaskWithId(taskId) - await this.provider.initClineWithHistoryItem(historyItem) - await this.provider.postMessageToWebview({ type: "action", action: "chatButtonClicked" }) + const { historyItem } = await this.sidebarProvider.getTaskWithId(taskId) + await this.sidebarProvider.initClineWithHistoryItem(historyItem) + await this.sidebarProvider.postMessageToWebview({ type: "action", action: "chatButtonClicked" }) } public async isTaskInHistory(taskId: string): Promise { try { - await this.provider.getTaskWithId(taskId) + await this.sidebarProvider.getTaskWithId(taskId) return true } catch { return false diff --git a/src/exports/interface.ts b/src/exports/interface.ts index f30cc3a09e..a0ef46a226 100644 --- a/src/exports/interface.ts +++ b/src/exports/interface.ts @@ -27,6 +27,20 @@ export interface RooCodeAPI extends EventEmitter { newTab?: boolean }): Promise + /** + * Resumes a task with the given ID. + * @param taskId The ID of the task to resume. + * @throws Error if the task is not found in the task history. + */ + resumeTask(taskId: string): Promise + + /** + * Checks if a task with the given ID is in the task history. + * @param taskId The ID of the task to check. + * @returns True if the task is in the task history, false otherwise. + */ + isTaskInHistory(taskId: string): Promise + /** * Returns the current task stack. * @returns An array of task IDs. diff --git a/src/exports/roo-code.d.ts b/src/exports/roo-code.d.ts index 06304dbda4..087edc37c7 100644 --- a/src/exports/roo-code.d.ts +++ b/src/exports/roo-code.d.ts @@ -557,14 +557,12 @@ interface RooCodeAPI extends EventEmitter { * @throws Error if the task is not found in the task history. */ resumeTask(taskId: string): Promise - /** * Checks if a task with the given ID is in the task history. * @param taskId The ID of the task to check. * @returns True if the task is in the task history, false otherwise. */ isTaskInHistory(taskId: string): Promise - /** * Returns the current task stack. * @returns An array of task IDs.