From d4360ab2e8aa8c1c878d02900fba0d4d1a6414ef Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 29 Jan 2026 14:42:27 +0000 Subject: [PATCH] Fix CloudService access in WebSearchTool Co-authored-by: hannesrudolph <49103247+hannesrudolph@users.noreply.github.com> --- src/core/tools/WebSearchTool.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/core/tools/WebSearchTool.ts b/src/core/tools/WebSearchTool.ts index 4999678d9d..d8bd67c546 100644 --- a/src/core/tools/WebSearchTool.ts +++ b/src/core/tools/WebSearchTool.ts @@ -55,15 +55,14 @@ export class WebSearchTool extends BaseTool<"web_search"> { } // Get CloudService and perform search - const provider = task.providerRef.deref() - const cloudService = provider?.getCloudService() + const { CloudService } = await import("@roo-code/cloud") - if (!cloudService) { + if (!CloudService.hasInstance()) { pushToolResult(formatResponse.toolError("Cloud service not available")) return } - const cloudAPI = cloudService.cloudAPI + const cloudAPI = CloudService.instance.cloudAPI if (!cloudAPI) { pushToolResult(formatResponse.toolError("Cloud API not available")) return