Skip to content

Commit 9114e64

Browse files
Add proper error tracking when CloudService is not available
Co-authored-by: hannesrudolph <[email protected]>
1 parent d4360ab commit 9114e64

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/core/tools/WebSearchTool.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,18 @@ export class WebSearchTool extends BaseTool<"web_search"> {
5858
const { CloudService } = await import("@roo-code/cloud")
5959

6060
if (!CloudService.hasInstance()) {
61+
task.consecutiveMistakeCount++
62+
task.recordToolError("web_search")
63+
task.didToolFailInCurrentTurn = true
6164
pushToolResult(formatResponse.toolError("Cloud service not available"))
6265
return
6366
}
6467

6568
const cloudAPI = CloudService.instance.cloudAPI
6669
if (!cloudAPI) {
70+
task.consecutiveMistakeCount++
71+
task.recordToolError("web_search")
72+
task.didToolFailInCurrentTurn = true
6773
pushToolResult(formatResponse.toolError("Cloud API not available"))
6874
return
6975
}

0 commit comments

Comments
 (0)