From 53b85120a0c5b12b2befba22d51322cf66d77e1a Mon Sep 17 00:00:00 2001 From: baiyu-yu <135424680+baiyu-yu@users.noreply.github.com> Date: Tue, 20 Jan 2026 15:07:47 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Dtool=E7=BE=A4=E5=86=85?= =?UTF-8?q?=E5=85=B3=E9=97=AD=E7=8A=B6=E6=80=81=E5=9C=A8=E5=AF=B9=E8=AF=9D?= =?UTF-8?q?=E8=A7=A6=E5=8F=91=E6=97=B6=E8=A2=AB=E9=87=8D=E7=BD=AE=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/AI/AI.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/AI/AI.ts b/src/AI/AI.ts index c00f497..d5bc7bf 100644 --- a/src/AI/AI.ts +++ b/src/AI/AI.ts @@ -138,8 +138,10 @@ export class AI { // 检查toolsNotAllow状态 const { toolsNotAllow } = ConfigManager.tool; - Object.keys(ToolManager.toolMap).forEach(key => { - this.tool.toolStatus[key] = !toolsNotAllow.includes(key); + toolsNotAllow.forEach(key => { + if (this.tool.toolStatus.hasOwnProperty(key)) { + this.tool.toolStatus[key] = false; + } }); //清空数据