@mxmweb/aichat 1.4.15 → 1.4.16

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.
Files changed (2) hide show
  1. package/index.js +8 -8
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -46717,7 +46717,7 @@ const {
46717
46717
  } = tn, Yu = async (e, t, n) => {
46718
46718
  try {
46719
46719
  tn.post(`${e.url}/qa/feedback`, t, {
46720
- headers: { Authorization: e.token, "X-CSRFToken": e.CSRFToken || "" }
46720
+ headers: { Authorization: e.token, "X-CSRF-TOKEN-IN": e.CSRFToken || "" }
46721
46721
  }).then((r) => {
46722
46722
  r.data.success && n && n();
46723
46723
  });
@@ -46727,7 +46727,7 @@ const {
46727
46727
  }, Xu = async (e, t, n) => {
46728
46728
  try {
46729
46729
  tn.delete(`${e.url}/qa/feedback/cancel?queryId=${t.queryId}`, {
46730
- headers: { Authorization: e.token, "X-CSRFToken": e.CSRFToken || "" }
46730
+ headers: { Authorization: e.token, "X-CSRF-TOKEN-IN": e.CSRFToken || "" }
46731
46731
  }).then((r) => {
46732
46732
  r.data.success && n && n();
46733
46733
  });
@@ -46747,7 +46747,7 @@ const {
46747
46747
  }, uK = async (e, t, n) => {
46748
46748
  try {
46749
46749
  tn.post(`${e.url}/qa/dialogue/reName`, t, {
46750
- headers: { Authorization: e.token, "X-CSRFToken": e.CSRFToken || "" }
46750
+ headers: { Authorization: e.token, "X-CSRF-TOKEN-IN": e.CSRFToken || "" }
46751
46751
  }).then((r) => {
46752
46752
  r.data.success ? n && n(r) : Tn.error("\u7F16\u8F91\u540D\u5B57\u5931\u8D25");
46753
46753
  }).catch((r) => {
@@ -46760,7 +46760,7 @@ const {
46760
46760
  }, dK = async (e, t, n) => {
46761
46761
  try {
46762
46762
  tn.delete(`${e.url}/qa/dialogue/delete?sessionId=${t.sessionId}`, {
46763
- headers: { Authorization: e.token, "X-CSRFToken": e.CSRFToken || "" }
46763
+ headers: { Authorization: e.token, "X-CSRF-TOKEN-IN": e.CSRFToken || "" }
46764
46764
  }).then((r) => {
46765
46765
  r.data.success && n && n(r.data);
46766
46766
  });
@@ -46771,7 +46771,7 @@ const {
46771
46771
  console.log("[DEBUG] handleCreateConversation \u8BF7\u6C42", { url: e.url, token: e.token, data: t });
46772
46772
  try {
46773
46773
  tn.post(`${e.url}/qa/dialogue/create`, t, {
46774
- headers: { Authorization: e.token, "X-CSRFToken": e.CSRFToken || "" }
46774
+ headers: { Authorization: e.token, "X-CSRF-TOKEN-IN": e.CSRFToken || "" }
46775
46775
  }).then((r) => {
46776
46776
  r.data.success ? n && n(r.data) : Tn.error(r.data.errorMsg || "\u521B\u5EFA\u4F1A\u8BDD\u5931\u8D25");
46777
46777
  }).catch((r) => {
@@ -46786,7 +46786,7 @@ const {
46786
46786
  const { uid: r, queryId: a } = t;
46787
46787
  let o = `${e.url}/index/knowledgeBase/file/deleteByUid?uid=${r}`;
46788
46788
  a && (o += `&queryId=${a}`), tn.delete(o, {
46789
- headers: { Authorization: e.token, "X-CSRFToken": e.CSRFToken || "" }
46789
+ headers: { Authorization: e.token, "X-CSRF-TOKEN-IN": e.CSRFToken || "" }
46790
46790
  }).then((i) => {
46791
46791
  i.data.success ? n && n(!0, i) : n && n(!1, i);
46792
46792
  }).catch((i) => {
@@ -59347,7 +59347,7 @@ const kI = ({
59347
59347
  "Content-Type": "application/json",
59348
59348
  Accept: "text/event-stream",
59349
59349
  Authorization: t || "",
59350
- "X-CSRFToken": n || ""
59350
+ "X-CSRF-TOKEN-IN": n || ""
59351
59351
  },
59352
59352
  openWhenHidden: !0,
59353
59353
  body: JSON.stringify(b),
@@ -59961,7 +59961,7 @@ function CJ(e = K2) {
59961
59961
  });
59962
59962
  }, [r, n]), Ct(() => {
59963
59963
  g && (E((ie) => ({ ...ie, display: "loading" })), tn.get(`${r}/qa/dialogue/getDialogBySessionId?sessionId=${g}`, {
59964
- headers: { Authorization: n, "X-CSRFToken": o }
59964
+ headers: { Authorization: n }
59965
59965
  }).then((ie) => {
59966
59966
  var st;
59967
59967
  if (!ie.data.data) {
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "style": "assets/style.css",
6
6
  "types": "lib_enter.d.ts",
7
7
  "private": false,
8
- "version": "1.4.15",
8
+ "version": "1.4.16",
9
9
  "author": "hanfeng_Zhang",
10
10
  "type": "module",
11
11
  "scripts": {