Skip to content

Commit 66ad474

Browse files
committed
fix(tools): correct error type and improve error handling in terminal kill tool
1 parent cab2ea7 commit 66ad474

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/core/tools/terminalKillTool.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,15 @@ export async function terminalKillTool(
3434
}
3535

3636
try {
37-
const parsedId = parseInt(terminalId, 10)
38-
if (isNaN(parsedId)) {
39-
task.consecutiveMistakeCount++
40-
task.recordToolError("terminal_ctrl")
41-
pushToolResult(formatResponse.toolError(`Invalid terminal_id "${terminalId}". Must be a number.`))
42-
return
43-
}
37+
const parsedId = parseInt(terminalId)
38+
if (isNaN(parsedId)) {
39+
task.consecutiveMistakeCount++
40+
task.recordToolError("terminal_kill")
41+
pushToolResult(formatResponse.toolError(`Invalid terminal_id "${terminalId}". Must be a number.`))
42+
return
43+
}
4444

45-
const result = await killTerminalProcess(parsedId)
45+
const result = await killTerminalProcess(parsedId)
4646
pushToolResult(formatResponse.toolResult(result))
4747
} catch (error) {
4848
await handleError("killing terminal process", error)

0 commit comments

Comments
 (0)