yiyan-browser-agent 1.0.10 → 1.0.11
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 +13 -0
package/package.json
CHANGED
package/src/browser.js
CHANGED
|
@@ -508,9 +508,22 @@ class YiyanBrowser {
|
|
|
508
508
|
if (!text) return '';
|
|
509
509
|
|
|
510
510
|
return text
|
|
511
|
+
// Strip AI thinking blocks
|
|
511
512
|
.replace(/<think>[\s\S]*?<\/think>\n?/gi, '')
|
|
513
|
+
// Strip "Thinking..." headers
|
|
512
514
|
.replace(/^Thinking\.{0,3}\n[\s\S]*?\n\n/m, '')
|
|
515
|
+
// Strip "深度思考已完成" and similar
|
|
516
|
+
.replace(/深度思考已完成\n?/g, '')
|
|
517
|
+
.replace(/思考完成[::\s]*[\s\S]*?(?=济宁|[^\n])/g, '')
|
|
518
|
+
// Strip "参考X个网页"
|
|
519
|
+
.replace(/参考\d+个网页\n?/g, '')
|
|
520
|
+
// Strip suggested follow-up questions (Chinese)
|
|
521
|
+
.replace(/请告诉我更多.*$/gm, '')
|
|
522
|
+
.replace(/再多给我一些.*$/gm, '')
|
|
523
|
+
.replace(/再多提供一些.*$/gm, '')
|
|
524
|
+
// Strip copy-code button artifacts
|
|
513
525
|
.replace(/^\d+(?:Copy|Run|Insert|Edit)\b.*$/gm, '')
|
|
526
|
+
// Collapse multiple blank lines
|
|
514
527
|
.replace(/\n{3,}/g, '\n\n')
|
|
515
528
|
.trim();
|
|
516
529
|
}
|