@8wave/ai-elements 0.98.0 → 0.99.0-beta.2
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/README.md +24 -5
- package/{dist-vue/_chunks/PkStreamingMarkdown-DEhbK-3c.js → dist/_chunks/PkStreamingMarkdown-6Xx9n1ue.js} +379 -362
- package/dist/_chunks/PkStreamingMarkdown-6Xx9n1ue.js.map +1 -0
- package/dist/_chunks/{PkToolRequestGeolocation-BJ9NJZIg.js → PkToolRequestGeolocation-B73evGBg.js} +2 -2
- package/dist/_chunks/{PkToolRequestGeolocation-BJ9NJZIg.js.map → PkToolRequestGeolocation-B73evGBg.js.map} +1 -1
- package/dist/_chunks/{PkToolRequestOAuthConnection-DdvJ6n1K.js → PkToolRequestOAuthConnection-BWP5dsK_.js} +3 -3
- package/dist/_chunks/{PkToolRequestOAuthConnection-DdvJ6n1K.js.map → PkToolRequestOAuthConnection-BWP5dsK_.js.map} +1 -1
- package/dist/_chunks/{PkToolShowArtifact-BaGEr7O9.js → PkToolShowArtifact-bYYaMGxq.js} +7 -7
- package/dist/_chunks/{PkToolShowArtifact-BaGEr7O9.js.map → PkToolShowArtifact-bYYaMGxq.js.map} +1 -1
- package/dist/_chunks/{PkToolShowCalendarEvent-BYnhl2er.js → PkToolShowCalendarEvent-DdEWaTj-.js} +4 -4
- package/dist/_chunks/{PkToolShowCalendarEvent-BYnhl2er.js.map → PkToolShowCalendarEvent-DdEWaTj-.js.map} +1 -1
- package/dist/_chunks/{PkToolShowComparison-DahL5vHr.js → PkToolShowComparison-Dcar7HPW.js} +4 -4
- package/dist/_chunks/{PkToolShowComparison-DahL5vHr.js.map → PkToolShowComparison-Dcar7HPW.js.map} +1 -1
- package/dist/_chunks/{PkToolShowContactForm-upUNZtId.js → PkToolShowContactForm-DtjVW-n6.js} +13 -13
- package/dist/_chunks/{PkToolShowContactForm-upUNZtId.js.map → PkToolShowContactForm-DtjVW-n6.js.map} +1 -1
- package/dist/_chunks/{PkToolShowDiagram-Jq_4KWiK.js → PkToolShowDiagram-X35nsoIY.js} +8 -8
- package/dist/_chunks/{PkToolShowDiagram-Jq_4KWiK.js.map → PkToolShowDiagram-X35nsoIY.js.map} +1 -1
- package/dist/_chunks/{PkToolShowEmail-CtmpDS1B.js → PkToolShowEmail-jVoK8qEh.js} +4 -4
- package/dist/_chunks/{PkToolShowEmail-CtmpDS1B.js.map → PkToolShowEmail-jVoK8qEh.js.map} +1 -1
- package/dist/_chunks/{PkToolShowForm-BNV4Ja6g.js → PkToolShowForm-BP8asXtz.js} +123 -97
- package/dist/_chunks/PkToolShowForm-BP8asXtz.js.map +1 -0
- package/dist/_chunks/{PkToolShowImageGallery-mLq2p3aH.js → PkToolShowImageGallery-WQL3T4Hr.js} +2 -2
- package/dist/_chunks/{PkToolShowImageGallery-mLq2p3aH.js.map → PkToolShowImageGallery-WQL3T4Hr.js.map} +1 -1
- package/dist/_chunks/{PkToolShowLocation-SbgTbuGu.js → PkToolShowLocation-w2t7lKpb.js} +4 -4
- package/dist/_chunks/{PkToolShowLocation-SbgTbuGu.js.map → PkToolShowLocation-w2t7lKpb.js.map} +1 -1
- package/dist/_chunks/{PkToolShowMessage-CAVpDTzd.js → PkToolShowMessage-BPo7WPim.js} +4 -4
- package/dist/_chunks/{PkToolShowMessage-CAVpDTzd.js.map → PkToolShowMessage-BPo7WPim.js.map} +1 -1
- package/dist/_chunks/{PkToolShowProductList-puiPFItN.js → PkToolShowProductList-BbY4ni7Y.js} +2 -2
- package/dist/_chunks/{PkToolShowProductList-puiPFItN.js.map → PkToolShowProductList-BbY4ni7Y.js.map} +1 -1
- package/dist/_chunks/{PkToolShowQrCode-CctXvRyG.js → PkToolShowQrCode-CN0ms27N.js} +4 -4
- package/dist/_chunks/{PkToolShowQrCode-CctXvRyG.js.map → PkToolShowQrCode-CN0ms27N.js.map} +1 -1
- package/dist/_chunks/{PkToolShowSources-DwB6VXrK.js → PkToolShowSources-D2tBcx7n.js} +18 -18
- package/dist/_chunks/{PkToolShowSources-DwB6VXrK.js.map → PkToolShowSources-D2tBcx7n.js.map} +1 -1
- package/dist/_chunks/{PkToolShowSuggestedReply-QEcIhSxa.js → PkToolShowSuggestedReply-Cdh_elSh.js} +2 -2
- package/dist/_chunks/{PkToolShowSuggestedReply-QEcIhSxa.js.map → PkToolShowSuggestedReply-Cdh_elSh.js.map} +1 -1
- package/dist/_chunks/{PkToolShowVideo-DoLoI8_N.js → PkToolShowVideo-D3aU5FMO.js} +2 -2
- package/dist/_chunks/{PkToolShowVideo-DoLoI8_N.js.map → PkToolShowVideo-D3aU5FMO.js.map} +1 -1
- package/dist/_chunks/{PkToolShowWeather-C2rPCQ_K.js → PkToolShowWeather-CzanXIJp.js} +3 -3
- package/dist/_chunks/{PkToolShowWeather-C2rPCQ_K.js.map → PkToolShowWeather-CzanXIJp.js.map} +1 -1
- package/dist/_chunks/{PkToolShowWebPages-BBJYzF8V.js → PkToolShowWebPages-DkMJrWmT.js} +2 -2
- package/dist/_chunks/{PkToolShowWebPages-BBJYzF8V.js.map → PkToolShowWebPages-DkMJrWmT.js.map} +1 -1
- package/dist/_chunks/{VvCheckbox.es-D5d8k9yP.js → VvCheckbox.es-CRhIKQNR.js} +2 -2
- package/dist/_chunks/{VvCheckbox.es-D5d8k9yP.js.map → VvCheckbox.es-CRhIKQNR.js.map} +1 -1
- package/dist/_chunks/{VvCheckboxGroup.es-DVnsOjX0.js → VvCheckboxGroup.es-gOy2kM1Y.js} +5 -5
- package/dist/_chunks/{VvCheckboxGroup.es-DVnsOjX0.js.map → VvCheckboxGroup.es-gOy2kM1Y.js.map} +1 -1
- package/dist/_chunks/{VvCombobox.es-CFA-K-cQ.js → VvCombobox.es-BOwH3LmO.js} +9 -9
- package/dist/_chunks/VvCombobox.es-BOwH3LmO.js.map +1 -0
- package/dist/_chunks/{VvInputText.es-csEQ-bSG.js → VvInputText.es-D8nXroKO.js} +536 -513
- package/dist/_chunks/VvInputText.es-D8nXroKO.js.map +1 -0
- package/dist/_chunks/{VvRadio.es-BpymhC73.js → VvRadio.es-Djy5J33A.js} +2 -2
- package/dist/_chunks/{VvRadio.es-BpymhC73.js.map → VvRadio.es-Djy5J33A.js.map} +1 -1
- package/dist/_chunks/{VvRadioGroup.es-CSNzOJKx.js → VvRadioGroup.es-DQq3JYCR.js} +5 -5
- package/dist/_chunks/VvRadioGroup.es-DQq3JYCR.js.map +1 -0
- package/dist/_chunks/{VvSelect.es-CjKMd0nH.js → VvSelect.es-CE4x1ww0.js} +4 -4
- package/dist/_chunks/{VvSelect.es-CjKMd0nH.js.map → VvSelect.es-CE4x1ww0.js.map} +1 -1
- package/dist/_chunks/VvTextarea.es-BU2vqdEQ.js +1129 -0
- package/dist/_chunks/VvTextarea.es-BU2vqdEQ.js.map +1 -0
- package/dist/_chunks/{dist-BNET2z7b.js → dist-CvMCBce7.js} +39 -21
- package/dist/_chunks/dist-CvMCBce7.js.map +1 -0
- package/dist/_chunks/dot-prop-CObyt75F.js +141 -0
- package/dist/_chunks/dot-prop-CObyt75F.js.map +1 -0
- package/dist/_chunks/{floating-ui.vue-CIKvCpTA.js → floating-ui.vue-BacoFpVq.js} +278 -305
- package/dist/_chunks/floating-ui.vue-BacoFpVq.js.map +1 -0
- package/dist/_chunks/{index.es-u1dF1xg2.js → index.es-DpqfagWZ.js} +12 -12
- package/dist/_chunks/{index.es-u1dF1xg2.js.map → index.es-DpqfagWZ.js.map} +1 -1
- package/dist/_chunks/{index.es-BYny0uhz.js → index.es-_oXVRjHy.js} +2352 -2329
- package/dist/_chunks/index.es-_oXVRjHy.js.map +1 -0
- package/dist/ai-elements.es.js +4818 -5765
- package/dist/ai-elements.es.js.map +1 -1
- package/dist-vue/PkChatbot.js +1 -1
- package/dist-vue/PkChatbotAuth.js +1 -1
- package/dist-vue/PkChatbotEmptyState.js +1 -1
- package/dist-vue/PkChatbotFeedbackForm.js +1 -1
- package/dist-vue/PkChatbotInput.js +1 -1
- package/dist-vue/PkChatbotMessages.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/PkChatbot-Bf5uY3cO.js +236 -0
- package/dist-vue/_chunks/{PkChatbot-DHkhT0Jf.js.map → PkChatbot-Bf5uY3cO.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotAuth-C_L2xWuD.js → PkChatbotAuth-BGn2MDYD.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotAuth-C_L2xWuD.js.map → PkChatbotAuth-BGn2MDYD.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotEmptyState-BGOC6vxr.js → PkChatbotEmptyState-CPqLqXek.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotEmptyState-BGOC6vxr.js.map → PkChatbotEmptyState-CPqLqXek.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotFeedbackForm-BSe40qlc.js → PkChatbotFeedbackForm-C_y__RH8.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotFeedbackForm-BSe40qlc.js.map → PkChatbotFeedbackForm-C_y__RH8.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotInput-DTazYlPd.js → PkChatbotInput-jvb0vuak.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotInput-DTazYlPd.js.map → PkChatbotInput-jvb0vuak.js.map} +1 -1
- package/dist-vue/_chunks/PkChatbotMessages-B3G12zah.js +752 -0
- package/dist-vue/_chunks/PkChatbotMessages-B3G12zah.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotStepToolDetail-ldThv0t5.js → PkChatbotStepToolDetail-BVI72gyx.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotStepToolDetail-ldThv0t5.js.map → PkChatbotStepToolDetail-BVI72gyx.js.map} +1 -1
- package/dist-vue/_chunks/PkChatbotSteps-BdU6YC_N.js +172 -0
- package/dist-vue/_chunks/{PkChatbotSteps-BpqdFhsG.js.map → PkChatbotSteps-BdU6YC_N.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewChat-C08TsXiL.js → PkChatbotViewChat-c0Ecpzoc.js} +68 -68
- package/dist-vue/_chunks/PkChatbotViewChat-c0Ecpzoc.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotViewConversations-BQZi5kSC.js → PkChatbotViewConversations-BfhRCA_1.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewConversations-BQZi5kSC.js.map → PkChatbotViewConversations-BfhRCA_1.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewFiles-TLKE_tRw.js → PkChatbotViewFiles-BipRoidH.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewFiles-TLKE_tRw.js.map → PkChatbotViewFiles-BipRoidH.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewProfile-B6ANZY96.js → PkChatbotViewProfile-DuLwYpGZ.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewProfile-B6ANZY96.js.map → PkChatbotViewProfile-DuLwYpGZ.js.map} +1 -1
- package/{dist/_chunks/PkStreamingMarkdown-Djw604Ny.js → dist-vue/_chunks/PkStreamingMarkdown-CjBMQ18U.js} +344 -347
- package/dist-vue/_chunks/PkStreamingMarkdown-CjBMQ18U.js.map +1 -0
- package/dist-vue/_chunks/{PkToolShowArtifact-CTBwt4DN.js → PkToolShowArtifact-COwSXmF4.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowArtifact-CTBwt4DN.js.map → PkToolShowArtifact-COwSXmF4.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowContactForm-B6-MsExL.js → PkToolShowContactForm-DRRtCCxB.js} +10 -10
- package/dist-vue/_chunks/{PkToolShowContactForm-B6-MsExL.js.map → PkToolShowContactForm-DRRtCCxB.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowForm-C-mWyeka.js → PkToolShowForm-j7Ha-0X3.js} +128 -102
- package/dist-vue/_chunks/PkToolShowForm-j7Ha-0X3.js.map +1 -0
- package/dist-vue/_chunks/{PkToolShowSources-CFh-i60o.js → PkToolShowSources-BVLw4W5l.js} +43 -43
- package/dist-vue/_chunks/{PkToolShowSources-CFh-i60o.js.map → PkToolShowSources-BVLw4W5l.js.map} +1 -1
- package/dist-vue/_chunks/{createChatbotApiClient-BOBdBxmf.js → createChatbotApiClient-IH6wBh4s.js} +148 -160
- package/dist-vue/_chunks/createChatbotApiClient-IH6wBh4s.js.map +1 -0
- package/dist-vue/_chunks/{index.es-XfWQ82pb.js → index.es-Bk1O0p8N.js} +166 -156
- package/dist-vue/_chunks/index.es-Bk1O0p8N.js.map +1 -0
- package/dist-vue/_chunks/{useChatbotStore-BJ-EDmND.js → useChatbotStore-C3uKi2FS.js} +114 -106
- package/dist-vue/_chunks/useChatbotStore-C3uKi2FS.js.map +1 -0
- package/dist-vue/_chunks/{utils-BMa8jwJS.js → utils-Cru8TJxe.js} +48 -30
- package/dist-vue/_chunks/utils-Cru8TJxe.js.map +1 -0
- package/dist-vue/api.js +1 -1
- package/dist-vue/composables.js +3 -3
- package/dist-vue/index.js +3732 -3213
- package/dist-vue/index.js.map +1 -1
- package/dist-vue/locales.js +43 -7
- package/dist-vue/packages/components/src/PkCheckboxField.d.ts +45 -0
- package/dist-vue/packages/components/src/PkEditorRepeater.d.ts +2 -2
- package/dist-vue/packages/components/src/{chat/PkToolRequestConfirm.d.ts → PkOfflineScreen.d.ts} +10 -3
- package/dist-vue/packages/components/src/PkPwaNotices.d.ts +19 -0
- package/dist-vue/packages/components/src/chat/PkAgentSettingsPanel.d.ts +18 -3
- package/dist-vue/packages/components/src/chat/PkChatbotMessages.d.ts +24 -2
- package/dist-vue/packages/components/src/chat/PkToolApprovalBadge.d.ts +4 -0
- package/dist-vue/packages/components/src/chat/PkToolApprovalCard.d.ts +35 -0
- package/dist-vue/packages/components/src/chat/PkToolApprovalPreviewMessage.d.ts +11 -0
- package/dist-vue/packages/components/src/chat/index.d.ts +2 -1
- package/dist-vue/packages/components/src/chat/toolApprovalPreviews.d.ts +12 -0
- package/dist-vue/packages/components/src/chat/toolComponentMap.d.ts +5 -3
- package/dist-vue/packages/components/src/chat/useChatScroll.d.ts +6 -0
- package/dist-vue/packages/components/src/chat/utils.d.ts +13 -0
- package/dist-vue/packages/components/src/index.d.ts +4 -1
- package/dist-vue/packages/composable/src/chatbot/useChatbotStore.d.ts +70 -1
- package/dist-vue/packages/composable/src/index.d.ts +1 -0
- package/dist-vue/packages/composable/src/useConnectivity.d.ts +28 -0
- package/dist-vue/packages/models/src/schema/Agent.d.ts +129 -0
- package/dist-vue/packages/models/src/schema/ReasoningChat.d.ts +30 -0
- package/dist-vue/packages/models/src/schema/SubAgent.d.ts +30 -0
- package/dist-vue/style.css +1 -1
- package/package.json +3 -3
- package/dist/_chunks/PkStreamingMarkdown-Djw604Ny.js.map +0 -1
- package/dist/_chunks/PkToolRequestConfirm-FQ9nDFXy.js +0 -48
- package/dist/_chunks/PkToolRequestConfirm-FQ9nDFXy.js.map +0 -1
- package/dist/_chunks/PkToolShowForm-BNV4Ja6g.js.map +0 -1
- package/dist/_chunks/VvCombobox.es-CFA-K-cQ.js.map +0 -1
- package/dist/_chunks/VvInputText.es-csEQ-bSG.js.map +0 -1
- package/dist/_chunks/VvRadioGroup.es-CSNzOJKx.js.map +0 -1
- package/dist/_chunks/VvTextarea.es-eEyRRpuT.js +0 -1109
- package/dist/_chunks/VvTextarea.es-eEyRRpuT.js.map +0 -1
- package/dist/_chunks/dist-BNET2z7b.js.map +0 -1
- package/dist/_chunks/dot-prop-BXrC9bAX.js +0 -131
- package/dist/_chunks/dot-prop-BXrC9bAX.js.map +0 -1
- package/dist/_chunks/floating-ui.vue-CIKvCpTA.js.map +0 -1
- package/dist/_chunks/index.es-BYny0uhz.js.map +0 -1
- package/dist-vue/_chunks/PkChatbot-DHkhT0Jf.js +0 -236
- package/dist-vue/_chunks/PkChatbotMessages-B4qfTNOJ.js +0 -630
- package/dist-vue/_chunks/PkChatbotMessages-B4qfTNOJ.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotSteps-BpqdFhsG.js +0 -172
- package/dist-vue/_chunks/PkChatbotViewChat-C08TsXiL.js.map +0 -1
- package/dist-vue/_chunks/PkStreamingMarkdown-DEhbK-3c.js.map +0 -1
- package/dist-vue/_chunks/PkToolRequestConfirm-CQNa3seA.js +0 -48
- package/dist-vue/_chunks/PkToolRequestConfirm-CQNa3seA.js.map +0 -1
- package/dist-vue/_chunks/PkToolShowForm-C-mWyeka.js.map +0 -1
- package/dist-vue/_chunks/createChatbotApiClient-BOBdBxmf.js.map +0 -1
- package/dist-vue/_chunks/index.es-XfWQ82pb.js.map +0 -1
- package/dist-vue/_chunks/useChatbotStore-BJ-EDmND.js.map +0 -1
- package/dist-vue/_chunks/utils-BMa8jwJS.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { C as e, _ as t, a as n, b as r, c as i, d as a, f as o, g as s, h as c, i as l, l as u, n as d, o as f, p, r as m, v as h, w as ee, y as g } from "./schemas-DnUKIqgi.js";
|
|
2
|
-
import { t as te } from "./createChatbotApiClient-
|
|
2
|
+
import { t as te } from "./createChatbotApiClient-IH6wBh4s.js";
|
|
3
3
|
import { t as ne } from "./src-8QXYVWIx.js";
|
|
4
4
|
import { n as re } from "./message-RohfrdWS.js";
|
|
5
5
|
import { a as _, i as v, n as y, r as b, t as x } from "./ZodError-BoB_0oSl.js";
|
|
@@ -57,7 +57,7 @@ async function me(e) {
|
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
//#endregion
|
|
60
|
-
//#region ../../node_modules/.pnpm/@ai-sdk+provider@4.0.
|
|
60
|
+
//#region ../../node_modules/.pnpm/@ai-sdk+provider@4.0.4/node_modules/@ai-sdk/provider/dist/index.js
|
|
61
61
|
var he = "vercel.ai.error", ge = Symbol.for(he), _e, ve, E = class e extends (ve = Error, _e = ge, ve) {
|
|
62
62
|
constructor({ name: e, message: t, cause: n }) {
|
|
63
63
|
super(t), this[_e] = !0, this.name = e, this.cause = n;
|
|
@@ -3856,8 +3856,6 @@ async function Dr(e) {
|
|
|
3856
3856
|
return typeof e == "function" && (e = e()), Promise.resolve(e);
|
|
3857
3857
|
}
|
|
3858
3858
|
new TextDecoder();
|
|
3859
|
-
//#endregion
|
|
3860
|
-
//#region ../../node_modules/.pnpm/ai@7.0.37_zod@4.4.3/node_modules/ai/dist/index.js
|
|
3861
3859
|
var Or = Object.defineProperty, kr = (e, t) => {
|
|
3862
3860
|
for (var n in t) Or(e, n, {
|
|
3863
3861
|
get: t[n],
|
|
@@ -5602,6 +5600,12 @@ var Ci = class {
|
|
|
5602
5600
|
}
|
|
5603
5601
|
};
|
|
5604
5602
|
function Ei({ messages: e }) {
|
|
5603
|
+
let t = e[e.length - 1];
|
|
5604
|
+
if (!t || t.role !== "assistant") return !1;
|
|
5605
|
+
let n = t.parts.reduce((e, t, n) => t.type === "step-start" ? n : e, -1), r = t.parts.slice(n + 1).filter(gi);
|
|
5606
|
+
return r.filter((e) => e.state === "approval-responded").length > 0 && r.every((e) => e.state === "output-available" || e.state === "output-error" || e.state === "approval-responded");
|
|
5607
|
+
}
|
|
5608
|
+
function Di({ messages: e }) {
|
|
5605
5609
|
let t = e[e.length - 1];
|
|
5606
5610
|
if (!t || t.role !== "assistant") return !1;
|
|
5607
5611
|
let n = t.parts.reduce((e, t, n) => t.type === "step-start" ? n : e, -1), r = t.parts.slice(n + 1).filter(gi).filter((e) => !e.providerExecuted);
|
|
@@ -5609,31 +5613,31 @@ function Ei({ messages: e }) {
|
|
|
5609
5613
|
}
|
|
5610
5614
|
//#endregion
|
|
5611
5615
|
//#region ../../node_modules/.pnpm/swrv@1.2.0_vue@3.5.40_typescript@6.0.3_/node_modules/swrv/esm/lib/hash.js
|
|
5612
|
-
var
|
|
5613
|
-
function
|
|
5616
|
+
var Oi = /* @__PURE__ */ new WeakMap(), ki = 0;
|
|
5617
|
+
function Ai(e) {
|
|
5614
5618
|
if (!e.length) return "";
|
|
5615
5619
|
for (var t = "arg", n = 0; n < e.length; ++n) {
|
|
5616
5620
|
var r = void 0;
|
|
5617
|
-
e[n] === null || typeof e[n] != "object" && typeof e[n] != "function" ? r = typeof e[n] == "string" ? "\"" + e[n] + "\"" : String(e[n]) :
|
|
5621
|
+
e[n] === null || typeof e[n] != "object" && typeof e[n] != "function" ? r = typeof e[n] == "string" ? "\"" + e[n] + "\"" : String(e[n]) : Oi.has(e[n]) ? r = Oi.get(e[n]) : (r = ki, Oi.set(e[n], ki++)), t += "@" + r;
|
|
5618
5622
|
}
|
|
5619
5623
|
return t;
|
|
5620
5624
|
}
|
|
5621
5625
|
//#endregion
|
|
5622
5626
|
//#region ../../node_modules/.pnpm/swrv@1.2.0_vue@3.5.40_typescript@6.0.3_/node_modules/swrv/esm/cache/index.js
|
|
5623
|
-
function
|
|
5627
|
+
function ji(e) {
|
|
5624
5628
|
if (typeof e == "function") try {
|
|
5625
5629
|
e = e();
|
|
5626
5630
|
} catch {
|
|
5627
5631
|
e = "";
|
|
5628
5632
|
}
|
|
5629
|
-
return e = Array.isArray(e) ?
|
|
5633
|
+
return e = Array.isArray(e) ? Ai(e) : String(e || ""), e;
|
|
5630
5634
|
}
|
|
5631
|
-
var
|
|
5635
|
+
var Mi = function() {
|
|
5632
5636
|
function e(e) {
|
|
5633
5637
|
e === void 0 && (e = 0), this.items = /* @__PURE__ */ new Map(), this.ttl = e;
|
|
5634
5638
|
}
|
|
5635
5639
|
return e.prototype.serializeKey = function(e) {
|
|
5636
|
-
return
|
|
5640
|
+
return ji(e);
|
|
5637
5641
|
}, e.prototype.get = function(e) {
|
|
5638
5642
|
var t = this.serializeKey(e);
|
|
5639
5643
|
return this.items.get(t);
|
|
@@ -5655,15 +5659,15 @@ var ji = function() {
|
|
|
5655
5659
|
}();
|
|
5656
5660
|
//#endregion
|
|
5657
5661
|
//#region ../../node_modules/.pnpm/swrv@1.2.0_vue@3.5.40_typescript@6.0.3_/node_modules/swrv/esm/lib/web-preset.js
|
|
5658
|
-
function
|
|
5662
|
+
function Ni() {
|
|
5659
5663
|
return navigator.onLine === void 0 || navigator.onLine;
|
|
5660
5664
|
}
|
|
5661
|
-
function
|
|
5665
|
+
function Pi() {
|
|
5662
5666
|
return typeof document < "u" && document.visibilityState !== void 0 ? document.visibilityState !== "hidden" : !0;
|
|
5663
5667
|
}
|
|
5664
|
-
var
|
|
5665
|
-
isOnline:
|
|
5666
|
-
isDocumentVisible:
|
|
5668
|
+
var Fi = {
|
|
5669
|
+
isOnline: Ni,
|
|
5670
|
+
isDocumentVisible: Pi,
|
|
5667
5671
|
fetcher: function(e) {
|
|
5668
5672
|
return fetch(e).then(function(e) {
|
|
5669
5673
|
return e.json();
|
|
@@ -5674,7 +5678,7 @@ var Pi = {
|
|
|
5674
5678
|
for (var t, n = 1, r = arguments.length; n < r; n++) for (var i in t = arguments[n], t) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
|
|
5675
5679
|
return e;
|
|
5676
5680
|
}, $.apply(this, arguments);
|
|
5677
|
-
},
|
|
5681
|
+
}, Ii = function(e, t, n, r) {
|
|
5678
5682
|
function i(e) {
|
|
5679
5683
|
return e instanceof n ? e : new n(function(t) {
|
|
5680
5684
|
t(e);
|
|
@@ -5700,7 +5704,7 @@ var Pi = {
|
|
|
5700
5704
|
}
|
|
5701
5705
|
c((r = r.apply(e, t || [])).next());
|
|
5702
5706
|
});
|
|
5703
|
-
},
|
|
5707
|
+
}, Li = function(e, t) {
|
|
5704
5708
|
var n = {
|
|
5705
5709
|
label: 0,
|
|
5706
5710
|
sent: function() {
|
|
@@ -5773,7 +5777,7 @@ var Pi = {
|
|
|
5773
5777
|
done: !0
|
|
5774
5778
|
};
|
|
5775
5779
|
}
|
|
5776
|
-
},
|
|
5780
|
+
}, Ri = function(e, t) {
|
|
5777
5781
|
var n = typeof Symbol == "function" && e[Symbol.iterator];
|
|
5778
5782
|
if (!n) return e;
|
|
5779
5783
|
var r = n.call(e), i, a = [], o;
|
|
@@ -5789,11 +5793,11 @@ var Pi = {
|
|
|
5789
5793
|
}
|
|
5790
5794
|
}
|
|
5791
5795
|
return a;
|
|
5792
|
-
},
|
|
5796
|
+
}, zi = function(e, t, n) {
|
|
5793
5797
|
if (n || arguments.length === 2) for (var r = 0, i = t.length, a; r < i; r++) (a || !(r in t)) && (a ||= Array.prototype.slice.call(t, 0, r), a[r] = t[r]);
|
|
5794
5798
|
return e.concat(a || Array.prototype.slice.call(t));
|
|
5795
|
-
},
|
|
5796
|
-
cache:
|
|
5799
|
+
}, Bi = new Mi(), Vi = new Mi(), Hi = new Mi(), Ui = {
|
|
5800
|
+
cache: Bi,
|
|
5797
5801
|
refreshInterval: 0,
|
|
5798
5802
|
ttl: 0,
|
|
5799
5803
|
serverTTL: 1e3,
|
|
@@ -5803,15 +5807,15 @@ var Pi = {
|
|
|
5803
5807
|
shouldRetryOnError: !0,
|
|
5804
5808
|
errorRetryInterval: 5e3,
|
|
5805
5809
|
errorRetryCount: 5,
|
|
5806
|
-
fetcher:
|
|
5807
|
-
isOnline:
|
|
5808
|
-
isDocumentVisible:
|
|
5810
|
+
fetcher: Fi.fetcher,
|
|
5811
|
+
isOnline: Fi.isOnline,
|
|
5812
|
+
isDocumentVisible: Fi.isDocumentVisible
|
|
5809
5813
|
};
|
|
5810
|
-
function Ui(e, t, n) {
|
|
5811
|
-
var r = Bi.get(e);
|
|
5812
|
-
r ? r.data.push(t) : Bi.set(e, [t], n > 0 ? n + 5e3 : n);
|
|
5813
|
-
}
|
|
5814
5814
|
function Wi(e, t, n) {
|
|
5815
|
+
var r = Vi.get(e);
|
|
5816
|
+
r ? r.data.push(t) : Vi.set(e, [t], n > 0 ? n + 5e3 : n);
|
|
5817
|
+
}
|
|
5818
|
+
function Gi(e, t, n) {
|
|
5815
5819
|
if (n.isDocumentVisible() && !(n.errorRetryCount !== void 0 && t > n.errorRetryCount)) {
|
|
5816
5820
|
var r = Math.min(t || 0, n.errorRetryCount), i = r * n.errorRetryInterval;
|
|
5817
5821
|
setTimeout(function() {
|
|
@@ -5822,17 +5826,17 @@ function Wi(e, t, n) {
|
|
|
5822
5826
|
}, i);
|
|
5823
5827
|
}
|
|
5824
5828
|
}
|
|
5825
|
-
function
|
|
5829
|
+
function Ki(e) {
|
|
5826
5830
|
var t = e.shouldRetry, n = t === void 0 ? void 0 : t, r = e.error;
|
|
5827
|
-
return typeof n == "function" ? n(r) : typeof n == "boolean" ? n :
|
|
5831
|
+
return typeof n == "function" ? n(r) : typeof n == "boolean" ? n : Ui.shouldRetryOnError;
|
|
5828
5832
|
}
|
|
5829
|
-
var
|
|
5830
|
-
return n === void 0 && (n =
|
|
5833
|
+
var qi = function(e, t, n, r) {
|
|
5834
|
+
return n === void 0 && (n = Bi), r === void 0 && (r = Ui.ttl), Ii(void 0, void 0, void 0, function() {
|
|
5831
5835
|
var i, a, o, s, c, l, u;
|
|
5832
|
-
return
|
|
5836
|
+
return Li(this, function(d) {
|
|
5833
5837
|
switch (d.label) {
|
|
5834
5838
|
case 0:
|
|
5835
|
-
if (!
|
|
5839
|
+
if (!Yi(t)) return [3, 5];
|
|
5836
5840
|
d.label = 1;
|
|
5837
5841
|
case 1: return d.trys.push([
|
|
5838
5842
|
1,
|
|
@@ -5854,7 +5858,7 @@ var Ki = function(e, t, n, r) {
|
|
|
5854
5858
|
} catch (e) {
|
|
5855
5859
|
console.error("swrv(mutate): failed to set cache", e);
|
|
5856
5860
|
}
|
|
5857
|
-
return l =
|
|
5861
|
+
return l = Vi.get(e), l && l.data.length && (u = l.data.filter(function(t) {
|
|
5858
5862
|
return t.key === e;
|
|
5859
5863
|
}), u.forEach(function(e, t) {
|
|
5860
5864
|
c.data !== void 0 && (e.data = c.data), e.error = c.error, e.isValidating = c.isValidating, e.isLoading = c.isValidating, t !== u.length - 1 && delete u[t];
|
|
@@ -5863,9 +5867,9 @@ var Ki = function(e, t, n, r) {
|
|
|
5863
5867
|
});
|
|
5864
5868
|
});
|
|
5865
5869
|
};
|
|
5866
|
-
function
|
|
5870
|
+
function Ji() {
|
|
5867
5871
|
for (var e = this, t = [], n = 0; n < arguments.length; n++) t[n] = arguments[n];
|
|
5868
|
-
var r, i, a = $({},
|
|
5872
|
+
var r, i, a = $({}, Ui), o = !1, s = !1;
|
|
5869
5873
|
if (!ae()) return console.error("useSWRV must be called inside setup() or an active effectScope()."), null;
|
|
5870
5874
|
var c = typeof window > "u" || typeof document > "u";
|
|
5871
5875
|
t.length >= 1 && (r = t[0]), t.length >= 2 && (i = t[1]), t.length > 2 && (a = $($({}, a), t[2]));
|
|
@@ -5880,32 +5884,32 @@ function qi() {
|
|
|
5880
5884
|
key: null
|
|
5881
5885
|
});
|
|
5882
5886
|
var f = function(t, n) {
|
|
5883
|
-
return
|
|
5887
|
+
return Ii(e, void 0, void 0, function() {
|
|
5884
5888
|
var e, r, s, c, p, m, h, ee = this;
|
|
5885
|
-
return
|
|
5889
|
+
return Li(this, function(g) {
|
|
5886
5890
|
switch (g.label) {
|
|
5887
5891
|
case 0: return e = d.data === void 0, r = u.value, r ? (s = a.cache.get(r), c = s && s.data, d.isValidating = !0, d.isLoading = !c, c && (d.data = c.data, d.error = c.error), p = t || i, !p || !a.isDocumentVisible() && !e || n?.forceRevalidate !== void 0 && !n?.forceRevalidate || s && (m = !!(Date.now() - s.createdAt >= a.dedupingInterval || n?.forceRevalidate), !m) ? (d.isValidating = !1, d.isLoading = !1, [2]) : (h = function() {
|
|
5888
|
-
return
|
|
5892
|
+
return Ii(ee, void 0, void 0, function() {
|
|
5889
5893
|
var e, t, i, s, c, u;
|
|
5890
|
-
return
|
|
5894
|
+
return Li(this, function(m) {
|
|
5891
5895
|
switch (m.label) {
|
|
5892
|
-
case 0: return e =
|
|
5896
|
+
case 0: return e = Hi.get(r), e ? [3, 2] : (t = Array.isArray(r) ? r : [r], i = p.apply(void 0, zi([], Ri(t), !1)), Hi.set(r, i, a.dedupingInterval), [4, qi(r, i, a.cache, l)]);
|
|
5893
5897
|
case 1: return m.sent(), [3, 4];
|
|
5894
|
-
case 2: return [4,
|
|
5898
|
+
case 2: return [4, qi(r, e.data, a.cache, l)];
|
|
5895
5899
|
case 3: m.sent(), m.label = 4;
|
|
5896
|
-
case 4: return d.isValidating = !1, d.isLoading = !1,
|
|
5900
|
+
case 4: return d.isValidating = !1, d.isLoading = !1, Hi.delete(r), d.error !== void 0 && (s = Ki({
|
|
5897
5901
|
shouldRetry: a.shouldRetryOnError,
|
|
5898
5902
|
error: d.error
|
|
5899
|
-
}), c =
|
|
5903
|
+
}), c = Ki({
|
|
5900
5904
|
shouldRetry: !n || n.shouldRetryOnError,
|
|
5901
5905
|
error: d.error
|
|
5902
|
-
}), u = !o && s && c, u &&
|
|
5906
|
+
}), u = !o && s && c, u && Gi(f, n ? n.errorRetryCount : 1, a)), [2];
|
|
5903
5907
|
}
|
|
5904
5908
|
});
|
|
5905
5909
|
});
|
|
5906
5910
|
}, c && a.revalidateDebounce ? (setTimeout(function() {
|
|
5907
|
-
return
|
|
5908
|
-
return
|
|
5911
|
+
return Ii(ee, void 0, void 0, function() {
|
|
5912
|
+
return Li(this, function(e) {
|
|
5909
5913
|
switch (e.label) {
|
|
5910
5914
|
case 0: return o ? [3, 2] : [4, h()];
|
|
5911
5915
|
case 1: e.sent(), e.label = 2;
|
|
@@ -5921,16 +5925,16 @@ function qi() {
|
|
|
5921
5925
|
});
|
|
5922
5926
|
});
|
|
5923
5927
|
}, p = function() {
|
|
5924
|
-
return
|
|
5925
|
-
return
|
|
5928
|
+
return Ii(e, void 0, void 0, function() {
|
|
5929
|
+
return Li(this, function(e) {
|
|
5926
5930
|
return [2, f(null, { shouldRetryOnError: !1 })];
|
|
5927
5931
|
});
|
|
5928
5932
|
});
|
|
5929
5933
|
}, m = null;
|
|
5930
5934
|
if (!c) {
|
|
5931
5935
|
var h = function() {
|
|
5932
|
-
return
|
|
5933
|
-
return
|
|
5936
|
+
return Ii(e, void 0, void 0, function() {
|
|
5937
|
+
return Li(this, function(e) {
|
|
5934
5938
|
switch (e.label) {
|
|
5935
5939
|
case 0: return !d.error && a.isOnline() ? [4, f()] : [3, 2];
|
|
5936
5940
|
case 1: return e.sent(), [3, 3];
|
|
@@ -5944,28 +5948,28 @@ function qi() {
|
|
|
5944
5948
|
}
|
|
5945
5949
|
C(function() {
|
|
5946
5950
|
o = !0, m &&= (clearTimeout(m), null), !c && a.revalidateOnFocus && (document.removeEventListener("visibilitychange", p, !1), window.removeEventListener("focus", p, !1));
|
|
5947
|
-
var e =
|
|
5951
|
+
var e = Vi.get(u.value);
|
|
5948
5952
|
e && (e.data = e.data.filter(function(e) {
|
|
5949
5953
|
return e !== d;
|
|
5950
5954
|
}));
|
|
5951
5955
|
});
|
|
5952
5956
|
try {
|
|
5953
5957
|
le(u, function(e) {
|
|
5954
|
-
oe(u) || (u.value = e), d.key = e, d.isValidating = !!e,
|
|
5958
|
+
oe(u) || (u.value = e), d.key = e, d.isValidating = !!e, Wi(u.value, d, l), !c && !s && u.value && f(), s = !1;
|
|
5955
5959
|
}, { immediate: !0 });
|
|
5956
5960
|
} catch {}
|
|
5957
5961
|
return $($({}, ce(d)), { mutate: function(e, t) {
|
|
5958
5962
|
return f(e, $($({}, t), { forceRevalidate: !0 }));
|
|
5959
5963
|
} });
|
|
5960
5964
|
}
|
|
5961
|
-
function
|
|
5965
|
+
function Yi(e) {
|
|
5962
5966
|
return typeof e == "object" && !!e && typeof e.then == "function";
|
|
5963
5967
|
}
|
|
5964
5968
|
//#endregion
|
|
5965
5969
|
//#region ../../node_modules/.pnpm/swrv@1.2.0_vue@3.5.40_typescript@6.0.3_/node_modules/swrv/esm/index.js
|
|
5966
|
-
var
|
|
5967
|
-
|
|
5968
|
-
var
|
|
5970
|
+
var Xi = Ji;
|
|
5971
|
+
Xi.default, Xi.default;
|
|
5972
|
+
var Zi = class {
|
|
5969
5973
|
constructor(e) {
|
|
5970
5974
|
this.statusRef = w("ready"), this.errorRef = w(void 0), this.pushMessage = (e) => {
|
|
5971
5975
|
this.messagesRef.value = [...this.messagesRef.value, e];
|
|
@@ -5993,17 +5997,17 @@ var Xi = class {
|
|
|
5993
5997
|
set error(e) {
|
|
5994
5998
|
this.errorRef.value = e;
|
|
5995
5999
|
}
|
|
5996
|
-
},
|
|
6000
|
+
}, Qi = class extends Ti {
|
|
5997
6001
|
constructor({ messages: e, ...t }) {
|
|
5998
6002
|
super({
|
|
5999
6003
|
...t,
|
|
6000
|
-
state: new
|
|
6004
|
+
state: new Zi(e)
|
|
6001
6005
|
});
|
|
6002
6006
|
}
|
|
6003
6007
|
};
|
|
6004
6008
|
//#endregion
|
|
6005
6009
|
//#region ../../packages/composable/src/chatbot/useChatbotStore.ts
|
|
6006
|
-
function
|
|
6010
|
+
function $i(e) {
|
|
6007
6011
|
return T(`chatbot-${e}`, () => {
|
|
6008
6012
|
let { t, te: n, locale: r } = de({ useScope: "global" }), i = w(""), a = w(), o = w(e), s = w(), c = w(), l = w(), u = w(), d = w(), f = w(), p = w(), m = w(), h = w(), ee = w(), g = w(), _ = w(), v = w(), y = w(), b = w(), x = w(!1), ae = fe(), oe = S(() => {
|
|
6009
6013
|
let e = u.value?.theme;
|
|
@@ -6042,7 +6046,7 @@ function Qi(e) {
|
|
|
6042
6046
|
baseUrl: i.value,
|
|
6043
6047
|
basePath: a.value,
|
|
6044
6048
|
headers: () => p.value
|
|
6045
|
-
})), ye = w(null), O = S(() => new
|
|
6049
|
+
})), ye = w(null), O = S(() => new Qi({
|
|
6046
6050
|
id: T.value,
|
|
6047
6051
|
transport: new wi({
|
|
6048
6052
|
api: D.value.getChatEndpoint(o.value, C.value ? "reasoning" : "chat"),
|
|
@@ -6075,7 +6079,7 @@ function Qi(e) {
|
|
|
6075
6079
|
onToolCall: ({ toolCall: e }) => {
|
|
6076
6080
|
ne.log("Tool call:", e);
|
|
6077
6081
|
},
|
|
6078
|
-
sendAutomaticallyWhen: Ei,
|
|
6082
|
+
sendAutomaticallyWhen: (e) => Di(e) || Ei(e),
|
|
6079
6083
|
onError: E,
|
|
6080
6084
|
onFinish: () => {
|
|
6081
6085
|
let e = T.value;
|
|
@@ -6221,10 +6225,10 @@ function Qi(e) {
|
|
|
6221
6225
|
});
|
|
6222
6226
|
function He(e = !1) {
|
|
6223
6227
|
for (let t of N.value) (e || t.state !== "done") && URL.revokeObjectURL(t.localUrl);
|
|
6224
|
-
N.value = [],
|
|
6228
|
+
N.value = [], Qe.value = null;
|
|
6225
6229
|
}
|
|
6226
6230
|
async function Ue() {
|
|
6227
|
-
return P.value = "", await Ve(), T.value = sn(), O.value.clearError(), he.value = void 0, ge.value = !1, He(!0),
|
|
6231
|
+
return P.value = "", await Ve(), T.value = sn(), O.value.clearError(), he.value = void 0, ge.value = !1, He(!0), lt("chat"), T.value;
|
|
6228
6232
|
}
|
|
6229
6233
|
async function We(e) {
|
|
6230
6234
|
O.value.status !== "ready" && (P.value = "", await Ve()), await O.value.regenerate(e);
|
|
@@ -6241,20 +6245,23 @@ function Qi(e) {
|
|
|
6241
6245
|
}
|
|
6242
6246
|
O.value.addToolOutput(e);
|
|
6243
6247
|
}
|
|
6244
|
-
|
|
6245
|
-
|
|
6248
|
+
function Ke(e) {
|
|
6249
|
+
O.value.addToolApprovalResponse(e);
|
|
6250
|
+
}
|
|
6251
|
+
let qe = S(() => O.value.messages.reduce((e, t) => e + t.parts.filter((e) => e.type === "file").length, 0)), Je = S(() => g.value?.maxFilesPerMessage ?? 5), Ye = S(() => g.value?.maxFilesPerChat ?? 20), Xe = S(() => Math.max(0, Math.min(Je.value - N.value.length, Ye.value - qe.value - N.value.length))), Ze = S(() => Xe.value <= 0), Qe = w(null), $e = () => {
|
|
6252
|
+
Qe.value = null;
|
|
6246
6253
|
};
|
|
6247
|
-
le(
|
|
6248
|
-
e || (
|
|
6254
|
+
le(Ze, (e) => {
|
|
6255
|
+
e || (Qe.value = null);
|
|
6249
6256
|
});
|
|
6250
|
-
async function
|
|
6251
|
-
if (
|
|
6252
|
-
|
|
6257
|
+
async function et(e) {
|
|
6258
|
+
if (Ze.value) {
|
|
6259
|
+
Qe.value = Ye.value - qe.value - N.value.length <= Je.value - N.value.length ? {
|
|
6253
6260
|
reason: "per-chat",
|
|
6254
|
-
max:
|
|
6261
|
+
max: Ye.value
|
|
6255
6262
|
} : {
|
|
6256
6263
|
reason: "per-message",
|
|
6257
|
-
max:
|
|
6264
|
+
max: Je.value
|
|
6258
6265
|
};
|
|
6259
6266
|
return;
|
|
6260
6267
|
}
|
|
@@ -6281,7 +6288,7 @@ function Qi(e) {
|
|
|
6281
6288
|
} : e);
|
|
6282
6289
|
}
|
|
6283
6290
|
}
|
|
6284
|
-
async function
|
|
6291
|
+
async function tt(e, t) {
|
|
6285
6292
|
let { userQuestion: n, assistantMessage: r } = z(e);
|
|
6286
6293
|
R(await D.value.submitMessageFeedback({
|
|
6287
6294
|
messageId: e.id,
|
|
@@ -6292,16 +6299,16 @@ function Qi(e) {
|
|
|
6292
6299
|
assistantMessage: r
|
|
6293
6300
|
}));
|
|
6294
6301
|
}
|
|
6295
|
-
async function tt(e) {
|
|
6296
|
-
await et(e, "upvote");
|
|
6297
|
-
}
|
|
6298
6302
|
async function nt(e) {
|
|
6299
|
-
await
|
|
6303
|
+
await tt(e, "upvote");
|
|
6304
|
+
}
|
|
6305
|
+
async function rt(e) {
|
|
6306
|
+
await tt(e, "downvote");
|
|
6300
6307
|
}
|
|
6301
|
-
function
|
|
6308
|
+
function it(e) {
|
|
6302
6309
|
Ae.value = !1, je.value = void 0, Oe.value = e;
|
|
6303
6310
|
}
|
|
6304
|
-
async function
|
|
6311
|
+
async function at(e) {
|
|
6305
6312
|
if (Oe.value) try {
|
|
6306
6313
|
ke.value = !0, Ae.value = !1, je.value = void 0;
|
|
6307
6314
|
let { userQuestion: t, assistantMessage: n } = z(Oe.value);
|
|
@@ -6319,7 +6326,7 @@ function Qi(e) {
|
|
|
6319
6326
|
ke.value = !1;
|
|
6320
6327
|
}
|
|
6321
6328
|
}
|
|
6322
|
-
async function
|
|
6329
|
+
async function ot(e) {
|
|
6323
6330
|
try {
|
|
6324
6331
|
Me.value = !0, M.value = !1, Ne.value = void 0, await D.value.submitLead({
|
|
6325
6332
|
agentId: o.value,
|
|
@@ -6332,29 +6339,29 @@ function Qi(e) {
|
|
|
6332
6339
|
Me.value = !1;
|
|
6333
6340
|
}
|
|
6334
6341
|
}
|
|
6335
|
-
async function
|
|
6342
|
+
async function st(e, t) {
|
|
6336
6343
|
let n = await D.value.updateChatTitle(o.value, e, t);
|
|
6337
6344
|
k.value = k.value.map((t) => t.id === e ? {
|
|
6338
6345
|
...t,
|
|
6339
6346
|
title: n.title
|
|
6340
6347
|
} : t);
|
|
6341
6348
|
}
|
|
6342
|
-
async function
|
|
6349
|
+
async function ct(e) {
|
|
6343
6350
|
await D.value.deleteChat(o.value, e), k.value = k.value.filter((t) => t.id !== e), T.value === e && await Ue();
|
|
6344
6351
|
}
|
|
6345
|
-
function
|
|
6352
|
+
function lt(e) {
|
|
6346
6353
|
De.value = e;
|
|
6347
6354
|
}
|
|
6348
|
-
let
|
|
6349
|
-
function
|
|
6355
|
+
let ut;
|
|
6356
|
+
function dt(e) {
|
|
6350
6357
|
let t = () => D.value.getChat(o.value, e).then((e) => e !== null);
|
|
6351
6358
|
return t().catch(() => t().catch(() => !1));
|
|
6352
6359
|
}
|
|
6353
6360
|
return le(l, async (e) => {
|
|
6354
|
-
if (!e || e ===
|
|
6355
|
-
let t =
|
|
6356
|
-
if (
|
|
6357
|
-
let n = T.value, r = !C.value && await
|
|
6361
|
+
if (!e || e === ut) return;
|
|
6362
|
+
let t = ut;
|
|
6363
|
+
if (ut = e, t === void 0) return;
|
|
6364
|
+
let n = T.value, r = !C.value && await dt(n);
|
|
6358
6365
|
if (!(l.value !== e || T.value !== n)) {
|
|
6359
6366
|
if (r) {
|
|
6360
6367
|
I(o.value);
|
|
@@ -6393,8 +6400,8 @@ function Qi(e) {
|
|
|
6393
6400
|
isLoadingChatFiles: Ee,
|
|
6394
6401
|
input: Pe,
|
|
6395
6402
|
pendingAttachments: N,
|
|
6396
|
-
isAttachmentLimitReached:
|
|
6397
|
-
fileLimitError:
|
|
6403
|
+
isAttachmentLimitReached: Ze,
|
|
6404
|
+
fileLimitError: Qe,
|
|
6398
6405
|
localChatId: T,
|
|
6399
6406
|
isConversationBlocked: ge,
|
|
6400
6407
|
inputMessagePlaceholder: we,
|
|
@@ -6420,21 +6427,22 @@ function Qi(e) {
|
|
|
6420
6427
|
startNewChat: Ue,
|
|
6421
6428
|
regenerate: We,
|
|
6422
6429
|
addToolOutput: Ge,
|
|
6423
|
-
|
|
6424
|
-
|
|
6430
|
+
addToolApprovalResponse: Ke,
|
|
6431
|
+
handleFileSelect: et,
|
|
6432
|
+
clearFileLimitError: $e,
|
|
6425
6433
|
clearPendingAttachments: He,
|
|
6426
|
-
onUpvote:
|
|
6427
|
-
onDownvote:
|
|
6428
|
-
onFeedback:
|
|
6429
|
-
onFeedbackSubmit:
|
|
6430
|
-
onLeadSubmit:
|
|
6431
|
-
navigate:
|
|
6432
|
-
renameChatTitle:
|
|
6433
|
-
deleteChat:
|
|
6434
|
+
onUpvote: nt,
|
|
6435
|
+
onDownvote: rt,
|
|
6436
|
+
onFeedback: it,
|
|
6437
|
+
onFeedbackSubmit: at,
|
|
6438
|
+
onLeadSubmit: ot,
|
|
6439
|
+
navigate: lt,
|
|
6440
|
+
renameChatTitle: st,
|
|
6441
|
+
deleteChat: ct
|
|
6434
6442
|
};
|
|
6435
6443
|
})();
|
|
6436
6444
|
}
|
|
6437
6445
|
//#endregion
|
|
6438
|
-
export { sn as i,
|
|
6446
|
+
export { sn as i, Qi as n, wi as r, $i as t };
|
|
6439
6447
|
|
|
6440
|
-
//# sourceMappingURL=useChatbotStore-
|
|
6448
|
+
//# sourceMappingURL=useChatbotStore-C3uKi2FS.js.map
|