yiyan-browser-agent 1.6.9 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/browser.js +10 -5
package/package.json
CHANGED
package/src/browser.js
CHANGED
|
@@ -344,12 +344,17 @@ class YiyanBrowser {
|
|
|
344
344
|
hasCompletionMarker = true;
|
|
345
345
|
}
|
|
346
346
|
|
|
347
|
-
// ── 完成判断:标记出现 + 连续两次稳定 ──
|
|
347
|
+
// ── 完成判断:标记出现 + 连续两次稳定 + _isGenerating 确认 ──
|
|
348
348
|
if (hasCompletionMarker && stableCount >= 2) {
|
|
349
|
-
await this.
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
349
|
+
if (!await this._isGenerating()) {
|
|
350
|
+
await this.page.waitForTimeout(500);
|
|
351
|
+
logger.clearLine();
|
|
352
|
+
logger.success('Response complete');
|
|
353
|
+
break;
|
|
354
|
+
}
|
|
355
|
+
// _isGenerating 说还在生成,重置计数继续等待
|
|
356
|
+
stableCount = 0;
|
|
357
|
+
lastCheckTime = Date.now();
|
|
353
358
|
}
|
|
354
359
|
|
|
355
360
|
// Progress indicator
|