yiyan-browser-agent 1.0.13 → 1.0.14

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/browser.js +8 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yiyan-browser-agent",
3
- "version": "1.0.13",
3
+ "version": "1.0.14",
4
4
  "description": "AI coding agent powered by Yiyan (文心一言) via browser automation — no API key needed",
5
5
  "main": "src/index.js",
6
6
  "bin": {
package/src/browser.js CHANGED
@@ -514,11 +514,14 @@ 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();
517
+ // Remove everything after regenerate/suggestion markers (Yiyan's UI elements)
518
+ const cutMarkers = ['重新生成', '重新生成的', '换个回答', '输出更详细的'];
519
+ for (const marker of cutMarkers) {
520
+ const cutIndex = text.indexOf(marker);
521
+ if (cutIndex !== -1) {
522
+ text = text.slice(0, cutIndex).trim();
523
+ break;
524
+ }
522
525
  }
523
526
 
524
527
  return text