@fv-ui/ai-chat 0.12.2 → 0.12.3

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
@@ -4953,6 +4953,12 @@ var _sfc_main$9 = /* @__PURE__ */ defineComponent({
4953
4953
  function typingOf(item) {
4954
4954
  return typingConfigs.value.get(item.key) ?? true;
4955
4955
  }
4956
+ const lastTypingKey = computed(() => {
4957
+ for (let i = props.items.length - 1; i >= 0; i--) {
4958
+ if (isTypingItem(props.items[i])) return props.items[i].key;
4959
+ }
4960
+ return null;
4961
+ });
4956
4962
  function isTypingItem(item) {
4957
4963
  if (flushedKeys.value.has(item.key)) return false;
4958
4964
  if (holdingKeys.value.has(item.key)) return true;
@@ -5162,8 +5168,8 @@ var _sfc_main$9 = /* @__PURE__ */ defineComponent({
5162
5168
  class: normalizeClass(["fv-chain-title", { "is-clamped": __props.collapsible && showToggle(item.key) && !expandedKeys.value.has(item.key) }])
5163
5169
  },
5164
5170
  [
5165
- createCommentVNode(" \u622A\u65AD\u7531 JS \u6D4B\u91CF(displayTitle \u524D\u7F00\u539F\u6587):\u6309\u94AE\u4E3A\u5185\u8054\u5143\u7D20\u81EA\u7136\u7D27\u8DDF\r\n \u7B2C\u4E09\u884C\u6587\u5B57\u672B(\u6536\u8D77)/\u5168\u91CF\u672B\u5B57(\u5C55\u5F00);\u65E0\u5E03\u5C40\u73AF\u5883\u4E0D\u88C1\u4E0D\u663E\u6309\u94AE;\r\n \u5EF6\u8FDF\u5F00\u6253\u7B49\u5F85\u671F(holding)\u6E32\u67D3\u7A7A\u5360\u4F4D,\u5230\u70B9\u518D\u6302\u6253\u5B57\u673A "),
5166
- isTypingItem(item) && !holdingKeys.value.has(item.key) ? (openBlock(), createBlock(_sfc_main$h, {
5171
+ createCommentVNode(" \u622A\u65AD\u7531 JS \u6D4B\u91CF(displayTitle \u524D\u7F00\u539F\u6587):\u6309\u94AE\u4E3A\u5185\u8054\u5143\u7D20\u81EA\u7136\u7D27\u8DDF\r\n \u7B2C\u4E09\u884C\u6587\u5B57\u672B(\u6536\u8D77)/\u5168\u91CF\u672B\u5B57(\u5C55\u5F00);\u65E0\u5E03\u5C40\u73AF\u5883\u4E0D\u88C1\u4E0D\u663E\u6309\u94AE;\r\n \u5EF6\u8FDF\u5F00\u6253\u7B49\u5F85\u671F(holding)\u6E32\u67D3\u7A7A\u5360\u4F4D,\u5230\u70B9\u518D\u6302\u6253\u5B57\u673A;\r\n \u6574\u94FE\u4E0D\u53D8\u5F0F:\u81F3\u591A\u6700\u540E\u4E00\u4E2A\u5019\u9009\u6253\u5B57\u6B65\u6302\u6253\u5B57\u673A(lastTypingKey),\r\n \u5176\u4F59\u9759\u6001\u5168\u91CF\u2014\u2014\u65B0\u6B65\u5DF2\u5230\u573A,\u65E7\u6B65\u4E0D\u62D6\u62CD,\u7ED3\u6784\u4E0A\u675C\u7EDD\u591A\u6B65\u5E76\u884C\u9010\u5B57 "),
5172
+ isTypingItem(item) && item.key === lastTypingKey.value && !holdingKeys.value.has(item.key) ? (openBlock(), createBlock(_sfc_main$h, {
5167
5173
  key: 0,
5168
5174
  content: normalizeTitle(item.title),
5169
5175
  typing: typingOf(item),
package/lib/index.js CHANGED
@@ -4969,6 +4969,12 @@
4969
4969
  function typingOf(item) {
4970
4970
  return typingConfigs.value.get(item.key) ?? true;
4971
4971
  }
4972
+ const lastTypingKey = vue.computed(() => {
4973
+ for (let i = props.items.length - 1; i >= 0; i--) {
4974
+ if (isTypingItem(props.items[i])) return props.items[i].key;
4975
+ }
4976
+ return null;
4977
+ });
4972
4978
  function isTypingItem(item) {
4973
4979
  if (flushedKeys.value.has(item.key)) return false;
4974
4980
  if (holdingKeys.value.has(item.key)) return true;
@@ -5178,8 +5184,8 @@
5178
5184
  class: vue.normalizeClass(["fv-chain-title", { "is-clamped": __props.collapsible && showToggle(item.key) && !expandedKeys.value.has(item.key) }])
5179
5185
  },
5180
5186
  [
5181
- vue.createCommentVNode(" \u622A\u65AD\u7531 JS \u6D4B\u91CF(displayTitle \u524D\u7F00\u539F\u6587):\u6309\u94AE\u4E3A\u5185\u8054\u5143\u7D20\u81EA\u7136\u7D27\u8DDF\r\n \u7B2C\u4E09\u884C\u6587\u5B57\u672B(\u6536\u8D77)/\u5168\u91CF\u672B\u5B57(\u5C55\u5F00);\u65E0\u5E03\u5C40\u73AF\u5883\u4E0D\u88C1\u4E0D\u663E\u6309\u94AE;\r\n \u5EF6\u8FDF\u5F00\u6253\u7B49\u5F85\u671F(holding)\u6E32\u67D3\u7A7A\u5360\u4F4D,\u5230\u70B9\u518D\u6302\u6253\u5B57\u673A "),
5182
- isTypingItem(item) && !holdingKeys.value.has(item.key) ? (vue.openBlock(), vue.createBlock(_sfc_main$h, {
5187
+ vue.createCommentVNode(" \u622A\u65AD\u7531 JS \u6D4B\u91CF(displayTitle \u524D\u7F00\u539F\u6587):\u6309\u94AE\u4E3A\u5185\u8054\u5143\u7D20\u81EA\u7136\u7D27\u8DDF\r\n \u7B2C\u4E09\u884C\u6587\u5B57\u672B(\u6536\u8D77)/\u5168\u91CF\u672B\u5B57(\u5C55\u5F00);\u65E0\u5E03\u5C40\u73AF\u5883\u4E0D\u88C1\u4E0D\u663E\u6309\u94AE;\r\n \u5EF6\u8FDF\u5F00\u6253\u7B49\u5F85\u671F(holding)\u6E32\u67D3\u7A7A\u5360\u4F4D,\u5230\u70B9\u518D\u6302\u6253\u5B57\u673A;\r\n \u6574\u94FE\u4E0D\u53D8\u5F0F:\u81F3\u591A\u6700\u540E\u4E00\u4E2A\u5019\u9009\u6253\u5B57\u6B65\u6302\u6253\u5B57\u673A(lastTypingKey),\r\n \u5176\u4F59\u9759\u6001\u5168\u91CF\u2014\u2014\u65B0\u6B65\u5DF2\u5230\u573A,\u65E7\u6B65\u4E0D\u62D6\u62CD,\u7ED3\u6784\u4E0A\u675C\u7EDD\u591A\u6B65\u5E76\u884C\u9010\u5B57 "),
5188
+ isTypingItem(item) && item.key === lastTypingKey.value && !holdingKeys.value.has(item.key) ? (vue.openBlock(), vue.createBlock(_sfc_main$h, {
5183
5189
  key: 0,
5184
5190
  content: normalizeTitle(item.title),
5185
5191
  typing: typingOf(item),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fv-ui/ai-chat",
3
- "version": "0.12.2",
3
+ "version": "0.12.3",
4
4
  "description": "基于 Vue3 + Element Plus 的 AI 对话组件库",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",