From 5b7d1e9322143ddd627c7de2199e0568ffd65949 Mon Sep 17 00:00:00 2001 From: foxhui Date: Sat, 24 Jan 2026 03:51:16 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=BF=AB=E9=BC=A0=E6=A0=87?= =?UTF-8?q?=E7=A7=BB=E5=8A=A8=E9=80=9F=E5=BA=A6=20(ref=20#13)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 4 ++++ src/backend/engine/utils.js | 3 ++- src/backend/utils/page.js | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3d62dc0..630bb9e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - **Token 留空问题** - 修复 WebUI 留空Token后无法重启的问题(允许 Token 留空) +### 🔄 Changed +- **鼠标轨迹** + - 增快鼠标移动速度 + ### ❌ Removed - **热门模型ID** - 竞技场删除了 gemini-3-pro-image-preview-2k,因此项目同步删除 diff --git a/src/backend/engine/utils.js b/src/backend/engine/utils.js index 298c76d..d1c7842 100644 --- a/src/backend/engine/utils.js +++ b/src/backend/engine/utils.js @@ -270,7 +270,8 @@ export async function safeClick(page, target, options = {}) { if (box) { const { x, y } = getHumanClickPoint(box, options.bias || 'random'); logger.debug('浏览器', `[safeClick] 移动鼠标到 (${x.toFixed(0)}, ${y.toFixed(0)})...`); - await page.cursor.moveTo({ x, y }); + const cursorSpeed = options.cursorSpeed ?? 40; + await page.cursor.moveTo({ x, y }, { moveSpeed: cursorSpeed }); logger.debug('浏览器', `[safeClick] 执行点击...`); await page.mouse.click(x, y, { clickCount }); return; diff --git a/src/backend/utils/page.js b/src/backend/utils/page.js index 8598cf1..a33c0ba 100644 --- a/src/backend/utils/page.js +++ b/src/backend/utils/page.js @@ -108,7 +108,7 @@ export async function gotoWithCheck(page, url, options = {}) { const { timeout = TIMEOUTS.NAVIGATION } = options; try { const response = await page.goto(url, { - waitUntil: 'domcontentloaded', + waitUntil: 'load', timeout }); if (!response) {