@8wave/ai-elements 0.124.0-beta.3 → 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.
Files changed (138) hide show
  1. package/dist/_chunks/{Agent-CsSvagZw.js → Agent-BBWFD4nI.js} +7 -1
  2. package/dist/_chunks/{Agent-CsSvagZw.js.map → Agent-BBWFD4nI.js.map} +1 -1
  3. package/dist/_chunks/{PkFilePreview-DXmgMwwu.js → PkFilePreview-CC2W-RXG.js} +197 -196
  4. package/dist/_chunks/{PkFilePreview-DXmgMwwu.js.map → PkFilePreview-CC2W-RXG.js.map} +1 -1
  5. package/dist/_chunks/{PkFilePreviewDialog-Bzt534GA.js → PkFilePreviewDialog-DYU2CUZS.js} +2 -2
  6. package/dist/_chunks/{PkFilePreviewDialog-Bzt534GA.js.map → PkFilePreviewDialog-DYU2CUZS.js.map} +1 -1
  7. package/dist/_chunks/{PkStreamingMarkdown-PQ3X83Fq.js → PkStreamingMarkdown-CeWyL_2B.js} +3 -3
  8. package/dist/_chunks/{PkStreamingMarkdown-PQ3X83Fq.js.map → PkStreamingMarkdown-CeWyL_2B.js.map} +1 -1
  9. package/dist/_chunks/{PkToolChatFile-CYxqugvO.js → PkToolChatFile-BMj7-urz.js} +3 -3
  10. package/dist/_chunks/{PkToolChatFile-CYxqugvO.js.map → PkToolChatFile-BMj7-urz.js.map} +1 -1
  11. package/dist/_chunks/{PkToolRequestGeolocation-CSAMqLyV.js → PkToolRequestGeolocation-D98zUqNQ.js} +2 -2
  12. package/dist/_chunks/{PkToolRequestGeolocation-CSAMqLyV.js.map → PkToolRequestGeolocation-D98zUqNQ.js.map} +1 -1
  13. package/dist/_chunks/{PkToolRequestOAuthConnection-ST3-OlS4.js → PkToolRequestOAuthConnection-DwcRnUcd.js} +2 -2
  14. package/dist/_chunks/{PkToolRequestOAuthConnection-ST3-OlS4.js.map → PkToolRequestOAuthConnection-DwcRnUcd.js.map} +1 -1
  15. package/dist/_chunks/{PkToolShowArtifact-BIpD-GkV.js → PkToolShowArtifact-BoJC-NtV.js} +2 -2
  16. package/dist/_chunks/{PkToolShowArtifact-BIpD-GkV.js.map → PkToolShowArtifact-BoJC-NtV.js.map} +1 -1
  17. package/dist/_chunks/{PkToolShowContactForm-2_YDqjeM.js → PkToolShowContactForm-CErVBzjl.js} +2 -2
  18. package/dist/_chunks/{PkToolShowContactForm-2_YDqjeM.js.map → PkToolShowContactForm-CErVBzjl.js.map} +1 -1
  19. package/dist/_chunks/{PkToolShowForm-Bu4igmQL.js → PkToolShowForm-B7Q79XAb.js} +4 -4
  20. package/dist/_chunks/{PkToolShowForm-Bu4igmQL.js.map → PkToolShowForm-B7Q79XAb.js.map} +1 -1
  21. package/dist/_chunks/{PkToolShowImageGallery-BMP-xuYr.js → PkToolShowImageGallery-CxeQcE6A.js} +2 -2
  22. package/dist/_chunks/{PkToolShowImageGallery-BMP-xuYr.js.map → PkToolShowImageGallery-CxeQcE6A.js.map} +1 -1
  23. package/dist/_chunks/{PkToolShowProductList-AkLG4dBV.js → PkToolShowProductList-DDqYsHNq.js} +2 -2
  24. package/dist/_chunks/{PkToolShowProductList-AkLG4dBV.js.map → PkToolShowProductList-DDqYsHNq.js.map} +1 -1
  25. package/dist/_chunks/{PkToolShowSources-DKtdU_Bq.js → PkToolShowSources-CTc2s510.js} +3 -3
  26. package/dist/_chunks/{PkToolShowSources-DKtdU_Bq.js.map → PkToolShowSources-CTc2s510.js.map} +1 -1
  27. package/dist/_chunks/{PkToolShowSuggestedReply-DVr8ps6g.js → PkToolShowSuggestedReply-vui8vph1.js} +2 -2
  28. package/dist/_chunks/{PkToolShowSuggestedReply-DVr8ps6g.js.map → PkToolShowSuggestedReply-vui8vph1.js.map} +1 -1
  29. package/dist/_chunks/{PkToolShowVideo-C5jqPYXw.js → PkToolShowVideo-C2kh6pVN.js} +2 -2
  30. package/dist/_chunks/{PkToolShowVideo-C5jqPYXw.js.map → PkToolShowVideo-C2kh6pVN.js.map} +1 -1
  31. package/dist/_chunks/{PkToolShowWebPages-BqL9PjpM.js → PkToolShowWebPages-By7zBIVa.js} +2 -2
  32. package/dist/_chunks/{PkToolShowWebPages-BqL9PjpM.js.map → PkToolShowWebPages-By7zBIVa.js.map} +1 -1
  33. package/dist/_chunks/{chatImagePolicy-ZiVuD6nX.js → chatImagePolicy-C4jFnVQl.js} +2 -2
  34. package/dist/_chunks/{chatImagePolicy-ZiVuD6nX.js.map → chatImagePolicy-C4jFnVQl.js.map} +1 -1
  35. package/dist/_chunks/{markdown-CUaXq5OY.js → markdown-DDYeZICP.js} +2 -2
  36. package/dist/_chunks/{markdown-CUaXq5OY.js.map → markdown-DDYeZICP.js.map} +1 -1
  37. package/dist/_chunks/{utils-Bz1Gb3iO.js → utils-DAQfsk2H.js} +109 -70
  38. package/dist/_chunks/utils-DAQfsk2H.js.map +1 -0
  39. package/dist/ai-elements.es.js +2529 -2509
  40. package/dist/ai-elements.es.js.map +1 -1
  41. package/dist-vue/PkChatbot.js +1 -1
  42. package/dist-vue/PkChatbotEmptyState.js +1 -1
  43. package/dist-vue/PkChatbotInput.js +1 -1
  44. package/dist-vue/PkChatbotMessages.js +1 -1
  45. package/dist-vue/PkChatbotStepPayload.js +1 -1
  46. package/dist-vue/PkChatbotStepToolDetail.js +1 -1
  47. package/dist-vue/PkChatbotSteps.js +1 -1
  48. package/dist-vue/PkChatbotViewChat.js +1 -1
  49. package/dist-vue/PkChatbotViewConversations.js +1 -1
  50. package/dist-vue/PkChatbotViewFiles.js +1 -1
  51. package/dist-vue/PkChatbotViewProfile.js +1 -1
  52. package/dist-vue/_chunks/{Agent-D3US-D1x.js → Agent-DQl-tv4S.js} +154 -148
  53. package/dist-vue/_chunks/{Agent-D3US-D1x.js.map → Agent-DQl-tv4S.js.map} +1 -1
  54. package/dist-vue/_chunks/{Document-D5FVOcP9.js → Document-DXDifFZE.js} +2 -2
  55. package/dist-vue/_chunks/{Document-D5FVOcP9.js.map → Document-DXDifFZE.js.map} +1 -1
  56. package/dist-vue/_chunks/{PkChatbot-C7--w-xA.js → PkChatbot-DQssgXm3.js} +8 -8
  57. package/dist-vue/_chunks/{PkChatbot-C7--w-xA.js.map → PkChatbot-DQssgXm3.js.map} +1 -1
  58. package/dist-vue/_chunks/{PkChatbotEmptyState-qKpfIuvI.js → PkChatbotEmptyState-B6qxJAPT.js} +2 -2
  59. package/dist-vue/_chunks/{PkChatbotEmptyState-qKpfIuvI.js.map → PkChatbotEmptyState-B6qxJAPT.js.map} +1 -1
  60. package/dist-vue/_chunks/{PkChatbotInput-DSH5IrO6.js → PkChatbotInput-Bk8OS1xU.js} +2 -2
  61. package/dist-vue/_chunks/{PkChatbotInput-DSH5IrO6.js.map → PkChatbotInput-Bk8OS1xU.js.map} +1 -1
  62. package/dist-vue/_chunks/PkChatbotMessages-D4LJZxv7.js +1041 -0
  63. package/dist-vue/_chunks/{PkChatbotMessages-pWNZCmM2.js.map → PkChatbotMessages-D4LJZxv7.js.map} +1 -1
  64. package/dist-vue/_chunks/{PkChatbotStepPayload-BT-Xg18D.js → PkChatbotStepPayload-_0WRbSR6.js} +2 -2
  65. package/dist-vue/_chunks/{PkChatbotStepPayload-BT-Xg18D.js.map → PkChatbotStepPayload-_0WRbSR6.js.map} +1 -1
  66. package/dist-vue/_chunks/{PkChatbotStepToolDetail-Cs322RDk.js → PkChatbotStepToolDetail-DiaervF2.js} +3 -3
  67. package/dist-vue/_chunks/{PkChatbotStepToolDetail-Cs322RDk.js.map → PkChatbotStepToolDetail-DiaervF2.js.map} +1 -1
  68. package/dist-vue/_chunks/PkChatbotSteps-BqL-ClgI.js +189 -0
  69. package/dist-vue/_chunks/{PkChatbotSteps-Dd62GEXJ.js.map → PkChatbotSteps-BqL-ClgI.js.map} +1 -1
  70. package/dist-vue/_chunks/{PkChatbotViewChat-mWZvsKLA.js → PkChatbotViewChat-BfVLCU_j.js} +337 -317
  71. package/dist-vue/_chunks/PkChatbotViewChat-BfVLCU_j.js.map +1 -0
  72. package/dist-vue/_chunks/{PkChatbotViewConversations-CIv5g2xZ.js → PkChatbotViewConversations-C32O6SsT.js} +3 -3
  73. package/dist-vue/_chunks/{PkChatbotViewConversations-CIv5g2xZ.js.map → PkChatbotViewConversations-C32O6SsT.js.map} +1 -1
  74. package/dist-vue/_chunks/{PkChatbotViewFiles-DjYF-UoB.js → PkChatbotViewFiles-Du5AAS4v.js} +3 -3
  75. package/dist-vue/_chunks/{PkChatbotViewFiles-DjYF-UoB.js.map → PkChatbotViewFiles-Du5AAS4v.js.map} +1 -1
  76. package/dist-vue/_chunks/{PkChatbotViewProfile-D3d-hG14.js → PkChatbotViewProfile-UZrZdOyM.js} +2 -2
  77. package/dist-vue/_chunks/{PkChatbotViewProfile-D3d-hG14.js.map → PkChatbotViewProfile-UZrZdOyM.js.map} +1 -1
  78. package/dist-vue/_chunks/{PkFilePreview-CFqcO3vY.js → PkFilePreview-jeqvHDm7.js} +30 -29
  79. package/dist-vue/_chunks/{PkFilePreview-CFqcO3vY.js.map → PkFilePreview-jeqvHDm7.js.map} +1 -1
  80. package/dist-vue/_chunks/{PkFilePreviewDialog-DeNnbXWq.js → PkFilePreviewDialog-BSvgiM9A.js} +2 -2
  81. package/dist-vue/_chunks/{PkFilePreviewDialog-DeNnbXWq.js.map → PkFilePreviewDialog-BSvgiM9A.js.map} +1 -1
  82. package/dist-vue/_chunks/{PkStreamingMarkdown-QDsT-4jC.js → PkStreamingMarkdown-Dk3iXhTm.js} +3 -3
  83. package/dist-vue/_chunks/{PkStreamingMarkdown-QDsT-4jC.js.map → PkStreamingMarkdown-Dk3iXhTm.js.map} +1 -1
  84. package/dist-vue/_chunks/{PkToolChatFile-UZeUytvT.js → PkToolChatFile-Bnj-YFLh.js} +3 -3
  85. package/dist-vue/_chunks/{PkToolChatFile-UZeUytvT.js.map → PkToolChatFile-Bnj-YFLh.js.map} +1 -1
  86. package/dist-vue/_chunks/{PkToolRequestGeolocation-gEDbmudT.js → PkToolRequestGeolocation-SDzM1-Wl.js} +2 -2
  87. package/dist-vue/_chunks/{PkToolRequestGeolocation-gEDbmudT.js.map → PkToolRequestGeolocation-SDzM1-Wl.js.map} +1 -1
  88. package/dist-vue/_chunks/{PkToolRequestOAuthConnection-C9_w8V0T.js → PkToolRequestOAuthConnection-DNrlGxMX.js} +2 -2
  89. package/dist-vue/_chunks/{PkToolRequestOAuthConnection-C9_w8V0T.js.map → PkToolRequestOAuthConnection-DNrlGxMX.js.map} +1 -1
  90. package/dist-vue/_chunks/{PkToolShowArtifact-ldnH-U3h.js → PkToolShowArtifact-BtCGilTJ.js} +2 -2
  91. package/dist-vue/_chunks/{PkToolShowArtifact-ldnH-U3h.js.map → PkToolShowArtifact-BtCGilTJ.js.map} +1 -1
  92. package/dist-vue/_chunks/{PkToolShowContactForm-4hISKYqb.js → PkToolShowContactForm-BZNIeJpf.js} +2 -2
  93. package/dist-vue/_chunks/{PkToolShowContactForm-4hISKYqb.js.map → PkToolShowContactForm-BZNIeJpf.js.map} +1 -1
  94. package/dist-vue/_chunks/{PkToolShowDiagram-uHFCQ0FJ.js → PkToolShowDiagram-KD4MfVkP.js} +2 -2
  95. package/dist-vue/_chunks/{PkToolShowDiagram-uHFCQ0FJ.js.map → PkToolShowDiagram-KD4MfVkP.js.map} +1 -1
  96. package/dist-vue/_chunks/{PkToolShowForm-DiUz5_Ct.js → PkToolShowForm-Dtfpi58S.js} +4 -4
  97. package/dist-vue/_chunks/{PkToolShowForm-DiUz5_Ct.js.map → PkToolShowForm-Dtfpi58S.js.map} +1 -1
  98. package/dist-vue/_chunks/{PkToolShowImageGallery-CEzeXupr.js → PkToolShowImageGallery-DnS04nTs.js} +2 -2
  99. package/dist-vue/_chunks/{PkToolShowImageGallery-CEzeXupr.js.map → PkToolShowImageGallery-DnS04nTs.js.map} +1 -1
  100. package/dist-vue/_chunks/{PkToolShowProductList-h4Dqvk1V.js → PkToolShowProductList-BlFKAtqQ.js} +2 -2
  101. package/dist-vue/_chunks/{PkToolShowProductList-h4Dqvk1V.js.map → PkToolShowProductList-BlFKAtqQ.js.map} +1 -1
  102. package/dist-vue/_chunks/{PkToolShowSources-BJd4zYAY.js → PkToolShowSources-DM177ZlR.js} +3 -3
  103. package/dist-vue/_chunks/{PkToolShowSources-BJd4zYAY.js.map → PkToolShowSources-DM177ZlR.js.map} +1 -1
  104. package/dist-vue/_chunks/{PkToolShowSuggestedReply-Bb7Inxa4.js → PkToolShowSuggestedReply-BlcEfMx8.js} +2 -2
  105. package/dist-vue/_chunks/{PkToolShowSuggestedReply-Bb7Inxa4.js.map → PkToolShowSuggestedReply-BlcEfMx8.js.map} +1 -1
  106. package/dist-vue/_chunks/{PkToolShowVideo-DgkpZriW.js → PkToolShowVideo-DQdVpaWT.js} +2 -2
  107. package/dist-vue/_chunks/{PkToolShowVideo-DgkpZriW.js.map → PkToolShowVideo-DQdVpaWT.js.map} +1 -1
  108. package/dist-vue/_chunks/{PkToolShowWebPages-DQr3SEGC.js → PkToolShowWebPages-Cx2Ft_wN.js} +2 -2
  109. package/dist-vue/_chunks/{PkToolShowWebPages-DQr3SEGC.js.map → PkToolShowWebPages-Cx2Ft_wN.js.map} +1 -1
  110. package/dist-vue/_chunks/{createChatbotApiClient-CFKeOgEA.js → createChatbotApiClient-Bukf58dz.js} +2 -2
  111. package/dist-vue/_chunks/{createChatbotApiClient-CFKeOgEA.js.map → createChatbotApiClient-Bukf58dz.js.map} +1 -1
  112. package/dist-vue/_chunks/{useChatbotStore--PcS9kGN.js → useChatbotStore-DcvdWkgq.js} +3 -3
  113. package/dist-vue/_chunks/{useChatbotStore--PcS9kGN.js.map → useChatbotStore-DcvdWkgq.js.map} +1 -1
  114. package/dist-vue/_chunks/{utils-DmBnucJs.js → utils-BuxgMuKv.js} +125 -76
  115. package/dist-vue/_chunks/utils-BuxgMuKv.js.map +1 -0
  116. package/dist-vue/api.js +1 -1
  117. package/dist-vue/apps/web-component/src/composables/useChatbotAgent.d.ts +4 -0
  118. package/dist-vue/composables.js +8 -8
  119. package/dist-vue/composables.js.map +1 -1
  120. package/dist-vue/index.js +5620 -5554
  121. package/dist-vue/index.js.map +1 -1
  122. package/dist-vue/locales.js +18 -0
  123. package/dist-vue/packages/components/src/chat/PkAgentSettingsPanel.d.ts +8 -2
  124. package/dist-vue/packages/components/src/chat/PkAuroraCanvas.d.ts +10 -3
  125. package/dist-vue/packages/components/src/chat/useChatFilePreview.d.ts +2 -0
  126. package/dist-vue/packages/components/src/chat/utils.d.ts +29 -0
  127. package/dist-vue/packages/composable/src/chatbot/useChatbotStore.d.ts +12 -0
  128. package/dist-vue/packages/models/src/schema/Agent.d.ts +48 -0
  129. package/dist-vue/packages/models/src/schema/ReasoningChat.d.ts +12 -0
  130. package/dist-vue/packages/models/src/schema/SpreadsheetPreview.d.ts +5 -0
  131. package/dist-vue/packages/models/src/schema/SubAgent.d.ts +12 -0
  132. package/dist-vue/style.css +1 -1
  133. package/package.json +1 -1
  134. package/dist/_chunks/utils-Bz1Gb3iO.js.map +0 -1
  135. package/dist-vue/_chunks/PkChatbotMessages-pWNZCmM2.js +0 -1041
  136. package/dist-vue/_chunks/PkChatbotSteps-Dd62GEXJ.js +0 -189
  137. package/dist-vue/_chunks/PkChatbotViewChat-mWZvsKLA.js.map +0 -1
  138. package/dist-vue/_chunks/utils-DmBnucJs.js.map +0 -1
@@ -1,1041 +0,0 @@
1
- import { A as e, E as t, S as n, n as r, v as i } from "./schemas-BO5QlXAp.js";
2
- import { c as a } from "./Media-DylqhvaF.js";
3
- import { O as o, V as s, _ as c, k as l, r as u } from "./Agent-D3US-D1x.js";
4
- import { t as d } from "./VvButtonLocalized-C-vx25u4.js";
5
- import { t as f } from "./PkStreamingMarkdown-QDsT-4jC.js";
6
- import "./src-nb8MU1sh.js";
7
- import { c as p, i as m, l as h, n as g, o as _, s as v, t as y, u as b } from "./message-DuibQyHy.js";
8
- import { t as ee } from "./PkChatbotAudioTranscript-SSTh074Z.js";
9
- import { A as x, D as S, F as te, N as ne, O as C, T as re, _ as ie, b as ae, c as oe, g as se, j as ce, l as le, m as ue, n as de, p as fe, r as pe, t as w, v as me, w as he, y as ge } from "./utils-DmBnucJs.js";
10
- import { t as _e } from "./PkChatbotError-BS84xuiu.js";
11
- import { t as ve } from "./PkRelativeTime-CZF5CYHv.js";
12
- import { t as ye } from "./PkChatbotFilePreview-KxVpL0UT.js";
13
- import { t as be } from "./PkChatbotFeedbackForm-Bh3tvNUW.js";
14
- import { t as xe } from "./PkChatbotMessageFeedback-DltXugdR.js";
15
- import { n as Se, t as Ce } from "./PkChatbotSteps-Dd62GEXJ.js";
16
- import { t as we } from "./PkChatbotOutlineRail-BI-DMvZi.js";
17
- import { VvAccordion as T, VvButtonGroup as Te, VvIcon as Ee } from "@volverjs/ui-vue/components";
18
- import { Fragment as E, Transition as D, computed as O, createBlock as k, createCommentVNode as A, createElementBlock as j, createElementVNode as M, createTextVNode as De, createVNode as N, defineAsyncComponent as P, defineComponent as F, inject as Oe, mergeProps as ke, nextTick as I, normalizeClass as L, normalizeStyle as Ae, onBeforeUnmount as je, onMounted as Me, openBlock as R, ref as z, renderList as B, renderSlot as Ne, resolveDynamicComponent as Pe, shallowRef as Fe, toDisplayString as V, unref as H, useSlots as Ie, useTemplateRef as Le, watch as U, withCtx as W, withModifiers as G } from "vue";
19
- import { useI18n as Re } from "vue-i18n";
20
- import { useResizeObserver as ze } from "@vueuse/core";
21
- // ../../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/classic/iso.js
22
- function Be(t) {
23
- return e(r, t);
24
- }
25
- i({
26
- platform: n(),
27
- threadId: n()
28
- });
29
- var Ve = i({
30
- wakeId: t(),
31
- dueAt: Be(),
32
- reason: n()
33
- });
34
- i({ pendingWakeup: Ve.nullable() }), i({ wakeId: t() });
35
- var He = (e) => e?.role === "user" && !!e.metadata?.wakeup, Ue = /* @__PURE__ */ new Set([
36
- "input-streaming",
37
- "input-available",
38
- "approval-requested"
39
- ]), K = /* @__PURE__ */ new Set([
40
- ...l,
41
- ...o,
42
- ...c
43
- ]);
44
- [...o, u.ShowContactForm];
45
- var We = (e) => e.state, Ge = (e) => e.type.startsWith("tool-") ? e.type.slice(5) : void 0, Ke = (e) => e?.role === "assistant" && e.parts.some((e) => {
46
- if (e.type === "text") return e.text.trim().length > 0;
47
- if (e.type === "file") return !0;
48
- let t = We(e);
49
- if (t && Ue.has(t)) return !0;
50
- let n = Ge(e);
51
- return n !== void 0 && K.has(n) && t === "output-available";
52
- }), qe = (e) => {
53
- if (e?.role !== "assistant" || Ke(e)) return !1;
54
- let t = !1;
55
- for (let n of e.parts) n.type === "tool-scheduleWakeup" && (t = We(n) === "output-available" && n.input?.noop === !0);
56
- return t;
57
- }, Je = {
58
- requestOAuthConnection: P(() => import("./PkToolRequestOAuthConnection-C9_w8V0T.js")),
59
- shareDocument: P(() => import("./PkToolShareDocument-CsS5OTDj.js").then((e) => e.n)),
60
- showArtifact: P(() => import("./PkToolShowArtifact-ldnH-U3h.js").then((e) => e.n)),
61
- showCalendarEvent: P(() => import("./PkToolShowCalendarEvent-BsAOYLjp.js").then((e) => e.n)),
62
- showComparison: P(() => import("./PkToolShowComparison-BEHyRNXE.js").then((e) => e.n)),
63
- showContactForm: P(() => import("./PkToolShowContactForm-4hISKYqb.js").then((e) => e.n)),
64
- showDiagram: P(() => import("./PkToolShowDiagram-uHFCQ0FJ.js")),
65
- showEmail: P(() => import("./PkToolShowEmail-BehvoNsz.js").then((e) => e.n)),
66
- showImageGallery: P(() => import("./PkToolShowImageGallery-CEzeXupr.js").then((e) => e.n)),
67
- showLocation: P(() => import("./PkToolShowLocation-DAQEuCuQ.js").then((e) => e.n)),
68
- showMessage: P(() => import("./PkToolShowMessage-Cca7K7GQ.js").then((e) => e.n)),
69
- showForm: P(() => import("./PkToolShowForm-DiUz5_Ct.js").then((e) => e.n)),
70
- showMultipleChoice: P(() => import("./PkToolShowForm-DiUz5_Ct.js").then((e) => e.n)),
71
- showProductList: P(() => import("./PkToolShowProductList-h4Dqvk1V.js").then((e) => e.n)),
72
- showQrCode: P(() => import("./PkToolShowQrCode-skWaARYV.js").then((e) => e.n)),
73
- showSources: P(() => import("./PkToolShowSources-BJd4zYAY.js").then((e) => e.n)),
74
- showSuggestedReply: P(() => import("./PkToolShowSuggestedReply-Bb7Inxa4.js").then((e) => e.n)),
75
- showVideo: P(() => import("./PkToolShowVideo-DgkpZriW.js")),
76
- showWeather: P(() => import("./PkToolShowWeather-BC-Rx-sI.js")),
77
- showWebPages: P(() => import("./PkToolShowWebPages-DQr3SEGC.js").then((e) => e.n))
78
- }, Ye = {
79
- key: 0,
80
- class: "text-12 text-word-3 m-0 mb-xs"
81
- }, q = /* @__PURE__ */ F({
82
- __name: "PkToolApprovalPreviewMessage",
83
- props: { input: {} },
84
- setup(e) {
85
- let t = e, n = O(() => {
86
- let e = t.input;
87
- return typeof e?.message == "string" ? e.message : "";
88
- });
89
- return (e, t) => n.value ? (R(), j("p", Ye, V(n.value), 1)) : A("", !0);
90
- }
91
- }), J = { [w]: q }, Xe = {
92
- key: 0,
93
- class: "text-12 text-word-3 m-0 mb-xs"
94
- }, Ze = /* @__PURE__ */ F({
95
- __name: "PkToolApprovalCard",
96
- props: {
97
- part: {},
98
- actionable: { type: Boolean },
99
- callVerdict: { type: Boolean }
100
- },
101
- emits: ["respond"],
102
- setup(e, { emit: t }) {
103
- let n = e, r = t, { t: i, te: a } = Re({ useScope: "global" }), o = O(() => n.part), c = O(() => m(n.part)), l = O(() => c.value === w), u = O(() => l.value ? (o.value.state === "input-available" || s(o.value.output)) && n.callVerdict === void 0 : o.value.state === "approval-requested"), f = O(() => u.value && n.actionable === !0), p = O(() => u.value && n.actionable !== !0), h = O(() => l.value ? o.value.output === "confirmed" || n.callVerdict === !0 : o.value.approval?.approved === !0), g = O(() => l.value ? o.value.output === "cancelled" || n.callVerdict === !1 : o.value.approval?.approved === !1 || o.value.state === "output-denied"), _ = O(() => J[c.value]), v = O(() => _.value ? i("toolApproval.prompt") : i("toolApproval.promptNamed", { tool: te(c.value, {
104
- t: i,
105
- te: a
106
- }) })), y = O(() => {
107
- if (p.value) return {
108
- icon: "ri:time-line",
109
- message: i("toolApproval.expired")
110
- };
111
- if (h.value) return {
112
- icon: "ri:check-line",
113
- message: i(l.value ? "toolApproval.confirmed" : "toolApproval.approved")
114
- };
115
- if (g.value) return {
116
- icon: "ri:close-line",
117
- message: i(l.value ? "toolApproval.cancelled" : "toolApproval.denied")
118
- };
119
- }), b = O(() => !!y.value && !_.value);
120
- return (t, n) => {
121
- let a = d, s = Te, c = Ee;
122
- return R(), j("div", { class: L(["w-full overflow-hidden transition-all duration-300", { "bg-surface p-sm rounded-xl border border-surface-3": !b.value }]) }, [
123
- N(D, null, {
124
- default: W(() => [!l.value && u.value ? (R(), j("p", Xe, V(v.value), 1)) : A("", !0)]),
125
- _: 1
126
- }),
127
- _.value ? (R(), k(Pe(_.value), {
128
- key: 0,
129
- part: e.part,
130
- input: o.value.input
131
- }, null, 8, ["part", "input"])) : A("", !0),
132
- N(D, { mode: "out-in" }, {
133
- default: W(() => [y.value ? (R(), j("p", {
134
- key: 1,
135
- class: L(["flex items-center gap-4 text-12 text-word-3 m-0", { "mt-xs": _.value }])
136
- }, [N(c, {
137
- name: y.value.icon,
138
- class: "shrink-0"
139
- }, null, 8, ["name"]), De(" " + V(y.value.message), 1)], 2)) : (R(), k(s, { key: 0 }, {
140
- default: W(() => [N(a, {
141
- modifiers: "primary-small",
142
- disabled: !f.value,
143
- icon: "ri:check-line",
144
- label: H(i)("action.proceed"),
145
- onClick: n[0] ||= G((e) => r("respond", !0), ["stop"])
146
- }, null, 8, ["disabled", "label"]), N(a, {
147
- modifiers: "action-quiet-small",
148
- disabled: !f.value,
149
- icon: "ri:close-line",
150
- label: H(i)("action.cancel"),
151
- onClick: n[1] ||= G((e) => r("respond", !1), ["stop"])
152
- }, null, 8, ["disabled", "label"])]),
153
- _: 1
154
- }))]),
155
- _: 1
156
- })
157
- ], 2);
158
- };
159
- }
160
- }), Qe = { class: "pk-host-call-confirm-card w-full bg-surface p-sm rounded-xl border border-surface-3" }, $e = { class: "text-14 text-word-2 m-0 mb-xs" }, et = {
161
- key: 0,
162
- class: "pk-host-call-confirm-card__changes text-14 mb-xs"
163
- }, tt = { key: 0 }, nt = { scope: "col" }, rt = { scope: "col" }, Y = { scope: "col" }, it = { scope: "row" }, at = { key: 0 }, ot = {
164
- key: 0,
165
- class: "pk-host-call-confirm-card__removed"
166
- }, st = {
167
- key: 0,
168
- class: "pk-host-call-confirm-card__added"
169
- }, ct = {
170
- key: 1,
171
- class: "pk-host-call-confirm-card__details text-14 m-0 mb-xs"
172
- }, lt = {
173
- key: 0,
174
- class: "text-word-3 truncate"
175
- }, ut = {
176
- key: 2,
177
- class: "text-12 text-word-3 m-0 mb-xs"
178
- }, dt = { class: "pk-host-call-confirm-card__details text-12 m-0" }, ft = { class: "text-word-3" }, pt = { class: "text-word-2 m-0" }, mt = /* @__PURE__ */ F({
179
- __name: "PkHostCallConfirmCard",
180
- props: {
181
- question: {},
182
- details: {},
183
- unchanged: {}
184
- },
185
- emits: ["respond"],
186
- setup(e, { emit: t }) {
187
- let n = e, r = t, i = O(() => n.details?.some((e) => e.before !== void 0) ?? !1), a = O(() => n.details?.some((e) => !!e.before) ?? !1);
188
- return (t, n) => {
189
- let o = T, s = d, c = Te;
190
- return R(), j("div", Qe, [
191
- M("p", $e, V(e.question), 1),
192
- e.details?.length && i.value ? (R(), j("table", et, [a.value ? (R(), j("thead", tt, [M("tr", null, [
193
- M("th", nt, V(t.$t("toolApproval.fieldColumn")), 1),
194
- M("th", rt, V(t.$t("toolApproval.beforeColumn")), 1),
195
- M("th", Y, V(t.$t("toolApproval.afterColumn")), 1)
196
- ])])) : A("", !0), M("tbody", null, [(R(!0), j(E, null, B(e.details, (e, t) => (R(), j("tr", { key: t }, [
197
- M("th", it, V(e.label), 1),
198
- a.value ? (R(), j("td", at, [e.before ? (R(), j("del", ot, V(e.before), 1)) : A("", !0)])) : A("", !0),
199
- M("td", null, [e.value ? (R(), j("ins", st, V(e.value), 1)) : A("", !0)])
200
- ]))), 128))])])) : e.details?.length ? (R(), j("dl", ct, [(R(!0), j(E, null, B(e.details, (e, t) => (R(), j(E, { key: t }, [e.label ? (R(), j("dt", lt, V(e.label), 1)) : A("", !0), M("dd", { class: L(["text-word-1 m-0 truncate", { "pk-host-call-confirm-card__alone": !e.label }]) }, V(e.value), 3)], 64))), 128))])) : e.unchanged?.length ? (R(), j("p", ut, V(t.$t("toolApproval.noChanges")), 1)) : A("", !0),
201
- e.unchanged?.length ? (R(), k(o, {
202
- key: 3,
203
- title: t.$t("toolApproval.unchangedFields", e.unchanged.length),
204
- modifiers: "compact",
205
- class: "mb-xs"
206
- }, {
207
- default: W(() => [M("dl", dt, [(R(!0), j(E, null, B(e.unchanged, (e, t) => (R(), j(E, { key: t }, [M("dt", ft, V(e.label), 1), M("dd", pt, V(e.value), 1)], 64))), 128))])]),
208
- _: 1
209
- }, 8, ["title"])) : A("", !0),
210
- N(c, null, {
211
- default: W(() => [N(s, {
212
- modifiers: "primary-small",
213
- icon: "ri:check-line",
214
- label: t.$t("action.proceed"),
215
- onClick: n[0] ||= G((e) => r("respond", !0), ["stop"])
216
- }, null, 8, ["label"]), N(s, {
217
- modifiers: "action-quiet-small",
218
- icon: "ri:close-line",
219
- label: t.$t("action.cancel"),
220
- onClick: n[1] ||= G((e) => r("respond", !1), ["stop"])
221
- }, null, 8, ["label"])]),
222
- _: 1
223
- })
224
- ]);
225
- };
226
- }
227
- }), ht = 30, gt = 500;
228
- function _t(e) {
229
- let { scrollEl: t, status: n, messagesLength: r, lastMessageRole: i, contentEl: a, beforeNewMessageScroll: o, onScrollUp: s, onScrollDown: c } = e, l = z(!1), u = z(!0), d = !1, f = null, p = null, m = null, h = null, g = 0, _ = (e = "smooth") => {
230
- !t.value || l.value ? d = !1 : (d = !0, t.value.scrollTo({
231
- top: t.value.scrollHeight,
232
- behavior: e
233
- }), setTimeout(() => {
234
- d = !1;
235
- }, e === "instant" ? 0 : gt));
236
- }, v = (e) => {
237
- e.deltaY < 0 && (l.value = !0);
238
- }, y = 0, b = (e) => {
239
- y = e.touches[0]?.clientY ?? 0;
240
- }, ee = (e) => {
241
- let t = e.touches[0]?.clientY ?? 0;
242
- t > y && (l.value = !0), y = t;
243
- }, x = () => {
244
- if (!t.value) return;
245
- let { scrollTop: e, scrollHeight: n, clientHeight: r } = t.value;
246
- u.value = n - r - e < ht, d || (e < g && s?.(), e > g && (u.value && (l.value = !1), c?.())), g = e;
247
- }, S = () => {
248
- if (d || l.value || !t.value) return;
249
- let e = t.value, n = e.scrollHeight - e.clientHeight;
250
- n <= e.scrollTop || (u.value = !0, d = !0, e.scrollTop = n, requestAnimationFrame(() => {
251
- d = !1;
252
- }));
253
- }, te = () => {
254
- !f && t.value && (f = new MutationObserver(S), f.observe(t.value, {
255
- childList: !0,
256
- subtree: !0,
257
- characterData: !0
258
- }));
259
- }, ne = () => {
260
- f?.disconnect(), f = null;
261
- };
262
- U(n, (e, t) => {
263
- e === "streaming" || e === "submitted" ? te() : (e !== "ready" || t !== "streaming") && ne();
264
- }), U(r, async () => {
265
- if (r() && i() !== "assistant") {
266
- ie(), l.value = !1, d = !0;
267
- try {
268
- await I(), await o?.(), await I();
269
- } finally {
270
- _();
271
- }
272
- }
273
- });
274
- let C = null, re = () => {
275
- t.value && (t.value.scrollHeight <= t.value.clientHeight || (t.value.scrollTop = t.value.scrollHeight, C && clearTimeout(C), C = setTimeout(ie, 300)));
276
- }, ie = () => {
277
- p?.disconnect(), p = null, m?.disconnect(), m = null, C &&= (clearTimeout(C), null);
278
- };
279
- return Me(() => {
280
- if (!t.value) return;
281
- t.value.addEventListener("wheel", v, { passive: !0 }), t.value.addEventListener("touchstart", b, { passive: !0 }), t.value.addEventListener("touchmove", ee, { passive: !0 });
282
- let e = n() === "submitted" || n() === "streaming";
283
- e ? te() : (p = new ResizeObserver(re), p.observe(t.value), m = new MutationObserver(re), m.observe(t.value, {
284
- childList: !0,
285
- subtree: !0
286
- }));
287
- let r = a?.() ?? t.value.firstElementChild;
288
- r && (h = new ResizeObserver(S), h.observe(r)), e || re();
289
- }), je(() => {
290
- t.value?.removeEventListener("wheel", v), t.value?.removeEventListener("touchstart", b), t.value?.removeEventListener("touchmove", ee), h?.disconnect(), h = null, ne(), ie();
291
- }), {
292
- handleScroll: x,
293
- scrollToBottom: _,
294
- userScrolledUp: l,
295
- isAtBottom: u
296
- };
297
- }
298
- // ../../packages/components/src/chat/wakeupFeed.ts
299
- function vt(e, t = () => !1) {
300
- let n = (e) => qe(e) && !t(e), r = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Map(), a = 0;
301
- for (; a < e.length;) {
302
- let t = e[a];
303
- if (He(t) && n(e[a + 1])) {
304
- let o = t.id, s = 0, c;
305
- for (; He(e[a]) && n(e[a + 1]);) s += 1, c = e[a].metadata?.createdAt ?? c, r.add(e[a].id), r.add(e[a + 1].id), a += 2;
306
- i.set(o, {
307
- count: s,
308
- lastAt: c
309
- });
310
- } else n(t) && r.add(t.id), a += 1;
311
- }
312
- return {
313
- hidden: r,
314
- quietRuns: i
315
- };
316
- }
317
- // ../../packages/components/src/chat/PkChatbotMessages.vue?vue&type=script&setup=true&lang.ts
318
- var yt = ["aria-busy"], bt = {
319
- key: 0,
320
- class: "pk-chatbot-messages__outline"
321
- }, xt = {
322
- key: 0,
323
- class: "pk-chatbot-divider vv-separator"
324
- }, St = { class: "pk-chatbot-divider__label" }, Ct = {
325
- key: 1,
326
- class: "pk-chatbot-wakeup"
327
- }, wt = ["title"], Tt = { class: "pk-chatbot-message__text" }, Et = ["title"], Dt = {
328
- key: 0,
329
- class: "pk-chatbot-message__reaction-emoji"
330
- }, Ot = {
331
- key: 0,
332
- class: "flex flex-col items-end gap-8 w-full"
333
- }, kt = { class: "pk-chatbot-message__host-call" }, At = { class: "pk-chatbot-message__host-call-label" }, jt = {
334
- key: 0,
335
- class: "pk-chatbot-message__host-call-outcome"
336
- }, Mt = {
337
- key: 0,
338
- class: "pk-chatbot-message__loading-info"
339
- }, Nt = { class: "flex gap-8 items-center" }, Pt = { class: "text-12" }, Ft = ["title"], It = { class: "pk-chatbot-message__pointer-label" }, Lt = { class: "flex gap-8 items-center" }, Rt = {
340
- key: 0,
341
- class: "pk-chatbot-message__footer"
342
- }, zt = {
343
- key: 0,
344
- class: "pk-chatbot-message__hover-meta"
345
- }, Bt = ["datetime", "title"], Vt = { class: "truncate" }, Ht = {
346
- key: 0,
347
- class: "flex items-center gap-4 min-w-0"
348
- }, Ut = { class: "truncate" }, Wt = ["title"], Gt = {
349
- key: 2,
350
- class: "flex items-center gap-4 text-12 text-word-3"
351
- }, Kt = { class: "truncate" }, qt = ["datetime"], Jt = { class: "truncate" }, Yt = {
352
- key: 4,
353
- class: "flex items-center gap-4 text-12 text-word-3"
354
- }, Xt = { class: "pk-chatbot-message__loading-info" }, Zt = { class: "flex gap-8 items-center" }, Qt = { class: "text-12" }, $t = {
355
- key: 0,
356
- class: "pk-chatbot-message pk-chatbot-message--assistant"
357
- }, en = ["title", "aria-label"], X = /* @__PURE__ */ F({
358
- __name: "PkChatbotMessages",
359
- props: {
360
- status: {},
361
- messages: {},
362
- error: {},
363
- actions: {},
364
- mainColor: {},
365
- textColor: {},
366
- revisedAnswers: {},
367
- messageFeedbacks: {},
368
- readonlyFeedback: { type: Boolean },
369
- disableHeightAdjustment: { type: Boolean },
370
- showMessageDateTime: { type: Boolean },
371
- showMessageTokensCount: { type: Boolean },
372
- showMessageNumber: { type: Boolean },
373
- showAllMessageParts: { type: Boolean },
374
- interactive: { type: Boolean },
375
- showExtendedSteps: { type: Boolean },
376
- hideReasoning: { type: Boolean },
377
- awaitingSpokenAnswer: { type: Boolean },
378
- hostWorking: { type: Boolean },
379
- hostConfirmation: {},
380
- confirmVerdictsOnCall: {},
381
- isDark: { type: Boolean },
382
- showScrollToBottom: { type: Boolean },
383
- parentScrolls: { type: Boolean },
384
- feedbackMessageId: {},
385
- feedbackLoading: { type: Boolean },
386
- feedbackSubmitted: { type: Boolean },
387
- feedbackError: {}
388
- },
389
- emits: [
390
- "show-info",
391
- "regenerate",
392
- "revise",
393
- "upvote",
394
- "downvote",
395
- "feedback",
396
- "feedback-submit",
397
- "feedback-close",
398
- "scroll-up",
399
- "scroll-down",
400
- "auto-retry",
401
- "reset-chat",
402
- "approval-respond",
403
- "confirm-respond",
404
- "host-confirm-respond"
405
- ],
406
- setup(e, { emit: t }) {
407
- let n = e, r = t, { t: i, te: o, d: s, n: c } = Re({ useScope: "global" }), l = Oe(de, void 0), u = Ie(), te = (e, t) => {
408
- if (C(e)) {
409
- let n = e.toolCallId;
410
- n && r("confirm-respond", {
411
- toolCallId: n,
412
- confirmed: t
413
- });
414
- return;
415
- }
416
- let n = ge(e);
417
- n && r("approval-respond", {
418
- id: n,
419
- approved: t
420
- });
421
- }, w = Le("scrollEl"), T = Le("wrapperEl"), P = O(() => ne(n.textColor, n.mainColor)), { handleScroll: F, scrollToBottom: je, userScrolledUp: Be, isAtBottom: Ve } = _t({
422
- scrollEl: w,
423
- status: () => n.status,
424
- messagesLength: () => n.messages?.length,
425
- lastMessageRole: () => n.messages?.[n.messages.length - 1]?.role,
426
- contentEl: () => T.value,
427
- beforeNewMessageScroll: () => nt(),
428
- onScrollUp: () => r("scroll-up"),
429
- onScrollDown: () => r("scroll-down")
430
- }), Ue = () => {
431
- Be.value = !1, je();
432
- }, K = O(() => (n.messages ?? []).filter((e) => e.role === "user" && !He(e)).map((e) => ({
433
- id: e.id,
434
- preview: e.parts.find(h)?.text.trim().slice(0, 120) || "…"
435
- }))), We = z(), Ge = () => w.value?.querySelectorAll(".pk-chatbot-message--user") ?? [], Ke = () => {
436
- let e = w.value;
437
- if (!e || !n.showScrollToBottom) return;
438
- let t = e.getBoundingClientRect().top + e.clientHeight / 2, r = K.value[0]?.id;
439
- Ge().forEach((e, n) => {
440
- e.getBoundingClientRect().top <= t && (r = K.value[n]?.id);
441
- }), We.value = r;
442
- };
443
- U(K, async () => {
444
- await I(), Ke();
445
- });
446
- let qe = () => {
447
- F(), Ke();
448
- }, Ye = (e) => {
449
- let t = w.value, n = K.value.findIndex((t) => t.id === e), r = Ge()[n];
450
- t && r && (Be.value = !0, t.scrollTo({
451
- top: t.scrollTop + r.getBoundingClientRect().top - t.getBoundingClientRect().top - Number.parseFloat(getComputedStyle(t).paddingTop),
452
- behavior: "smooth"
453
- }));
454
- }, q = O(() => n.status === "submitted" || n.status === "streaming" || n.hostWorking === !0), J = z(0), Xe = z(!1), Qe = !1, $e = Fe(), et = () => n.messages?.[n.messages.length - 1]?.role === "user" || q.value, tt = () => {
455
- Qe = !1, Xe.value = !0, J.value = 0;
456
- }, nt = async () => {
457
- if (!n.messages?.length || n.disableHeightAdjustment) return;
458
- if (!et()) {
459
- Qe && (await I(), w.value?.scrollHeight, et() || tt());
460
- return;
461
- }
462
- if (Qe = !0, Xe.value = !1, await I(), !w.value) return;
463
- let { paddingTop: e, paddingBottom: t } = getComputedStyle(w.value), r = w.value.clientHeight - Number.parseFloat(e) - Number.parseFloat(t), i = T.value && Number.parseFloat(getComputedStyle(T.value).rowGap) || 0, a = Ge();
464
- $e.value = a[a.length - 1];
465
- let o = r - ($e.value?.clientHeight ?? 0) - i;
466
- r > 0 && (J.value = Math.max(o, 0)), await I();
467
- };
468
- U([() => n.messages?.length, () => n.messages?.[n.messages.length - 1]?.id], () => nt()), ze([w, $e], () => {
469
- Qe && nt();
470
- }), Me(() => {
471
- (q.value || n.awaitingSpokenAnswer) && nt();
472
- }), U(q, (e) => {
473
- e || tt();
474
- });
475
- let rt = (e) => n.revisedAnswers?.some((t) => t.messageId === e), Y = (e) => n.messageFeedbacks?.find((t) => t.messageId === e), it = /* @__PURE__ */ new Set([
476
- "showContactForm",
477
- "showForm",
478
- "showMultipleChoice",
479
- "showSuggestedReply"
480
- ]), at = /* @__PURE__ */ new Set(["showDiagram", "showLocation"]), ot = (e) => {
481
- let t = m(e);
482
- return {
483
- ...!n.interactive && it.has(t) ? { record: !0 } : {},
484
- ...at.has(t) ? { isDark: n.isDark } : {}
485
- };
486
- }, st = (e, t) => !n.readonlyFeedback && fn(e, t), ct = (e) => n.readonlyFeedback ? Y(e) : void 0, lt = (e) => ct(e)?.vote, ut = (e) => {
487
- let t = ct(e);
488
- if (t?.vote) return;
489
- let n = t?.metadata?.reactionEmoji;
490
- return typeof n == "string" && /\p{Extended_Pictographic}/u.test(n) ? n : void 0;
491
- }, dt = (e) => !!(lt(e) || ut(e)), ft = (e) => {
492
- if (ut(e)) return "pk-chatbot-message__reaction--neutral";
493
- let t = lt(e);
494
- return t === "upvote" ? "pk-chatbot-message__reaction--positive" : t === "downvote" ? "pk-chatbot-message__reaction--negative" : "pk-chatbot-message__reaction--neutral";
495
- }, pt = (e) => {
496
- let t = lt(e);
497
- return i(t === "upvote" ? "hint.userFeedbackPositive" : t === "downvote" ? "hint.userFeedbackNegative" : "hint.userFeedbackReaction");
498
- }, ht = (e) => {
499
- let t = nn(e);
500
- for (let e = t.length - 1; e >= 0; --e) if (h(t[e])) return e;
501
- return -1;
502
- }, gt = O(() => n.messages?.[n.messages.length - 1]), X = O(() => {
503
- let e = gt.value;
504
- return e ? e.parts[e.parts.length - 1] : null;
505
- }), tn = O(() => {
506
- let e = /* @__PURE__ */ new Map();
507
- for (let t of n.messages ?? []) t.role === "assistant" && e.set(t.id, ce(oe(x(t.parts))));
508
- return e;
509
- }), nn = (e) => tn.value.get(e.id) ?? e.parts, rn = O(() => n.status === "error"), an = O(() => n.awaitingSpokenAnswer === !0 && !q.value), on = O(() => an.value && gt.value?.role === "user" && !rn.value), sn = (e, t) => t(), cn = O(() => {
510
- let e = X.value;
511
- return ae(i, e, l?.value);
512
- }), ln = O(() => {
513
- let e = X.value;
514
- return se(e);
515
- }), un = (e) => n.messages?.findIndex((t) => t.id === e), Z = (e) => e === void 0 || !n.messages ? !1 : e === n.messages.length - 1, dn = (e) => Z(e) && n.status === "ready" && !n.hostWorking && !!n.actions?.includes("regenerate"), fn = (e, t) => (!Z(t) || n.status === "ready" && !n.hostWorking) && !!n.actions?.includes(e), pn = (e) => {
516
- let t = e.parts[e.parts.length - 1];
517
- return h(t);
518
- }, mn = (e) => e.parts.some((e) => p(e) || b(e) || !!ue(e)), hn = (e) => !!n.showExtendedSteps && Q(e) && mn(e), gn = (e) => n.hostConfirmation !== void 0 && ue(e) !== void 0 && e.toolCallId === n.hostConfirmation.toolCallId, _n = O(() => n.hostConfirmation !== void 0 && !n.messages?.some((e) => e.parts.some(gn))), vn = (e, t) => q.value && Z(e) && ue(t)?.state === "input-available", yn = (e, t, n, r) => {
519
- if (!ue(n) || hn(e)) return !1;
520
- let i = vn(t, n);
521
- return i && r === nn(e).length - 1 ? !1 : i || re(n) || !_(e);
522
- }, bn = (e, t) => {
523
- let n = ue(t);
524
- return n?.state === "output-error" ? i(n.errorText === "The user refused this call. Do not repeat it unless the user asks." ? "toolApproval.denied" : "messagePart.hostToolFailed") : n?.state === "input-available" && !vn(e, t) ? i("messagePart.hostToolNoAnswer") : void 0;
525
- }, xn = (e) => b(e) && !S(e) && !!(Je[m(e)] || u[e.type] || n.showAllMessageParts), Sn = (e) => e.parts.some((e) => h(e) && !!e.text.trim() || v(e) || he(e) && !S(e) || xn(e)), Q = (e) => e.role === "assistant", Cn = (e) => e.role === "user", wn = (e) => n.messages?.slice(0, e).reverse().find((e) => Q(e)), Tn = (e) => n.messages?.slice(e + 1).find((e) => Q(e)), En = (e) => {
526
- let t = wn(e)?.metadata?.createdAt, n = Tn(e)?.metadata?.createdAt;
527
- if (!t || !n) return;
528
- let r = new Date(t), i = new Date(n);
529
- return r.toDateString() === i.toDateString() ? void 0 : i;
530
- }, $ = O(() => n.showAllMessageParts ? vt([]) : vt(n.messages ?? [], Sn)), Dn = O(() => {
531
- let e = 0;
532
- return (n.messages ?? []).map((t) => t.parts.length > 0 ? ++e : void 0);
533
- }), On = (e, t) => t === 0 || e.role !== "assistant" ? !1 : !!(n.actions?.length || n.showMessageNumber || n.showMessageDateTime && e.metadata?.createdAt !== void 0 || e.metadata?.completedAt !== void 0 || n.showMessageTokensCount && e.metadata?.totalTokens !== void 0), kn = (e) => {
534
- let t = new Date(e), n = t.toDateString() === (/* @__PURE__ */ new Date()).toDateString();
535
- return s(t, n ? "time" : "date-time");
536
- }, An = (e) => {
537
- let { createdAt: t, completedAt: n } = e.metadata ?? {};
538
- if (t && n) return fe(c, n - t);
539
- }, jn = Le("feedbackMessageEl");
540
- return U(() => n.feedbackMessageId, async () => {
541
- if (await I(), !n.feedbackMessageId) return;
542
- let e = jn.value?.[0]?.$el;
543
- e && (Z(un(n.feedbackMessageId)) ? je() : e.scrollIntoView({
544
- behavior: "smooth",
545
- block: "center"
546
- }));
547
- }), (t, n) => {
548
- let p = Ee, _ = d, b = Te;
549
- return R(), j("div", {
550
- ref_key: "scrollEl",
551
- ref: w,
552
- class: L(["pk-chatbot-messages scrollbar-thin", {
553
- "pk-chatbot-messages--settling": Xe.value,
554
- "pk-chatbot-messages--parent-scrolls": e.parentScrolls
555
- }]),
556
- role: "log",
557
- "aria-live": "polite",
558
- "aria-relevant": "additions text",
559
- "aria-busy": q.value,
560
- style: Ae({
561
- "--chatbot-main-color": e.mainColor,
562
- "--chatbot-contrast-color": P.value
563
- }),
564
- onScroll: qe
565
- }, [
566
- e.showScrollToBottom && K.value.length > 1 ? (R(), j("div", bt, [N(we, {
567
- items: K.value,
568
- "active-id": We.value,
569
- onSelect: Ye
570
- }, null, 8, ["items", "active-id"])])) : A("", !0),
571
- M("div", {
572
- ref_key: "wrapperEl",
573
- ref: T,
574
- class: "pk-chatbot-messages__wrapper"
575
- }, [
576
- (R(!0), j(E, null, B(e.messages, (d, x) => (R(), j(E, { key: d.id }, [
577
- Cn(d) && En(x) ? (R(), j("div", xt, [M("span", St, V(H(s)(En(x), "short")), 1)])) : A("", !0),
578
- $.value.quietRuns.has(d.id) ? (R(), j("div", Ct, [N(p, {
579
- name: "ri:alarm-line",
580
- class: "shrink-0"
581
- }), M("span", null, V(H(i)("label.wakeupQuietRun", {
582
- count: $.value.quietRuns.get(d.id).count,
583
- time: H(s)($.value.quietRuns.get(d.id).lastAt ?? Date.now(), "time")
584
- }, $.value.quietRuns.get(d.id).count)), 1)])) : H(He)(d) && !$.value.hidden.has(d.id) && !e.showAllMessageParts ? (R(), j("div", {
585
- key: 2,
586
- class: "pk-chatbot-wakeup",
587
- title: d.metadata?.wakeup?.reason
588
- }, [N(p, {
589
- name: "ri:alarm-line",
590
- class: "shrink-0"
591
- }), M("span", null, [De(V(H(i)("label.wakeupCheck")) + " ", 1), d.metadata?.createdAt ? (R(), j(E, { key: 0 }, [De(" · " + V(H(s)(d.metadata.createdAt, "time")), 1)], 64)) : A("", !0)])], 8, wt)) : A("", !0),
592
- (!H(He)(d) || e.showAllMessageParts) && (!$.value.hidden.has(d.id) || q.value && Z(x)) && (d.parts.length || Z(x) && q.value && Q(d)) ? (R(), j("div", {
593
- key: 3,
594
- class: L(["pk-chatbot-message", [`pk-chatbot-message--${d.role}`, { "pk-chatbot-message--loading": q.value && Z(x) && Q(d) }]]),
595
- style: Ae({ minHeight: Z(x) && Q(d) && !rn.value ? `${J.value}px` : void 0 })
596
- }, [
597
- N(D, {
598
- appear: "",
599
- name: "pk-chatbot-part"
600
- }, {
601
- default: W(() => [hn(d) ? (R(), k(Ce, {
602
- key: 0,
603
- message: d,
604
- "is-streaming": q.value && Z(x),
605
- "has-content": Sn(d),
606
- "hide-reasoning": e.hideReasoning,
607
- "is-dark": e.isDark
608
- }, null, 8, [
609
- "message",
610
- "is-streaming",
611
- "has-content",
612
- "hide-reasoning",
613
- "is-dark"
614
- ])) : A("", !0)]),
615
- _: 2
616
- }, 1024),
617
- (R(!0), j(E, null, B(nn(d), (s, c) => (R(), j(E, { key: H(le)(s, c) }, [H(h)(s) && s.text.trim() ? (R(), k(D, {
618
- key: 0,
619
- appear: "",
620
- name: "pk-chatbot-part"
621
- }, {
622
- default: W(() => [M("div", Tt, [Ne(t.$slots, "text", ke({ ref_for: !0 }, {
623
- message: d,
624
- part: s,
625
- index: x,
626
- isLoading: q.value
627
- }), () => [Q(d) ? (R(), k(f, {
628
- key: 0,
629
- class: "wysiwyg",
630
- markdown: s.text,
631
- "is-dark": e.isDark,
632
- loading: Z(x) && e.status === "streaming"
633
- }, null, 8, [
634
- "markdown",
635
- "is-dark",
636
- "loading"
637
- ])) : (R(), j(E, { key: 1 }, [De(V(s.text), 1)], 64))]), dt(d.id) && !Y(d.id)?.comment && c === ht(d) ? (R(), j("span", {
638
- key: 0,
639
- class: L(["pk-chatbot-message__reaction", ft(d.id)]),
640
- title: pt(d.id)
641
- }, [ut(d.id) ? (R(), j("span", Dt, V(ut(d.id)), 1)) : (R(), k(p, {
642
- key: 1,
643
- name: lt(d.id) === "downvote" ? "ri:thumb-down-fill" : "ri:thumb-up-fill"
644
- }, null, 8, ["name"]))], 10, Et)) : A("", !0)])]),
645
- _: 2
646
- }, 1024)) : H(v)(s) ? (R(), k(D, {
647
- key: 1,
648
- appear: "",
649
- name: "pk-chatbot-part"
650
- }, {
651
- default: W(() => [H(a)(s.filename, s.mediaType) ? (R(), j("div", Ot, [N(ye, {
652
- "media-type": s.mediaType,
653
- url: s.url,
654
- filename: s.filename,
655
- size: H(y)(s)?.bytesCount
656
- }, null, 8, [
657
- "media-type",
658
- "url",
659
- "filename",
660
- "size"
661
- ]), N(ee, {
662
- url: s.url,
663
- transcript: H(g)(s),
664
- pending: e.status === "submitted" && Z(x)
665
- }, null, 8, [
666
- "url",
667
- "transcript",
668
- "pending"
669
- ])])) : (R(), k(ye, {
670
- key: 1,
671
- "media-type": s.mediaType,
672
- url: s.url,
673
- filename: s.filename,
674
- size: H(y)(s)?.bytesCount
675
- }, null, 8, [
676
- "media-type",
677
- "url",
678
- "filename",
679
- "size"
680
- ]))]),
681
- _: 2
682
- }, 1024)) : H(he)(s) && !H(S)(s) ? (R(), k(D, {
683
- key: 2,
684
- appear: "",
685
- name: "pk-chatbot-part"
686
- }, {
687
- default: W(() => [(R(), k(Ze, {
688
- key: `approval-${c}`,
689
- part: s,
690
- actionable: e.interactive === !0 && (H(C)(s) || Z(x)),
691
- "call-verdict": e.confirmVerdictsOnCall?.get(s.toolCallId ?? ""),
692
- onRespond: (e) => te(s, e)
693
- }, null, 8, [
694
- "part",
695
- "actionable",
696
- "call-verdict",
697
- "onRespond"
698
- ]))]),
699
- _: 2
700
- }, 1024)) : gn(s) ? (R(), k(D, {
701
- key: 3,
702
- appear: "",
703
- name: "pk-chatbot-part"
704
- }, {
705
- default: W(() => [N(mt, {
706
- question: e.hostConfirmation?.question ?? H(i)("toolApproval.hostCall", { name: H(ae)(H(i), s) }),
707
- details: e.hostConfirmation?.details,
708
- unchanged: e.hostConfirmation?.unchanged,
709
- onRespond: n[0] ||= (e) => r("host-confirm-respond", e)
710
- }, null, 8, [
711
- "question",
712
- "details",
713
- "unchanged"
714
- ])]),
715
- _: 2
716
- }, 1024)) : yn(d, x, s, c) ? (R(), k(D, {
717
- key: 4,
718
- appear: "",
719
- name: "pk-chatbot-part"
720
- }, {
721
- default: W(() => [M("div", kt, [
722
- N(p, {
723
- name: vn(x, s) ? "loading-loop" : H(se)(s) ?? "ri:apps-line",
724
- class: "shrink-0"
725
- }, null, 8, ["name"]),
726
- M("span", At, V(H(ae)(H(i), s, H(l))), 1),
727
- bn(x, s) ? (R(), j("span", jt, " · " + V(bn(x, s)), 1)) : A("", !0)
728
- ])]),
729
- _: 2
730
- }, 1024)) : xn(s) ? (R(), k(D, {
731
- key: 5,
732
- appear: "",
733
- name: "pk-chatbot-part"
734
- }, {
735
- default: W(() => [!H(u)[s.type] && H(Je)[H(m)(s)] ? (R(), k(Pe(H(Je)[H(m)(s)]), ke({
736
- key: `component-${c}-${H(ie)(s)}`,
737
- part: s
738
- }, { ref_for: !0 }, ot(s)), null, 16, ["part"])) : Ne(t.$slots, s.type, ke({ ref_for: !0 }, {
739
- message: d,
740
- part: s,
741
- index: x,
742
- isLoading: q.value
743
- }), () => [e.showAllMessageParts ? (R(), j("div", Mt, [M("div", Nt, [H(se)(s) ? (R(), k(p, {
744
- key: 0,
745
- name: H(se)(s),
746
- class: "shrink-0"
747
- }, null, 8, ["name"])) : A("", !0), M("span", Pt, V(H(me)(s, {
748
- t: H(i),
749
- te: H(o)
750
- })), 1)])])) : A("", !0)], void 0, 1)]),
751
- _: 2
752
- }, 1024)) : A("", !0), N(D, { mode: "out-in" }, {
753
- default: W(() => [c === ht(d) && e.readonlyFeedback && Y(d.id)?.comment ? (R(), k(xe, {
754
- key: 0,
755
- feedback: Y(d.id)
756
- }, null, 8, ["feedback"])) : A("", !0)]),
757
- _: 2
758
- }, 1024)], 64))), 128)),
759
- Cn(d) && d.metadata?.pagePointer ? (R(), j("div", {
760
- key: 0,
761
- class: "pk-chatbot-message__pointer",
762
- title: d.metadata.pagePointer.kind === "text" ? H(i)("pagePointer.selected") : H(i)("pagePointer.pointed")
763
- }, [N(p, {
764
- name: d.metadata.pagePointer.kind === "text" ? "ri:double-quotes-l" : "ri:focus-3-line",
765
- class: "pk-chatbot-message__pointer-icon"
766
- }, null, 8, ["name"]), M("span", It, V(d.metadata.pagePointer.kind === "text" ? `«${d.metadata.pagePointer.label}»` : d.metadata.pagePointer.label), 1)], 8, Ft)) : A("", !0),
767
- N(D, {
768
- name: "fade-in",
769
- mode: "out-in"
770
- }, {
771
- default: W(() => [q.value && Z(x) && !pn(d) && !e.hostConfirmation && Q(d) && (!hn(d) || Sn(d)) ? (R(), j("div", {
772
- key: `loading-info-${d.id}`,
773
- class: "pk-chatbot-message__loading-info"
774
- }, [M("div", Lt, [
775
- N(p, {
776
- name: "loading-loop",
777
- class: "shrink-0"
778
- }),
779
- N(D, { mode: "out-in" }, {
780
- default: W(() => [ln.value ? (R(), k(p, {
781
- key: ln.value,
782
- class: "shrink-0",
783
- name: ln.value
784
- }, null, 8, ["name"])) : A("", !0)]),
785
- _: 1
786
- }),
787
- N(D, { mode: "out-in" }, {
788
- default: W(() => [cn.value ? (R(), j("span", {
789
- key: cn.value,
790
- class: "text-12"
791
- }, V(cn.value), 1)) : A("", !0)]),
792
- _: 1
793
- })
794
- ]), N(D, {
795
- name: "fade-in",
796
- mode: "out-in"
797
- }, {
798
- default: W(() => [!e.hideReasoning && !hn(d) && X.value && "text" in X.value && X.value.text.trim() ? (R(), k(Se, {
799
- key: 0,
800
- markdown: X.value.text,
801
- "is-dark": e.isDark,
802
- "tail-length": H(pe),
803
- "inner-class": "wysiwyg",
804
- class: "border border-surface-3 rounded-md p-4 mt-8 bg-surface-1 max-h-64 text-12 w-full"
805
- }, null, 8, [
806
- "markdown",
807
- "is-dark",
808
- "tail-length"
809
- ])) : A("", !0)]),
810
- _: 2
811
- }, 1024)])) : A("", !0)]),
812
- _: 2
813
- }, 1024),
814
- N(D, { mode: "out-in" }, {
815
- default: W(() => [On(d, x) ? (R(), j("div", Rt, [
816
- N(b, {
817
- modifiers: "compact",
818
- class: "mr-auto shrink-0"
819
- }, {
820
- default: W(() => [
821
- N(D, { mode: "out-in" }, {
822
- default: W(() => [dn(x) ? (R(), k(_, {
823
- key: 0,
824
- icon: "ri:reset-right-line",
825
- modifiers: "action-quiet-small",
826
- title: H(i)("action.regenerate"),
827
- "aria-label": H(i)("action.regenerate"),
828
- onClick: n[1] ||= G((e) => t.$emit("regenerate"), ["stop"])
829
- }, null, 8, ["title", "aria-label"])) : A("", !0)]),
830
- _: 2
831
- }, 1024),
832
- N(D, { mode: "out-in" }, {
833
- default: W(() => [fn("show-info", x) ? (R(), k(_, {
834
- key: 0,
835
- icon: "ri:information-line",
836
- title: H(i)("action.getMoreInfo"),
837
- "aria-label": H(i)("action.getMoreInfo"),
838
- modifiers: "action-quiet-small",
839
- onClick: G((e) => t.$emit("show-info", d), ["stop"])
840
- }, null, 8, [
841
- "title",
842
- "aria-label",
843
- "onClick"
844
- ])) : A("", !0)]),
845
- _: 2
846
- }, 1024),
847
- N(D, { mode: "out-in" }, {
848
- default: W(() => [fn("revise", x) ? (R(), k(_, {
849
- key: 0,
850
- icon: rt(d.id) ? "ri:file-edit-fill" : "ri:file-edit-line",
851
- title: rt(d.id) ? H(i)("action.editRevise") : H(i)("action.createRevise"),
852
- "aria-label": rt(d.id) ? H(i)("action.editRevise") : H(i)("action.createRevise"),
853
- modifiers: "action-quiet-small",
854
- class: L({ "text-brand-graphic": rt(d.id) }),
855
- onClick: G((e) => t.$emit("revise", d), ["stop"])
856
- }, null, 8, [
857
- "icon",
858
- "title",
859
- "aria-label",
860
- "class",
861
- "onClick"
862
- ])) : A("", !0)]),
863
- _: 2
864
- }, 1024),
865
- N(D, { mode: "out-in" }, {
866
- default: W(() => [st("upvote", x) ? (R(), k(_, {
867
- key: 0,
868
- icon: Y(d.id)?.vote === "upvote" ? "ri:thumb-up-fill" : "ri:thumb-up-line",
869
- title: H(i)("action.upvote"),
870
- "aria-label": H(i)("action.upvote"),
871
- modifiers: "action-quiet-small",
872
- onClick: G((e) => t.$emit("upvote", d), ["stop"])
873
- }, null, 8, [
874
- "icon",
875
- "title",
876
- "aria-label",
877
- "onClick"
878
- ])) : A("", !0)]),
879
- _: 2
880
- }, 1024),
881
- N(D, { mode: "out-in" }, {
882
- default: W(() => [st("downvote", x) ? (R(), k(_, {
883
- key: 0,
884
- icon: Y(d.id)?.vote === "downvote" ? "ri:thumb-down-fill" : "ri:thumb-down-line",
885
- title: H(i)("action.downvote"),
886
- "aria-label": H(i)("action.downvote"),
887
- modifiers: "action-quiet-small",
888
- onClick: G((e) => t.$emit("downvote", d), ["stop"])
889
- }, null, 8, [
890
- "icon",
891
- "title",
892
- "aria-label",
893
- "onClick"
894
- ])) : A("", !0)]),
895
- _: 2
896
- }, 1024),
897
- N(D, { mode: "out-in" }, {
898
- default: W(() => [st("feedback", x) ? (R(), k(_, {
899
- key: 0,
900
- icon: Y(d.id)?.comment ? "ri:feedback-fill" : "ri:feedback-line",
901
- title: H(i)("action.feedback"),
902
- "aria-label": H(i)("action.feedback"),
903
- modifiers: "action-quiet-small",
904
- onClick: G((e) => t.$emit("feedback", d), ["stop"])
905
- }, null, 8, [
906
- "icon",
907
- "title",
908
- "aria-label",
909
- "onClick"
910
- ])) : A("", !0)]),
911
- _: 2
912
- }, 1024)
913
- ]),
914
- _: 2
915
- }, 1024),
916
- !e.showMessageDateTime && d.metadata?.createdAt && d.metadata?.completedAt ? (R(), j("div", zt, [M("time", {
917
- datetime: new Date(d.metadata.createdAt).toISOString(),
918
- title: H(s)(new Date(d.metadata.createdAt), "date-time"),
919
- class: "flex items-center gap-4 min-w-0"
920
- }, [N(p, {
921
- name: "ri:time-line",
922
- class: "shrink-0"
923
- }), M("span", Vt, V(kn(d.metadata.createdAt)), 1)], 8, Bt), An(d) ? (R(), j("span", Ht, [N(p, {
924
- name: "ri:hourglass-line",
925
- class: "shrink-0"
926
- }), M("span", Ut, V(An(d)), 1)])) : A("", !0)])) : A("", !0),
927
- e.showMessageNumber ? (R(), j("span", {
928
- key: 1,
929
- title: H(i)("label.messageNumber", { n: Dn.value[x] }),
930
- class: "text-12 text-word-3 tabular-nums"
931
- }, " #" + V(Dn.value[x]), 9, Wt)) : A("", !0),
932
- e.showMessageTokensCount && d.metadata?.totalTokens ? (R(), j("span", Gt, [N(p, {
933
- name: "ri:ai-generate-2-line",
934
- class: "shrink-0"
935
- }), M("span", Kt, V(H(c)(d.metadata.totalTokens, "integer")) + " " + V(H(i)("label.tokens")), 1)])) : A("", !0),
936
- e.showMessageDateTime && d.metadata?.createdAt ? (R(), j("time", {
937
- key: 3,
938
- datetime: new Date(d.metadata?.createdAt).toISOString(),
939
- class: "flex items-center gap-4 text-12 text-word-3"
940
- }, [N(p, {
941
- name: "ri:time-line",
942
- class: "shrink-0"
943
- }), M("span", Jt, V(H(s)(new Date(d.metadata?.createdAt), "date-time")), 1)], 8, qt)) : A("", !0),
944
- e.showMessageDateTime && d?.metadata?.completedAt && d?.metadata?.createdAt ? (R(), j("div", Yt, [N(p, {
945
- name: "ri:hourglass-line",
946
- class: "shrink-0"
947
- }), N(ve, {
948
- class: "truncate",
949
- date: d.metadata?.createdAt,
950
- "end-date": d.metadata?.completedAt
951
- }, null, 8, ["date", "end-date"])])) : A("", !0)
952
- ])) : A("", !0)]),
953
- _: 2
954
- }, 1024),
955
- N(D, { mode: "out-in" }, {
956
- default: W(() => [d.id === e.feedbackMessageId ? (R(), k(be, {
957
- key: 0,
958
- ref_for: !0,
959
- ref_key: "feedbackMessageEl",
960
- ref: jn,
961
- loading: e.feedbackLoading,
962
- submitted: e.feedbackSubmitted,
963
- error: e.feedbackError,
964
- onSubmit: n[2] ||= (e) => t.$emit("feedback-submit", e),
965
- onClose: n[3] ||= (e) => t.$emit("feedback-close")
966
- }, null, 8, [
967
- "loading",
968
- "submitted",
969
- "error"
970
- ])) : A("", !0)]),
971
- _: 2
972
- }, 1024)
973
- ], 6)) : A("", !0)
974
- ], 64))), 128)),
975
- N(D, {
976
- appear: "",
977
- name: "pk-chatbot-part",
978
- onLeave: sn
979
- }, {
980
- default: W(() => [an.value ? (R(), j("div", {
981
- key: 0,
982
- class: "pk-chatbot-message pk-chatbot-message--assistant pk-chatbot-message--loading",
983
- style: Ae({ minHeight: on.value ? `${J.value}px` : void 0 })
984
- }, [M("div", Xt, [M("div", Zt, [N(p, {
985
- name: "loading-loop",
986
- class: "shrink-0"
987
- }), M("span", Qt, V(H(i)("label.answeringOnTheCall")), 1)])])], 4)) : A("", !0)]),
988
- _: 1
989
- }),
990
- N(D, {
991
- appear: "",
992
- name: "pk-chatbot-part"
993
- }, {
994
- default: W(() => [_n.value ? (R(), j("div", $t, [N(mt, {
995
- question: e.hostConfirmation?.question ?? H(i)("toolApproval.prompt"),
996
- details: e.hostConfirmation?.details,
997
- unchanged: e.hostConfirmation?.unchanged,
998
- onRespond: n[4] ||= (e) => r("host-confirm-respond", e)
999
- }, null, 8, [
1000
- "question",
1001
- "details",
1002
- "unchanged"
1003
- ])])) : A("", !0)]),
1004
- _: 1
1005
- }),
1006
- N(D, {
1007
- appear: "",
1008
- name: "pk-chatbot-part"
1009
- }, {
1010
- default: W(() => [rn.value ? (R(), k(_e, {
1011
- key: 0,
1012
- error: e.error,
1013
- onRetry: n[5] ||= (e) => t.$emit("auto-retry"),
1014
- onReset: n[6] ||= (e) => t.$emit("reset-chat")
1015
- }, null, 8, ["error"])) : A("", !0)]),
1016
- _: 1
1017
- }),
1018
- gt.value?.role === "user" && !on.value || rn.value ? (R(), j("div", {
1019
- key: 0,
1020
- class: "pk-chatbot-messages__spacer",
1021
- style: Ae({ minHeight: `${J.value}px` })
1022
- }, null, 4)) : A("", !0)
1023
- ], 512),
1024
- N(D, { name: "pk-chatbot-messages-fab" }, {
1025
- default: W(() => [e.showScrollToBottom && (H(Be) || !H(Ve)) ? (R(), j("button", {
1026
- key: 0,
1027
- type: "button",
1028
- class: "pk-chatbot-messages__scroll-to-bottom",
1029
- title: H(i)("action.scrollToBottom"),
1030
- "aria-label": H(i)("action.scrollToBottom"),
1031
- onClick: Ue
1032
- }, [N(p, { name: "ri:arrow-down-line" })], 8, en)) : A("", !0)]),
1033
- _: 1
1034
- })
1035
- ], 46, yt);
1036
- };
1037
- }
1038
- });
1039
- export { X as t };
1040
-
1041
- //# sourceMappingURL=PkChatbotMessages-pWNZCmM2.js.map