@mxmweb/rtext 1.6.21 → 1.6.23
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/index.js +11 -6
- package/package.json +1 -1
- package/stats.html +1 -1
- package/utils/sseThoughtChainHandler.d.ts +2 -0
package/index.js
CHANGED
|
@@ -28323,7 +28323,10 @@ const B7 = Ne.div.attrs({
|
|
|
28323
28323
|
}
|
|
28324
28324
|
let Fe = [];
|
|
28325
28325
|
try {
|
|
28326
|
-
|
|
28326
|
+
if (_) {
|
|
28327
|
+
const X = JSON.parse(_);
|
|
28328
|
+
Fe = Array.isArray(X) ? X : X && Array.isArray(X.knowledgeRefs) ? X.knowledgeRefs : [];
|
|
28329
|
+
}
|
|
28327
28330
|
} catch (X) {
|
|
28328
28331
|
console.error("Failed to parse reference:", X);
|
|
28329
28332
|
}
|
|
@@ -31731,7 +31734,7 @@ function b8(e, t) {
|
|
|
31731
31734
|
e.reply?.content && t.onContentUpdate(e.reply.content);
|
|
31732
31735
|
}
|
|
31733
31736
|
function y8(e, t) {
|
|
31734
|
-
let r = null, n = null, a = null, l = null, c = null;
|
|
31737
|
+
let r = null, n = null, a = null, l = null, c = null, d = null;
|
|
31735
31738
|
try {
|
|
31736
31739
|
if (e.reference && e.reference !== "[]" && e.reference !== "null" && (typeof e.reference == "string" ? r = JSON.parse(e.reference) : r = e.reference), e.webReference && e.webReference !== "[]" && e.webReference !== "null" && (typeof e.webReference == "string" ? n = JSON.parse(e.webReference) : n = e.webReference), e.graphReference && e.graphReference !== "[]" && e.graphReference !== "null" && (e.graphReference, a = e.graphReference), e.databaseReference && e.databaseReference !== "[]" && e.databaseReference !== "null" && (typeof e.databaseReference == "string" ? l = JSON.parse(e.databaseReference) : l = e.databaseReference), e.knowledgeBases !== null && e.knowledgeBases !== void 0)
|
|
31737
31740
|
if (Array.isArray(e.knowledgeBases))
|
|
@@ -31739,12 +31742,13 @@ function y8(e, t) {
|
|
|
31739
31742
|
else if (typeof e.knowledgeBases == "string" && e.knowledgeBases !== "[]" && e.knowledgeBases !== "null")
|
|
31740
31743
|
try {
|
|
31741
31744
|
c = JSON.parse(e.knowledgeBases);
|
|
31742
|
-
} catch (
|
|
31743
|
-
console.warn("\u89E3\u6790 knowledgeBases \u5B57\u7B26\u4E32\u5931\u8D25:",
|
|
31745
|
+
} catch (m) {
|
|
31746
|
+
console.warn("\u89E3\u6790 knowledgeBases \u5B57\u7B26\u4E32\u5931\u8D25:", m);
|
|
31744
31747
|
}
|
|
31745
31748
|
else typeof e.knowledgeBases == "object" && (c = e.knowledgeBases);
|
|
31746
|
-
|
|
31747
|
-
|
|
31749
|
+
e.faqReference !== void 0 && e.faqReference !== null && (d = e.faqReference);
|
|
31750
|
+
} catch (m) {
|
|
31751
|
+
console.warn("\u89E3\u6790\u5F15\u7528\u6570\u636E\u5931\u8D25:", m, e);
|
|
31748
31752
|
}
|
|
31749
31753
|
t.onReferencesUpdate({
|
|
31750
31754
|
reference: r,
|
|
@@ -31752,6 +31756,7 @@ function y8(e, t) {
|
|
|
31752
31756
|
graphReference: a,
|
|
31753
31757
|
databaseReference: l,
|
|
31754
31758
|
knowledgeBases: c,
|
|
31759
|
+
faqReference: d,
|
|
31755
31760
|
resultType: e.resultType,
|
|
31756
31761
|
respTime: e.respTime
|
|
31757
31762
|
});
|