@8wave/ai-elements 0.99.0-beta.1 → 0.99.0
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-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-dFuoqTPs.js → PkToolShowForm-BP8asXtz.js} +101 -79
- 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 +4087 -5205
- 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/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-BlG1WlAO.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-BrufA7o1.js → PkChatbotMessages-B3G12zah.js} +246 -246
- package/dist-vue/_chunks/{PkChatbotMessages-BrufA7o1.js.map → PkChatbotMessages-B3G12zah.js.map} +1 -1
- package/dist-vue/_chunks/PkChatbotSteps-BdU6YC_N.js +172 -0
- package/dist-vue/_chunks/{PkChatbotSteps-Dv9NkYER.js.map → PkChatbotSteps-BdU6YC_N.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewChat-CAqvbbfN.js → PkChatbotViewChat-c0Ecpzoc.js} +6 -6
- package/dist-vue/_chunks/{PkChatbotViewChat-CAqvbbfN.js.map → PkChatbotViewChat-c0Ecpzoc.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewConversations-Cq41H-tc.js → PkChatbotViewConversations-BfhRCA_1.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewConversations-Cq41H-tc.js.map → PkChatbotViewConversations-BfhRCA_1.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewFiles-DNuzmBJc.js → PkChatbotViewFiles-BipRoidH.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewFiles-DNuzmBJc.js.map → PkChatbotViewFiles-BipRoidH.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewProfile-C0BXIY2N.js → PkChatbotViewProfile-DuLwYpGZ.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewProfile-C0BXIY2N.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-CQuX08lk.js → PkToolShowForm-j7Ha-0X3.js} +109 -87
- 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-BMZltBLh.js → createChatbotApiClient-IH6wBh4s.js} +365 -381
- 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-DZiorgLW.js → useChatbotStore-C3uKi2FS.js} +3 -5
- package/dist-vue/_chunks/useChatbotStore-C3uKi2FS.js.map +1 -0
- package/dist-vue/api.js +1 -1
- package/dist-vue/composables.js +2 -2
- package/dist-vue/index.js +4430 -4221
- package/dist-vue/index.js.map +1 -1
- package/dist-vue/locales.js +27 -7
- package/dist-vue/packages/components/src/PkCheckboxField.d.ts +1 -1
- package/dist-vue/packages/components/src/PkOfflineScreen.d.ts +18 -0
- package/dist-vue/packages/components/src/PkPwaNotices.d.ts +19 -0
- package/dist-vue/packages/components/src/chat/PkAgentSettingsPanel.d.ts +9 -3
- package/dist-vue/packages/components/src/index.d.ts +3 -3
- package/dist-vue/packages/composable/src/chatbot/useChatbotStore.d.ts +36 -0
- 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 +81 -0
- package/dist-vue/packages/models/src/schema/ReasoningChat.d.ts +24 -0
- package/dist-vue/packages/models/src/schema/SubAgent.d.ts +24 -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/PkToolShowForm-dFuoqTPs.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-BlG1WlAO.js +0 -236
- package/dist-vue/_chunks/PkChatbotSteps-Dv9NkYER.js +0 -172
- package/dist-vue/_chunks/PkStreamingMarkdown-DEhbK-3c.js.map +0 -1
- package/dist-vue/_chunks/PkToolShowForm-CQuX08lk.js.map +0 -1
- package/dist-vue/_chunks/createChatbotApiClient-BMZltBLh.js.map +0 -1
- package/dist-vue/_chunks/index.es-XfWQ82pb.js.map +0 -1
- package/dist-vue/_chunks/useChatbotStore-DZiorgLW.js.map +0 -1
- package/dist-vue/packages/components/src/PkPwaInstallPrompt.d.ts +0 -4
- package/dist-vue/packages/components/src/PkPwaOfflineNotice.d.ts +0 -4
|
@@ -1,236 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./useChatbotStore-DZiorgLW.js";
|
|
2
|
-
import { t } from "./PkChatbotViewConversations-Cq41H-tc.js";
|
|
3
|
-
import { t as n } from "./PkChatbotViewChat-CAqvbbfN.js";
|
|
4
|
-
import { t as r } from "./useShortUrlResolver-DI8ycJiO.js";
|
|
5
|
-
import { t as ee } from "./PkChatbotViewFiles-DNuzmBJc.js";
|
|
6
|
-
import { t as i } from "./useLocalizedString-PfaKjIQY.js";
|
|
7
|
-
import { t as te } from "./PkStreamingMarkdown-DEhbK-3c.js";
|
|
8
|
-
import { t as ne } from "./PkAvatar-CyIgsndA.js";
|
|
9
|
-
import { h as a } from "./utils-Cru8TJxe.js";
|
|
10
|
-
import { t as o } from "./chatbotProfileContext-CgnFhNPn.js";
|
|
11
|
-
import { t as re } from "./PkChatbotViewProfile-C0BXIY2N.js";
|
|
12
|
-
import { VvAlert as ie, VvButton as ae, VvButtonGroup as oe, VvDropdown as se, VvDropdownAction as ce, VvIcon as le } from "@volverjs/ui-vue/components";
|
|
13
|
-
import { Fragment as ue, computed as s, createBlock as c, createCommentVNode as l, createElementBlock as u, createElementVNode as d, createSlots as f, createTextVNode as p, createVNode as m, defineComponent as h, guardReactiveProps as g, inject as _, mergeModels as v, mergeProps as de, normalizeClass as fe, normalizeProps as y, normalizeStyle as b, openBlock as x, renderList as S, renderSlot as C, toDisplayString as w, toRef as pe, unref as T, useModel as me, useSlots as he, watch as E, watchEffect as ge, withCtx as D } from "vue";
|
|
14
|
-
import { useI18n as _e } from "vue-i18n";
|
|
15
|
-
import { storeToRefs as ve } from "pinia";
|
|
16
|
-
//#region ../../packages/components/src/chat/PkChatbot.vue?vue&type=script&setup=true&lang.ts
|
|
17
|
-
var ye = { class: "pk-chatbot__header-start" }, be = ["title"], xe = { key: 1 }, Se = { class: "pk-chatbot__warning-body" }, O = { class: "pk-chatbot__warning-header" }, Ce = { class: "pk-chatbot__warning-title" }, k = { class: "pk-chatbot__warning-text" }, A = {
|
|
18
|
-
key: 5,
|
|
19
|
-
class: "pk-chatbot__view-auth flex-1 min-h-0 overflow-y-auto"
|
|
20
|
-
}, we = {
|
|
21
|
-
key: 7,
|
|
22
|
-
class: "pk-chatbot__footer"
|
|
23
|
-
}, j = /* @__PURE__ */ h({
|
|
24
|
-
__name: "PkChatbot",
|
|
25
|
-
props: /*@__PURE__*/ v({
|
|
26
|
-
baseUrl: {},
|
|
27
|
-
basePath: {},
|
|
28
|
-
agentId: {},
|
|
29
|
-
agentType: {},
|
|
30
|
-
userId: {},
|
|
31
|
-
name: {},
|
|
32
|
-
model: {},
|
|
33
|
-
agentModel: {},
|
|
34
|
-
agentTools: {},
|
|
35
|
-
agentInterface: {},
|
|
36
|
-
actions: {},
|
|
37
|
-
revisedAnswers: {},
|
|
38
|
-
headers: {},
|
|
39
|
-
systemTheme: {},
|
|
40
|
-
agentFileUpload: {},
|
|
41
|
-
fallbackModels: {},
|
|
42
|
-
gatewayOptions: {},
|
|
43
|
-
externalContext: {},
|
|
44
|
-
modifier: {},
|
|
45
|
-
userName: {},
|
|
46
|
-
userFilesEnabled: { type: Boolean }
|
|
47
|
-
}, {
|
|
48
|
-
chatId: {
|
|
49
|
-
type: String,
|
|
50
|
-
default: void 0
|
|
51
|
-
},
|
|
52
|
-
chatIdModifiers: {}
|
|
53
|
-
}),
|
|
54
|
-
emits: /*@__PURE__*/ v([
|
|
55
|
-
"message-update",
|
|
56
|
-
"show-info",
|
|
57
|
-
"revise",
|
|
58
|
-
"error"
|
|
59
|
-
], ["update:chatId"]),
|
|
60
|
-
setup(h, { expose: v, emit: j }) {
|
|
61
|
-
let M = he(), { t: N } = _e({ useScope: "global" }), P = h, F = j, I = me(h, "chatId"), L = e(P.agentId);
|
|
62
|
-
r((e) => L.apiClient.resolveShortUrls(e));
|
|
63
|
-
let { messages: R, chat: Te, localChatId: z, activeView: B, chatError: Ee, isDark: De } = ve(L), V = pe(L, "agentId"), { startNewChat: H, stopGeneration: U, regenerate: Oe, navigate: W, sendMessage: ke } = L, G = _(o, void 0), K = s(() => G?.canManageProfile.value ?? !1), Ae = s(() => !K.value && (G?.canSignIn?.value ?? !1) && M["view-auth"] !== void 0);
|
|
64
|
-
E(K, (e) => {
|
|
65
|
-
e && B.value === "auth" && W("chat");
|
|
66
|
-
}), ge(() => {
|
|
67
|
-
L.baseUrl = P.baseUrl, L.basePath = P.basePath, L.name = P.name, L.agentType = P.agentType, L.userId = P.userId, L.agentInterface = P.agentInterface, L.agentModel = P.agentModel, L.agentTools = P.agentTools, L.headers = P.headers, L.revisedAnswers = P.revisedAnswers, L.model = P.model, L.actionsInput = P.actions, L.agentFileUpload = P.agentFileUpload, L.fallbackModels = P.fallbackModels, L.gatewayOptions = P.gatewayOptions, L.externalContext = P.externalContext, L.systemTheme = P.systemTheme, L.hideWelcomeMessage = P.modifier === "fullscreen";
|
|
68
|
-
}), E(() => I.value, (e) => {
|
|
69
|
-
e && e !== L.localChatId && (L.localChatId = e);
|
|
70
|
-
}, { immediate: !0 }), E(z, (e) => {
|
|
71
|
-
I.value = e;
|
|
72
|
-
}), E(Ee, (e) => {
|
|
73
|
-
if (e) try {
|
|
74
|
-
let t = JSON.parse(e.message);
|
|
75
|
-
F("error", t);
|
|
76
|
-
} catch {}
|
|
77
|
-
});
|
|
78
|
-
let q = s(() => P.modifier === "fullscreen"), J = s(() => P.agentType === "reasoning"), Y = s(() => P.agentInterface?.useColorsForAgentHeader), je = s(() => ["theme", `theme--${De.value ? "dark" : "light"}`]), X = s(() => P.agentInterface?.mainColor), Z = s(() => a(P.agentInterface?.textColor, X.value)), Q = i(() => P.agentInterface?.footerMessage), $ = s(() => B.value === "conversations" ? N("label.conversations") : B.value === "profile" ? N("label.profile") : B.value === "auth" ? N("label.authentication") : B.value === "files" ? N("userFiles.chatFilesTitle") : P.name), Me = s(() => Te.value.status === "ready"), Ne = s(() => R.value?.[R.value.length - 1]);
|
|
79
|
-
return v({
|
|
80
|
-
startNewChat: H,
|
|
81
|
-
regenerate: Oe,
|
|
82
|
-
stopGeneration: U,
|
|
83
|
-
sendMessage: ke
|
|
84
|
-
}), E([V, z], async ([e, t]) => {
|
|
85
|
-
await L.initialize(e, t);
|
|
86
|
-
}, { immediate: !0 }), E(B, (e) => {
|
|
87
|
-
e === "conversations" ? L.loadConversations(V.value) : e === "files" && L.loadChatFiles();
|
|
88
|
-
}), E(Ne, (e) => {
|
|
89
|
-
e && F("message-update", e);
|
|
90
|
-
}, {
|
|
91
|
-
deep: !0,
|
|
92
|
-
immediate: !0
|
|
93
|
-
}), (e, r) => {
|
|
94
|
-
let i = ae, a = le, o = ce, s = se, _ = oe, v = ie;
|
|
95
|
-
return x(), u("div", { class: fe(["pk-chatbot", [je.value, { "pk-chatbot--fullscreen": q.value }]]) }, [
|
|
96
|
-
q.value ? l("", !0) : (x(), u("div", {
|
|
97
|
-
key: 0,
|
|
98
|
-
class: "pk-chatbot__header",
|
|
99
|
-
style: b(Y.value ? { backgroundColor: X.value } : void 0)
|
|
100
|
-
}, [d("div", ye, [T(B) === "chat" ? (x(), c(ne, {
|
|
101
|
-
key: 1,
|
|
102
|
-
modifiers: "surface ring shrink-0",
|
|
103
|
-
class: "pk-chatbot__avatar",
|
|
104
|
-
name: h.name,
|
|
105
|
-
"img-src": h.agentInterface?.logo
|
|
106
|
-
}, null, 8, ["name", "img-src"])) : (x(), u(ue, { key: 0 }, [m(i, de({
|
|
107
|
-
modifiers: Y.value ? `action-quiet-${Z.value}` : "action-quiet",
|
|
108
|
-
icon: "ri:arrow-left-s-line",
|
|
109
|
-
title: T(N)("action.goBack")
|
|
110
|
-
}, { onClick: r[0] ||= (e) => T(W)("chat") }), null, 16), m(a, {
|
|
111
|
-
name: T(B) === "conversations" ? "ri:history-line" : T(B) === "files" ? "ri:attachment-2" : "ri:user-line",
|
|
112
|
-
class: "pk-chatbot__nav-icon",
|
|
113
|
-
style: b(Y.value ? { color: Z.value } : void 0)
|
|
114
|
-
}, null, 8, ["name", "style"])], 64)), d("strong", {
|
|
115
|
-
class: "pk-chatbot__title",
|
|
116
|
-
title: $.value,
|
|
117
|
-
style: b(Y.value ? { color: Z.value } : void 0)
|
|
118
|
-
}, w($.value), 13, be)]), m(_, {
|
|
119
|
-
class: "pk-chatbot__header-end",
|
|
120
|
-
modifiers: "compact"
|
|
121
|
-
}, {
|
|
122
|
-
default: D(() => [
|
|
123
|
-
C(e.$slots, "header-actions", y(g({
|
|
124
|
-
mainColor: X.value,
|
|
125
|
-
useColorsForAgentHeader: Y.value,
|
|
126
|
-
contrastColor: Z.value,
|
|
127
|
-
startNewChat: T(H),
|
|
128
|
-
stopGeneration: T(U)
|
|
129
|
-
}))),
|
|
130
|
-
m(s, y(g({
|
|
131
|
-
placement: "bottom-end",
|
|
132
|
-
modifiers: "menu",
|
|
133
|
-
flip: !0,
|
|
134
|
-
offset: 3,
|
|
135
|
-
strategy: "fixed"
|
|
136
|
-
})), {
|
|
137
|
-
items: D(() => [
|
|
138
|
-
m(o, { onClick: r[1] ||= (e) => T(H)() }, {
|
|
139
|
-
default: D(() => [m(a, { name: "ri:edit-box-line" }), p(" " + w(T(N)("action.startNewChat")), 1)]),
|
|
140
|
-
_: 1
|
|
141
|
-
}),
|
|
142
|
-
J.value ? l("", !0) : (x(), c(o, {
|
|
143
|
-
key: 0,
|
|
144
|
-
onClick: r[2] ||= (e) => T(W)("conversations")
|
|
145
|
-
}, {
|
|
146
|
-
default: D(() => [m(a, { name: "ri:history-line" }), p(" " + w(T(N)("action.viewRecentChats")), 1)]),
|
|
147
|
-
_: 1
|
|
148
|
-
})),
|
|
149
|
-
(K.value || h.userFilesEnabled) && T(z) ? (x(), c(o, {
|
|
150
|
-
key: 1,
|
|
151
|
-
onClick: r[3] ||= (e) => T(W)("files")
|
|
152
|
-
}, {
|
|
153
|
-
default: D(() => [m(a, { name: "ri:attachment-2" }), p(" " + w(T(N)("userFiles.chatFilesTitle")), 1)]),
|
|
154
|
-
_: 1
|
|
155
|
-
})) : l("", !0),
|
|
156
|
-
K.value ? (x(), c(o, {
|
|
157
|
-
key: 2,
|
|
158
|
-
onClick: r[4] ||= (e) => T(W)("profile")
|
|
159
|
-
}, {
|
|
160
|
-
default: D(() => [m(a, { name: "ri:user-line" }), p(" " + w(T(N)("label.profile")), 1)]),
|
|
161
|
-
_: 1
|
|
162
|
-
})) : Ae.value ? (x(), c(o, {
|
|
163
|
-
key: 3,
|
|
164
|
-
onClick: r[5] ||= (e) => T(W)("auth")
|
|
165
|
-
}, {
|
|
166
|
-
default: D(() => [m(a, { name: "ri:account-circle-line" }), p(" " + w(T(N)("action.signIn")), 1)]),
|
|
167
|
-
_: 1
|
|
168
|
-
})) : l("", !0)
|
|
169
|
-
]),
|
|
170
|
-
default: D(() => [m(i, y(g({
|
|
171
|
-
modifiers: Y.value ? `action-quiet-${Z.value}` : "action-quiet",
|
|
172
|
-
icon: "ri:more-2-fill",
|
|
173
|
-
disabled: !Me.value,
|
|
174
|
-
title: T(N)("action.moreActions")
|
|
175
|
-
})), null, 16)]),
|
|
176
|
-
_: 1
|
|
177
|
-
}, 16),
|
|
178
|
-
C(e.$slots, "actions", y(g({
|
|
179
|
-
mainColor: X.value,
|
|
180
|
-
useColorsForAgentHeader: Y.value,
|
|
181
|
-
contrastColor: Z.value,
|
|
182
|
-
startNewChat: T(H),
|
|
183
|
-
stopGeneration: T(U)
|
|
184
|
-
})))
|
|
185
|
-
]),
|
|
186
|
-
_: 3
|
|
187
|
-
})], 4)),
|
|
188
|
-
J.value ? (x(), u("div", xe, [d("div", Se, [m(v, { modifiers: "callout" }, {
|
|
189
|
-
default: D(() => [d("div", O, [m(a, {
|
|
190
|
-
name: "ri:alert-line",
|
|
191
|
-
class: "pk-chatbot__warning-icon"
|
|
192
|
-
}), d("strong", Ce, w(T(N)("message.warning")), 1)]), d("p", k, w(T(N)("message.reasoningAgent")), 1)]),
|
|
193
|
-
_: 1
|
|
194
|
-
})])])) : l("", !0),
|
|
195
|
-
T(B) === "chat" ? (x(), c(n, {
|
|
196
|
-
key: 2,
|
|
197
|
-
"agent-id": h.agentId,
|
|
198
|
-
modifier: h.modifier,
|
|
199
|
-
"user-name": h.userName,
|
|
200
|
-
onShowInfo: r[6] ||= (e) => F("show-info", e),
|
|
201
|
-
onRevise: r[7] ||= (e) => F("revise", e)
|
|
202
|
-
}, f({ _: 2 }, [S(Object.keys(T(M)), (t) => ({
|
|
203
|
-
name: t,
|
|
204
|
-
fn: D((n) => [C(e.$slots, t, y(g(n)))])
|
|
205
|
-
}))]), 1032, [
|
|
206
|
-
"agent-id",
|
|
207
|
-
"modifier",
|
|
208
|
-
"user-name"
|
|
209
|
-
])) : T(B) === "conversations" ? (x(), c(t, {
|
|
210
|
-
key: 3,
|
|
211
|
-
"agent-id": h.agentId
|
|
212
|
-
}, f({ _: 2 }, [S(Object.keys(T(M)), (t) => ({
|
|
213
|
-
name: t,
|
|
214
|
-
fn: D((n) => [C(e.$slots, t, y(g(n)))])
|
|
215
|
-
}))]), 1032, ["agent-id"])) : T(B) === "files" ? (x(), c(ee, {
|
|
216
|
-
key: 4,
|
|
217
|
-
"agent-id": h.agentId
|
|
218
|
-
}, null, 8, ["agent-id"])) : T(B) === "auth" ? (x(), u("div", A, [C(e.$slots, "view-auth")])) : (x(), c(re, {
|
|
219
|
-
key: 6,
|
|
220
|
-
"agent-id": h.agentId
|
|
221
|
-
}, f({ _: 2 }, [S(Object.keys(T(M)), (t) => ({
|
|
222
|
-
name: t,
|
|
223
|
-
fn: D((n) => [C(e.$slots, t, y(g(n)))])
|
|
224
|
-
}))]), 1032, ["agent-id"])),
|
|
225
|
-
T(Q) ? (x(), u("div", we, [m(te, {
|
|
226
|
-
markdown: T(Q),
|
|
227
|
-
class: "wysiwyg"
|
|
228
|
-
}, null, 8, ["markdown"])])) : l("", !0)
|
|
229
|
-
], 2);
|
|
230
|
-
};
|
|
231
|
-
}
|
|
232
|
-
});
|
|
233
|
-
//#endregion
|
|
234
|
-
export { j as t };
|
|
235
|
-
|
|
236
|
-
//# sourceMappingURL=PkChatbot-BlG1WlAO.js.map
|
|
@@ -1,172 +0,0 @@
|
|
|
1
|
-
import { c as e, o as t } from "./message-RohfrdWS.js";
|
|
2
|
-
import { t as n } from "./PkStreamingMarkdown-DEhbK-3c.js";
|
|
3
|
-
import { a as r, c as i, g as a, i as o, l as s, r as c, s as l } from "./utils-Cru8TJxe.js";
|
|
4
|
-
import { t as u } from "./PkChatbotStepToolDetail-BVI72gyx.js";
|
|
5
|
-
import { VvIcon as d } from "@volverjs/ui-vue/components";
|
|
6
|
-
import { Fragment as f, computed as p, createBlock as m, createCommentVNode as h, createElementBlock as g, createElementVNode as _, createTextVNode as v, createVNode as y, defineComponent as b, nextTick as x, normalizeClass as S, openBlock as C, reactive as ee, ref as w, renderList as te, resolveDynamicComponent as T, toDisplayString as E, unref as D, watch as O, withCtx as k } from "vue";
|
|
7
|
-
import { useI18n as A } from "vue-i18n";
|
|
8
|
-
//#endregion
|
|
9
|
-
//#region ../../packages/components/src/chat/PkStreamingMarkdownAutoscroll.vue
|
|
10
|
-
var j = /* @__PURE__ */ b({
|
|
11
|
-
__name: "PkStreamingMarkdownAutoscroll",
|
|
12
|
-
props: {
|
|
13
|
-
markdown: {},
|
|
14
|
-
innerClass: {},
|
|
15
|
-
isDark: { type: Boolean }
|
|
16
|
-
},
|
|
17
|
-
setup(e) {
|
|
18
|
-
let t = e, r = w(), i = w(0), a = w(!1), o = () => {
|
|
19
|
-
if (!r.value) return;
|
|
20
|
-
let e = r.value.scrollTop;
|
|
21
|
-
e < i.value && i.value - e < 50 && (a.value = !0), e > i.value && e === r.value.scrollHeight - r.value.clientHeight && (a.value = !1), i.value = e;
|
|
22
|
-
};
|
|
23
|
-
return O(() => t.markdown, async () => {
|
|
24
|
-
await x(), r.value && !a.value && (r.value.scrollTop = r.value.scrollHeight);
|
|
25
|
-
}, { immediate: !0 }), (t, i) => (C(), g("div", {
|
|
26
|
-
ref_key: "scrollEl",
|
|
27
|
-
ref: r,
|
|
28
|
-
class: "overflow-auto light-scrollbar",
|
|
29
|
-
onScroll: o
|
|
30
|
-
}, [y(n, {
|
|
31
|
-
markdown: e.markdown,
|
|
32
|
-
"is-dark": e.isDark,
|
|
33
|
-
class: S(e.innerClass)
|
|
34
|
-
}, null, 8, [
|
|
35
|
-
"markdown",
|
|
36
|
-
"is-dark",
|
|
37
|
-
"class"
|
|
38
|
-
])], 544));
|
|
39
|
-
}
|
|
40
|
-
}), M = {
|
|
41
|
-
key: 0,
|
|
42
|
-
class: "pk-chatbot-steps"
|
|
43
|
-
}, N = ["aria-expanded"], ne = { class: "pk-chatbot-steps__title" }, re = { class: "pk-chatbot-steps__meta" }, ie = {
|
|
44
|
-
key: 0,
|
|
45
|
-
class: "pk-chatbot-steps__list"
|
|
46
|
-
}, ae = { class: "pk-chatbot-steps__step-label" }, P = { class: "pk-chatbot-steps__step-summary" }, F = {
|
|
47
|
-
key: 0,
|
|
48
|
-
class: "pk-chatbot-steps__step-duration"
|
|
49
|
-
}, I = {
|
|
50
|
-
key: 0,
|
|
51
|
-
class: "pk-chatbot-steps__step-body"
|
|
52
|
-
}, L = {
|
|
53
|
-
key: 2,
|
|
54
|
-
class: "pk-chatbot-steps__step-payload pk-chatbot-steps__step-payload--error"
|
|
55
|
-
}, R = { class: "pk-chatbot-steps__step-payload-label" }, z = {
|
|
56
|
-
key: 0,
|
|
57
|
-
class: "pk-chatbot-steps__step-payload"
|
|
58
|
-
}, B = { class: "pk-chatbot-steps__step-payload-label" }, V = {
|
|
59
|
-
key: 1,
|
|
60
|
-
class: "pk-chatbot-steps__step-payload"
|
|
61
|
-
}, H = { class: "pk-chatbot-steps__step-payload-label" }, U = /* @__PURE__ */ b({
|
|
62
|
-
__name: "PkChatbotSteps",
|
|
63
|
-
props: {
|
|
64
|
-
message: {},
|
|
65
|
-
isStreaming: { type: Boolean },
|
|
66
|
-
isDark: { type: Boolean }
|
|
67
|
-
},
|
|
68
|
-
setup(b) {
|
|
69
|
-
let x = b, { t: U, n: W } = A({ useScope: "global" }), G = p(() => {
|
|
70
|
-
let n = x.message.parts, r = x.message.metadata?.partTimings, a = [];
|
|
71
|
-
for (let [s, c] of n.entries()) {
|
|
72
|
-
let u = t(c), d = e(c);
|
|
73
|
-
if (!u && !d) continue;
|
|
74
|
-
let f = "toolCallId" in c ? c.toolCallId : void 0;
|
|
75
|
-
a.push({
|
|
76
|
-
key: f ?? `${c.type}-${s}`,
|
|
77
|
-
part: c,
|
|
78
|
-
icon: o(c),
|
|
79
|
-
label: l(U, c),
|
|
80
|
-
summary: i(c),
|
|
81
|
-
durationMs: f ? r?.[f] : void 0,
|
|
82
|
-
isActive: !!x.isStreaming && s === n.length - 1,
|
|
83
|
-
text: u && c.text.trim() ? c.text : void 0,
|
|
84
|
-
toolInput: d && "input" in c ? c.input : void 0,
|
|
85
|
-
toolOutput: d && "output" in c ? c.output : void 0
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
return a;
|
|
89
|
-
}), K = p(() => {
|
|
90
|
-
let { createdAt: e, completedAt: t } = x.message.metadata ?? {};
|
|
91
|
-
if (!(!e || !t)) return t - e;
|
|
92
|
-
}), q = (e) => c(W, e), J = (e) => r(e.part) === "output-error" && "errorText" in e.part && typeof e.part.errorText == "string" ? e.part.errorText : void 0, Y = (e) => e.text || J(e) ? !0 : s(e.part) ? e.toolInput !== void 0 || e.toolOutput !== void 0 : !!(a(e.toolInput) ?? a(e.toolOutput)), X = ee(/* @__PURE__ */ new Map()), Z = (e) => X.get(e.key) ?? e.isActive, oe = (e) => {
|
|
93
|
-
X.set(e.key, !Z(e));
|
|
94
|
-
}, Q = w(void 0), $ = p(() => Q.value ?? !!x.isStreaming);
|
|
95
|
-
return O(() => x.isStreaming, (e) => {
|
|
96
|
-
e && (Q.value = void 0, X.clear());
|
|
97
|
-
}), (e, t) => {
|
|
98
|
-
let r = d;
|
|
99
|
-
return G.value.length ? (C(), g("div", M, [_("button", {
|
|
100
|
-
type: "button",
|
|
101
|
-
class: "pk-chatbot-steps__header",
|
|
102
|
-
"aria-expanded": $.value,
|
|
103
|
-
onClick: t[0] ||= (e) => Q.value = !$.value
|
|
104
|
-
}, [
|
|
105
|
-
b.isStreaming ? (C(), m(r, {
|
|
106
|
-
key: 0,
|
|
107
|
-
name: "line-md:loading-loop",
|
|
108
|
-
class: "shrink-0"
|
|
109
|
-
})) : (C(), m(r, {
|
|
110
|
-
key: 1,
|
|
111
|
-
name: "ri:route-line",
|
|
112
|
-
class: "shrink-0"
|
|
113
|
-
})),
|
|
114
|
-
_("span", ne, E(D(U)("messagePart.steps")), 1),
|
|
115
|
-
_("span", re, [v(E(D(U)("messagePart.stepCount", G.value.length)) + " ", 1), q(K.value) ? (C(), g(f, { key: 0 }, [v(" · " + E(q(K.value)), 1)], 64)) : h("", !0)]),
|
|
116
|
-
y(r, {
|
|
117
|
-
name: $.value ? "ri:arrow-up-s-line" : "ri:arrow-down-s-line",
|
|
118
|
-
class: "pk-chatbot-steps__chevron shrink-0 ml-auto"
|
|
119
|
-
}, null, 8, ["name"])
|
|
120
|
-
], 8, N), $.value ? (C(), g("ol", ie, [(C(!0), g(f, null, te(G.value, (e) => (C(), g("li", {
|
|
121
|
-
key: e.key,
|
|
122
|
-
class: S(["pk-chatbot-steps__step", { "pk-chatbot-steps__step--active": e.isActive }])
|
|
123
|
-
}, [(C(), m(T(Y(e) ? "button" : "div"), {
|
|
124
|
-
type: Y(e) ? "button" : void 0,
|
|
125
|
-
class: "pk-chatbot-steps__step-header",
|
|
126
|
-
"aria-expanded": Y(e) ? Z(e) : void 0,
|
|
127
|
-
onClick: (t) => Y(e) ? oe(e) : void 0
|
|
128
|
-
}, {
|
|
129
|
-
default: k(() => [
|
|
130
|
-
_("span", { class: S(["pk-chatbot-steps-marker", { "pk-chatbot-steps-marker--active": e.isActive }]) }, [e.isActive ? (C(), m(r, {
|
|
131
|
-
key: 0,
|
|
132
|
-
name: "line-md:loading-loop"
|
|
133
|
-
})) : e.icon ? (C(), m(r, {
|
|
134
|
-
key: 1,
|
|
135
|
-
name: e.icon
|
|
136
|
-
}, null, 8, ["name"])) : h("", !0)], 2),
|
|
137
|
-
_("span", ae, E(e.label), 1),
|
|
138
|
-
_("span", P, E(e.summary), 1),
|
|
139
|
-
q(e.durationMs) ? (C(), g("span", F, E(q(e.durationMs)), 1)) : h("", !0),
|
|
140
|
-
Y(e) ? (C(), m(r, {
|
|
141
|
-
key: 1,
|
|
142
|
-
name: Z(e) ? "ri:arrow-up-s-line" : "ri:arrow-down-s-line",
|
|
143
|
-
class: "pk-chatbot-steps__chevron shrink-0 ml-auto"
|
|
144
|
-
}, null, 8, ["name"])) : h("", !0)
|
|
145
|
-
]),
|
|
146
|
-
_: 2
|
|
147
|
-
}, 1032, [
|
|
148
|
-
"type",
|
|
149
|
-
"aria-expanded",
|
|
150
|
-
"onClick"
|
|
151
|
-
])), Y(e) && Z(e) ? (C(), g("div", I, [e.text && e.isActive ? (C(), m(j, {
|
|
152
|
-
key: 0,
|
|
153
|
-
markdown: e.text,
|
|
154
|
-
"is-dark": b.isDark,
|
|
155
|
-
"inner-class": "wysiwyg",
|
|
156
|
-
class: "pk-chatbot-steps__step-content pk-chatbot-steps__step-content--scroll"
|
|
157
|
-
}, null, 8, ["markdown", "is-dark"])) : e.text ? (C(), m(n, {
|
|
158
|
-
key: 1,
|
|
159
|
-
markdown: e.text,
|
|
160
|
-
"is-dark": b.isDark,
|
|
161
|
-
class: "wysiwyg pk-chatbot-steps__step-content"
|
|
162
|
-
}, null, 8, ["markdown", "is-dark"])) : J(e) ? (C(), g("div", L, [_("span", R, E(D(U)("messagePart.stepError")), 1), _("pre", null, E(J(e)), 1)])) : D(s)(e.part) ? (C(), m(u, {
|
|
163
|
-
key: 3,
|
|
164
|
-
part: e.part
|
|
165
|
-
}, null, 8, ["part"])) : (C(), g(f, { key: 4 }, [D(a)(e.toolInput) ? (C(), g("div", z, [_("span", B, E(D(U)("messagePart.stepInput")), 1), _("pre", null, E(D(a)(e.toolInput)), 1)])) : h("", !0), D(a)(e.toolOutput) ? (C(), g("div", V, [_("span", H, E(D(U)("messagePart.stepOutput")), 1), _("pre", null, E(D(a)(e.toolOutput)), 1)])) : h("", !0)], 64))])) : h("", !0)], 2))), 128))])) : h("", !0)])) : h("", !0);
|
|
166
|
-
};
|
|
167
|
-
}
|
|
168
|
-
});
|
|
169
|
-
//#endregion
|
|
170
|
-
export { j as n, U as t };
|
|
171
|
-
|
|
172
|
-
//# sourceMappingURL=PkChatbotSteps-Dv9NkYER.js.map
|