mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-10-08 03:07:53 +00:00
Add proper error tracking when CloudService is not available
Co-authored-by: hannesrudolph <49103247+hannesrudolph@users.noreply.github.com>
This commit is contained in:
parent
d4360ab2e8
commit
9114e647b9
1 changed files with 6 additions and 0 deletions
|
|
@ -58,12 +58,18 @@ export class WebSearchTool extends BaseTool<"web_search"> {
|
|||
const { CloudService } = await import("@roo-code/cloud")
|
||||
|
||||
if (!CloudService.hasInstance()) {
|
||||
task.consecutiveMistakeCount++
|
||||
task.recordToolError("web_search")
|
||||
task.didToolFailInCurrentTurn = true
|
||||
pushToolResult(formatResponse.toolError("Cloud service not available"))
|
||||
return
|
||||
}
|
||||
|
||||
const cloudAPI = CloudService.instance.cloudAPI
|
||||
if (!cloudAPI) {
|
||||
task.consecutiveMistakeCount++
|
||||
task.recordToolError("web_search")
|
||||
task.didToolFailInCurrentTurn = true
|
||||
pushToolResult(formatResponse.toolError("Cloud API not available"))
|
||||
return
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue