yiyan-browser-agent 1.0.11 → 1.0.12
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 +9 -9
package/package.json
CHANGED
package/src/browser.js
CHANGED
|
@@ -507,17 +507,17 @@ class YiyanBrowser {
|
|
|
507
507
|
_cleanText(text) {
|
|
508
508
|
if (!text) return '';
|
|
509
509
|
|
|
510
|
+
// Remove everything before "准备输出结果" (Yiyan's thinking process)
|
|
511
|
+
const outputMarker = '准备输出结果';
|
|
512
|
+
const markerIndex = text.indexOf(outputMarker);
|
|
513
|
+
if (markerIndex !== -1) {
|
|
514
|
+
text = text.slice(markerIndex + outputMarker.length).trim();
|
|
515
|
+
}
|
|
516
|
+
|
|
510
517
|
return text
|
|
511
|
-
// Strip AI thinking blocks
|
|
518
|
+
// Strip any remaining AI thinking blocks
|
|
512
519
|
.replace(/<think>[\s\S]*?<\/think>\n?/gi, '')
|
|
513
|
-
// Strip
|
|
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)
|
|
520
|
+
// Strip suggested follow-up questions
|
|
521
521
|
.replace(/请告诉我更多.*$/gm, '')
|
|
522
522
|
.replace(/再多给我一些.*$/gm, '')
|
|
523
523
|
.replace(/再多提供一些.*$/gm, '')
|