@8wave/ai-elements 0.126.0-beta.32 → 0.126.0-beta.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/_chunks/{Agent-COa7L9GK.js → Agent-DZEyfr8D.js} +2 -1
- package/dist/_chunks/Agent-DZEyfr8D.js.map +1 -0
- package/dist/_chunks/{PkFilePreview-SBGa95Ca.js → PkFilePreview-C6ZZablL.js} +3 -3
- package/dist/_chunks/{PkFilePreview-SBGa95Ca.js.map → PkFilePreview-C6ZZablL.js.map} +1 -1
- package/dist/_chunks/{PkFilePreviewDialog-Cc7iZWCl.js → PkFilePreviewDialog-BzBHAt8l.js} +2 -2
- package/dist/_chunks/{PkFilePreviewDialog-Cc7iZWCl.js.map → PkFilePreviewDialog-BzBHAt8l.js.map} +1 -1
- package/dist/_chunks/{PkImageEditorDialog-D13bWv-N.js → PkImageEditorDialog-Dm34WFmS.js} +2 -2
- package/dist/_chunks/{PkImageEditorDialog-D13bWv-N.js.map → PkImageEditorDialog-Dm34WFmS.js.map} +1 -1
- package/dist/_chunks/{PkSelectionActions-BaX_rsCt.js → PkSelectionActions-CYqbMEjg.js} +2 -2
- package/dist/_chunks/{PkSelectionActions-BaX_rsCt.js.map → PkSelectionActions-CYqbMEjg.js.map} +1 -1
- package/dist/_chunks/{PkStreamingMarkdown-GRB3Gg_x.js → PkStreamingMarkdown-B8rZbprU.js} +3 -3
- package/dist/_chunks/{PkStreamingMarkdown-GRB3Gg_x.js.map → PkStreamingMarkdown-B8rZbprU.js.map} +1 -1
- package/dist/_chunks/{PkToolChatFile-DTm5-CE4.js → PkToolChatFile-C0emIVfS.js} +3 -3
- package/dist/_chunks/{PkToolChatFile-DTm5-CE4.js.map → PkToolChatFile-C0emIVfS.js.map} +1 -1
- package/dist/_chunks/{PkToolRequestGeolocation-DZenn1az.js → PkToolRequestGeolocation-DNzNRszE.js} +2 -2
- package/dist/_chunks/{PkToolRequestGeolocation-DZenn1az.js.map → PkToolRequestGeolocation-DNzNRszE.js.map} +1 -1
- package/dist/_chunks/{PkToolRequestOAuthConnection-Dz0qfYu5.js → PkToolRequestOAuthConnection-BDxYXz4s.js} +2 -2
- package/dist/_chunks/{PkToolRequestOAuthConnection-Dz0qfYu5.js.map → PkToolRequestOAuthConnection-BDxYXz4s.js.map} +1 -1
- package/dist/_chunks/{PkToolShowArtifact-C9_DHr5Y.js → PkToolShowArtifact-B_KIIjEn.js} +2 -2
- package/dist/_chunks/{PkToolShowArtifact-C9_DHr5Y.js.map → PkToolShowArtifact-B_KIIjEn.js.map} +1 -1
- package/dist/_chunks/{PkToolShowContactForm-DhyelktO.js → PkToolShowContactForm-DiHb3fRQ.js} +2 -2
- package/dist/_chunks/{PkToolShowContactForm-DhyelktO.js.map → PkToolShowContactForm-DiHb3fRQ.js.map} +1 -1
- package/dist/_chunks/{PkToolShowForm-Dz2Hnzts.js → PkToolShowForm-BmUAhIQy.js} +4 -4
- package/dist/_chunks/{PkToolShowForm-Dz2Hnzts.js.map → PkToolShowForm-BmUAhIQy.js.map} +1 -1
- package/dist/_chunks/{PkToolShowImageGallery-CiDfIboY.js → PkToolShowImageGallery-CZ394fdT.js} +2 -2
- package/dist/_chunks/{PkToolShowImageGallery-CiDfIboY.js.map → PkToolShowImageGallery-CZ394fdT.js.map} +1 -1
- package/dist/_chunks/{PkToolShowProductList-CY96IGWn.js → PkToolShowProductList-uNvUr2s9.js} +2 -2
- package/dist/_chunks/{PkToolShowProductList-CY96IGWn.js.map → PkToolShowProductList-uNvUr2s9.js.map} +1 -1
- package/dist/_chunks/{PkToolShowSources-CRk-MOoE.js → PkToolShowSources-Dm0L4prK.js} +3 -3
- package/dist/_chunks/{PkToolShowSources-CRk-MOoE.js.map → PkToolShowSources-Dm0L4prK.js.map} +1 -1
- package/dist/_chunks/{PkToolShowSuggestedReply-DKuV4mmV.js → PkToolShowSuggestedReply-B_dRrZfj.js} +2 -2
- package/dist/_chunks/{PkToolShowSuggestedReply-DKuV4mmV.js.map → PkToolShowSuggestedReply-B_dRrZfj.js.map} +1 -1
- package/dist/_chunks/{PkToolShowVideo-DI6ohcVU.js → PkToolShowVideo-DLgQjTq_.js} +2 -2
- package/dist/_chunks/{PkToolShowVideo-DI6ohcVU.js.map → PkToolShowVideo-DLgQjTq_.js.map} +1 -1
- package/dist/_chunks/{PkToolShowWebPages-Dh6L_n9T.js → PkToolShowWebPages-Cj2mJrs5.js} +2 -2
- package/dist/_chunks/{PkToolShowWebPages-Dh6L_n9T.js.map → PkToolShowWebPages-Cj2mJrs5.js.map} +1 -1
- package/dist/_chunks/{chatImagePolicy-Ckz-KAHA.js → chatImagePolicy-DMt6O5iK.js} +2 -2
- package/dist/_chunks/{chatImagePolicy-Ckz-KAHA.js.map → chatImagePolicy-DMt6O5iK.js.map} +1 -1
- package/dist/_chunks/{markdown-DHayRAiy.js → markdown-nw5sXwU0.js} +2 -2
- package/dist/_chunks/{markdown-DHayRAiy.js.map → markdown-nw5sXwU0.js.map} +1 -1
- package/dist/_chunks/{utils-3jpXeGGy.js → utils-DPGBO-HU.js} +2 -2
- package/dist/_chunks/{utils-3jpXeGGy.js.map → utils-DPGBO-HU.js.map} +1 -1
- package/dist/ai-elements.es.js +3927 -3858
- package/dist/ai-elements.es.js.map +1 -1
- package/dist-vue/PkChatbot.js +1 -1
- package/dist-vue/PkChatbotEmptyState.js +1 -1
- package/dist-vue/PkChatbotInput.js +1 -1
- package/dist-vue/PkChatbotMessages.js +1 -1
- package/dist-vue/PkChatbotStepPayload.js +1 -1
- package/dist-vue/PkChatbotStepToolDetail.js +1 -1
- package/dist-vue/PkChatbotSteps.js +1 -1
- package/dist-vue/PkChatbotViewChat.js +1 -1
- package/dist-vue/PkChatbotViewConversations.js +1 -1
- package/dist-vue/PkChatbotViewFiles.js +1 -1
- package/dist-vue/PkChatbotViewProfile.js +1 -1
- package/dist-vue/_chunks/{Agent-CRwhrv5Z.js → Agent-CBAd3F7k.js} +2 -1
- package/dist-vue/_chunks/Agent-CBAd3F7k.js.map +1 -0
- package/dist-vue/_chunks/{Document-Bp-qpa8v.js → Document-B3w5H0R0.js} +2 -2
- package/dist-vue/_chunks/{Document-Bp-qpa8v.js.map → Document-B3w5H0R0.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbot-CtrcDgBe.js → PkChatbot-CXpftmWm.js} +8 -8
- package/dist-vue/_chunks/{PkChatbot-CtrcDgBe.js.map → PkChatbot-CXpftmWm.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotEmptyState-BF3Odn3v.js → PkChatbotEmptyState-vA2v4FES.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotEmptyState-BF3Odn3v.js.map → PkChatbotEmptyState-vA2v4FES.js.map} +1 -1
- package/dist-vue/_chunks/PkChatbotInput-CIIJ1bpF.js +584 -0
- package/dist-vue/_chunks/PkChatbotInput-CIIJ1bpF.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotMessages-10eBKpC5.js → PkChatbotMessages-15R8RxAq.js} +18 -18
- package/dist-vue/_chunks/{PkChatbotMessages-10eBKpC5.js.map → PkChatbotMessages-15R8RxAq.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotStepPayload-C4ahOq6Z.js → PkChatbotStepPayload-BbNSav-U.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotStepPayload-C4ahOq6Z.js.map → PkChatbotStepPayload-BbNSav-U.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotStepToolDetail-CkIX0aKu.js → PkChatbotStepToolDetail-B_4pmbLe.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotStepToolDetail-CkIX0aKu.js.map → PkChatbotStepToolDetail-B_4pmbLe.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotSteps-BalLo6DZ.js → PkChatbotSteps-h4E6DH_g.js} +5 -5
- package/dist-vue/_chunks/{PkChatbotSteps-BalLo6DZ.js.map → PkChatbotSteps-h4E6DH_g.js.map} +1 -1
- package/dist-vue/_chunks/PkChatbotViewChat-CLQ0J9_f.js +1382 -0
- package/dist-vue/_chunks/PkChatbotViewChat-CLQ0J9_f.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotViewConversations-D0vDYTyo.js → PkChatbotViewConversations-DFBbypGg.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotViewConversations-D0vDYTyo.js.map → PkChatbotViewConversations-DFBbypGg.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewFiles-BwfAnywk.js → PkChatbotViewFiles-PHdrHZOf.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotViewFiles-BwfAnywk.js.map → PkChatbotViewFiles-PHdrHZOf.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewProfile-GW0WuMOy.js → PkChatbotViewProfile-B0AZvHTr.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewProfile-GW0WuMOy.js.map → PkChatbotViewProfile-B0AZvHTr.js.map} +1 -1
- package/dist-vue/_chunks/{PkFilePreview-qizsvSVW.js → PkFilePreview-Cb-1YRPN.js} +616 -666
- package/dist-vue/_chunks/PkFilePreview-Cb-1YRPN.js.map +1 -0
- package/dist-vue/_chunks/{PkFilePreviewDialog-WsVzH9hg.js → PkFilePreviewDialog-Bd7kEoCB.js} +2 -2
- package/dist-vue/_chunks/{PkFilePreviewDialog-WsVzH9hg.js.map → PkFilePreviewDialog-Bd7kEoCB.js.map} +1 -1
- package/dist-vue/_chunks/{PkImageEditorDialog-NQFpdqCU.js → PkImageEditorDialog-Bj4sUHXM.js} +2 -2
- package/dist-vue/_chunks/{PkImageEditorDialog-NQFpdqCU.js.map → PkImageEditorDialog-Bj4sUHXM.js.map} +1 -1
- package/dist-vue/_chunks/{PkStreamingMarkdown-CMxiJTMR.js → PkStreamingMarkdown-BcUq4ThC.js} +3 -3
- package/dist-vue/_chunks/{PkStreamingMarkdown-CMxiJTMR.js.map → PkStreamingMarkdown-BcUq4ThC.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolChatFile-Bd6Ci7i1.js → PkToolChatFile-BOexrlLt.js} +3 -3
- package/dist-vue/_chunks/{PkToolChatFile-Bd6Ci7i1.js.map → PkToolChatFile-BOexrlLt.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolRequestGeolocation-C2OmF31d.js → PkToolRequestGeolocation-CyL_M1Rm.js} +2 -2
- package/dist-vue/_chunks/{PkToolRequestGeolocation-C2OmF31d.js.map → PkToolRequestGeolocation-CyL_M1Rm.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolRequestOAuthConnection-CgD-o99C.js → PkToolRequestOAuthConnection-DWkeVLpx.js} +2 -2
- package/dist-vue/_chunks/{PkToolRequestOAuthConnection-CgD-o99C.js.map → PkToolRequestOAuthConnection-DWkeVLpx.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowArtifact-rlZ-AGWh.js → PkToolShowArtifact-C4gHB6lH.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowArtifact-rlZ-AGWh.js.map → PkToolShowArtifact-C4gHB6lH.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowChart-B8xJi1yY.js → PkToolShowChart-CsPXNAb9.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowChart-B8xJi1yY.js.map → PkToolShowChart-CsPXNAb9.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowContactForm-BVBL7Unx.js → PkToolShowContactForm-2_HBPZaa.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowContactForm-BVBL7Unx.js.map → PkToolShowContactForm-2_HBPZaa.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowDiagram-Bs39QQZ3.js → PkToolShowDiagram-cCbeL6MK.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowDiagram-Bs39QQZ3.js.map → PkToolShowDiagram-cCbeL6MK.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowForm-D-RJeA2F.js → PkToolShowForm-DjB3fji5.js} +4 -4
- package/dist-vue/_chunks/{PkToolShowForm-D-RJeA2F.js.map → PkToolShowForm-DjB3fji5.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowImageGallery-CrkkKCVI.js → PkToolShowImageGallery-C22TCUKW.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowImageGallery-CrkkKCVI.js.map → PkToolShowImageGallery-C22TCUKW.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowProductList-BwfUG41_.js → PkToolShowProductList-BvtmiHBf.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowProductList-BwfUG41_.js.map → PkToolShowProductList-BvtmiHBf.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowSources-q9gQIuam.js → PkToolShowSources-uKO4MQgd.js} +3 -3
- package/dist-vue/_chunks/{PkToolShowSources-q9gQIuam.js.map → PkToolShowSources-uKO4MQgd.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowSuggestedReply-75Kc8-OQ.js → PkToolShowSuggestedReply-wKgwHTRO.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowSuggestedReply-75Kc8-OQ.js.map → PkToolShowSuggestedReply-wKgwHTRO.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowVideo-BK-jDVJd.js → PkToolShowVideo-DKj5N1vo.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowVideo-BK-jDVJd.js.map → PkToolShowVideo-DKj5N1vo.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowWebPages-K3Jml1f7.js → PkToolShowWebPages-BNZmbCSf.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowWebPages-K3Jml1f7.js.map → PkToolShowWebPages-BNZmbCSf.js.map} +1 -1
- package/dist-vue/_chunks/{createChatbotApiClient-Pb7_cU2s.js → createChatbotApiClient-DBKfGL6y.js} +5 -2
- package/dist-vue/_chunks/{createChatbotApiClient-Pb7_cU2s.js.map → createChatbotApiClient-DBKfGL6y.js.map} +1 -1
- package/dist-vue/_chunks/{useChatbotStore-ChrZVIDt.js → useChatbotStore-Hb5EjISl.js} +94 -85
- package/dist-vue/_chunks/useChatbotStore-Hb5EjISl.js.map +1 -0
- package/dist-vue/_chunks/{utils-Bdk5kFfi.js → utils-waie4Gfn.js} +2 -2
- package/dist-vue/_chunks/{utils-Bdk5kFfi.js.map → utils-waie4Gfn.js.map} +1 -1
- package/dist-vue/api.js +1 -1
- package/dist-vue/apps/web-component/src/composables/useChatbotAgent.d.ts +2 -0
- package/dist-vue/composables.js +8 -8
- package/dist-vue/index.js +408 -389
- package/dist-vue/index.js.map +1 -1
- package/dist-vue/locales.js +6 -0
- package/dist-vue/packages/components/src/chat/PkAgentSettingsPanel.d.ts +9 -2
- package/dist-vue/packages/components/src/chat/PkChatbotInput.d.ts +6 -0
- package/dist-vue/packages/composable/src/chatbot/api/createChatbotApiClient.d.ts +5 -0
- package/dist-vue/packages/composable/src/chatbot/useChatbotStore.d.ts +10 -1
- package/dist-vue/packages/models/src/schema/Agent.d.ts +8 -0
- package/dist-vue/packages/models/src/schema/ReasoningChat.d.ts +2 -0
- package/dist-vue/packages/models/src/schema/SubAgent.d.ts +2 -0
- package/dist-vue/packages/models/src/schema/constants.d.ts +11 -2
- package/dist-vue/style.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/Agent-COa7L9GK.js.map +0 -1
- package/dist-vue/_chunks/Agent-CRwhrv5Z.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotInput-DNXvFvyG.js +0 -520
- package/dist-vue/_chunks/PkChatbotInput-DNXvFvyG.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotViewChat-U6T-gG-c.js +0 -1336
- package/dist-vue/_chunks/PkChatbotViewChat-U6T-gG-c.js.map +0 -1
- package/dist-vue/_chunks/PkFilePreview-qizsvSVW.js.map +0 -1
- package/dist-vue/_chunks/useChatbotStore-ChrZVIDt.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { $ as e, A as t, B as n, D as r, E as i, F as a, G as o, H as s, I as c, J as l, K as u, L as d, M as f, N as p, P as m, Q as h, R as g, S as _, T as v, U as y, W as b, X as ee, Y as te, Z as ne, _t as re, a as ie, at as ae, b as oe, bt as x, ct as se, dt as ce, et as le, g as ue, gt as de, h as fe, ht as pe, i as me, it as he, k as ge, l as _e, lt as ve, m as ye, mt as S, nt as C, o as be, ot as xe, p as w, q as Se, rt as Ce, s as we, st as Te, tt as Ee, u as De, ut as Oe, vt as ke, x as Ae, xt as je, y as Me, yt as Ne, z as Pe } from "./schemas-CwcNxjnD.js";
|
|
2
2
|
import { n as Fe, t as Ie } from "./useSafeLocalStorage-Bn4SsL8C.js";
|
|
3
|
-
import { i as Le, r as Re, t as ze } from "./createChatbotApiClient-
|
|
4
|
-
import { Q as Be, V as Ve, Z as He, at as Ue, et as We, nt as Ge, ot as Ke, st as qe } from "./Agent-
|
|
3
|
+
import { i as Le, r as Re, t as ze } from "./createChatbotApiClient-DBKfGL6y.js";
|
|
4
|
+
import { Q as Be, V as Ve, Z as He, at as Ue, et as We, nt as Ge, ot as Ke, st as qe } from "./Agent-CBAd3F7k.js";
|
|
5
5
|
import { d as Je, r as Ye } from "./message-DuibQyHy.js";
|
|
6
6
|
import { n as Xe } from "./src-nb8MU1sh.js";
|
|
7
7
|
import { computed as T, getCurrentScope as E, isReadonly as Ze, nextTick as Qe, onScopeDispose as $e, reactive as et, ref as D, shallowRef as O, toRefs as tt, toValue as nt, watch as k, watchEffect as rt } from "vue";
|
|
@@ -4454,7 +4454,7 @@ function Wa(e) {
|
|
|
4454
4454
|
} finally {
|
|
4455
4455
|
$t.value = !1;
|
|
4456
4456
|
}
|
|
4457
|
-
|
|
4457
|
+
sr([.../* @__PURE__ */ new Set([...er(), ...R.value.map((e) => e.id)])]);
|
|
4458
4458
|
}
|
|
4459
4459
|
}
|
|
4460
4460
|
async function Cn() {
|
|
@@ -4650,7 +4650,7 @@ function Wa(e) {
|
|
|
4650
4650
|
filename: e.mediaSource.name,
|
|
4651
4651
|
providerMetadata: { "8bot": { media: e.mediaSource } }
|
|
4652
4652
|
})), n = Ae.value ? ue.value : void 0;
|
|
4653
|
-
!C.value && Pn() ? e && t.length === 0 && !n && (yn(w.value, [...vn.value, e]), H.value = "") : (C.value && Ut.value.length > 0 && await
|
|
4653
|
+
!C.value && Pn() ? e && t.length === 0 && !n && (yn(w.value, [...vn.value, e]), H.value = "") : (C.value && Ut.value.length > 0 && await fr(), qn(e, t, n && { pagePointer: n }), H.value = "", ue.value = void 0, dr());
|
|
4654
4654
|
}
|
|
4655
4655
|
function J(e, t) {
|
|
4656
4656
|
let n = e.trim();
|
|
@@ -4725,10 +4725,18 @@ function Wa(e) {
|
|
|
4725
4725
|
}), er = () => [.../* @__PURE__ */ new Set([...jt.value, ...N.value])], tr = at(), nr, rr = 0, ir = 0;
|
|
4726
4726
|
function ar() {
|
|
4727
4727
|
clearTimeout(nr), nr = void 0, er().length !== 0 && tr.value === "visible" && (nr = setTimeout(() => {
|
|
4728
|
-
nr = void 0,
|
|
4728
|
+
nr = void 0, sr(er());
|
|
4729
4729
|
}, Pa));
|
|
4730
4730
|
}
|
|
4731
4731
|
async function or(e) {
|
|
4732
|
+
let t = w.value;
|
|
4733
|
+
if (u.value?.nextMessageSuggestion && !C.value && t) try {
|
|
4734
|
+
return await E.value.suggestNextMessage(o.value, t, e) ?? void 0;
|
|
4735
|
+
} catch {
|
|
4736
|
+
return;
|
|
4737
|
+
}
|
|
4738
|
+
}
|
|
4739
|
+
async function sr(e) {
|
|
4732
4740
|
let t = e.slice(0, Fa);
|
|
4733
4741
|
if (C.value || t.length === 0) {
|
|
4734
4742
|
ar();
|
|
@@ -4750,16 +4758,16 @@ function Wa(e) {
|
|
|
4750
4758
|
(u.length > 0 || c.length > 0) && (N.value = N.value.filter((e) => !u.includes(e) && !c.includes(e)), P.value = [...P.value, ...u.filter((e) => e !== w.value && !P.value.includes(e))]), l.length > 0 && q(o.value), ar();
|
|
4751
4759
|
}
|
|
4752
4760
|
k(tr, (e) => {
|
|
4753
|
-
e === "visible" ?
|
|
4761
|
+
e === "visible" ? sr(er()) : (clearTimeout(nr), nr = void 0);
|
|
4754
4762
|
}), $e(() => clearTimeout(nr));
|
|
4755
|
-
let
|
|
4763
|
+
let cr = T(() => P.value.map((e) => ({
|
|
4756
4764
|
chatId: e,
|
|
4757
4765
|
title: R.value.find((t) => t.id === e)?.title || Mt.value[e] || void 0
|
|
4758
4766
|
})));
|
|
4759
|
-
function cr(e) {
|
|
4760
|
-
Lt(e), w.value = e, Ir("chat");
|
|
4761
|
-
}
|
|
4762
4767
|
function lr(e) {
|
|
4768
|
+
Lt(e), w.value = e, Lr("chat");
|
|
4769
|
+
}
|
|
4770
|
+
function ur(e) {
|
|
4763
4771
|
P.value = P.value.filter((t) => t !== e), It(e);
|
|
4764
4772
|
}
|
|
4765
4773
|
k(() => [F.value.status, F.value.id], ([e, t], [n, r]) => {
|
|
@@ -4778,18 +4786,18 @@ function Wa(e) {
|
|
|
4778
4786
|
}), k(() => F.value.status, (e) => {
|
|
4779
4787
|
e === "ready" && W.value.length > 0 && (W.value = "");
|
|
4780
4788
|
});
|
|
4781
|
-
function
|
|
4789
|
+
function dr(e = !1) {
|
|
4782
4790
|
for (let t of U.value) (e || t.state !== "done") && URL.revokeObjectURL(t.localUrl);
|
|
4783
|
-
U.value = [],
|
|
4791
|
+
U.value = [], br.value = null;
|
|
4784
4792
|
}
|
|
4785
|
-
async function
|
|
4793
|
+
async function fr(e) {
|
|
4786
4794
|
let t = typeof e?.projectId == "string" ? e.projectId : void 0;
|
|
4787
|
-
return W.value = "", pe.value = {}, me.value = {}, w.value = Qt(), qt(w.value, { projectId: t }), await Qe(), F.value.clearError(), Pe.value = void 0, Le.value = !1,
|
|
4795
|
+
return W.value = "", pe.value = {}, me.value = {}, w.value = Qt(), qt(w.value, { projectId: t }), await Qe(), F.value.clearError(), Pe.value = void 0, Le.value = !1, dr(!0), Lr("chat"), w.value;
|
|
4788
4796
|
}
|
|
4789
|
-
async function
|
|
4797
|
+
async function Y(e) {
|
|
4790
4798
|
I.value || (F.value.status !== "ready" && (W.value = "", await Yn()), Et(), await F.value.regenerate(e));
|
|
4791
4799
|
}
|
|
4792
|
-
function
|
|
4800
|
+
function pr(e) {
|
|
4793
4801
|
if (!I.value) {
|
|
4794
4802
|
if (e.tool === "requestGeolocation") {
|
|
4795
4803
|
let t = e.output;
|
|
@@ -4803,46 +4811,46 @@ function Wa(e) {
|
|
|
4803
4811
|
F.value.addToolOutput(e);
|
|
4804
4812
|
}
|
|
4805
4813
|
}
|
|
4806
|
-
function
|
|
4814
|
+
function mr(e) {
|
|
4807
4815
|
I.value || F.value.addToolApprovalResponse(e);
|
|
4808
4816
|
}
|
|
4809
|
-
let
|
|
4810
|
-
|
|
4817
|
+
let hr = T(() => F.value.messages.reduce((e, t) => e + t.parts.filter((e) => e.type === "file").length, 0)), gr = T(() => _.value?.maxFilesPerMessage ?? 5), _r = T(() => _.value?.maxFilesPerChat ?? 20), vr = T(() => Math.max(0, Math.min(gr.value - U.value.length, _r.value - hr.value - U.value.length))), yr = T(() => vr.value <= 0), br = D(null), xr = () => {
|
|
4818
|
+
br.value = null;
|
|
4811
4819
|
};
|
|
4812
|
-
k(
|
|
4813
|
-
e || (
|
|
4820
|
+
k(yr, (e) => {
|
|
4821
|
+
e || (br.value = null);
|
|
4814
4822
|
});
|
|
4815
|
-
async function
|
|
4823
|
+
async function Sr(e) {
|
|
4816
4824
|
if (I.value) return;
|
|
4817
|
-
if (
|
|
4818
|
-
|
|
4825
|
+
if (yr.value) {
|
|
4826
|
+
br.value = _r.value - hr.value - U.value.length <= gr.value - U.value.length ? {
|
|
4819
4827
|
reason: "per-chat",
|
|
4820
|
-
max:
|
|
4828
|
+
max: _r.value
|
|
4821
4829
|
} : {
|
|
4822
4830
|
reason: "per-message",
|
|
4823
|
-
max:
|
|
4831
|
+
max: gr.value
|
|
4824
4832
|
};
|
|
4825
4833
|
return;
|
|
4826
4834
|
}
|
|
4827
|
-
let t =
|
|
4828
|
-
U.value = [...U.value, t], await
|
|
4835
|
+
let t = Tr(e);
|
|
4836
|
+
U.value = [...U.value, t], await Er(t);
|
|
4829
4837
|
}
|
|
4830
|
-
async function
|
|
4838
|
+
async function Cr(e, t) {
|
|
4831
4839
|
let n = U.value.find((t) => t.id === e.id);
|
|
4832
4840
|
if (!n) return;
|
|
4833
4841
|
URL.revokeObjectURL(n.localUrl);
|
|
4834
|
-
let r =
|
|
4835
|
-
U.value = U.value.map((e) => e.id === n.id ? r : e), await Promise.all([
|
|
4842
|
+
let r = Tr(t);
|
|
4843
|
+
U.value = U.value.map((e) => e.id === n.id ? r : e), await Promise.all([Dr(n), Er(r)]);
|
|
4836
4844
|
}
|
|
4837
|
-
async function
|
|
4845
|
+
async function wr(e) {
|
|
4838
4846
|
let t = U.value.find((t) => t.id === e.id && t.state === "error");
|
|
4839
4847
|
t && (U.value = U.value.map((e) => e.id === t.id ? {
|
|
4840
4848
|
...e,
|
|
4841
4849
|
state: "uploading",
|
|
4842
4850
|
error: void 0
|
|
4843
|
-
} : e), await
|
|
4851
|
+
} : e), await Er(t));
|
|
4844
4852
|
}
|
|
4845
|
-
function
|
|
4853
|
+
function Tr(e) {
|
|
4846
4854
|
return {
|
|
4847
4855
|
id: Qt(),
|
|
4848
4856
|
file: e,
|
|
@@ -4850,11 +4858,11 @@ function Wa(e) {
|
|
|
4850
4858
|
state: "uploading"
|
|
4851
4859
|
};
|
|
4852
4860
|
}
|
|
4853
|
-
async function
|
|
4861
|
+
async function Er({ id: e, file: t }) {
|
|
4854
4862
|
try {
|
|
4855
4863
|
let n = await E.value.uploadMedia(o.value, w.value, t);
|
|
4856
4864
|
if (!U.value.some((t) => t.id === e)) {
|
|
4857
|
-
await
|
|
4865
|
+
await Or(n);
|
|
4858
4866
|
return;
|
|
4859
4867
|
}
|
|
4860
4868
|
U.value = U.value.map((t) => t.id === e ? {
|
|
@@ -4871,15 +4879,15 @@ function Wa(e) {
|
|
|
4871
4879
|
} : t);
|
|
4872
4880
|
}
|
|
4873
4881
|
}
|
|
4874
|
-
async function Er(e) {
|
|
4875
|
-
e.mediaSource && await Dr(e.mediaSource);
|
|
4876
|
-
}
|
|
4877
4882
|
async function Dr(e) {
|
|
4883
|
+
e.mediaSource && await Or(e.mediaSource);
|
|
4884
|
+
}
|
|
4885
|
+
async function Or(e) {
|
|
4878
4886
|
try {
|
|
4879
4887
|
await E.value.discardMedia(e);
|
|
4880
4888
|
} catch {}
|
|
4881
4889
|
}
|
|
4882
|
-
async function
|
|
4890
|
+
async function kr(e, t) {
|
|
4883
4891
|
let { userQuestion: n, assistantMessage: r } = Wn(e);
|
|
4884
4892
|
Un(await E.value.submitMessageFeedback({
|
|
4885
4893
|
messageId: e.id,
|
|
@@ -4890,16 +4898,16 @@ function Wa(e) {
|
|
|
4890
4898
|
assistantMessage: r
|
|
4891
4899
|
}));
|
|
4892
4900
|
}
|
|
4893
|
-
async function kr(e) {
|
|
4894
|
-
await Or(e, "upvote");
|
|
4895
|
-
}
|
|
4896
4901
|
async function Ar(e) {
|
|
4897
|
-
await
|
|
4902
|
+
await kr(e, "upvote");
|
|
4903
|
+
}
|
|
4904
|
+
async function jr(e) {
|
|
4905
|
+
await kr(e, "downvote");
|
|
4898
4906
|
}
|
|
4899
|
-
function
|
|
4907
|
+
function Mr(e) {
|
|
4900
4908
|
ln.value = !1, un.value = void 0, V.value = e;
|
|
4901
4909
|
}
|
|
4902
|
-
async function
|
|
4910
|
+
async function Nr(e) {
|
|
4903
4911
|
if (V.value) try {
|
|
4904
4912
|
cn.value = !0, ln.value = !1, un.value = void 0;
|
|
4905
4913
|
let { userQuestion: t, assistantMessage: n } = Wn(V.value);
|
|
@@ -4917,7 +4925,7 @@ function Wa(e) {
|
|
|
4917
4925
|
cn.value = !1;
|
|
4918
4926
|
}
|
|
4919
4927
|
}
|
|
4920
|
-
async function
|
|
4928
|
+
async function Pr(e) {
|
|
4921
4929
|
try {
|
|
4922
4930
|
fn.value = !0, dn.value = !1, pn.value = void 0, await E.value.submitLead({
|
|
4923
4931
|
agentId: o.value,
|
|
@@ -4930,36 +4938,36 @@ function Wa(e) {
|
|
|
4930
4938
|
fn.value = !1;
|
|
4931
4939
|
}
|
|
4932
4940
|
}
|
|
4933
|
-
async function
|
|
4941
|
+
async function Fr(e, t) {
|
|
4934
4942
|
let n = await E.value.updateChatTitle(o.value, e, t);
|
|
4935
4943
|
R.value = R.value.map((t) => t.id === e ? {
|
|
4936
4944
|
...t,
|
|
4937
4945
|
title: n.title
|
|
4938
4946
|
} : t);
|
|
4939
4947
|
}
|
|
4940
|
-
async function
|
|
4941
|
-
await E.value.deleteChat(o.value, e), R.value = R.value.filter((t) => t.id !== e), w.value === e && await
|
|
4948
|
+
async function Ir(e) {
|
|
4949
|
+
await E.value.deleteChat(o.value, e), R.value = R.value.filter((t) => t.id !== e), w.value === e && await fr();
|
|
4942
4950
|
}
|
|
4943
|
-
function
|
|
4951
|
+
function Lr(e) {
|
|
4944
4952
|
an.value = e;
|
|
4945
4953
|
}
|
|
4946
|
-
function
|
|
4947
|
-
|
|
4954
|
+
function Rr() {
|
|
4955
|
+
Lr("chat"), on.value++;
|
|
4948
4956
|
}
|
|
4949
|
-
let
|
|
4950
|
-
function
|
|
4957
|
+
let zr;
|
|
4958
|
+
function Br(e) {
|
|
4951
4959
|
let t = () => E.value.getChat(o.value, e);
|
|
4952
4960
|
return t().catch(() => t().catch(() => null));
|
|
4953
4961
|
}
|
|
4954
4962
|
return k(l, async (e) => {
|
|
4955
|
-
if (!e || e ===
|
|
4956
|
-
let t =
|
|
4957
|
-
if (
|
|
4958
|
-
let n = w.value, r = C.value ? null : await
|
|
4963
|
+
if (!e || e === zr) return;
|
|
4964
|
+
let t = zr;
|
|
4965
|
+
if (zr = e, t === void 0) return;
|
|
4966
|
+
let n = w.value, r = C.value ? null : await Br(n);
|
|
4959
4967
|
l.value === e && w.value === n && (r ? (qt(n, {
|
|
4960
4968
|
authorId: r.userId,
|
|
4961
4969
|
projectId: r.projectId
|
|
4962
|
-
}), q(o.value)) : (R.value = [], sn.value = [], z.value = [], jt.value = [], N.value = [], P.value = [], Mt.value = {}, await
|
|
4970
|
+
}), q(o.value)) : (R.value = [], sn.value = [], z.value = [], jt.value = [], N.value = [], P.value = [], Mt.value = {}, await fr(), H.value = ""));
|
|
4963
4971
|
}), {
|
|
4964
4972
|
apiClient: E,
|
|
4965
4973
|
baseUrl: i,
|
|
@@ -4969,6 +4977,7 @@ function Wa(e) {
|
|
|
4969
4977
|
agentType: c,
|
|
4970
4978
|
userId: l,
|
|
4971
4979
|
agentInterface: u,
|
|
4980
|
+
suggestNextMessage: or,
|
|
4972
4981
|
agentModel: d,
|
|
4973
4982
|
agentTools: f,
|
|
4974
4983
|
headers: p,
|
|
@@ -5025,16 +5034,16 @@ function Wa(e) {
|
|
|
5025
5034
|
isLoadingChatFiles: B,
|
|
5026
5035
|
input: H,
|
|
5027
5036
|
pendingAttachments: U,
|
|
5028
|
-
isAttachmentLimitReached:
|
|
5029
|
-
fileLimitError:
|
|
5037
|
+
isAttachmentLimitReached: yr,
|
|
5038
|
+
fileLimitError: br,
|
|
5030
5039
|
localChatId: w,
|
|
5031
5040
|
isConversationBlocked: Le,
|
|
5032
5041
|
inputMessagePlaceholder: Wt,
|
|
5033
5042
|
chatError: Pe,
|
|
5034
5043
|
runningChatIds: $n,
|
|
5035
|
-
backgroundAnswers:
|
|
5036
|
-
openBackgroundAnswer:
|
|
5037
|
-
dismissBackgroundAnswer:
|
|
5044
|
+
backgroundAnswers: cr,
|
|
5045
|
+
openBackgroundAnswer: lr,
|
|
5046
|
+
dismissBackgroundAnswer: ur,
|
|
5038
5047
|
canQueue: G,
|
|
5039
5048
|
queuedMessages: vn,
|
|
5040
5049
|
removeQueuedMessage: Sn,
|
|
@@ -5068,28 +5077,28 @@ function Wa(e) {
|
|
|
5068
5077
|
handleSubmit: Kn,
|
|
5069
5078
|
sendMessage: Jn,
|
|
5070
5079
|
stopGeneration: Yn,
|
|
5071
|
-
startNewChat:
|
|
5072
|
-
regenerate:
|
|
5073
|
-
addToolOutput:
|
|
5074
|
-
addToolApprovalResponse:
|
|
5075
|
-
handleFileSelect:
|
|
5076
|
-
discardPendingAttachment:
|
|
5077
|
-
replacePendingAttachment:
|
|
5078
|
-
retryPendingAttachment:
|
|
5079
|
-
clearFileLimitError:
|
|
5080
|
-
clearPendingAttachments:
|
|
5081
|
-
onUpvote:
|
|
5082
|
-
onDownvote:
|
|
5083
|
-
onFeedback:
|
|
5084
|
-
onFeedbackSubmit:
|
|
5085
|
-
onLeadSubmit:
|
|
5086
|
-
navigate:
|
|
5087
|
-
focusInput:
|
|
5088
|
-
renameChatTitle:
|
|
5089
|
-
deleteChat:
|
|
5080
|
+
startNewChat: fr,
|
|
5081
|
+
regenerate: Y,
|
|
5082
|
+
addToolOutput: pr,
|
|
5083
|
+
addToolApprovalResponse: mr,
|
|
5084
|
+
handleFileSelect: Sr,
|
|
5085
|
+
discardPendingAttachment: Dr,
|
|
5086
|
+
replacePendingAttachment: Cr,
|
|
5087
|
+
retryPendingAttachment: wr,
|
|
5088
|
+
clearFileLimitError: xr,
|
|
5089
|
+
clearPendingAttachments: dr,
|
|
5090
|
+
onUpvote: Ar,
|
|
5091
|
+
onDownvote: jr,
|
|
5092
|
+
onFeedback: Mr,
|
|
5093
|
+
onFeedbackSubmit: Nr,
|
|
5094
|
+
onLeadSubmit: Pr,
|
|
5095
|
+
navigate: Lr,
|
|
5096
|
+
focusInput: Rr,
|
|
5097
|
+
renameChatTitle: Fr,
|
|
5098
|
+
deleteChat: Ir
|
|
5090
5099
|
};
|
|
5091
5100
|
})();
|
|
5092
5101
|
}
|
|
5093
5102
|
export { Qt as a, qi as i, Wa as n, wa as r, Ta as t };
|
|
5094
5103
|
|
|
5095
|
-
//# sourceMappingURL=useChatbotStore-
|
|
5104
|
+
//# sourceMappingURL=useChatbotStore-Hb5EjISl.js.map
|