@gengage/assistant-fe 0.4.18 → 0.4.20
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/api-paths-CReMDZWg.js +1250 -0
- package/dist/chat/components/ChoicePrompter.d.ts +2 -2
- package/dist/chat/runtime.d.ts +7 -0
- package/dist/chat/types.d.ts +65 -0
- package/dist/chat-runtime.js +1 -1
- package/dist/chat.iife.js +43 -43
- package/dist/chat.js +1 -1
- package/dist/common/find-similar-payload.d.ts +3 -0
- package/dist/common/index.d.ts +1 -0
- package/dist/common/overlay.d.ts +4 -2
- package/dist/common/sdk-version.d.ts +3 -0
- package/dist/{common-Bxy1FrAk.js → common-BM2ZsSLI.js} +3 -3
- package/dist/common.js +79 -77
- package/dist/{connection-warning-C7ehvQxx.js → connection-warning-C_4e7ahZ.js} +1 -1
- package/dist/{fastIntent-CINRmM8r.js → fastIntent-DMNzXOSI.js} +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +75 -73
- package/dist/{native-webview-BsRcv49q.js → native-webview-Bbcvvi_5.js} +1 -1
- package/dist/native.iife.js +21 -21
- package/dist/native.js +1 -1
- package/dist/{overlay-CfnBuj7M.js → overlay-O4nlUrzw.js} +1 -1
- package/dist/overlay.js +1 -1
- package/dist/qna-runtime.js +1 -1
- package/dist/qna.iife.js +22 -22
- package/dist/qna.js +1 -1
- package/dist/{runtime-B0hDHRlN.js → runtime-C51WykbJ.js} +13 -13
- package/dist/{runtime-CAUALvac.js → runtime-DBh8899B.js} +2185 -2091
- package/dist/{runtime-CLcYqzoA.js → runtime-bbMljGVG.js} +17 -17
- package/dist/simbut/index.d.ts +1 -1
- package/dist/simbut/types.d.ts +7 -7
- package/dist/{simbut-3kqLW3SM.js → simbut-CO1rLVM9.js} +19 -22
- package/dist/simbut.iife.js +9 -9
- package/dist/simbut.js +1 -1
- package/dist/simrel/components/GroupTabs.d.ts +1 -1
- package/dist/simrel/types.d.ts +3 -3
- package/dist/simrel-runtime.js +1 -1
- package/dist/{simrel-fQg2EIB8.js → simrel-zCDlCrqG.js} +1 -1
- package/dist/simrel.iife.js +7 -7
- package/dist/simrel.js +2 -2
- package/dist/{widget-base-bdJaGJYi.js → widget-base-Cf9ofZhh.js} +91 -83
- package/package.json +2 -1
- package/dist/api-paths-BX3Lea3A.js +0 -1213
package/dist/qna.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { d as Q, h as N, p as H, r as O, t as U } from "./api-paths-CReMDZWg.js";
|
|
2
|
+
import { C as j, E as M, S as D, o as F, t as W, w as z } from "./widget-base-Cf9ofZhh.js";
|
|
3
3
|
import { A as $, D as G, E as J, a as E, v as V } from "./context-DGz5F81j.js";
|
|
4
4
|
import { t as T } from "./locale-CfqNifrU.js";
|
|
5
|
-
import { n as Y } from "./connection-warning-
|
|
5
|
+
import { n as Y } from "./connection-warning-C_4e7ahZ.js";
|
|
6
6
|
async function Z(e, t, n) {
|
|
7
|
-
const o =
|
|
7
|
+
const o = U("launcher_action", t), i = {
|
|
8
8
|
uiSpecs: [],
|
|
9
9
|
actions: []
|
|
10
10
|
}, a = {
|
|
@@ -16,7 +16,7 @@ async function Z(e, t, n) {
|
|
|
16
16
|
const l = await fetch(o, a);
|
|
17
17
|
if (!l.ok) throw new Error(`HTTP ${l.status}: ${l.statusText}`);
|
|
18
18
|
const r = { onEvent: (c) => {
|
|
19
|
-
const s =
|
|
19
|
+
const s = O(c);
|
|
20
20
|
if (s && (s.type === "ui_spec" && i.uiSpecs.push(s.spec), s.type === "ui_spec" && s.spec.elements)) {
|
|
21
21
|
for (const d of Object.values(s.spec.elements)) if (d.type === "ActionButton" && d.props?.action) {
|
|
22
22
|
const b = d.props.action;
|
|
@@ -24,7 +24,7 @@ async function Z(e, t, n) {
|
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
} };
|
|
27
|
-
return n !== void 0 && (r.signal = n), await
|
|
27
|
+
return n !== void 0 && (r.signal = n), await Q(l, r), i;
|
|
28
28
|
}
|
|
29
29
|
function C(e) {
|
|
30
30
|
const t = document.createElement("div");
|
|
@@ -387,7 +387,7 @@ function ct(e) {
|
|
|
387
387
|
function dt(e) {
|
|
388
388
|
return ct(e) === "en" ? lt : R;
|
|
389
389
|
}
|
|
390
|
-
var ut = class extends
|
|
390
|
+
var ut = class extends W {
|
|
391
391
|
constructor(...e) {
|
|
392
392
|
super(...e), this._abortController = null, this._debounceTimer = null, this._contentEl = null, this._i18n = R, this._actionHandler = this._handleAction.bind(this), this._openChatHandler = this._handleOpenChat.bind(this);
|
|
393
393
|
}
|
|
@@ -440,7 +440,7 @@ var ut = class extends F {
|
|
|
440
440
|
source: "qna",
|
|
441
441
|
locale: this.config.locale
|
|
442
442
|
});
|
|
443
|
-
this.track(
|
|
443
|
+
this.track(z(this.analyticsContext(), {
|
|
444
444
|
endpoint: "launcher_action",
|
|
445
445
|
request_id: o,
|
|
446
446
|
widget: "qna"
|
|
@@ -457,12 +457,12 @@ var ut = class extends F {
|
|
|
457
457
|
const c = this.config.pageContext?.pageType;
|
|
458
458
|
c !== void 0 && (r.page_type = c);
|
|
459
459
|
const s = await Z(r, n, this._abortController.signal);
|
|
460
|
-
if (this.track(
|
|
460
|
+
if (this.track(D(this.analyticsContext(), {
|
|
461
461
|
request_id: o,
|
|
462
462
|
latency_ms: Date.now() - i,
|
|
463
463
|
chunk_count: s.actions.length,
|
|
464
464
|
widget: "qna"
|
|
465
|
-
})), this.track(
|
|
465
|
+
})), this.track(M(this.analyticsContext(), {
|
|
466
466
|
message_count: s.actions.length,
|
|
467
467
|
history_ref: o,
|
|
468
468
|
redaction_level: "none",
|
|
@@ -499,8 +499,8 @@ var ut = class extends F {
|
|
|
499
499
|
if (E("gengage:global:error", {
|
|
500
500
|
source: "qna",
|
|
501
501
|
code: "FETCH_ERROR",
|
|
502
|
-
message:
|
|
503
|
-
}), this.track(
|
|
502
|
+
message: F(this.config.locale, l)
|
|
503
|
+
}), this.track(j(this.analyticsContext(), {
|
|
504
504
|
request_id: o,
|
|
505
505
|
error_code: "FETCH_ERROR",
|
|
506
506
|
error_message: l instanceof Error ? l.message : String(l),
|
|
@@ -562,7 +562,7 @@ var ut = class extends F {
|
|
|
562
562
|
return r.children.length === 0 ? null : r;
|
|
563
563
|
}
|
|
564
564
|
_resolveUISpecRegistry() {
|
|
565
|
-
return
|
|
565
|
+
return H(X(), this.config.renderer?.registry);
|
|
566
566
|
}
|
|
567
567
|
_renderUISpec(e, t) {
|
|
568
568
|
const n = this._resolveUISpecRegistry(), o = this.config.renderer?.unknownRenderer ?? P, i = (l, r) => tt(l, r, n, o), a = this.config.renderer?.renderUISpec;
|