@8wave/ai-elements 0.115.0-beta.34 → 0.115.0-beta.52
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 +1 -0
- package/dist/_chunks/{Agent-Cu04vBnd.js → Agent-CJbRpoZG.js} +133 -122
- package/dist/_chunks/Agent-CJbRpoZG.js.map +1 -0
- package/dist/_chunks/PkChatbotFilePreview-DcqwX9nI.js +256 -0
- package/dist/_chunks/PkChatbotFilePreview-DcqwX9nI.js.map +1 -0
- package/dist/_chunks/PkHeldImage-BtaPh0Jr.js +42 -0
- package/dist/_chunks/PkHeldImage-BtaPh0Jr.js.map +1 -0
- package/dist/_chunks/{PkStreamingMarkdown-Qk9Tk_N7.js → PkStreamingMarkdown-B_qmgO9_.js} +801 -745
- package/dist/_chunks/PkStreamingMarkdown-B_qmgO9_.js.map +1 -0
- package/dist/_chunks/PkToolEditSpreadsheet-BSxYLcys.js +41 -0
- package/dist/_chunks/PkToolEditSpreadsheet-BSxYLcys.js.map +1 -0
- package/dist/_chunks/{PkToolRequestGeolocation-BoKYkQ-Z.js → PkToolRequestGeolocation-YW0ilIxN.js} +2 -2
- package/dist/_chunks/{PkToolRequestGeolocation-BoKYkQ-Z.js.map → PkToolRequestGeolocation-YW0ilIxN.js.map} +1 -1
- package/dist/_chunks/{PkToolRequestOAuthConnection-CDzpfBg6.js → PkToolRequestOAuthConnection-Cx4aFL5g.js} +2 -2
- package/dist/_chunks/{PkToolRequestOAuthConnection-CDzpfBg6.js.map → PkToolRequestOAuthConnection-Cx4aFL5g.js.map} +1 -1
- package/dist/_chunks/{PkToolShowArtifact-DB8JjN-b.js → PkToolShowArtifact-Bgj02cPe.js} +2 -2
- package/dist/_chunks/{PkToolShowArtifact-DB8JjN-b.js.map → PkToolShowArtifact-Bgj02cPe.js.map} +1 -1
- package/dist/_chunks/{PkToolShowContactForm-DHviNxDk.js → PkToolShowContactForm-Die8UpNv.js} +2 -2
- package/dist/_chunks/{PkToolShowContactForm-DHviNxDk.js.map → PkToolShowContactForm-Die8UpNv.js.map} +1 -1
- package/dist/_chunks/{PkToolShowForm-B-R9fh3R.js → PkToolShowForm-Dmq95u6b.js} +5 -5
- package/dist/_chunks/{PkToolShowForm-B-R9fh3R.js.map → PkToolShowForm-Dmq95u6b.js.map} +1 -1
- package/dist/_chunks/PkToolShowImageGallery-CKuyTxih.js +88 -0
- package/dist/_chunks/PkToolShowImageGallery-CKuyTxih.js.map +1 -0
- package/dist/_chunks/PkToolShowProductList-DjS9nvXe.js +72 -0
- package/dist/_chunks/PkToolShowProductList-DjS9nvXe.js.map +1 -0
- package/dist/_chunks/{PkToolShowSources-CfZEfleZ.js → PkToolShowSources-MJRFeqMA.js} +3 -3
- package/dist/_chunks/{PkToolShowSources-CfZEfleZ.js.map → PkToolShowSources-MJRFeqMA.js.map} +1 -1
- package/dist/_chunks/{PkToolShowSuggestedReply-DsB35hRR.js → PkToolShowSuggestedReply-DPVS3C74.js} +2 -2
- package/dist/_chunks/{PkToolShowSuggestedReply-DsB35hRR.js.map → PkToolShowSuggestedReply-DPVS3C74.js.map} +1 -1
- package/dist/_chunks/PkToolShowVideo-DnvvRE7H.js +142 -0
- package/dist/_chunks/PkToolShowVideo-DnvvRE7H.js.map +1 -0
- package/dist/_chunks/{PkToolShowWebPages-BOxbTe2X.js → PkToolShowWebPages-CYbiGa7e.js} +31 -24
- package/dist/_chunks/PkToolShowWebPages-CYbiGa7e.js.map +1 -0
- package/dist/_chunks/chatImagePolicy-C5eH4Cpq.js +46 -0
- package/dist/_chunks/chatImagePolicy-C5eH4Cpq.js.map +1 -0
- package/dist/_chunks/{markdown-_p-gd9w8.js → markdown-qIVVfGoX.js} +146 -73
- package/dist/_chunks/markdown-qIVVfGoX.js.map +1 -0
- package/dist/ai-elements.es.js +2975 -3134
- 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/PkChatbotFilePreview.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-KbZm8GvA.js → Agent---jwXeaB.js} +57 -46
- package/dist-vue/_chunks/Agent---jwXeaB.js.map +1 -0
- package/dist-vue/_chunks/{Document-DCSWwcRE.js → Document-DmBTgjd4.js} +150 -77
- package/dist-vue/_chunks/Document-DmBTgjd4.js.map +1 -0
- package/dist-vue/_chunks/PkChatbot-W9tO1H9i.js +275 -0
- package/dist-vue/_chunks/PkChatbot-W9tO1H9i.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotEmptyState-CO7-vlsZ.js → PkChatbotEmptyState-BY3f3T0T.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotEmptyState-CO7-vlsZ.js.map → PkChatbotEmptyState-BY3f3T0T.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotFilePreview-CwiVQDF2.js → PkChatbotFilePreview-Dq9JBX9U.js} +5 -3
- package/dist-vue/_chunks/PkChatbotFilePreview-Dq9JBX9U.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotInput-D8ykcHKJ.js → PkChatbotInput-C5l6QDQY.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotInput-D8ykcHKJ.js.map → PkChatbotInput-C5l6QDQY.js.map} +1 -1
- package/dist-vue/_chunks/PkChatbotMessages-3RZER9PO.js +769 -0
- package/dist-vue/_chunks/PkChatbotMessages-3RZER9PO.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotStepPayload-CSVHe7DP.js → PkChatbotStepPayload-C-xnhmzZ.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotStepPayload-CSVHe7DP.js.map → PkChatbotStepPayload-C-xnhmzZ.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotStepToolDetail-ixte-rGB.js → PkChatbotStepToolDetail-Cko1vU0N.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotStepToolDetail-ixte-rGB.js.map → PkChatbotStepToolDetail-Cko1vU0N.js.map} +1 -1
- package/dist-vue/_chunks/PkChatbotSteps-BkZ3Kq2M.js +191 -0
- package/dist-vue/_chunks/{PkChatbotSteps-Y6kQ00ui.js.map → PkChatbotSteps-BkZ3Kq2M.js.map} +1 -1
- package/dist-vue/_chunks/PkChatbotViewChat-BFImSy1X.js +789 -0
- package/dist-vue/_chunks/PkChatbotViewChat-BFImSy1X.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotViewConversations-dpwDFyr_.js → PkChatbotViewConversations-C6T4ZxxX.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewConversations-dpwDFyr_.js.map → PkChatbotViewConversations-C6T4ZxxX.js.map} +1 -1
- package/dist-vue/_chunks/PkChatbotViewFiles-CMQdbZN6.js +125 -0
- package/dist-vue/_chunks/PkChatbotViewFiles-CMQdbZN6.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotViewProfile-Brylm3We.js → PkChatbotViewProfile-CDCy1LEX.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewProfile-Brylm3We.js.map → PkChatbotViewProfile-CDCy1LEX.js.map} +1 -1
- package/dist-vue/_chunks/PkHeldImage-BqnlurT_.js +41 -0
- package/dist-vue/_chunks/PkHeldImage-BqnlurT_.js.map +1 -0
- package/dist-vue/_chunks/{PkStreamingMarkdown-CJlfq7ub.js → PkStreamingMarkdown-DJG-aPx2.js} +792 -780
- package/dist-vue/_chunks/PkStreamingMarkdown-DJG-aPx2.js.map +1 -0
- package/dist-vue/_chunks/{PkSvgViewer-D-0M5bqg.js → PkSvgViewer-D1y8hZRW.js} +2 -2
- package/dist-vue/_chunks/{PkSvgViewer-D-0M5bqg.js.map → PkSvgViewer-D1y8hZRW.js.map} +1 -1
- package/dist-vue/_chunks/PkToolEditSpreadsheet-BHh7NUdR.js +40 -0
- package/dist-vue/_chunks/PkToolEditSpreadsheet-BHh7NUdR.js.map +1 -0
- package/dist-vue/_chunks/{PkToolRequestGeolocation-C8sLjD6g.js → PkToolRequestGeolocation-Ccbhljmn.js} +2 -2
- package/dist-vue/_chunks/{PkToolRequestGeolocation-C8sLjD6g.js.map → PkToolRequestGeolocation-Ccbhljmn.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolRequestOAuthConnection-rbjNi_l0.js → PkToolRequestOAuthConnection-BXf5ZRzR.js} +2 -2
- package/dist-vue/_chunks/{PkToolRequestOAuthConnection-rbjNi_l0.js.map → PkToolRequestOAuthConnection-BXf5ZRzR.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowArtifact-hBmAAfsd.js → PkToolShowArtifact-BsfbvfVC.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowArtifact-hBmAAfsd.js.map → PkToolShowArtifact-BsfbvfVC.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowContactForm-BHsm_W2R.js → PkToolShowContactForm-C-YbtBlG.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowContactForm-BHsm_W2R.js.map → PkToolShowContactForm-C-YbtBlG.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowDiagram-De2XvRnq.js → PkToolShowDiagram-CIHVrQ3e.js} +3 -3
- package/dist-vue/_chunks/{PkToolShowDiagram-De2XvRnq.js.map → PkToolShowDiagram-CIHVrQ3e.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowEmail-D1mXZrT-.js → PkToolShowEmail-C591LR5N.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowEmail-D1mXZrT-.js.map → PkToolShowEmail-C591LR5N.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowForm-Ce_GpcBt.js → PkToolShowForm-BwYJhEVO.js} +6 -6
- package/dist-vue/_chunks/{PkToolShowForm-Ce_GpcBt.js.map → PkToolShowForm-BwYJhEVO.js.map} +1 -1
- package/dist-vue/_chunks/PkToolShowImageGallery-1A9zyOVn.js +88 -0
- package/dist-vue/_chunks/PkToolShowImageGallery-1A9zyOVn.js.map +1 -0
- package/dist-vue/_chunks/{PkToolShowMessage-lNPZxw2v.js → PkToolShowMessage-CbXERPHI.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowMessage-lNPZxw2v.js.map → PkToolShowMessage-CbXERPHI.js.map} +1 -1
- package/dist-vue/_chunks/PkToolShowProductList-D61i6AMs.js +72 -0
- package/dist-vue/_chunks/PkToolShowProductList-D61i6AMs.js.map +1 -0
- package/dist-vue/_chunks/{PkToolShowSources-B1Nhrk7O.js → PkToolShowSources-BQpdJE_m.js} +4 -4
- package/dist-vue/_chunks/{PkToolShowSources-B1Nhrk7O.js.map → PkToolShowSources-BQpdJE_m.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowSuggestedReply-Bmzygdww.js → PkToolShowSuggestedReply-D3jLsbKJ.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowSuggestedReply-Bmzygdww.js.map → PkToolShowSuggestedReply-D3jLsbKJ.js.map} +1 -1
- package/dist-vue/_chunks/PkToolShowVideo-DUdkb3qb.js +141 -0
- package/dist-vue/_chunks/PkToolShowVideo-DUdkb3qb.js.map +1 -0
- package/dist-vue/_chunks/PkToolShowWebPages-BeeBiv9R.js +86 -0
- package/dist-vue/_chunks/PkToolShowWebPages-BeeBiv9R.js.map +1 -0
- package/dist-vue/_chunks/{PkUrl-E12f7rn_.js → PkUrl-CN1kkZiH.js} +2 -2
- package/dist-vue/_chunks/{PkUrl-E12f7rn_.js.map → PkUrl-CN1kkZiH.js.map} +1 -1
- package/dist-vue/_chunks/{createChatbotApiClient-B_mkyrEl.js → createChatbotApiClient-CDrs7NwO.js} +13 -9
- package/dist-vue/_chunks/{createChatbotApiClient-B_mkyrEl.js.map → createChatbotApiClient-CDrs7NwO.js.map} +1 -1
- package/dist-vue/_chunks/{useChatbotStore-DEELIJ89.js → useChatbotStore-D6YNk8Rx.js} +6 -4
- package/dist-vue/_chunks/useChatbotStore-D6YNk8Rx.js.map +1 -0
- package/dist-vue/_chunks/useShortUrlResolver-DI8ycJiO.js +71 -0
- package/dist-vue/_chunks/useShortUrlResolver-DI8ycJiO.js.map +1 -0
- package/dist-vue/_chunks/utils-roi6YVNC.js +199 -0
- package/dist-vue/_chunks/utils-roi6YVNC.js.map +1 -0
- 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 +73 -13
- package/dist-vue/composables.js.map +1 -1
- package/dist-vue/index.js +3614 -3559
- package/dist-vue/index.js.map +1 -1
- package/dist-vue/locales.js +26 -14
- package/dist-vue/packages/components/src/chat/PkAgentSettingsPanel.d.ts +6 -2
- package/dist-vue/packages/components/src/chat/PkChatbotFilePreview.d.ts +5 -0
- package/dist-vue/packages/components/src/chat/PkHeldImage.d.ts +21 -0
- package/dist-vue/packages/components/src/chat/PkToolEditSpreadsheet.d.ts +14 -0
- package/dist-vue/packages/components/src/chat/chatImagePolicy.d.ts +55 -0
- package/dist-vue/packages/components/src/chat/index.d.ts +1 -0
- package/dist-vue/packages/components/src/chat/markdownHtml.d.ts +17 -1
- package/dist-vue/packages/components/src/chat/utils.d.ts +8 -0
- package/dist-vue/packages/composable/src/chatbot/api/createChatbotApiClient.d.ts +7 -1
- package/dist-vue/packages/composable/src/chatbot/useChatbotStore.d.ts +18 -0
- package/dist-vue/packages/composable/src/useFileRow.d.ts +21 -0
- package/dist-vue/packages/models/src/schema/Agent.d.ts +28 -0
- package/dist-vue/packages/models/src/schema/Document.d.ts +173 -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/Tabular.d.ts +181 -0
- package/dist-vue/packages/models/src/schema/index.d.ts +1 -0
- package/dist-vue/style.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/Agent-Cu04vBnd.js.map +0 -1
- package/dist/_chunks/PkStreamingMarkdown-Qk9Tk_N7.js.map +0 -1
- package/dist/_chunks/PkToolShowImageGallery-FubPWFCb.js +0 -75
- package/dist/_chunks/PkToolShowImageGallery-FubPWFCb.js.map +0 -1
- package/dist/_chunks/PkToolShowProductList-DFy2jxn4.js +0 -65
- package/dist/_chunks/PkToolShowProductList-DFy2jxn4.js.map +0 -1
- package/dist/_chunks/PkToolShowVideo-DClps9oP.js +0 -123
- package/dist/_chunks/PkToolShowVideo-DClps9oP.js.map +0 -1
- package/dist/_chunks/PkToolShowWebPages-BOxbTe2X.js.map +0 -1
- package/dist/_chunks/markdown-_p-gd9w8.js.map +0 -1
- package/dist-vue/_chunks/Agent-KbZm8GvA.js.map +0 -1
- package/dist-vue/_chunks/Document-DCSWwcRE.js.map +0 -1
- package/dist-vue/_chunks/PkChatbot-CRb-U8e3.js +0 -272
- package/dist-vue/_chunks/PkChatbot-CRb-U8e3.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotFilePreview-CwiVQDF2.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotMessages-UT72KC_z.js +0 -769
- package/dist-vue/_chunks/PkChatbotMessages-UT72KC_z.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotSteps-Y6kQ00ui.js +0 -191
- package/dist-vue/_chunks/PkChatbotViewChat-D3PwREDw.js +0 -784
- package/dist-vue/_chunks/PkChatbotViewChat-D3PwREDw.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotViewFiles-BStYLY2B.js +0 -111
- package/dist-vue/_chunks/PkChatbotViewFiles-BStYLY2B.js.map +0 -1
- package/dist-vue/_chunks/PkStreamingMarkdown-CJlfq7ub.js.map +0 -1
- package/dist-vue/_chunks/PkToolShowImageGallery-DmhZLnBk.js +0 -75
- package/dist-vue/_chunks/PkToolShowImageGallery-DmhZLnBk.js.map +0 -1
- package/dist-vue/_chunks/PkToolShowProductList-BW5pRFe4.js +0 -65
- package/dist-vue/_chunks/PkToolShowProductList-BW5pRFe4.js.map +0 -1
- package/dist-vue/_chunks/PkToolShowVideo-BZOTu2Qe.js +0 -122
- package/dist-vue/_chunks/PkToolShowVideo-BZOTu2Qe.js.map +0 -1
- package/dist-vue/_chunks/PkToolShowWebPages-BiIBRV_n.js +0 -79
- package/dist-vue/_chunks/PkToolShowWebPages-BiIBRV_n.js.map +0 -1
- package/dist-vue/_chunks/useChatbotStore-DEELIJ89.js.map +0 -1
- package/dist-vue/_chunks/utils-CtD8DCrq.js +0 -184
- package/dist-vue/_chunks/utils-CtD8DCrq.js.map +0 -1
|
@@ -1,191 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./PkStreamingMarkdown-CJlfq7ub.js";
|
|
2
|
-
import { c as t, o as n } from "./message-RohfrdWS.js";
|
|
3
|
-
import { c as r, d as i, g as a, h as o, m as s, n as c, p as ee, u as te } from "./utils-CtD8DCrq.js";
|
|
4
|
-
import { t as l } from "./PkChatbotStepPayload-CSVHe7DP.js";
|
|
5
|
-
import { t as u } from "./PkChatbotStepToolDetail-ixte-rGB.js";
|
|
6
|
-
import { VvIcon as d } from "@volverjs/ui-vue/components";
|
|
7
|
-
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, normalizeClass as x, openBlock as S, reactive as C, ref as w, renderList as T, resolveDynamicComponent as E, toDisplayString as D, unref as O, watch as ne, withCtx as re } from "vue";
|
|
8
|
-
import { useI18n as k } from "vue-i18n";
|
|
9
|
-
import { useResizeObserver as A } from "@vueuse/core";
|
|
10
|
-
//#region ../../packages/components/src/chat/PkStreamingMarkdownAutoscroll.vue?vue&type=script&setup=true&lang.ts
|
|
11
|
-
var j = 8, M = /* @__PURE__ */ b({
|
|
12
|
-
__name: "PkStreamingMarkdownAutoscroll",
|
|
13
|
-
props: {
|
|
14
|
-
markdown: {},
|
|
15
|
-
innerClass: {},
|
|
16
|
-
isDark: { type: Boolean },
|
|
17
|
-
tailLength: {}
|
|
18
|
-
},
|
|
19
|
-
setup(t) {
|
|
20
|
-
let n = w(), r = w(), i = !1, a, o = () => {
|
|
21
|
-
let e = n.value;
|
|
22
|
-
e && e.scrollTop !== a && (a = void 0, i = e.scrollHeight - e.clientHeight - e.scrollTop > j);
|
|
23
|
-
};
|
|
24
|
-
return A([n, r], () => {
|
|
25
|
-
let e = n.value;
|
|
26
|
-
e && (e.scrollHeight <= e.clientHeight && (i = !1), !i && (e.scrollTop = e.scrollHeight, a = e.scrollTop));
|
|
27
|
-
}), (i, a) => (S(), g("div", {
|
|
28
|
-
ref_key: "scrollEl",
|
|
29
|
-
ref: n,
|
|
30
|
-
class: "overflow-auto light-scrollbar",
|
|
31
|
-
onScroll: o
|
|
32
|
-
}, [y(e, {
|
|
33
|
-
ref_key: "contentEl",
|
|
34
|
-
ref: r,
|
|
35
|
-
markdown: t.markdown,
|
|
36
|
-
"is-dark": t.isDark,
|
|
37
|
-
"tail-length": t.tailLength,
|
|
38
|
-
class: x(t.innerClass)
|
|
39
|
-
}, null, 8, [
|
|
40
|
-
"markdown",
|
|
41
|
-
"is-dark",
|
|
42
|
-
"tail-length",
|
|
43
|
-
"class"
|
|
44
|
-
])], 544));
|
|
45
|
-
}
|
|
46
|
-
}), N = {
|
|
47
|
-
key: 0,
|
|
48
|
-
class: "pk-chatbot-steps"
|
|
49
|
-
}, P = ["aria-expanded"], F = { class: "pk-chatbot-steps__title" }, I = { class: "pk-chatbot-steps__meta" }, L = {
|
|
50
|
-
key: 0,
|
|
51
|
-
class: "pk-chatbot-steps__list"
|
|
52
|
-
}, R = { class: "pk-chatbot-steps__step-label" }, z = { class: "pk-chatbot-steps__step-summary" }, B = {
|
|
53
|
-
key: 0,
|
|
54
|
-
class: "pk-chatbot-steps__step-duration"
|
|
55
|
-
}, V = {
|
|
56
|
-
key: 0,
|
|
57
|
-
class: "pk-chatbot-steps__step-body"
|
|
58
|
-
}, H = {
|
|
59
|
-
key: 1,
|
|
60
|
-
class: "pk-chatbot-steps__step-content pk-chatbot-steps__step-content--scroll light-scrollbar"
|
|
61
|
-
}, U = {
|
|
62
|
-
key: 2,
|
|
63
|
-
class: "pk-chatbot-steps__step-payload pk-chatbot-steps__step-payload--error"
|
|
64
|
-
}, W = { class: "pk-chatbot-steps__step-payload-label" }, G = /* @__PURE__ */ b({
|
|
65
|
-
__name: "PkChatbotSteps",
|
|
66
|
-
props: {
|
|
67
|
-
message: {},
|
|
68
|
-
isStreaming: { type: Boolean },
|
|
69
|
-
hasContent: { type: Boolean },
|
|
70
|
-
isDark: { type: Boolean }
|
|
71
|
-
},
|
|
72
|
-
setup(b) {
|
|
73
|
-
let A = b, { t: j, n: G } = k({ useScope: "global" }), K = (e) => i(e) === "output-error" && "errorText" in e && typeof e.errorText == "string" ? e.errorText : void 0, q = p(() => {
|
|
74
|
-
let e = A.message.parts, r = A.message.metadata?.partTimings, i = [];
|
|
75
|
-
for (let [c, l] of e.entries()) {
|
|
76
|
-
let u = n(l), d = t(l);
|
|
77
|
-
if (!u && !d) continue;
|
|
78
|
-
let f = "toolCallId" in l ? l.toolCallId : void 0, p = u && l.text.trim() ? l.text : void 0, m = K(l), h = a(l), g = d && "input" in l ? l.input : void 0, _ = d && "output" in l ? l.output : void 0;
|
|
79
|
-
i.push({
|
|
80
|
-
key: f ?? `${l.type}-${c}`,
|
|
81
|
-
part: l,
|
|
82
|
-
icon: te(l),
|
|
83
|
-
label: ee(j, l),
|
|
84
|
-
summary: s(l),
|
|
85
|
-
durationMs: f ? r?.[f] : void 0,
|
|
86
|
-
isActive: !!A.isStreaming && c === e.length - 1,
|
|
87
|
-
text: p,
|
|
88
|
-
error: m,
|
|
89
|
-
hasRichDetail: h,
|
|
90
|
-
hasBody: !!(p || m || (h ? g !== void 0 || _ !== void 0 : o(g) || o(_))),
|
|
91
|
-
toolInput: g,
|
|
92
|
-
toolOutput: _
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
return i;
|
|
96
|
-
}), J = p(() => {
|
|
97
|
-
let { createdAt: e, completedAt: t } = A.message.metadata ?? {};
|
|
98
|
-
if (e && t) return t - e;
|
|
99
|
-
}), Y = (e) => r(G, e), X = C(/* @__PURE__ */ new Map()), Z = (e) => X.get(e.key) ?? !1, ie = (e) => {
|
|
100
|
-
X.set(e.key, !Z(e));
|
|
101
|
-
}, Q = w(void 0), $ = p(() => Q.value ?? (!!A.isStreaming && !A.hasContent));
|
|
102
|
-
return ne(() => A.isStreaming, (e) => {
|
|
103
|
-
e && (Q.value = void 0, X.clear());
|
|
104
|
-
}), (t, n) => {
|
|
105
|
-
let r = d;
|
|
106
|
-
return q.value.length ? (S(), g("div", N, [_("button", {
|
|
107
|
-
type: "button",
|
|
108
|
-
class: "pk-chatbot-steps__header",
|
|
109
|
-
"aria-expanded": $.value,
|
|
110
|
-
onClick: n[0] ||= (e) => Q.value = !$.value
|
|
111
|
-
}, [
|
|
112
|
-
b.isStreaming ? (S(), m(r, {
|
|
113
|
-
key: 0,
|
|
114
|
-
name: "loading-loop",
|
|
115
|
-
class: "shrink-0"
|
|
116
|
-
})) : (S(), m(r, {
|
|
117
|
-
key: 1,
|
|
118
|
-
name: "ri:route-line",
|
|
119
|
-
class: "shrink-0"
|
|
120
|
-
})),
|
|
121
|
-
_("span", F, D(O(j)("messagePart.steps")), 1),
|
|
122
|
-
_("span", I, [v(D(O(j)("messagePart.stepCount", q.value.length)) + " ", 1), Y(J.value) ? (S(), g(f, { key: 0 }, [v(" · " + D(Y(J.value)), 1)], 64)) : h("", !0)]),
|
|
123
|
-
y(r, {
|
|
124
|
-
name: $.value ? "ri:arrow-up-s-line" : "ri:arrow-down-s-line",
|
|
125
|
-
class: "pk-chatbot-steps__chevron shrink-0 ml-auto"
|
|
126
|
-
}, null, 8, ["name"])
|
|
127
|
-
], 8, P), $.value ? (S(), g("ol", L, [(S(!0), g(f, null, T(q.value, (t) => (S(), g("li", {
|
|
128
|
-
key: t.key,
|
|
129
|
-
class: x(["pk-chatbot-steps__step", { "pk-chatbot-steps__step--active": t.isActive }])
|
|
130
|
-
}, [(S(), m(E(t.hasBody ? "button" : "div"), {
|
|
131
|
-
type: t.hasBody ? "button" : void 0,
|
|
132
|
-
class: "pk-chatbot-steps__step-header",
|
|
133
|
-
"aria-expanded": t.hasBody ? Z(t) : void 0,
|
|
134
|
-
onClick: (e) => t.hasBody ? ie(t) : void 0
|
|
135
|
-
}, {
|
|
136
|
-
default: re(() => [
|
|
137
|
-
_("span", { class: x(["pk-chatbot-steps-marker", { "pk-chatbot-steps-marker--active": t.isActive }]) }, [t.isActive ? (S(), m(r, {
|
|
138
|
-
key: 0,
|
|
139
|
-
name: "loading-loop"
|
|
140
|
-
})) : t.icon ? (S(), m(r, {
|
|
141
|
-
key: 1,
|
|
142
|
-
name: t.icon
|
|
143
|
-
}, null, 8, ["name"])) : h("", !0)], 2),
|
|
144
|
-
_("span", R, D(t.label), 1),
|
|
145
|
-
_("span", z, D(t.summary), 1),
|
|
146
|
-
Y(t.durationMs) ? (S(), g("span", B, D(Y(t.durationMs)), 1)) : h("", !0),
|
|
147
|
-
t.hasBody ? (S(), m(r, {
|
|
148
|
-
key: 1,
|
|
149
|
-
name: Z(t) ? "ri:arrow-up-s-line" : "ri:arrow-down-s-line",
|
|
150
|
-
class: "pk-chatbot-steps__chevron shrink-0 ml-auto"
|
|
151
|
-
}, null, 8, ["name"])) : h("", !0)
|
|
152
|
-
]),
|
|
153
|
-
_: 2
|
|
154
|
-
}, 1032, [
|
|
155
|
-
"type",
|
|
156
|
-
"aria-expanded",
|
|
157
|
-
"onClick"
|
|
158
|
-
])), t.hasBody && Z(t) ? (S(), g("div", V, [t.text && t.isActive ? (S(), m(M, {
|
|
159
|
-
key: 0,
|
|
160
|
-
markdown: t.text,
|
|
161
|
-
"is-dark": b.isDark,
|
|
162
|
-
"tail-length": O(c),
|
|
163
|
-
"inner-class": "wysiwyg",
|
|
164
|
-
class: "pk-chatbot-steps__step-content pk-chatbot-steps__step-content--scroll"
|
|
165
|
-
}, null, 8, [
|
|
166
|
-
"markdown",
|
|
167
|
-
"is-dark",
|
|
168
|
-
"tail-length"
|
|
169
|
-
])) : t.text ? (S(), g("div", H, [y(e, {
|
|
170
|
-
markdown: t.text,
|
|
171
|
-
"is-dark": b.isDark,
|
|
172
|
-
class: "wysiwyg"
|
|
173
|
-
}, null, 8, ["markdown", "is-dark"])])) : t.error ? (S(), g("div", U, [_("span", W, D(O(j)("messagePart.stepError")), 1), _("pre", null, D(t.error), 1)])) : t.hasRichDetail ? (S(), m(u, {
|
|
174
|
-
key: 3,
|
|
175
|
-
part: t.part
|
|
176
|
-
}, null, 8, ["part"])) : (S(), g(f, { key: 4 }, [O(o)(t.toolInput) ? (S(), m(l, {
|
|
177
|
-
key: 0,
|
|
178
|
-
label: O(j)("messagePart.stepInput"),
|
|
179
|
-
value: t.toolInput
|
|
180
|
-
}, null, 8, ["label", "value"])) : h("", !0), O(o)(t.toolOutput) ? (S(), m(l, {
|
|
181
|
-
key: 1,
|
|
182
|
-
label: O(j)("messagePart.stepOutput"),
|
|
183
|
-
value: t.toolOutput
|
|
184
|
-
}, null, 8, ["label", "value"])) : h("", !0)], 64))])) : h("", !0)], 2))), 128))])) : h("", !0)])) : h("", !0);
|
|
185
|
-
};
|
|
186
|
-
}
|
|
187
|
-
});
|
|
188
|
-
//#endregion
|
|
189
|
-
export { M as n, G as t };
|
|
190
|
-
|
|
191
|
-
//# sourceMappingURL=PkChatbotSteps-Y6kQ00ui.js.map
|