(taskId: string)
| 211 | } |
| 212 | |
| 213 | public async resumeTask(taskId: string): Promise<void> { |
| 214 | await vscode.commands.executeCommand(`${Package.name}.SidebarProvider.focus`) |
| 215 | await this.waitForWebviewLaunch(5_000) |
| 216 | |
| 217 | const { historyItem } = await this.sidebarProvider.getTaskWithId(taskId) |
| 218 | await this.sidebarProvider.createTaskWithHistoryItem(historyItem) |
| 219 | |
| 220 | if (this.sidebarProvider.viewLaunched) { |
| 221 | await this.sidebarProvider.postMessageToWebview({ type: "action", action: "chatButtonClicked" }) |
| 222 | } else { |
| 223 | this.log( |
| 224 | `[API#resumeTask] webview not launched after resume for task ${taskId}; continuing in headless mode`, |
| 225 | ) |
| 226 | } |
| 227 | } |
| 228 | |
| 229 | public async isTaskInHistory(taskId: string): Promise<boolean> { |
| 230 | try { |
no test coverage detected