(timeoutMs: number)
| 301 | } |
| 302 | |
| 303 | private async waitForWebviewLaunch(timeoutMs: number): Promise<boolean> { |
| 304 | try { |
| 305 | await pWaitFor(() => this.sidebarProvider.viewLaunched, { |
| 306 | timeout: timeoutMs, |
| 307 | interval: 50, |
| 308 | }) |
| 309 | |
| 310 | return true |
| 311 | } catch { |
| 312 | this.log(`[API#waitForWebviewLaunch] webview did not launch within ${timeoutMs}ms`) |
| 313 | return false |
| 314 | } |
| 315 | } |
| 316 | |
| 317 | private registerListeners(provider: ClineProvider) { |
| 318 | provider.on(RooCodeEventName.TaskCreated, (task) => { |