From cd7f8056818531088dc3a95c7aab0f297666968a Mon Sep 17 00:00:00 2001 From: foxhui Date: Sun, 5 Apr 2026 03:44:29 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20Gemini=20=E6=96=87?= =?UTF-8?q?=E6=9C=AC=E9=80=82=E9=85=8D=E5=99=A8=E9=81=87=E5=88=B0=E9=95=BF?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E8=AF=8D=E7=9A=84=E6=97=B6=E5=80=99=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E9=80=89=E6=8B=A9=E6=A8=A1=E5=9E=8B=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98=20(closes=20#42)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 6 ++++++ src/backend/adapter/gemini_text.js | 17 +++-------------- 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ffc7b5..92fb832 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [3.6.3] - 2025-04-05 + +### ๐Ÿ› Fixed +- **้€‚้…ๅ™จ** + - ไฟฎๅค Gemini ๆ–‡ๆœฌ้€‚้…ๅ™จ้‡ๅˆฐ้•ฟๆ็คบ่ฏ็š„ๆ—ถๅ€™ๆ— ๆณ•้€‰ๆ‹ฉๆจกๅž‹็š„้—ฎ้ข˜ + ## [3.6.2] - 2025-03-31 ### โœจ Added diff --git a/src/backend/adapter/gemini_text.js b/src/backend/adapter/gemini_text.js index 9f5e38c..2ba652e 100644 --- a/src/backend/adapter/gemini_text.js +++ b/src/backend/adapter/gemini_text.js @@ -71,20 +71,9 @@ async function generate(context, prompt, imgPaths, modelId, meta = {}) { try { logger.debug('้€‚้…ๅ™จ', `ๅ‡†ๅค‡้€‰ๆ‹ฉๆจกๅž‹: ${modelId}`, meta); - // ็‚นๅ‡ป่พ“ๅ…ฅๆก†็กฎไฟ็„ฆ็‚น - await inputLocator.focus(); - await sleep(300, 500); - - // ๆŒ‰ 3 ๆฌก Tab ้”ฎๅˆฐ่พพๆจกๅž‹้€‰ๆ‹ฉๆŒ‰้’ฎ - await page.keyboard.press('Tab'); - await sleep(100, 200); - await page.keyboard.press('Tab'); - await sleep(100, 200); - await page.keyboard.press('Tab'); - await sleep(100, 200); - - // ๆŒ‰ๅ›ž่ฝฆๆ‰“ๅผ€ๆจกๅž‹่œๅ• - await page.keyboard.press('Enter'); + // ็‚นๅ‡ปๆ‰“ๅผ€ๆจกๅž‹้€‰ๆ‹ฉ่œๅ• + const modePickerBtn = page.getByRole('button', { name: 'Open mode picker' }); + await safeClick(page, modePickerBtn, { bias: 'button' }); await sleep(300, 500); // ่Žทๅ–ๆ‰€ๆœ‰ menuitem ้€‰้กน็š„ๆ–‡ๆœฌ