Fix CloudService access in WebSearchTool

Co-authored-by: hannesrudolph <49103247+hannesrudolph@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2026-01-29 14:42:27 +00:00
parent e6a76172b9
commit d4360ab2e8

View file

@ -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