bstp-agent-widget 0.2.123 → 0.2.125

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/shadow.mjs CHANGED
@@ -54831,25 +54831,25 @@ function sU({ size: e, ...t }) {
54831
54831
  });
54832
54832
  }
54833
54833
  var cU = {
54834
- header: "_header_5x292_19",
54835
- headerLeft: "_headerLeft_5x292_31",
54836
- headerInfo: "_headerInfo_5x292_36",
54837
- orbContainer: "_orbContainer_5x292_40",
54838
- orbOuter: "_orbOuter_5x292_54",
54839
- orbPulse: "_orbPulse_5x292_1",
54840
- orbMiddle: "_orbMiddle_5x292_63",
54841
- orbInner: "_orbInner_5x292_72",
54842
- orbFloat: "_orbFloat_5x292_1",
54843
- headerMeta: "_headerMeta_5x292_85",
54844
- statusDot: "_statusDot_5x292_89",
54845
- statusText: "_statusText_5x292_103",
54846
- closeButton: "_closeButton_5x292_112",
54847
- title: "_title_5x292_123",
54848
- topSubHeader: "_topSubHeader_5x292_135",
54849
- subHeaderLeft: "_subHeaderLeft_5x292_145",
54850
- subHeaderIcon: "_subHeaderIcon_5x292_151",
54851
- subHeaderTitle: "_subHeaderTitle_5x292_162",
54852
- subHeaderStatus: "_subHeaderStatus_5x292_168"
54834
+ header: "_header_8tb8q_19",
54835
+ headerLeft: "_headerLeft_8tb8q_31",
54836
+ headerInfo: "_headerInfo_8tb8q_36",
54837
+ orbContainer: "_orbContainer_8tb8q_40",
54838
+ orbOuter: "_orbOuter_8tb8q_54",
54839
+ orbPulse: "_orbPulse_8tb8q_1",
54840
+ orbMiddle: "_orbMiddle_8tb8q_63",
54841
+ orbInner: "_orbInner_8tb8q_72",
54842
+ orbFloat: "_orbFloat_8tb8q_1",
54843
+ headerMeta: "_headerMeta_8tb8q_85",
54844
+ statusDot: "_statusDot_8tb8q_89",
54845
+ statusText: "_statusText_8tb8q_103",
54846
+ closeButton: "_closeButton_8tb8q_112",
54847
+ title: "_title_8tb8q_123",
54848
+ topSubHeader: "_topSubHeader_8tb8q_135",
54849
+ subHeaderLeft: "_subHeaderLeft_8tb8q_145",
54850
+ subHeaderIcon: "_subHeaderIcon_8tb8q_151",
54851
+ subHeaderTitle: "_subHeaderTitle_8tb8q_162",
54852
+ subHeaderStatus: "_subHeaderStatus_8tb8q_168"
54853
54853
  };
54854
54854
  //#endregion
54855
54855
  //#region package/src/internal/components/AgentPanel/AgentPanelHeader.tsx
@@ -55183,7 +55183,8 @@ var AU = kU({
55183
55183
  //#endregion
55184
55184
  //#region package/src/internal/hooks/useRemoteAssistants.ts
55185
55185
  function MU(e, t) {
55186
- return e && t.includes(e) ? e : t[0];
55186
+ let n = typeof e == "number" && e > 0;
55187
+ return n && t.length === 0 || n && t.includes(e) ? e : t[0];
55187
55188
  }
55188
55189
  function NU(e, t, n) {
55189
55190
  let { mutateAsync: r } = jU(), { mutateAsync: i } = AU(), { isMultiAgent: a } = fU(e), [o, s] = (0, H.useState)(null), c = (0, H.useRef)(null), l = (0, H.useRef)(null), u = gT(), d = vT(), f = d ? Number(d) : null, p = bT();
@@ -55245,7 +55246,7 @@ function NU(e, t, n) {
55245
55246
  function PU() {
55246
55247
  let e = (0, H.useContext)(OM), { agentType: t } = fU(e?.agentType), { selectedAssistantId: n, selectedAssistant: r } = NU(e?.agentType, e?.assistantId, !!e), i = (0, H.useMemo)(() => e ? {
55247
55248
  ...e,
55248
- assistantId: n,
55249
+ assistantId: n ?? e.assistantId,
55249
55250
  agentType: t,
55250
55251
  assistantLabel: r?.label,
55251
55252
  assistantInitialMessage: r?.initialMessage
@@ -55890,68 +55891,69 @@ function vW(e = {}) {
55890
55891
  //#endregion
55891
55892
  //#region package/src/internal/features/agent-chat/components/AgentLauncher/AgentLauncher.tsx
55892
55893
  function yW({ runtime: e, uiOptions: t }) {
55893
- let n = e.forceReAuth, { isAuthenticating: r, hasToken: i } = _W(n), { panelWidth: a, panelHeight: o, panelHeaderHeight: s, panelTopOffset: c, panelBorder: l, panelBorderRadius: u, zIndex: d, fabPosition: f } = rW(t), p = (0, H.useRef)(!1), { messages: m, composerText: h, setComposerText: g, isLoading: _, error: v, sendMessage: y, sendInitialMessage: b, agentDisplayName: x, canSend: S } = qU(), { actions: C, handleActionClick: w } = JU(m, g), { runtimeInfo: T, refreshRuntimeInfo: E } = QU(), { isOpen: D, open: O, close: k } = vW({
55894
+ let n = e.forceReAuth, { isAuthenticating: r, hasToken: i } = _W(n), { panelWidth: a, panelHeight: o, panelHeaderHeight: s, panelTopOffset: c, panelBorder: l, panelBorderRadius: u, zIndex: d, fabPosition: f } = rW(t), p = (0, H.useRef)(!1), m = (0, H.useRef)(!1), [h, g] = (0, H.useState)(!1), { messages: _, composerText: v, setComposerText: y, isLoading: b, error: x, sendMessage: S, sendInitialMessage: C, agentDisplayName: w, canSend: T } = qU(), { actions: E, handleActionClick: D } = JU(_, y), { runtimeInfo: O, refreshRuntimeInfo: k } = QU(), { isOpen: A, open: j, close: M } = vW({
55894
55895
  defaultOpen: !1,
55895
55896
  persist: !0,
55896
55897
  onOpen: async () => {
55897
- p.current || (p.current = !0, await E());
55898
+ p.current || (p.current = !0, await k()), m.current || g(!0);
55898
55899
  }
55899
55900
  });
55900
55901
  (0, H.useEffect)(() => {
55901
55902
  (async () => {
55902
- p.current && D && !r && i && await b() && (p.current = !1);
55903
+ h && A && !r && i && await C() && (m.current = !0, g(!1));
55903
55904
  })();
55904
55905
  }, [
55905
- D,
55906
+ A,
55906
55907
  r,
55907
55908
  i,
55908
- b
55909
+ C,
55910
+ h
55909
55911
  ]);
55910
- let A = oW([m.length, _]), { isListening: j, isSupported: M, startListening: N, stopListening: P, reset: ee } = eW({
55912
+ let N = oW([_.length, b]), { isListening: P, isSupported: ee, startListening: F, stopListening: I, reset: te } = eW({
55911
55913
  lang: $U(),
55912
55914
  continuous: !0,
55913
55915
  pauseOnSubmit: !0,
55914
- onTextChange: g
55915
- }), { panelResizableWidth: F, actualWidth: I, shellGap: te, floatingTop: ne, floatingHeight: re, floatingMaxHeight: ie } = ZU(t, a, D, o, c), { handleSubmit: L, handleToggleVoice: ae, handleClose: oe } = iW({
55916
- isListening: j,
55917
- stopListening: P,
55918
- reset: ee,
55919
- sendMessage: y,
55920
- composerText: h,
55921
- setComposerText: g,
55922
- startListening: N,
55923
- close: k
55924
- });
55925
- return /* @__PURE__ */ (0, U.jsxs)(U.Fragment, { children: [!D && /* @__PURE__ */ (0, U.jsx)(BM, {
55926
- onClick: () => void O(),
55916
+ onTextChange: y
55917
+ }), { panelResizableWidth: ne, actualWidth: re, shellGap: ie, floatingTop: L, floatingHeight: ae, floatingMaxHeight: oe } = ZU(t, a, A, o, c), { handleSubmit: se, handleToggleVoice: ce, handleClose: le } = iW({
55918
+ isListening: P,
55919
+ stopListening: I,
55920
+ reset: te,
55921
+ sendMessage: S,
55922
+ composerText: v,
55923
+ setComposerText: y,
55924
+ startListening: F,
55925
+ close: M
55926
+ });
55927
+ return /* @__PURE__ */ (0, U.jsxs)(U.Fragment, { children: [!A && /* @__PURE__ */ (0, U.jsx)(BM, {
55928
+ onClick: () => void j(),
55927
55929
  zIndex: d,
55928
55930
  position: f,
55929
- label: x
55930
- }), D && /* @__PURE__ */ (0, U.jsx)(dU, {
55931
+ label: w
55932
+ }), A && /* @__PURE__ */ (0, U.jsx)(dU, {
55931
55933
  visible: !0,
55932
- onClose: oe,
55933
- messages: m,
55934
- composerText: h,
55935
- onComposerTextChange: g,
55936
- isLoading: _,
55937
- error: v,
55938
- canSend: S,
55939
- onSubmit: L,
55940
- actions: C,
55941
- onActionClick: w,
55942
- isListening: j,
55943
- isVoiceSupported: M,
55944
- onToggleVoice: ae,
55945
- panelTitle: x,
55946
- runtimeInfo: T,
55947
- scrollViewportRef: A,
55948
- actualWidth: I,
55949
- floatingTop: ne,
55950
- floatingHeight: re,
55951
- floatingMaxHeight: ie,
55952
- shellGap: te,
55934
+ onClose: le,
55935
+ messages: _,
55936
+ composerText: v,
55937
+ onComposerTextChange: y,
55938
+ isLoading: b,
55939
+ error: x,
55940
+ canSend: T,
55941
+ onSubmit: se,
55942
+ actions: E,
55943
+ onActionClick: D,
55944
+ isListening: P,
55945
+ isVoiceSupported: ee,
55946
+ onToggleVoice: ce,
55947
+ panelTitle: w,
55948
+ runtimeInfo: O,
55949
+ scrollViewportRef: N,
55950
+ actualWidth: re,
55951
+ floatingTop: L,
55952
+ floatingHeight: ae,
55953
+ floatingMaxHeight: oe,
55954
+ shellGap: ie,
55953
55955
  panelHeaderHeight: s,
55954
- panelResizableWidth: F,
55956
+ panelResizableWidth: ne,
55955
55957
  panelBorder: l,
55956
55958
  panelBorderRadius: u,
55957
55959
  zIndex: d