@sciol/xyzen 1.9.94-beta.f119078 → 1.9.94-beta.fa6bb03
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/core/embed/embedBridge.d.ts +1 -0
- package/dist/core/embed/index.d.ts +1 -0
- package/dist/xyzen.es.js +29 -29
- package/dist/xyzen.umd.js +2 -2
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function initEmbedBridge(allowedOrigins: string[]): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { initEmbedBridge } from './embedBridge';
|
package/dist/xyzen.es.js
CHANGED
|
@@ -8692,17 +8692,17 @@ function xtr(t, e, n) {
|
|
|
8692
8692
|
return;
|
|
8693
8693
|
}
|
|
8694
8694
|
const y = n5(), v = u.filter(
|
|
8695
|
-
(
|
|
8696
|
-
), _ = v.map((
|
|
8697
|
-
id:
|
|
8698
|
-
name:
|
|
8699
|
-
type:
|
|
8700
|
-
size:
|
|
8701
|
-
category: ws.getFileCategory(
|
|
8695
|
+
(C) => C.status === "completed" && C.uploadedId
|
|
8696
|
+
), _ = v.map((C) => ({
|
|
8697
|
+
id: C.uploadedId,
|
|
8698
|
+
name: C.file.name,
|
|
8699
|
+
type: C.file.type,
|
|
8700
|
+
size: C.file.size,
|
|
8701
|
+
category: ws.getFileCategory(C.file)
|
|
8702
8702
|
}));
|
|
8703
|
-
t((
|
|
8704
|
-
const
|
|
8705
|
-
|
|
8703
|
+
t((C) => {
|
|
8704
|
+
const E = C.channels[l];
|
|
8705
|
+
E && (E.responding = !0, E.messages.push({
|
|
8706
8706
|
id: y,
|
|
8707
8707
|
clientId: y,
|
|
8708
8708
|
role: "user",
|
|
@@ -8713,29 +8713,29 @@ function xtr(t, e, n) {
|
|
|
8713
8713
|
..._.length > 0 ? { attachments: _ } : {}
|
|
8714
8714
|
}));
|
|
8715
8715
|
}), r();
|
|
8716
|
-
const
|
|
8716
|
+
const x = {
|
|
8717
8717
|
message: o,
|
|
8718
8718
|
client_id: y
|
|
8719
8719
|
};
|
|
8720
|
-
v.length > 0 && (
|
|
8721
|
-
const
|
|
8722
|
-
|
|
8720
|
+
v.length > 0 && (x.file_ids = v.map((C) => C.uploadedId));
|
|
8721
|
+
const k = b;
|
|
8722
|
+
k?.knowledgeContext && (x.context = k.knowledgeContext);
|
|
8723
8723
|
try {
|
|
8724
|
-
await Kg.sendMessage(l,
|
|
8725
|
-
} catch (
|
|
8726
|
-
console.error("Failed to send message via REST:",
|
|
8727
|
-
const
|
|
8728
|
-
if (
|
|
8729
|
-
|
|
8730
|
-
const
|
|
8731
|
-
(
|
|
8724
|
+
await Kg.sendMessage(l, x);
|
|
8725
|
+
} catch (C) {
|
|
8726
|
+
console.error("Failed to send message via REST:", C), t((S) => {
|
|
8727
|
+
const I = S.channels[l];
|
|
8728
|
+
if (I) {
|
|
8729
|
+
I.responding = !1;
|
|
8730
|
+
const T = I.messages.find(
|
|
8731
|
+
(D) => D.clientId === y
|
|
8732
8732
|
);
|
|
8733
|
-
|
|
8733
|
+
T && (T.status = "failed");
|
|
8734
8734
|
}
|
|
8735
8735
|
}), r();
|
|
8736
|
-
const
|
|
8737
|
-
if (
|
|
8738
|
-
const
|
|
8736
|
+
const E = C instanceof Error && "detail" in C ? C.detail : void 0;
|
|
8737
|
+
if (E && typeof E == "object" && E.type === "parallel_chat_limit") {
|
|
8738
|
+
const S = E.data;
|
|
8739
8739
|
e().showNotification(
|
|
8740
8740
|
Ao.t(
|
|
8741
8741
|
"app.chat.parallelLimitTitle",
|
|
@@ -8744,11 +8744,11 @@ function xtr(t, e, n) {
|
|
|
8744
8744
|
Ao.t(
|
|
8745
8745
|
"app.chat.parallelLimitMessage",
|
|
8746
8746
|
"You have reached the parallel chat limit ({{current}}/{{limit}}). Please wait for other chats to finish.",
|
|
8747
|
-
{ current:
|
|
8747
|
+
{ current: S?.current ?? "?", limit: S?.limit ?? "?" }
|
|
8748
8748
|
),
|
|
8749
8749
|
"warning"
|
|
8750
8750
|
);
|
|
8751
|
-
} else
|
|
8751
|
+
} else E && typeof E == "object" && E.error_code === "INSUFFICIENT_BALANCE" && e().showNotification(
|
|
8752
8752
|
Ao.t("app.chat.insufficientBalance", "Insufficient balance"),
|
|
8753
8753
|
Ao.t(
|
|
8754
8754
|
"app.chat.insufficientBalanceMessage",
|
|
@@ -10650,7 +10650,7 @@ if (typeof window < "u") {
|
|
|
10650
10650
|
});
|
|
10651
10651
|
}
|
|
10652
10652
|
function Xtr(t) {
|
|
10653
|
-
return Vn.getState().status !== "succeeded" &&
|
|
10653
|
+
return Vn.getState().status !== "succeeded" && new URLSearchParams(window.location.search).get("platform") === "bohrium" ? (t("provider_bohrium"), !0) : !1;
|
|
10654
10654
|
}
|
|
10655
10655
|
async function RMe() {
|
|
10656
10656
|
try {
|