We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9dea0b5 commit 49964a9Copy full SHA for 49964a9
src/core/tools/terminalKillTool.ts
@@ -34,7 +34,15 @@ export async function terminalKillTool(
34
}
35
36
try {
37
- const result = await killTerminalProcess(parseInt(terminalId))
+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
+}
44
+
45
+const result = await killTerminalProcess(parsedId)
46
pushToolResult(formatResponse.toolResult(result))
47
} catch (error) {
48
await handleError("killing terminal process", error)
0 commit comments