@fv-ui/ai-chat 0.7.0 → 0.8.0

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/es/index.mjs CHANGED
@@ -6506,7 +6506,14 @@ var _sfc_main$2 = /* @__PURE__ */ defineComponent({
6506
6506
  }
6507
6507
  );
6508
6508
  watch(
6509
- () => props.messages.reduce((sum, m) => sum + m.content.length + (m.reasoning?.length ?? 0), 0),
6509
+ () => props.messages.reduce(
6510
+ (sum, m) => sum + m.content.length + (m.reasoning?.length ?? 0) + (m.toolSteps?.reduce((s, t) => s + (t.status?.length ?? 0) + (t.title?.length ?? 0), 0) ?? 0) + (m.toolSteps?.length ?? 0),
6511
+ 0
6512
+ ),
6513
+ () => scrollToBottomIfNear()
6514
+ );
6515
+ watch(
6516
+ () => props.messages.reduce((sum, m) => sum + (m.status === "done" || m.status === "error" ? 1 : 0), 0),
6510
6517
  () => scrollToBottomIfNear()
6511
6518
  );
6512
6519
  function branchInfo(m) {
package/lib/index.js CHANGED
@@ -6522,7 +6522,14 @@ ${fileParts.join("\n")}` });
6522
6522
  }
6523
6523
  );
6524
6524
  vue.watch(
6525
- () => props.messages.reduce((sum, m) => sum + m.content.length + (m.reasoning?.length ?? 0), 0),
6525
+ () => props.messages.reduce(
6526
+ (sum, m) => sum + m.content.length + (m.reasoning?.length ?? 0) + (m.toolSteps?.reduce((s, t) => s + (t.status?.length ?? 0) + (t.title?.length ?? 0), 0) ?? 0) + (m.toolSteps?.length ?? 0),
6527
+ 0
6528
+ ),
6529
+ () => scrollToBottomIfNear()
6530
+ );
6531
+ vue.watch(
6532
+ () => props.messages.reduce((sum, m) => sum + (m.status === "done" || m.status === "error" ? 1 : 0), 0),
6526
6533
  () => scrollToBottomIfNear()
6527
6534
  );
6528
6535
  function branchInfo(m) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fv-ui/ai-chat",
3
- "version": "0.7.0",
3
+ "version": "0.8.0",
4
4
  "description": "基于 Vue3 + Element Plus 的 AI 对话组件库",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",