yiyan-browser-agent 1.0.12 → 1.0.13
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 +7 -4
package/package.json
CHANGED
package/src/browser.js
CHANGED
|
@@ -514,13 +514,16 @@ class YiyanBrowser {
|
|
|
514
514
|
text = text.slice(markerIndex + outputMarker.length).trim();
|
|
515
515
|
}
|
|
516
516
|
|
|
517
|
+
// Remove everything after "输出更详细的" (Yiyan's suggestions)
|
|
518
|
+
const cutMarker = '输出更详细的';
|
|
519
|
+
const cutIndex = text.indexOf(cutMarker);
|
|
520
|
+
if (cutIndex !== -1) {
|
|
521
|
+
text = text.slice(0, cutIndex).trim();
|
|
522
|
+
}
|
|
523
|
+
|
|
517
524
|
return text
|
|
518
525
|
// Strip any remaining AI thinking blocks
|
|
519
526
|
.replace(/<think>[\s\S]*?<\/think>\n?/gi, '')
|
|
520
|
-
// Strip suggested follow-up questions
|
|
521
|
-
.replace(/请告诉我更多.*$/gm, '')
|
|
522
|
-
.replace(/再多给我一些.*$/gm, '')
|
|
523
|
-
.replace(/再多提供一些.*$/gm, '')
|
|
524
527
|
// Strip copy-code button artifacts
|
|
525
528
|
.replace(/^\d+(?:Copy|Run|Insert|Edit)\b.*$/gm, '')
|
|
526
529
|
// Collapse multiple blank lines
|