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.
- package/dist/agent-widget.js +29 -28
- package/dist/agent-widget.js.map +1 -1
- package/package.json +1 -1
package/dist/agent-widget.js
CHANGED
|
@@ -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,
|
|
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:
|
|
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
|
-
}),
|
|
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:
|
|
29086
|
-
}),
|
|
29085
|
+
onTextChange: u
|
|
29086
|
+
}), j = _(() => /* @__PURE__ */ T(Xd, {
|
|
29087
29087
|
fw: 800,
|
|
29088
29088
|
children: "Agent Chat"
|
|
29089
|
-
}), []),
|
|
29090
|
-
n(), await
|
|
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
|
|
29093
|
+
onClick: () => void M(),
|
|
29094
29094
|
zIndex: i,
|
|
29095
|
-
position:
|
|
29095
|
+
position: s
|
|
29096
29096
|
}), /* @__PURE__ */ T(YO, {
|
|
29097
29097
|
opened: t,
|
|
29098
29098
|
onClose: () => {
|
|
29099
|
-
|
|
29099
|
+
C && k(), r();
|
|
29100
29100
|
},
|
|
29101
29101
|
zIndex: i,
|
|
29102
29102
|
withinPortal: a,
|
|
29103
|
-
|
|
29104
|
-
|
|
29105
|
-
|
|
29106
|
-
|
|
29107
|
-
|
|
29108
|
-
|
|
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
|
-
|
|
29111
|
+
C && k(), A(), p(l);
|
|
29111
29112
|
},
|
|
29112
|
-
isListening:
|
|
29113
|
-
isVoiceSupported:
|
|
29113
|
+
isListening: C,
|
|
29114
|
+
isVoiceSupported: D,
|
|
29114
29115
|
onToggleVoice: () => {
|
|
29115
|
-
|
|
29116
|
+
C ? k() : (u(""), O());
|
|
29116
29117
|
},
|
|
29117
|
-
drawerTitle:
|
|
29118
|
-
runtimeInfo:
|
|
29119
|
-
scrollViewportRef:
|
|
29120
|
-
drawerDraggable:
|
|
29121
|
-
drawerResizableWidth:
|
|
29122
|
-
drawerResizableHeight:
|
|
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
|