@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.cjs.js +8 -6
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +8 -6
- package/dist/index.esm.js.map +1 -1
- package/package.json +3 -3
package/dist/index.cjs.js
CHANGED
|
@@ -914,7 +914,6 @@ function createChatStore() {
|
|
|
914
914
|
conversation.messages[msg.conversationId].loading = true;
|
|
915
915
|
messages[idx] = {
|
|
916
916
|
...messages[idx],
|
|
917
|
-
params: messages[idx]?.params || msg.params,
|
|
918
917
|
type: msg.type,
|
|
919
918
|
tempContent: msg.msgContent
|
|
920
919
|
};
|
|
@@ -926,7 +925,9 @@ function createChatStore() {
|
|
|
926
925
|
conversation.messages[msg.conversationId].loading = true;
|
|
927
926
|
messages[idx] = {
|
|
928
927
|
...messages[idx],
|
|
928
|
+
msgFiles: messages[idx]?.msgFiles?.length ? messages[idx].msgFiles : msg.msgFiles,
|
|
929
929
|
params: messages[idx]?.params || msg.params,
|
|
930
|
+
quoteMsg: messages[idx]?.quoteMsg || msg.quoteMsg,
|
|
930
931
|
type: msg.type,
|
|
931
932
|
tempContent: "",
|
|
932
933
|
msgContent: messages[idx].msgContent + (msg.msgContent || "")
|
|
@@ -960,12 +961,10 @@ function createChatStore() {
|
|
|
960
961
|
if (idx === -1) return;
|
|
961
962
|
messages[idx] = {
|
|
962
963
|
...messages[idx],
|
|
963
|
-
params: messages[idx]?.params || msg.params,
|
|
964
964
|
tempContent: msg.msgContent,
|
|
965
965
|
type: void 0,
|
|
966
966
|
// 报错后清空消息内容
|
|
967
|
-
msgContent: ""
|
|
968
|
-
citations: ""
|
|
967
|
+
msgContent: ""
|
|
969
968
|
};
|
|
970
969
|
conversation.messages[msg.conversationId].loading = false;
|
|
971
970
|
};
|
|
@@ -1800,7 +1799,7 @@ var ChatSender_default = react.forwardRef(
|
|
|
1800
1799
|
autoSize: { minRows: 2, maxRows: 6 },
|
|
1801
1800
|
onCancel,
|
|
1802
1801
|
footer: ({ components }) => {
|
|
1803
|
-
const { SendButton, LoadingButton } = components;
|
|
1802
|
+
const { SendButton, LoadingButton, SpeechButton } = components;
|
|
1804
1803
|
return /* @__PURE__ */ jsxRuntime.jsxs(antd.Flex, { vertical: true, children: [
|
|
1805
1804
|
/* @__PURE__ */ jsxRuntime.jsxs(antd.Flex, { justify: "space-between", align: "center", gap: 12, children: [
|
|
1806
1805
|
/* @__PURE__ */ jsxRuntime.jsxs(antd.Flex, { className: "flex-1", gap: 6, align: "center", children: [
|
|
@@ -1808,7 +1807,10 @@ var ChatSender_default = react.forwardRef(
|
|
|
1808
1807
|
extraFooter,
|
|
1809
1808
|
" "
|
|
1810
1809
|
] }),
|
|
1811
|
-
/* @__PURE__ */ jsxRuntime.
|
|
1810
|
+
/* @__PURE__ */ jsxRuntime.jsxs(antd.Flex, { align: "center", gap: 6, children: [
|
|
1811
|
+
/* @__PURE__ */ jsxRuntime.jsx(SpeechButton, {}),
|
|
1812
|
+
loading ? /* @__PURE__ */ jsxRuntime.jsx(LoadingButton, { disabled: false }) : /* @__PURE__ */ jsxRuntime.jsx(SendButton, { ...sendBtnProps })
|
|
1813
|
+
] })
|
|
1812
1814
|
] }),
|
|
1813
1815
|
extraFooterBelow
|
|
1814
1816
|
] });
|