@8wave/ai-elements 0.124.0-beta.4 → 0.124.0-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunks/{Agent-CsSvagZw.js → Agent-BBWFD4nI.js} +7 -1
- package/dist/_chunks/{Agent-CsSvagZw.js.map → Agent-BBWFD4nI.js.map} +1 -1
- package/dist/_chunks/{PkFilePreview-C21RR0l6.js → PkFilePreview-CC2W-RXG.js} +195 -195
- package/dist/_chunks/{PkFilePreview-C21RR0l6.js.map → PkFilePreview-CC2W-RXG.js.map} +1 -1
- package/dist/_chunks/{PkFilePreviewDialog-C5Ex7Rf5.js → PkFilePreviewDialog-DYU2CUZS.js} +2 -2
- package/dist/_chunks/{PkFilePreviewDialog-C5Ex7Rf5.js.map → PkFilePreviewDialog-DYU2CUZS.js.map} +1 -1
- package/dist/_chunks/{PkStreamingMarkdown-PQ3X83Fq.js → PkStreamingMarkdown-CeWyL_2B.js} +3 -3
- package/dist/_chunks/{PkStreamingMarkdown-PQ3X83Fq.js.map → PkStreamingMarkdown-CeWyL_2B.js.map} +1 -1
- package/dist/_chunks/{PkToolChatFile-CYxqugvO.js → PkToolChatFile-BMj7-urz.js} +3 -3
- package/dist/_chunks/{PkToolChatFile-CYxqugvO.js.map → PkToolChatFile-BMj7-urz.js.map} +1 -1
- package/dist/_chunks/{PkToolRequestGeolocation-CSAMqLyV.js → PkToolRequestGeolocation-D98zUqNQ.js} +2 -2
- package/dist/_chunks/{PkToolRequestGeolocation-CSAMqLyV.js.map → PkToolRequestGeolocation-D98zUqNQ.js.map} +1 -1
- package/dist/_chunks/{PkToolRequestOAuthConnection-ST3-OlS4.js → PkToolRequestOAuthConnection-DwcRnUcd.js} +2 -2
- package/dist/_chunks/{PkToolRequestOAuthConnection-ST3-OlS4.js.map → PkToolRequestOAuthConnection-DwcRnUcd.js.map} +1 -1
- package/dist/_chunks/{PkToolShowArtifact-BIpD-GkV.js → PkToolShowArtifact-BoJC-NtV.js} +2 -2
- package/dist/_chunks/{PkToolShowArtifact-BIpD-GkV.js.map → PkToolShowArtifact-BoJC-NtV.js.map} +1 -1
- package/dist/_chunks/{PkToolShowContactForm-2_YDqjeM.js → PkToolShowContactForm-CErVBzjl.js} +2 -2
- package/dist/_chunks/{PkToolShowContactForm-2_YDqjeM.js.map → PkToolShowContactForm-CErVBzjl.js.map} +1 -1
- package/dist/_chunks/{PkToolShowForm-Bu4igmQL.js → PkToolShowForm-B7Q79XAb.js} +4 -4
- package/dist/_chunks/{PkToolShowForm-Bu4igmQL.js.map → PkToolShowForm-B7Q79XAb.js.map} +1 -1
- package/dist/_chunks/{PkToolShowImageGallery-BMP-xuYr.js → PkToolShowImageGallery-CxeQcE6A.js} +2 -2
- package/dist/_chunks/{PkToolShowImageGallery-BMP-xuYr.js.map → PkToolShowImageGallery-CxeQcE6A.js.map} +1 -1
- package/dist/_chunks/{PkToolShowProductList-AkLG4dBV.js → PkToolShowProductList-DDqYsHNq.js} +2 -2
- package/dist/_chunks/{PkToolShowProductList-AkLG4dBV.js.map → PkToolShowProductList-DDqYsHNq.js.map} +1 -1
- package/dist/_chunks/{PkToolShowSources-DKtdU_Bq.js → PkToolShowSources-CTc2s510.js} +3 -3
- package/dist/_chunks/{PkToolShowSources-DKtdU_Bq.js.map → PkToolShowSources-CTc2s510.js.map} +1 -1
- package/dist/_chunks/{PkToolShowSuggestedReply-DVr8ps6g.js → PkToolShowSuggestedReply-vui8vph1.js} +2 -2
- package/dist/_chunks/{PkToolShowSuggestedReply-DVr8ps6g.js.map → PkToolShowSuggestedReply-vui8vph1.js.map} +1 -1
- package/dist/_chunks/{PkToolShowVideo-C5jqPYXw.js → PkToolShowVideo-C2kh6pVN.js} +2 -2
- package/dist/_chunks/{PkToolShowVideo-C5jqPYXw.js.map → PkToolShowVideo-C2kh6pVN.js.map} +1 -1
- package/dist/_chunks/{PkToolShowWebPages-BqL9PjpM.js → PkToolShowWebPages-By7zBIVa.js} +2 -2
- package/dist/_chunks/{PkToolShowWebPages-BqL9PjpM.js.map → PkToolShowWebPages-By7zBIVa.js.map} +1 -1
- package/dist/_chunks/{chatImagePolicy-ZiVuD6nX.js → chatImagePolicy-C4jFnVQl.js} +2 -2
- package/dist/_chunks/{chatImagePolicy-ZiVuD6nX.js.map → chatImagePolicy-C4jFnVQl.js.map} +1 -1
- package/dist/_chunks/{markdown-CUaXq5OY.js → markdown-DDYeZICP.js} +2 -2
- package/dist/_chunks/{markdown-CUaXq5OY.js.map → markdown-DDYeZICP.js.map} +1 -1
- package/dist/_chunks/{utils-Bz1Gb3iO.js → utils-DAQfsk2H.js} +109 -70
- package/dist/_chunks/utils-DAQfsk2H.js.map +1 -0
- package/dist/ai-elements.es.js +2529 -2509
- package/dist/ai-elements.es.js.map +1 -1
- package/dist-vue/PkChatbot.js +1 -1
- package/dist-vue/PkChatbotEmptyState.js +1 -1
- package/dist-vue/PkChatbotInput.js +1 -1
- package/dist-vue/PkChatbotMessages.js +1 -1
- package/dist-vue/PkChatbotStepPayload.js +1 -1
- package/dist-vue/PkChatbotStepToolDetail.js +1 -1
- package/dist-vue/PkChatbotSteps.js +1 -1
- package/dist-vue/PkChatbotViewChat.js +1 -1
- package/dist-vue/PkChatbotViewConversations.js +1 -1
- package/dist-vue/PkChatbotViewFiles.js +1 -1
- package/dist-vue/PkChatbotViewProfile.js +1 -1
- package/dist-vue/_chunks/{Agent-D3US-D1x.js → Agent-DQl-tv4S.js} +154 -148
- package/dist-vue/_chunks/{Agent-D3US-D1x.js.map → Agent-DQl-tv4S.js.map} +1 -1
- package/dist-vue/_chunks/{Document-D5FVOcP9.js → Document-DXDifFZE.js} +2 -2
- package/dist-vue/_chunks/{Document-D5FVOcP9.js.map → Document-DXDifFZE.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbot-BA2tk9ix.js → PkChatbot-DQssgXm3.js} +8 -8
- package/dist-vue/_chunks/{PkChatbot-BA2tk9ix.js.map → PkChatbot-DQssgXm3.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotEmptyState-qKpfIuvI.js → PkChatbotEmptyState-B6qxJAPT.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotEmptyState-qKpfIuvI.js.map → PkChatbotEmptyState-B6qxJAPT.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotInput-DSH5IrO6.js → PkChatbotInput-Bk8OS1xU.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotInput-DSH5IrO6.js.map → PkChatbotInput-Bk8OS1xU.js.map} +1 -1
- package/dist-vue/_chunks/PkChatbotMessages-D4LJZxv7.js +1041 -0
- package/dist-vue/_chunks/{PkChatbotMessages-pWNZCmM2.js.map → PkChatbotMessages-D4LJZxv7.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotStepPayload-BT-Xg18D.js → PkChatbotStepPayload-_0WRbSR6.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotStepPayload-BT-Xg18D.js.map → PkChatbotStepPayload-_0WRbSR6.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotStepToolDetail-Cs322RDk.js → PkChatbotStepToolDetail-DiaervF2.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotStepToolDetail-Cs322RDk.js.map → PkChatbotStepToolDetail-DiaervF2.js.map} +1 -1
- package/dist-vue/_chunks/PkChatbotSteps-BqL-ClgI.js +189 -0
- package/dist-vue/_chunks/{PkChatbotSteps-Dd62GEXJ.js.map → PkChatbotSteps-BqL-ClgI.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewChat-C8-fUyQh.js → PkChatbotViewChat-BfVLCU_j.js} +337 -317
- package/dist-vue/_chunks/PkChatbotViewChat-BfVLCU_j.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotViewConversations-CIv5g2xZ.js → PkChatbotViewConversations-C32O6SsT.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotViewConversations-CIv5g2xZ.js.map → PkChatbotViewConversations-C32O6SsT.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewFiles-DjYF-UoB.js → PkChatbotViewFiles-Du5AAS4v.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotViewFiles-DjYF-UoB.js.map → PkChatbotViewFiles-Du5AAS4v.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewProfile-D3d-hG14.js → PkChatbotViewProfile-UZrZdOyM.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewProfile-D3d-hG14.js.map → PkChatbotViewProfile-UZrZdOyM.js.map} +1 -1
- package/dist-vue/_chunks/{PkFilePreview-DfRbMUCD.js → PkFilePreview-jeqvHDm7.js} +29 -29
- package/dist-vue/_chunks/{PkFilePreview-DfRbMUCD.js.map → PkFilePreview-jeqvHDm7.js.map} +1 -1
- package/dist-vue/_chunks/{PkFilePreviewDialog-Cap9D7s8.js → PkFilePreviewDialog-BSvgiM9A.js} +2 -2
- package/dist-vue/_chunks/{PkFilePreviewDialog-Cap9D7s8.js.map → PkFilePreviewDialog-BSvgiM9A.js.map} +1 -1
- package/dist-vue/_chunks/{PkStreamingMarkdown-QDsT-4jC.js → PkStreamingMarkdown-Dk3iXhTm.js} +3 -3
- package/dist-vue/_chunks/{PkStreamingMarkdown-QDsT-4jC.js.map → PkStreamingMarkdown-Dk3iXhTm.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolChatFile-UZeUytvT.js → PkToolChatFile-Bnj-YFLh.js} +3 -3
- package/dist-vue/_chunks/{PkToolChatFile-UZeUytvT.js.map → PkToolChatFile-Bnj-YFLh.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolRequestGeolocation-gEDbmudT.js → PkToolRequestGeolocation-SDzM1-Wl.js} +2 -2
- package/dist-vue/_chunks/{PkToolRequestGeolocation-gEDbmudT.js.map → PkToolRequestGeolocation-SDzM1-Wl.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolRequestOAuthConnection-C9_w8V0T.js → PkToolRequestOAuthConnection-DNrlGxMX.js} +2 -2
- package/dist-vue/_chunks/{PkToolRequestOAuthConnection-C9_w8V0T.js.map → PkToolRequestOAuthConnection-DNrlGxMX.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowArtifact-ldnH-U3h.js → PkToolShowArtifact-BtCGilTJ.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowArtifact-ldnH-U3h.js.map → PkToolShowArtifact-BtCGilTJ.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowContactForm-4hISKYqb.js → PkToolShowContactForm-BZNIeJpf.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowContactForm-4hISKYqb.js.map → PkToolShowContactForm-BZNIeJpf.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowDiagram-uHFCQ0FJ.js → PkToolShowDiagram-KD4MfVkP.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowDiagram-uHFCQ0FJ.js.map → PkToolShowDiagram-KD4MfVkP.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowForm-DiUz5_Ct.js → PkToolShowForm-Dtfpi58S.js} +4 -4
- package/dist-vue/_chunks/{PkToolShowForm-DiUz5_Ct.js.map → PkToolShowForm-Dtfpi58S.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowImageGallery-CEzeXupr.js → PkToolShowImageGallery-DnS04nTs.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowImageGallery-CEzeXupr.js.map → PkToolShowImageGallery-DnS04nTs.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowProductList-h4Dqvk1V.js → PkToolShowProductList-BlFKAtqQ.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowProductList-h4Dqvk1V.js.map → PkToolShowProductList-BlFKAtqQ.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowSources-BJd4zYAY.js → PkToolShowSources-DM177ZlR.js} +3 -3
- package/dist-vue/_chunks/{PkToolShowSources-BJd4zYAY.js.map → PkToolShowSources-DM177ZlR.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowSuggestedReply-Bb7Inxa4.js → PkToolShowSuggestedReply-BlcEfMx8.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowSuggestedReply-Bb7Inxa4.js.map → PkToolShowSuggestedReply-BlcEfMx8.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowVideo-DgkpZriW.js → PkToolShowVideo-DQdVpaWT.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowVideo-DgkpZriW.js.map → PkToolShowVideo-DQdVpaWT.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowWebPages-DQr3SEGC.js → PkToolShowWebPages-Cx2Ft_wN.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowWebPages-DQr3SEGC.js.map → PkToolShowWebPages-Cx2Ft_wN.js.map} +1 -1
- package/dist-vue/_chunks/{createChatbotApiClient-CFKeOgEA.js → createChatbotApiClient-Bukf58dz.js} +2 -2
- package/dist-vue/_chunks/{createChatbotApiClient-CFKeOgEA.js.map → createChatbotApiClient-Bukf58dz.js.map} +1 -1
- package/dist-vue/_chunks/{useChatbotStore--PcS9kGN.js → useChatbotStore-DcvdWkgq.js} +3 -3
- package/dist-vue/_chunks/{useChatbotStore--PcS9kGN.js.map → useChatbotStore-DcvdWkgq.js.map} +1 -1
- package/dist-vue/_chunks/{utils-DmBnucJs.js → utils-BuxgMuKv.js} +125 -76
- package/dist-vue/_chunks/utils-BuxgMuKv.js.map +1 -0
- package/dist-vue/api.js +1 -1
- package/dist-vue/apps/web-component/src/composables/useChatbotAgent.d.ts +4 -0
- package/dist-vue/composables.js +8 -8
- package/dist-vue/composables.js.map +1 -1
- package/dist-vue/index.js +5620 -5554
- package/dist-vue/index.js.map +1 -1
- package/dist-vue/locales.js +18 -0
- package/dist-vue/packages/components/src/chat/PkAgentSettingsPanel.d.ts +8 -2
- package/dist-vue/packages/components/src/chat/PkAuroraCanvas.d.ts +10 -3
- package/dist-vue/packages/components/src/chat/utils.d.ts +29 -0
- package/dist-vue/packages/composable/src/chatbot/useChatbotStore.d.ts +12 -0
- package/dist-vue/packages/models/src/schema/Agent.d.ts +48 -0
- package/dist-vue/packages/models/src/schema/ReasoningChat.d.ts +12 -0
- package/dist-vue/packages/models/src/schema/SubAgent.d.ts +12 -0
- package/dist-vue/style.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/utils-Bz1Gb3iO.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotMessages-pWNZCmM2.js +0 -1041
- package/dist-vue/_chunks/PkChatbotSteps-Dd62GEXJ.js +0 -189
- package/dist-vue/_chunks/PkChatbotViewChat-C8-fUyQh.js.map +0 -1
- package/dist-vue/_chunks/utils-DmBnucJs.js.map +0 -1
|
@@ -1,189 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./PkStreamingMarkdown-QDsT-4jC.js";
|
|
2
|
-
import { c as t, u as n } from "./message-DuibQyHy.js";
|
|
3
|
-
import { C as r, S as i, _ as a, b as o, g as ee, m as te, n as s, p as c, r as l, x as ne } from "./utils-DmBnucJs.js";
|
|
4
|
-
import { t as u } from "./PkChatbotStepPayload-BT-Xg18D.js";
|
|
5
|
-
import { t as d } from "./PkChatbotStepToolDetail-Cs322RDk.js";
|
|
6
|
-
import { VvIcon as f } from "@volverjs/ui-vue/components";
|
|
7
|
-
import { Fragment as p, computed as m, createBlock as h, createCommentVNode as g, createElementBlock as _, createElementVNode as v, createTextVNode as y, createVNode as b, defineComponent as x, inject as re, normalizeClass as S, openBlock as C, reactive as ie, ref as w, renderList as T, resolveDynamicComponent as E, toDisplayString as D, unref as O, withCtx as ae } from "vue";
|
|
8
|
-
import { useI18n as oe } from "vue-i18n";
|
|
9
|
-
import { useResizeObserver as k } from "@vueuse/core";
|
|
10
|
-
// ../../packages/components/src/chat/PkStreamingMarkdownAutoscroll.vue?vue&type=script&setup=true&lang.ts
|
|
11
|
-
var A = 8, j = /* @__PURE__ */ x({
|
|
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 > A);
|
|
23
|
-
};
|
|
24
|
-
return k([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) => (C(), _("div", {
|
|
28
|
-
ref_key: "scrollEl",
|
|
29
|
-
ref: n,
|
|
30
|
-
class: "overflow-auto light-scrollbar",
|
|
31
|
-
onScroll: o
|
|
32
|
-
}, [b(e, {
|
|
33
|
-
ref_key: "contentEl",
|
|
34
|
-
ref: r,
|
|
35
|
-
markdown: t.markdown,
|
|
36
|
-
"is-dark": t.isDark,
|
|
37
|
-
"tail-length": t.tailLength,
|
|
38
|
-
class: S(t.innerClass)
|
|
39
|
-
}, null, 8, [
|
|
40
|
-
"markdown",
|
|
41
|
-
"is-dark",
|
|
42
|
-
"tail-length",
|
|
43
|
-
"class"
|
|
44
|
-
])], 544));
|
|
45
|
-
}
|
|
46
|
-
}), M = {
|
|
47
|
-
key: 0,
|
|
48
|
-
class: "pk-chatbot-steps"
|
|
49
|
-
}, N = ["aria-expanded"], P = { class: "pk-chatbot-steps__title" }, F = { class: "pk-chatbot-steps__meta" }, I = {
|
|
50
|
-
key: 0,
|
|
51
|
-
class: "pk-chatbot-steps__list"
|
|
52
|
-
}, L = { class: "pk-chatbot-steps__step-label" }, R = { class: "pk-chatbot-steps__step-summary" }, z = {
|
|
53
|
-
key: 0,
|
|
54
|
-
class: "pk-chatbot-steps__step-duration"
|
|
55
|
-
}, B = {
|
|
56
|
-
key: 0,
|
|
57
|
-
class: "pk-chatbot-steps__step-body"
|
|
58
|
-
}, V = {
|
|
59
|
-
key: 1,
|
|
60
|
-
class: "pk-chatbot-steps__step-content pk-chatbot-steps__step-content--scroll light-scrollbar"
|
|
61
|
-
}, H = {
|
|
62
|
-
key: 2,
|
|
63
|
-
class: "pk-chatbot-steps__step-payload pk-chatbot-steps__step-payload--error"
|
|
64
|
-
}, U = { class: "pk-chatbot-steps__step-payload-label" }, W = /* @__PURE__ */ x({
|
|
65
|
-
__name: "PkChatbotSteps",
|
|
66
|
-
props: {
|
|
67
|
-
message: {},
|
|
68
|
-
isStreaming: { type: Boolean },
|
|
69
|
-
hasContent: { type: Boolean },
|
|
70
|
-
hideReasoning: { type: Boolean },
|
|
71
|
-
isDark: { type: Boolean }
|
|
72
|
-
},
|
|
73
|
-
setup(x) {
|
|
74
|
-
let k = x, { t: A, n: W } = oe({ useScope: "global" }), G = re(s, void 0), K = (e) => a(e) === "output-error" && "errorText" in e && typeof e.errorText == "string" ? e.errorText : void 0, q = m(() => {
|
|
75
|
-
let e = k.message.parts, a = k.message.metadata?.partTimings, s = [];
|
|
76
|
-
for (let [c, l] of e.entries()) {
|
|
77
|
-
let u = t(l), d = te(l), f = n(l) || !!d;
|
|
78
|
-
if (!u && !f) continue;
|
|
79
|
-
let p = d?.state === "input-available", m = "toolCallId" in l ? l.toolCallId : void 0, h = u && !k.hideReasoning && l.text.trim() ? l.text : void 0, g = K(l), _ = r(l), v = f && "input" in l ? l.input : void 0, y = f && "output" in l ? l.output : void 0;
|
|
80
|
-
s.push({
|
|
81
|
-
key: m ?? `${l.type}-${c}`,
|
|
82
|
-
part: l,
|
|
83
|
-
icon: ee(l),
|
|
84
|
-
label: o(A, l, G?.value),
|
|
85
|
-
summary: p && !k.isStreaming ? A("messagePart.hostToolNoAnswer") : ne(l),
|
|
86
|
-
durationMs: m ? a?.[m] : void 0,
|
|
87
|
-
isActive: !!k.isStreaming && (d ? p : c === e.length - 1),
|
|
88
|
-
text: h,
|
|
89
|
-
error: g,
|
|
90
|
-
hasRichDetail: _,
|
|
91
|
-
hasBody: !!(h || g || (_ ? v !== void 0 || y !== void 0 : i(v) || i(y))),
|
|
92
|
-
toolInput: v,
|
|
93
|
-
toolOutput: y
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
return s;
|
|
97
|
-
}), J = m(() => {
|
|
98
|
-
let { createdAt: e, completedAt: t } = k.message.metadata ?? {};
|
|
99
|
-
if (e && t) return t - e;
|
|
100
|
-
}), Y = (e) => c(W, e), X = ie(/* @__PURE__ */ new Map()), Z = (e) => X.get(e.key) ?? !1, se = (e) => {
|
|
101
|
-
X.set(e.key, !Z(e));
|
|
102
|
-
}, Q = w(void 0), $ = m(() => Q.value ?? (!!k.isStreaming && !k.hasContent));
|
|
103
|
-
return (t, n) => {
|
|
104
|
-
let r = f;
|
|
105
|
-
return q.value.length ? (C(), _("div", M, [v("button", {
|
|
106
|
-
type: "button",
|
|
107
|
-
class: "pk-chatbot-steps__header",
|
|
108
|
-
"aria-expanded": $.value,
|
|
109
|
-
onClick: n[0] ||= (e) => Q.value = !$.value
|
|
110
|
-
}, [
|
|
111
|
-
x.isStreaming ? (C(), h(r, {
|
|
112
|
-
key: 0,
|
|
113
|
-
name: "loading-loop",
|
|
114
|
-
class: "shrink-0"
|
|
115
|
-
})) : (C(), h(r, {
|
|
116
|
-
key: 1,
|
|
117
|
-
name: "ri:route-line",
|
|
118
|
-
class: "shrink-0"
|
|
119
|
-
})),
|
|
120
|
-
v("span", P, D(O(A)("messagePart.steps")), 1),
|
|
121
|
-
v("span", F, [y(D(O(A)("messagePart.stepCount", q.value.length)) + " ", 1), Y(J.value) ? (C(), _(p, { key: 0 }, [y(" · " + D(Y(J.value)), 1)], 64)) : g("", !0)]),
|
|
122
|
-
b(r, {
|
|
123
|
-
name: $.value ? "ri:arrow-up-s-line" : "ri:arrow-down-s-line",
|
|
124
|
-
class: "pk-chatbot-steps__chevron shrink-0 ml-auto"
|
|
125
|
-
}, null, 8, ["name"])
|
|
126
|
-
], 8, N), $.value ? (C(), _("ol", I, [(C(!0), _(p, null, T(q.value, (t) => (C(), _("li", {
|
|
127
|
-
key: t.key,
|
|
128
|
-
class: S(["pk-chatbot-steps__step", { "pk-chatbot-steps__step--active": t.isActive }])
|
|
129
|
-
}, [(C(), h(E(t.hasBody ? "button" : "div"), {
|
|
130
|
-
type: t.hasBody ? "button" : void 0,
|
|
131
|
-
class: "pk-chatbot-steps__step-header",
|
|
132
|
-
"aria-expanded": t.hasBody ? Z(t) : void 0,
|
|
133
|
-
onClick: (e) => t.hasBody ? se(t) : void 0
|
|
134
|
-
}, {
|
|
135
|
-
default: ae(() => [
|
|
136
|
-
v("span", { class: S(["pk-chatbot-steps-marker", { "pk-chatbot-steps-marker--active": t.isActive }]) }, [t.isActive ? (C(), h(r, {
|
|
137
|
-
key: 0,
|
|
138
|
-
name: "loading-loop"
|
|
139
|
-
})) : t.icon ? (C(), h(r, {
|
|
140
|
-
key: 1,
|
|
141
|
-
name: t.icon
|
|
142
|
-
}, null, 8, ["name"])) : g("", !0)], 2),
|
|
143
|
-
v("span", L, D(t.label), 1),
|
|
144
|
-
v("span", R, D(t.summary), 1),
|
|
145
|
-
Y(t.durationMs) ? (C(), _("span", z, D(Y(t.durationMs)), 1)) : g("", !0),
|
|
146
|
-
t.hasBody ? (C(), h(r, {
|
|
147
|
-
key: 1,
|
|
148
|
-
name: Z(t) ? "ri:arrow-up-s-line" : "ri:arrow-down-s-line",
|
|
149
|
-
class: "pk-chatbot-steps__chevron shrink-0 ml-auto"
|
|
150
|
-
}, null, 8, ["name"])) : g("", !0)
|
|
151
|
-
]),
|
|
152
|
-
_: 2
|
|
153
|
-
}, 1032, [
|
|
154
|
-
"type",
|
|
155
|
-
"aria-expanded",
|
|
156
|
-
"onClick"
|
|
157
|
-
])), t.hasBody && Z(t) ? (C(), _("div", B, [t.text && t.isActive ? (C(), h(j, {
|
|
158
|
-
key: 0,
|
|
159
|
-
markdown: t.text,
|
|
160
|
-
"is-dark": x.isDark,
|
|
161
|
-
"tail-length": O(l),
|
|
162
|
-
"inner-class": "wysiwyg",
|
|
163
|
-
class: "pk-chatbot-steps__step-content pk-chatbot-steps__step-content--scroll"
|
|
164
|
-
}, null, 8, [
|
|
165
|
-
"markdown",
|
|
166
|
-
"is-dark",
|
|
167
|
-
"tail-length"
|
|
168
|
-
])) : t.text ? (C(), _("div", V, [b(e, {
|
|
169
|
-
markdown: t.text,
|
|
170
|
-
"is-dark": x.isDark,
|
|
171
|
-
class: "wysiwyg"
|
|
172
|
-
}, null, 8, ["markdown", "is-dark"])])) : t.error ? (C(), _("div", H, [v("span", U, D(O(A)("messagePart.stepError")), 1), v("pre", null, D(t.error), 1)])) : t.hasRichDetail ? (C(), h(d, {
|
|
173
|
-
key: 3,
|
|
174
|
-
part: t.part
|
|
175
|
-
}, null, 8, ["part"])) : (C(), _(p, { key: 4 }, [O(i)(t.toolInput) ? (C(), h(u, {
|
|
176
|
-
key: 0,
|
|
177
|
-
label: O(A)("messagePart.stepInput"),
|
|
178
|
-
value: t.toolInput
|
|
179
|
-
}, null, 8, ["label", "value"])) : g("", !0), O(i)(t.toolOutput) ? (C(), h(u, {
|
|
180
|
-
key: 1,
|
|
181
|
-
label: O(A)("messagePart.stepOutput"),
|
|
182
|
-
value: t.toolOutput
|
|
183
|
-
}, null, 8, ["label", "value"])) : g("", !0)], 64))])) : g("", !0)], 2))), 128))])) : g("", !0)])) : g("", !0);
|
|
184
|
-
};
|
|
185
|
-
}
|
|
186
|
-
});
|
|
187
|
-
export { j as n, W as t };
|
|
188
|
-
|
|
189
|
-
//# sourceMappingURL=PkChatbotSteps-Dd62GEXJ.js.map
|