@zero-library/chat-agent 2.2.4 → 2.2.6

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/dist/index.esm.js CHANGED
@@ -906,7 +906,6 @@ function createChatStore() {
906
906
  conversation.messages[msg.conversationId].loading = true;
907
907
  messages[idx] = {
908
908
  ...messages[idx],
909
- params: messages[idx]?.params || msg.params,
910
909
  type: msg.type,
911
910
  tempContent: msg.msgContent
912
911
  };
@@ -918,7 +917,9 @@ function createChatStore() {
918
917
  conversation.messages[msg.conversationId].loading = true;
919
918
  messages[idx] = {
920
919
  ...messages[idx],
920
+ msgFiles: messages[idx]?.msgFiles?.length ? messages[idx].msgFiles : msg.msgFiles,
921
921
  params: messages[idx]?.params || msg.params,
922
+ quoteMsg: messages[idx]?.quoteMsg || msg.quoteMsg,
922
923
  type: msg.type,
923
924
  tempContent: "",
924
925
  msgContent: messages[idx].msgContent + (msg.msgContent || "")
@@ -952,12 +953,10 @@ function createChatStore() {
952
953
  if (idx === -1) return;
953
954
  messages[idx] = {
954
955
  ...messages[idx],
955
- params: messages[idx]?.params || msg.params,
956
956
  tempContent: msg.msgContent,
957
957
  type: void 0,
958
958
  // 报错后清空消息内容
959
- msgContent: "",
960
- citations: ""
959
+ msgContent: ""
961
960
  };
962
961
  conversation.messages[msg.conversationId].loading = false;
963
962
  };
@@ -1792,7 +1791,7 @@ var ChatSender_default = forwardRef(
1792
1791
  autoSize: { minRows: 2, maxRows: 6 },
1793
1792
  onCancel,
1794
1793
  footer: ({ components }) => {
1795
- const { SendButton, LoadingButton } = components;
1794
+ const { SendButton, LoadingButton, SpeechButton } = components;
1796
1795
  return /* @__PURE__ */ jsxs(Flex, { vertical: true, children: [
1797
1796
  /* @__PURE__ */ jsxs(Flex, { justify: "space-between", align: "center", gap: 12, children: [
1798
1797
  /* @__PURE__ */ jsxs(Flex, { className: "flex-1", gap: 6, align: "center", children: [
@@ -1800,7 +1799,10 @@ var ChatSender_default = forwardRef(
1800
1799
  extraFooter,
1801
1800
  " "
1802
1801
  ] }),
1803
- /* @__PURE__ */ jsx(Flex, { align: "center", children: loading ? /* @__PURE__ */ jsx(LoadingButton, { disabled: false }) : /* @__PURE__ */ jsx(SendButton, { ...sendBtnProps }) })
1802
+ /* @__PURE__ */ jsxs(Flex, { align: "center", gap: 6, children: [
1803
+ /* @__PURE__ */ jsx(SpeechButton, {}),
1804
+ loading ? /* @__PURE__ */ jsx(LoadingButton, { disabled: false }) : /* @__PURE__ */ jsx(SendButton, { ...sendBtnProps })
1805
+ ] })
1804
1806
  ] }),
1805
1807
  extraFooterBelow
1806
1808
  ] });