Skip to content

Commit a83b46c

Browse files
committed
Missed a few spots
1 parent 25c7f3f commit a83b46c

File tree

4 files changed

+6
-0
lines changed

4 files changed

+6
-0
lines changed

src/core/tools/applyDiffTool.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ export async function applyDiffTool(
7373

7474
if (!fileExists) {
7575
cline.consecutiveMistakeCount++
76+
cline.recordToolUsage({ toolName: "apply_diff", success: false })
7677
const formattedError = `File does not exist at path: ${absolutePath}\n\n<error_details>\nThe specified file could not be found. Please verify the file path and try again.\n</error_details>`
7778
await cline.say("error", formattedError)
7879
pushToolResult(formattedError)

src/core/tools/askFollowupQuestionTool.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export async function askFollowupQuestionTool(
2121
} else {
2222
if (!question) {
2323
cline.consecutiveMistakeCount++
24+
cline.recordToolUsage({ toolName: "ask_followup_question", success: false })
2425
pushToolResult(await cline.sayAndCreateMissingParamError("ask_followup_question", "question"))
2526
return
2627
}

src/core/tools/readFileTool.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ export async function readFileTool(
6969
if (isNaN(startLine)) {
7070
// Invalid start_line
7171
cline.consecutiveMistakeCount++
72+
cline.recordToolUsage({ toolName: "read_file", success: false })
7273
await cline.say("error", `Failed to parse start_line: ${startLineStr}`)
7374
pushToolResult(`<file><path>${relPath}</path><error>Invalid start_line value</error></file>`)
7475
return
@@ -84,6 +85,7 @@ export async function readFileTool(
8485
if (isNaN(endLine)) {
8586
// Invalid end_line
8687
cline.consecutiveMistakeCount++
88+
cline.recordToolUsage({ toolName: "read_file", success: false })
8789
await cline.say("error", `Failed to parse end_line: ${endLineStr}`)
8890
pushToolResult(`<file><path>${relPath}</path><error>Invalid end_line value</error></file>`)
8991
return

src/core/tools/searchAndReplaceTool.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ export async function searchAndReplaceTool(
5555

5656
if (!fileExists) {
5757
cline.consecutiveMistakeCount++
58+
cline.recordToolUsage({ toolName: "search_and_replace", success: false })
5859
const formattedError = `File does not exist at path: ${absolutePath}\n\n<error_details>\nThe specified file could not be found. Please verify the file path and try again.\n</error_details>`
5960
await cline.say("error", formattedError)
6061
pushToolResult(formattedError)
@@ -79,6 +80,7 @@ export async function searchAndReplaceTool(
7980
}
8081
} catch (error) {
8182
cline.consecutiveMistakeCount++
83+
cline.recordToolUsage({ toolName: "search_and_replace", success: false })
8284
await cline.say("error", `Failed to parse operations JSON: ${error.message}`)
8385
pushToolResult(formatResponse.toolError("Invalid operations JSON format"))
8486
return

0 commit comments

Comments
 (0)