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.
- package/dist/agent-widget.js +30 -27
- package/dist/agent-widget.js.map +1 -1
- package/package.json +1 -1
- package/src/lib/index.d.ts +1 -0
package/dist/agent-widget.js
CHANGED
|
@@ -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:
|
|
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
|
-
}),
|
|
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:
|
|
29099
|
-
}),
|
|
29100
|
+
onTextChange: d
|
|
29101
|
+
}), M = _(() => /* @__PURE__ */ T(Xd, {
|
|
29100
29102
|
fw: 800,
|
|
29101
29103
|
children: "Agent Chat"
|
|
29102
|
-
}), []),
|
|
29103
|
-
n(), await
|
|
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
|
|
29108
|
+
onClick: () => void N(),
|
|
29107
29109
|
zIndex: i,
|
|
29108
|
-
position:
|
|
29110
|
+
position: c
|
|
29109
29111
|
}), /* @__PURE__ */ T(YO, {
|
|
29110
29112
|
opened: t,
|
|
29111
29113
|
onClose: () => {
|
|
29112
|
-
|
|
29114
|
+
D && A(), r();
|
|
29113
29115
|
},
|
|
29114
29116
|
zIndex: i,
|
|
29115
29117
|
withinPortal: a,
|
|
29118
|
+
topOffset: s,
|
|
29116
29119
|
drawerBaseWidth: o,
|
|
29117
|
-
messages:
|
|
29118
|
-
composerText:
|
|
29119
|
-
onComposerTextChange:
|
|
29120
|
-
isLoading:
|
|
29121
|
-
error:
|
|
29122
|
-
canSend:
|
|
29120
|
+
messages: l,
|
|
29121
|
+
composerText: u,
|
|
29122
|
+
onComposerTextChange: d,
|
|
29123
|
+
isLoading: f,
|
|
29124
|
+
error: p,
|
|
29125
|
+
canSend: g,
|
|
29123
29126
|
onSubmit: () => {
|
|
29124
|
-
|
|
29127
|
+
D && A(), j(), m(u);
|
|
29125
29128
|
},
|
|
29126
|
-
isListening:
|
|
29127
|
-
isVoiceSupported:
|
|
29129
|
+
isListening: D,
|
|
29130
|
+
isVoiceSupported: O,
|
|
29128
29131
|
onToggleVoice: () => {
|
|
29129
|
-
|
|
29132
|
+
D ? A() : (d(""), k());
|
|
29130
29133
|
},
|
|
29131
|
-
drawerTitle:
|
|
29132
|
-
runtimeInfo:
|
|
29133
|
-
scrollViewportRef:
|
|
29134
|
-
drawerDraggable:
|
|
29135
|
-
drawerResizableWidth:
|
|
29136
|
-
drawerResizableHeight:
|
|
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
|