@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.
@@ -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
- (k) => k.status === "completed" && k.uploadedId
8696
- ), _ = v.map((k) => ({
8697
- id: k.uploadedId,
8698
- name: k.file.name,
8699
- type: k.file.type,
8700
- size: k.file.size,
8701
- category: ws.getFileCategory(k.file)
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((k) => {
8704
- const C = k.channels[l];
8705
- C && (C.responding = !0, C.messages.push({
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 w = {
8716
+ const x = {
8717
8717
  message: o,
8718
8718
  client_id: y
8719
8719
  };
8720
- v.length > 0 && (w.file_ids = v.map((k) => k.uploadedId));
8721
- const x = b;
8722
- x?.knowledgeContext && (w.context = x.knowledgeContext);
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, w);
8725
- } catch (k) {
8726
- console.error("Failed to send message via REST:", k), t((E) => {
8727
- const S = E.channels[l];
8728
- if (S) {
8729
- S.responding = !1;
8730
- const I = S.messages.find(
8731
- (T) => T.clientId === y
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
- I && (I.status = "failed");
8733
+ T && (T.status = "failed");
8734
8734
  }
8735
8735
  }), r();
8736
- const C = k instanceof Error && "detail" in k ? k.detail : void 0;
8737
- if (C && typeof C == "object" && C.type === "parallel_chat_limit") {
8738
- const E = C.data;
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: E?.current ?? "?", limit: E?.limit ?? "?" }
8747
+ { current: S?.current ?? "?", limit: S?.limit ?? "?" }
8748
8748
  ),
8749
8749
  "warning"
8750
8750
  );
8751
- } else C && typeof C == "object" && C.error_code === "INSUFFICIENT_BALANCE" && e().showNotification(
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" && localStorage.getItem("platform") === "bohrium" ? (t("provider_bohrium"), !0) : !1;
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 {