@ray-js/t-agent 0.2.6-beta-7 → 0.2.6-beta-8

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.
@@ -188,6 +188,8 @@ export default class ChatAgent {
188
188
  errorCompose
189
189
  } = composeHandler;
190
190
  message.bubble.setIsMarkdown(true);
191
+ // must start read stream before any await call
192
+ const parts = response.parts();
191
193
  if (!message.isShow) {
192
194
  await message.show();
193
195
  }
@@ -197,7 +199,6 @@ export default class ChatAgent {
197
199
  await message.bubble.setText(text).update();
198
200
  await this.runWithCatchError(async () => {
199
201
  try {
200
- const parts = response.parts();
201
202
  let partText = '';
202
203
  var _iteratorAbruptCompletion = false;
203
204
  var _didIteratorError = false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ray-js/t-agent",
3
- "version": "0.2.6-beta-7",
3
+ "version": "0.2.6-beta-8",
4
4
  "author": "Tuya.inc",
5
5
  "license": "MIT",
6
6
  "private": false,
@@ -26,5 +26,5 @@
26
26
  "build": "ray build --type=component --output dist",
27
27
  "clean": "rimraf ./dist"
28
28
  },
29
- "gitHead": "d76b6bc9d2d7b69b12cc1b741a8638f2dd671db2"
29
+ "gitHead": "6fc9a8195706d72c2bab10479e8d65a26854bdde"
30
30
  }