From bb23bb192ca5a5327f6cd444e62538acc005874a Mon Sep 17 00:00:00 2001 From: yu <191972707@qq.com> Date: Thu, 29 Oct 2026 09:35:51 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=A7=BB=E9=99=A4=20System=5FExecuteCom?= =?UTF-8?q?mandV1=20=E9=87=8D=E5=A4=8D=E6=B3=A8=E5=86=8C=EF=BC=8C=E7=BB=9F?= =?UTF-8?q?=E4=B8=80=E4=BD=BF=E7=94=A8=E5=8E=9F=E7=94=9F=E5=AE=9E=E7=8E=B0?= =?UTF-8?q?=EF=BC=88type:1=3DDOS=202=3DBAT=203=3DPS=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/capabilities/desktop.ts | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/src/main/capabilities/desktop.ts b/src/main/capabilities/desktop.ts index 35bcfc0..e571d20 100644 --- a/src/main/capabilities/desktop.ts +++ b/src/main/capabilities/desktop.ts @@ -147,19 +147,6 @@ const executeCommand: CapabilityHandler = async (_ctx, node, args) => { return powershell(command, Math.max(1000, number(args, ["timeoutMs"], 120000))); }; -register("System_ExecuteCommandV1", async (ctx, node, args) => { - const type = String(args.command_type ?? "1"); - const dos = String(args.dos_command ?? "").trim(); - const bat = String(args.bat_file ?? "").trim(); - const ps = String(args.ps_command ?? "").trim(); - let command = ps; - if (type === "2") command = dos; - else if (type === "3") command = bat ? ("& '" + bat.replace(/'/g, "''") + "'") : ""; - if (!command) { - throw new RuntimeError("validation_error", "命令为空", { nodeId: node.id, componentId: node.componentId, recommendation: "填写 PowerShell/DOS 命令或 BAT 文件路径" }); - } - return powershell(command, Math.max(1000, Number(args.timeoutMs) || 120000)); -}); register(["Keyboard_Send_V1", "Keyboard_Send", "Keyboard_PressNew", "Keyboard_Press"], keyboardSend); register(["Mouse_Click", "Mouse_ClickNew"], mouseClick);