@8wave/ai-elements 0.123.0-beta.16 → 0.123.0-beta.18

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