bstp-agent-widget 0.2.26 → 0.2.27

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.
@@ -23739,11 +23739,11 @@ function JO({ ...e }) {
23739
23739
  }
23740
23740
  //#endregion
23741
23741
  //#region src/components/AgentChat/AgentChatDrawer.tsx
23742
- function YO({ opened: e, onClose: t, zIndex: n, withinPortal: r, messages: i, composerText: a, onComposerTextChange: o, isLoading: s, error: c, canSend: l, onSubmit: u, isListening: d, isVoiceSupported: f, onToggleVoice: p, drawerTitle: m, runtimeInfo: h, scrollViewportRef: g, drawerDraggable: _, drawerResizableWidth: v, drawerResizableHeight: y }) {
23742
+ function YO({ opened: e, onClose: t, zIndex: n, withinPortal: r, messages: i, composerText: a, onComposerTextChange: o, isLoading: s, error: c, canSend: l, onSubmit: u, isListening: d, isVoiceSupported: f, onToggleVoice: p, drawerTitle: m, runtimeInfo: h, scrollViewportRef: g, drawerDraggable: _, drawerResizableWidth: v, drawerResizableHeight: y, drawerBaseWidth: b = 420 }) {
23743
23743
  return /* @__PURE__ */ T(w, { children: /* @__PURE__ */ E(ub, {
23744
23744
  opened: e,
23745
23745
  onClose: t,
23746
- size: Math.max(280, 420 + v.offset),
23746
+ size: Math.max(280, b + v.offset),
23747
23747
  zIndex: n,
23748
23748
  withinPortal: r,
23749
23749
  overlayProps: {
@@ -29072,54 +29072,55 @@ var qF = 1e4, JF = {
29072
29072
  };
29073
29073
  function YF({ ui: e }) {
29074
29074
  KF();
29075
- let [t, { open: n, close: r }] = mt(!1), i = e?.zIndex ?? qF, a = e?.withinPortal ?? !0, o = {
29075
+ let [t, { open: n, close: r }] = mt(!1), i = e?.zIndex ?? qF, a = e?.withinPortal ?? !0, o = e?.drawerWidth ?? 420, s = {
29076
29076
  bottom: e?.fabPosition?.bottom ?? JF.bottom,
29077
29077
  right: e?.fabPosition?.right ?? JF.right
29078
- }, { messages: s, composerText: c, setComposerText: l, isLoading: u, error: d, sendMessage: f, sendInitialMessage: p, canSend: m } = NF(), { runtimeInfo: h, refreshRuntimeInfo: g } = PF(), v = LF({ skipSelector: "button, input, textarea, [role=\"button\"]" }), y = RF({ axis: "y" }), b = RF({
29078
+ }, { messages: c, composerText: l, setComposerText: u, isLoading: d, error: f, sendMessage: p, sendInitialMessage: m, canSend: h } = NF(), { runtimeInfo: g, refreshRuntimeInfo: v } = PF(), y = LF({ skipSelector: "button, input, textarea, [role=\"button\"]" }), b = RF({ axis: "y" }), x = RF({
29079
29079
  axis: "x",
29080
29080
  direction: -1
29081
- }), x = BF([s.length, u]), { isListening: S, isSupported: C, startListening: D, stopListening: O, reset: k } = VF({
29081
+ }), S = BF([c.length, d]), { isListening: C, isSupported: D, startListening: O, stopListening: k, reset: A } = VF({
29082
29082
  lang: HF(),
29083
29083
  continuous: !0,
29084
29084
  pauseOnSubmit: !0,
29085
- onTextChange: l
29086
- }), A = _(() => /* @__PURE__ */ T(Xd, {
29085
+ onTextChange: u
29086
+ }), j = _(() => /* @__PURE__ */ T(Xd, {
29087
29087
  fw: 800,
29088
29088
  children: "Agent Chat"
29089
- }), []), j = async () => {
29090
- n(), await g(), await p();
29089
+ }), []), M = async () => {
29090
+ n(), await v(), await m();
29091
29091
  };
29092
29092
  return /* @__PURE__ */ E(w, { children: [!t && /* @__PURE__ */ T(XO, {
29093
- onClick: () => void j(),
29093
+ onClick: () => void M(),
29094
29094
  zIndex: i,
29095
- position: o
29095
+ position: s
29096
29096
  }), /* @__PURE__ */ T(YO, {
29097
29097
  opened: t,
29098
29098
  onClose: () => {
29099
- S && O(), r();
29099
+ C && k(), r();
29100
29100
  },
29101
29101
  zIndex: i,
29102
29102
  withinPortal: a,
29103
- messages: s,
29104
- composerText: c,
29105
- onComposerTextChange: l,
29106
- isLoading: u,
29107
- error: d,
29108
- canSend: m,
29103
+ drawerBaseWidth: o,
29104
+ messages: c,
29105
+ composerText: l,
29106
+ onComposerTextChange: u,
29107
+ isLoading: d,
29108
+ error: f,
29109
+ canSend: h,
29109
29110
  onSubmit: () => {
29110
- S && O(), k(), f(c);
29111
+ C && k(), A(), p(l);
29111
29112
  },
29112
- isListening: S,
29113
- isVoiceSupported: C,
29113
+ isListening: C,
29114
+ isVoiceSupported: D,
29114
29115
  onToggleVoice: () => {
29115
- S ? O() : (l(""), D());
29116
+ C ? k() : (u(""), O());
29116
29117
  },
29117
- drawerTitle: A,
29118
- runtimeInfo: h,
29119
- scrollViewportRef: x,
29120
- drawerDraggable: v,
29121
- drawerResizableWidth: b,
29122
- drawerResizableHeight: y
29118
+ drawerTitle: j,
29119
+ runtimeInfo: g,
29120
+ scrollViewportRef: S,
29121
+ drawerDraggable: y,
29122
+ drawerResizableWidth: x,
29123
+ drawerResizableHeight: b
29123
29124
  })] });
29124
29125
  }
29125
29126
  //#endregion