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