bstp-agent-widget 0.2.32 → 0.2.34

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,7 +23739,7 @@ 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, drawerBaseWidth: b = 420 }) {
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, topOffset: x = 0 }) {
23743
23743
  return /* @__PURE__ */ T(w, { children: /* @__PURE__ */ E(ub, {
23744
23744
  opened: e,
23745
23745
  onClose: t,
@@ -23764,6 +23764,8 @@ function YO({ opened: e, onClose: t, zIndex: n, withinPortal: r, messages: i, co
23764
23764
  content: {
23765
23765
  display: "flex",
23766
23766
  flexDirection: "column",
23767
+ marginTop: x,
23768
+ height: `calc(100vh - ${x}px)`,
23767
23769
  backgroundColor: "var(--mantine-custom-color-surface-body-bg, #f8f9fa)"
23768
23770
  },
23769
23771
  header: {
@@ -29085,55 +29087,56 @@ var qF = 1e4, JF = {
29085
29087
  };
29086
29088
  function YF({ ui: e }) {
29087
29089
  KF();
29088
- let [t, { open: n, close: r }] = mt(!1), i = e?.zIndex ?? qF, a = e?.withinPortal ?? !0, o = e?.drawerWidth ?? 420, s = {
29090
+ let [t, { open: n, close: r }] = mt(!1), i = e?.zIndex ?? qF, a = e?.withinPortal ?? !0, o = e?.drawerWidth ?? 420, s = e?.topOffset ?? 0, c = {
29089
29091
  bottom: e?.fabPosition?.bottom ?? JF.bottom,
29090
29092
  right: e?.fabPosition?.right ?? JF.right
29091
- }, { 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({
29093
+ }, { messages: l, composerText: u, setComposerText: d, isLoading: f, error: p, sendMessage: m, sendInitialMessage: h, canSend: g } = NF(), { runtimeInfo: v, refreshRuntimeInfo: y } = PF(), b = LF({ skipSelector: "button, input, textarea, [role=\"button\"]" }), x = RF({ axis: "y" }), S = RF({
29092
29094
  axis: "x",
29093
29095
  direction: -1
29094
- }), S = BF([c.length, d]), { isListening: C, isSupported: D, startListening: O, stopListening: k, reset: A } = VF({
29096
+ }), C = BF([l.length, f]), { isListening: D, isSupported: O, startListening: k, stopListening: A, reset: j } = VF({
29095
29097
  lang: HF(),
29096
29098
  continuous: !0,
29097
29099
  pauseOnSubmit: !0,
29098
- onTextChange: u
29099
- }), j = _(() => /* @__PURE__ */ T(Xd, {
29100
+ onTextChange: d
29101
+ }), M = _(() => /* @__PURE__ */ T(Xd, {
29100
29102
  fw: 800,
29101
29103
  children: "Agent Chat"
29102
- }), []), M = async () => {
29103
- n(), await v(), await m();
29104
+ }), []), N = async () => {
29105
+ n(), await y(), await h();
29104
29106
  };
29105
29107
  return /* @__PURE__ */ E(w, { children: [!t && /* @__PURE__ */ T(XO, {
29106
- onClick: () => void M(),
29108
+ onClick: () => void N(),
29107
29109
  zIndex: i,
29108
- position: s
29110
+ position: c
29109
29111
  }), /* @__PURE__ */ T(YO, {
29110
29112
  opened: t,
29111
29113
  onClose: () => {
29112
- C && k(), r();
29114
+ D && A(), r();
29113
29115
  },
29114
29116
  zIndex: i,
29115
29117
  withinPortal: a,
29118
+ topOffset: s,
29116
29119
  drawerBaseWidth: o,
29117
- messages: c,
29118
- composerText: l,
29119
- onComposerTextChange: u,
29120
- isLoading: d,
29121
- error: f,
29122
- canSend: h,
29120
+ messages: l,
29121
+ composerText: u,
29122
+ onComposerTextChange: d,
29123
+ isLoading: f,
29124
+ error: p,
29125
+ canSend: g,
29123
29126
  onSubmit: () => {
29124
- C && k(), A(), p(l);
29127
+ D && A(), j(), m(u);
29125
29128
  },
29126
- isListening: C,
29127
- isVoiceSupported: D,
29129
+ isListening: D,
29130
+ isVoiceSupported: O,
29128
29131
  onToggleVoice: () => {
29129
- C ? k() : (u(""), O());
29132
+ D ? A() : (d(""), k());
29130
29133
  },
29131
- drawerTitle: j,
29132
- runtimeInfo: g,
29133
- scrollViewportRef: S,
29134
- drawerDraggable: y,
29135
- drawerResizableWidth: x,
29136
- drawerResizableHeight: b
29134
+ drawerTitle: M,
29135
+ runtimeInfo: v,
29136
+ scrollViewportRef: C,
29137
+ drawerDraggable: b,
29138
+ drawerResizableWidth: S,
29139
+ drawerResizableHeight: x
29137
29140
  })] });
29138
29141
  }
29139
29142
  //#endregion