mirror of
https://github.com/foxhui/WebAI2API.git
synced 2026-06-16 21:03:59 +08:00
fix: 修复 Gemini 可能无法点击发送按钮的问题
This commit is contained in:
+8
-1
@@ -5,7 +5,14 @@ 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.5.5] - 2026-03-05
|
||||
## [3.5.6] - 2026-03-20
|
||||
|
||||
### 🐛 Fixed
|
||||
- **适配器**
|
||||
- 修复 Gemini 适配器可能会点不到发送按钮的问题
|
||||
|
||||
## [3.5.6] - 2026-03-20
|
||||
|
||||
### ✨ Added
|
||||
- **豆包**
|
||||
- 增加豆包 Pro 模型的支持
|
||||
|
||||
@@ -64,12 +64,7 @@ async function generate(context, prompt, imgPaths, modelId, meta = {}) {
|
||||
logger.info('适配器', '图片上传完成', meta);
|
||||
}
|
||||
|
||||
// 3. 输入提示词
|
||||
logger.info('适配器', '输入提示词...', meta);
|
||||
await safeClick(page, inputLocator, { bias: 'input' });
|
||||
await humanType(page, inputLocator, prompt);
|
||||
|
||||
// 4. 点击 Tools 按钮启用图片/视频生成
|
||||
// 3. 点击 Tools 按钮启用图片/视频生成
|
||||
logger.debug('适配器', '点击 Tools 按钮...', meta);
|
||||
const toolsBtn = page.getByRole('button', { name: 'Tools' });
|
||||
await safeClick(page, toolsBtn, { bias: 'button' });
|
||||
@@ -96,6 +91,12 @@ async function generate(context, prompt, imgPaths, modelId, meta = {}) {
|
||||
await safeClick(page, createImagesBtn, { bias: 'button' });
|
||||
}
|
||||
|
||||
// 4. 输入提示词
|
||||
logger.info('适配器', '输入提示词...', meta);
|
||||
await sleep(300, 500);
|
||||
await safeClick(page, inputLocator, { bias: 'input' });
|
||||
await humanType(page, inputLocator, prompt);
|
||||
|
||||
// 6. 先启动 API 监听
|
||||
logger.debug('适配器', '启动 API 监听...', meta);
|
||||
const streamApiResponsePromise = waitApiResponse(page, {
|
||||
|
||||
Reference in New Issue
Block a user