@8wave/ai-elements 0.125.0-beta.10 → 0.125.0-beta.11

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 (97) hide show
  1. package/dist/_chunks/{PkChatbotFilePreview-DuvRnOes.js → PkChatbotFilePreview-fbgRmR9n.js} +58 -55
  2. package/dist/_chunks/PkChatbotFilePreview-fbgRmR9n.js.map +1 -0
  3. package/dist/_chunks/{PkStreamingMarkdown-BM-DSTPr.js → PkStreamingMarkdown-CfdkyZqP.js} +803 -799
  4. package/dist/_chunks/PkStreamingMarkdown-CfdkyZqP.js.map +1 -0
  5. package/dist/_chunks/{PkToolChatFile-DbeOmRPh.js → PkToolChatFile-ClZrtYIz.js} +2 -2
  6. package/dist/_chunks/{PkToolChatFile-DbeOmRPh.js.map → PkToolChatFile-ClZrtYIz.js.map} +1 -1
  7. package/dist/_chunks/{PkToolShareDocument-Buzu27rQ.js → PkToolShareDocument-DLRwzPaL.js} +2 -2
  8. package/dist/_chunks/{PkToolShareDocument-Buzu27rQ.js.map → PkToolShareDocument-DLRwzPaL.js.map} +1 -1
  9. package/dist/_chunks/{PkToolShowArtifact-utxGuLLt.js → PkToolShowArtifact-Dc4YM786.js} +2 -2
  10. package/dist/_chunks/{PkToolShowArtifact-utxGuLLt.js.map → PkToolShowArtifact-Dc4YM786.js.map} +1 -1
  11. package/dist/_chunks/{PkToolShowContactForm-DTtE93D3.js → PkToolShowContactForm-CU1Sv3DA.js} +2 -2
  12. package/dist/_chunks/{PkToolShowContactForm-DTtE93D3.js.map → PkToolShowContactForm-CU1Sv3DA.js.map} +1 -1
  13. package/dist/_chunks/{PkToolShowDiagram-BHd-C_cx.js → PkToolShowDiagram-BDrdT_AB.js} +4 -2
  14. package/dist/_chunks/PkToolShowDiagram-BDrdT_AB.js.map +1 -0
  15. package/dist/_chunks/{PkToolShowForm-I4pKopEI.js → PkToolShowForm-DDgEmFRc.js} +2 -2
  16. package/dist/_chunks/{PkToolShowForm-I4pKopEI.js.map → PkToolShowForm-DDgEmFRc.js.map} +1 -1
  17. package/dist/_chunks/{PkToolShowImageGallery-skV87BlD.js → PkToolShowImageGallery-BCSO1iSG.js} +9 -4
  18. package/dist/_chunks/PkToolShowImageGallery-BCSO1iSG.js.map +1 -0
  19. package/dist/_chunks/{PkToolShowSources-DLmVS3bL.js → PkToolShowSources-DDI2s76O.js} +2 -2
  20. package/dist/_chunks/{PkToolShowSources-DLmVS3bL.js.map → PkToolShowSources-DDI2s76O.js.map} +1 -1
  21. package/dist/_chunks/{useLightbox-BigL4WLe.js → useLightbox-BEEzZ0qT.js} +112 -41
  22. package/dist/_chunks/useLightbox-BEEzZ0qT.js.map +1 -0
  23. package/dist/ai-elements.es.js +2420 -2409
  24. package/dist/ai-elements.es.js.map +1 -1
  25. package/dist-vue/PkChatbot.js +1 -1
  26. package/dist-vue/PkChatbotEmptyState.js +1 -1
  27. package/dist-vue/PkChatbotFilePreview.js +1 -1
  28. package/dist-vue/PkChatbotInput.js +1 -1
  29. package/dist-vue/PkChatbotMessages.js +1 -1
  30. package/dist-vue/PkChatbotSteps.js +1 -1
  31. package/dist-vue/PkChatbotViewChat.js +1 -1
  32. package/dist-vue/_chunks/{PkChatbot-CLOfTLQy.js → PkChatbot-D4SNWH_2.js} +3 -3
  33. package/dist-vue/_chunks/{PkChatbot-CLOfTLQy.js.map → PkChatbot-D4SNWH_2.js.map} +1 -1
  34. package/dist-vue/_chunks/{PkChatbotEmptyState-C9aUiynZ.js → PkChatbotEmptyState-BnCCmm10.js} +2 -2
  35. package/dist-vue/_chunks/{PkChatbotEmptyState-C9aUiynZ.js.map → PkChatbotEmptyState-BnCCmm10.js.map} +1 -1
  36. package/dist-vue/_chunks/PkChatbotFilePreview-BpVM850N.js +291 -0
  37. package/dist-vue/_chunks/PkChatbotFilePreview-BpVM850N.js.map +1 -0
  38. package/dist-vue/_chunks/{PkChatbotInput-Bs8nn-Jz.js → PkChatbotInput-COjn57UP.js} +3 -3
  39. package/dist-vue/_chunks/{PkChatbotInput-Bs8nn-Jz.js.map → PkChatbotInput-COjn57UP.js.map} +1 -1
  40. package/dist-vue/_chunks/{PkChatbotMessages-BxkCGmqV.js → PkChatbotMessages-D-m0cOqM.js} +282 -279
  41. package/dist-vue/_chunks/PkChatbotMessages-D-m0cOqM.js.map +1 -0
  42. package/dist-vue/_chunks/{PkChatbotSteps-MTSA_RrY.js → PkChatbotSteps-BWKjM1Z4.js} +2 -2
  43. package/dist-vue/_chunks/{PkChatbotSteps-MTSA_RrY.js.map → PkChatbotSteps-BWKjM1Z4.js.map} +1 -1
  44. package/dist-vue/_chunks/{PkChatbotViewChat-BwXOt2WW.js → PkChatbotViewChat-DIh2wVa_.js} +5 -5
  45. package/dist-vue/_chunks/{PkChatbotViewChat-BwXOt2WW.js.map → PkChatbotViewChat-DIh2wVa_.js.map} +1 -1
  46. package/dist-vue/_chunks/{PkStreamingMarkdown-DlcTV5je.js → PkStreamingMarkdown-BZPAHAni.js} +760 -757
  47. package/dist-vue/_chunks/PkStreamingMarkdown-BZPAHAni.js.map +1 -0
  48. package/dist-vue/_chunks/{PkSvgViewer-DBYr0CUi.js → PkSvgViewer-DmkElalq.js} +4 -2
  49. package/dist-vue/_chunks/PkSvgViewer-DmkElalq.js.map +1 -0
  50. package/dist-vue/_chunks/{PkToolChatFile-HWGjtuaT.js → PkToolChatFile-BGH2cQuM.js} +2 -2
  51. package/dist-vue/_chunks/{PkToolChatFile-HWGjtuaT.js.map → PkToolChatFile-BGH2cQuM.js.map} +1 -1
  52. package/dist-vue/_chunks/{PkToolShareDocument-CsS5OTDj.js → PkToolShareDocument-BIZkgcJ3.js} +2 -2
  53. package/dist-vue/_chunks/{PkToolShareDocument-CsS5OTDj.js.map → PkToolShareDocument-BIZkgcJ3.js.map} +1 -1
  54. package/dist-vue/_chunks/{PkToolShowArtifact-C8OIF_sy.js → PkToolShowArtifact-DCe8yizN.js} +2 -2
  55. package/dist-vue/_chunks/{PkToolShowArtifact-C8OIF_sy.js.map → PkToolShowArtifact-DCe8yizN.js.map} +1 -1
  56. package/dist-vue/_chunks/{PkToolShowContactForm-K6Z5MUXk.js → PkToolShowContactForm-4bO4fM5O.js} +2 -2
  57. package/dist-vue/_chunks/{PkToolShowContactForm-K6Z5MUXk.js.map → PkToolShowContactForm-4bO4fM5O.js.map} +1 -1
  58. package/dist-vue/_chunks/{PkToolShowDiagram-DrlGh_v6.js → PkToolShowDiagram-DNRUCCt8.js} +2 -2
  59. package/dist-vue/_chunks/{PkToolShowDiagram-DrlGh_v6.js.map → PkToolShowDiagram-DNRUCCt8.js.map} +1 -1
  60. package/dist-vue/_chunks/{PkToolShowForm-DzsXJfOl.js → PkToolShowForm-CQwXQwgt.js} +2 -2
  61. package/dist-vue/_chunks/{PkToolShowForm-DzsXJfOl.js.map → PkToolShowForm-CQwXQwgt.js.map} +1 -1
  62. package/dist-vue/_chunks/{PkToolShowImageGallery-sCyrPOIT.js → PkToolShowImageGallery-CgDng1Gr.js} +17 -12
  63. package/dist-vue/_chunks/PkToolShowImageGallery-CgDng1Gr.js.map +1 -0
  64. package/dist-vue/_chunks/{PkToolShowLocation-DAQEuCuQ.js → PkToolShowLocation-DCPaDtBI.js} +3 -3
  65. package/dist-vue/_chunks/PkToolShowLocation-DCPaDtBI.js.map +1 -0
  66. package/dist-vue/_chunks/{PkToolShowProductList-DPDDeVu4.js → PkToolShowProductList-DyPyz1pU.js} +2 -2
  67. package/dist-vue/_chunks/{PkToolShowProductList-DPDDeVu4.js.map → PkToolShowProductList-DyPyz1pU.js.map} +1 -1
  68. package/dist-vue/_chunks/{PkToolShowSources-D4zjssdh.js → PkToolShowSources-C3JjevRj.js} +2 -2
  69. package/dist-vue/_chunks/{PkToolShowSources-D4zjssdh.js.map → PkToolShowSources-C3JjevRj.js.map} +1 -1
  70. package/dist-vue/_chunks/{PkToolShowVideo-C77DAqoZ.js → PkToolShowVideo--qiiAK7R.js} +2 -2
  71. package/dist-vue/_chunks/{PkToolShowVideo-C77DAqoZ.js.map → PkToolShowVideo--qiiAK7R.js.map} +1 -1
  72. package/dist-vue/_chunks/{PkToolShowWebPages-D_tqGI6o.js → PkToolShowWebPages-Cw9FPQuL.js} +2 -2
  73. package/dist-vue/_chunks/{PkToolShowWebPages-D_tqGI6o.js.map → PkToolShowWebPages-Cw9FPQuL.js.map} +1 -1
  74. package/dist-vue/_chunks/useLightbox-gSzoBgNv.js +190 -0
  75. package/dist-vue/_chunks/useLightbox-gSzoBgNv.js.map +1 -0
  76. package/dist-vue/composables.js +8 -0
  77. package/dist-vue/composables.js.map +1 -1
  78. package/dist-vue/index.js +2899 -2898
  79. package/dist-vue/index.js.map +1 -1
  80. package/dist-vue/locales.js +10 -0
  81. package/dist-vue/packages/components/src/composables/useLightbox.d.ts +33 -3
  82. package/dist-vue/style.css +1 -1
  83. package/package.json +1 -1
  84. package/dist/_chunks/PkChatbotFilePreview-DuvRnOes.js.map +0 -1
  85. package/dist/_chunks/PkStreamingMarkdown-BM-DSTPr.js.map +0 -1
  86. package/dist/_chunks/PkToolShowDiagram-BHd-C_cx.js.map +0 -1
  87. package/dist/_chunks/PkToolShowImageGallery-skV87BlD.js.map +0 -1
  88. package/dist/_chunks/useLightbox-BigL4WLe.js.map +0 -1
  89. package/dist-vue/_chunks/PkChatbotFilePreview-KxVpL0UT.js +0 -391
  90. package/dist-vue/_chunks/PkChatbotFilePreview-KxVpL0UT.js.map +0 -1
  91. package/dist-vue/_chunks/PkChatbotMessages-BxkCGmqV.js.map +0 -1
  92. package/dist-vue/_chunks/PkStreamingMarkdown-DlcTV5je.js.map +0 -1
  93. package/dist-vue/_chunks/PkSvgViewer-DBYr0CUi.js.map +0 -1
  94. package/dist-vue/_chunks/PkToolShowImageGallery-sCyrPOIT.js.map +0 -1
  95. package/dist-vue/_chunks/PkToolShowLocation-DAQEuCuQ.js.map +0 -1
  96. package/dist-vue/_chunks/cdn-css-C3_zuSx6.js +0 -15
  97. package/dist-vue/_chunks/cdn-css-C3_zuSx6.js.map +0 -1
@@ -2,83 +2,84 @@ 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 { A as o, H as s, _ as c, k as l, r as u } from "./Agent-BtXBSGy6.js";
4
4
  import { t as d } from "./VvButtonLocalized-C-vx25u4.js";
5
- import { t as f } from "./PkStreamingMarkdown-DlcTV5je.js";
5
+ import { t as f } from "./useLightbox-gSzoBgNv.js";
6
+ import { t as p } from "./PkStreamingMarkdown-BZPAHAni.js";
6
7
  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 te, D as ne, I as x, N as re, O as S, P as ie, S as C, b as ae, d as oe, g as w, h as se, i as ce, j as le, n as ue, r as de, t as fe, u as pe, v as me, x as he, y as ge, z as _e } from "./utils-CX4JuhXz.js";
10
- import { t as ve } from "./PkChatbotError-BS84xuiu.js";
11
- import { t as ye } from "./PkRelativeTime-CZF5CYHv.js";
12
- import { t as be } from "./PkChatbotFilePreview-KxVpL0UT.js";
8
+ import { c as m, i as h, l as g, n as _, o as ee, s as v, t as y, u as b } from "./message-DuibQyHy.js";
9
+ import { t as te } from "./PkChatbotAudioTranscript-SSTh074Z.js";
10
+ import { A as x, D as ne, I as re, N as S, O as ie, P as ae, S as oe, b as se, d as ce, g as C, h as le, i as ue, j as de, n as fe, r as pe, t as w, u as me, v as he, x as ge, y as _e, z as ve } from "./utils-CX4JuhXz.js";
11
+ import { t as ye } from "./PkChatbotError-BS84xuiu.js";
12
+ import { t as be } from "./PkRelativeTime-CZF5CYHv.js";
13
13
  import { t as xe } from "./PkChatbotFeedbackForm-Bh3tvNUW.js";
14
14
  import { t as Se } from "./PkChatbotMessageFeedback-DltXugdR.js";
15
- import { n as Ce, r as we, t as Te } from "./PkChatbotSteps-MTSA_RrY.js";
16
- import { t as Ee } from "./PkChatbotOutlineRail-BI-DMvZi.js";
17
- import { VvAccordion as De, VvButtonGroup as Oe, VvIcon as ke } 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 Ae, createVNode as M, defineAsyncComponent as N, defineComponent as P, inject as je, mergeProps as Me, nextTick as F, normalizeClass as I, normalizeStyle as Ne, onBeforeUnmount as L, onMounted as Pe, openBlock as R, ref as z, renderList as Fe, renderSlot as Ie, resolveDynamicComponent as Le, shallowRef as Re, toDisplayString as B, unref as V, useSlots as ze, useTemplateRef as Be, watch as H, withCtx as U, withModifiers as W } from "vue";
19
- import { useI18n as Ve } from "vue-i18n";
20
- import { useResizeObserver as He } from "@vueuse/core";
15
+ import { t as Ce } from "./PkChatbotFilePreview-BpVM850N.js";
16
+ import { n as we, r as Te, t as Ee } from "./PkChatbotSteps-BWKjM1Z4.js";
17
+ import { t as De } from "./PkChatbotOutlineRail-BI-DMvZi.js";
18
+ import { VvAccordion as Oe, VvButtonGroup as ke, VvIcon as Ae } from "@volverjs/ui-vue/components";
19
+ import { Fragment as T, Transition as E, computed as D, createBlock as O, createCommentVNode as k, createElementBlock as A, createElementVNode as j, createTextVNode as je, createVNode as M, defineAsyncComponent as N, defineComponent as P, inject as Me, mergeProps as Ne, nextTick as F, normalizeClass as I, normalizeStyle as Pe, onBeforeUnmount as L, onMounted as Fe, openBlock as R, ref as z, renderList as Ie, renderSlot as Le, resolveDynamicComponent as Re, shallowRef as ze, toDisplayString as B, unref as V, useSlots as Be, useTemplateRef as Ve, watch as H, withCtx as U, withModifiers as W } from "vue";
20
+ import { useI18n as He } from "vue-i18n";
21
+ import { useResizeObserver as Ue } from "@vueuse/core";
21
22
  // ../../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/classic/iso.js
22
- function Ue(t) {
23
+ function We(t) {
23
24
  return e(r, t);
24
25
  }
25
26
  i({
26
27
  platform: n(),
27
28
  threadId: n()
28
29
  });
29
- var We = i({
30
+ var Ge = i({
30
31
  wakeId: t(),
31
- dueAt: Ue(),
32
+ dueAt: We(),
32
33
  reason: n()
33
34
  });
34
- i({ pendingWakeup: We.nullable() }), i({ wakeId: t() });
35
- var G = (e) => e?.role === "user" && !!e.metadata?.wakeup, Ge = /* @__PURE__ */ new Set([
35
+ i({ pendingWakeup: Ge.nullable() }), i({ wakeId: t() });
36
+ var G = (e) => e?.role === "user" && !!e.metadata?.wakeup, Ke = /* @__PURE__ */ new Set([
36
37
  "input-streaming",
37
38
  "input-available",
38
39
  "approval-requested"
39
- ]), Ke = /* @__PURE__ */ new Set([
40
+ ]), qe = /* @__PURE__ */ new Set([
40
41
  ...o,
41
42
  ...l,
42
43
  ...c
43
44
  ]);
44
45
  [...l, u.ShowContactForm];
45
- var qe = (e) => e.state, Je = (e) => e.type.startsWith("tool-") ? e.type.slice(5) : void 0, K = (e) => e?.role === "assistant" && e.parts.some((e) => {
46
+ var Je = (e) => e.state, Ye = (e) => e.type.startsWith("tool-") ? e.type.slice(5) : void 0, K = (e) => e?.role === "assistant" && e.parts.some((e) => {
46
47
  if (e.type === "text") return e.text.trim().length > 0;
47
48
  if (e.type === "file") return !0;
48
- let t = qe(e);
49
- if (t && Ge.has(t)) return !0;
50
- let n = Je(e);
51
- return n !== void 0 && Ke.has(n) && t === "output-available";
52
- }), Ye = (e) => {
49
+ let t = Je(e);
50
+ if (t && Ke.has(t)) return !0;
51
+ let n = Ye(e);
52
+ return n !== void 0 && qe.has(n) && t === "output-available";
53
+ }), Xe = (e) => {
53
54
  if (e?.role !== "assistant" || K(e)) return !1;
54
55
  let t = !1;
55
- for (let n of e.parts) n.type === "tool-scheduleWakeup" && (t = qe(n) === "output-available" && n.input?.noop === !0);
56
+ for (let n of e.parts) n.type === "tool-scheduleWakeup" && (t = Je(n) === "output-available" && n.input?.noop === !0);
56
57
  return t;
57
- }, Xe = {
58
+ }, Ze = {
58
59
  requestOAuthConnection: N(() => import("./PkToolRequestOAuthConnection-DAAYyufP.js")),
59
- shareDocument: N(() => import("./PkToolShareDocument-CsS5OTDj.js").then((e) => e.n)),
60
- showArtifact: N(() => import("./PkToolShowArtifact-C8OIF_sy.js").then((e) => e.n)),
60
+ shareDocument: N(() => import("./PkToolShareDocument-BIZkgcJ3.js").then((e) => e.n)),
61
+ showArtifact: N(() => import("./PkToolShowArtifact-DCe8yizN.js").then((e) => e.n)),
61
62
  showCalendarEvent: N(() => import("./PkToolShowCalendarEvent-CAejFLQI.js").then((e) => e.n)),
62
63
  showComparison: N(() => import("./PkToolShowComparison-BEHyRNXE.js").then((e) => e.n)),
63
- showContactForm: N(() => import("./PkToolShowContactForm-K6Z5MUXk.js").then((e) => e.n)),
64
- showDiagram: N(() => import("./PkToolShowDiagram-DrlGh_v6.js")),
64
+ showContactForm: N(() => import("./PkToolShowContactForm-4bO4fM5O.js").then((e) => e.n)),
65
+ showDiagram: N(() => import("./PkToolShowDiagram-DNRUCCt8.js")),
65
66
  showEmail: N(() => import("./PkToolShowEmail-BehvoNsz.js").then((e) => e.n)),
66
- showImageGallery: N(() => import("./PkToolShowImageGallery-sCyrPOIT.js").then((e) => e.n)),
67
- showLocation: N(() => import("./PkToolShowLocation-DAQEuCuQ.js").then((e) => e.n)),
67
+ showImageGallery: N(() => import("./PkToolShowImageGallery-CgDng1Gr.js").then((e) => e.n)),
68
+ showLocation: N(() => import("./PkToolShowLocation-DCPaDtBI.js").then((e) => e.n)),
68
69
  showMessage: N(() => import("./PkToolShowMessage-Cca7K7GQ.js").then((e) => e.n)),
69
- showForm: N(() => import("./PkToolShowForm-DzsXJfOl.js").then((e) => e.n)),
70
- showMultipleChoice: N(() => import("./PkToolShowForm-DzsXJfOl.js").then((e) => e.n)),
71
- showProductList: N(() => import("./PkToolShowProductList-DPDDeVu4.js").then((e) => e.n)),
70
+ showForm: N(() => import("./PkToolShowForm-CQwXQwgt.js").then((e) => e.n)),
71
+ showMultipleChoice: N(() => import("./PkToolShowForm-CQwXQwgt.js").then((e) => e.n)),
72
+ showProductList: N(() => import("./PkToolShowProductList-DyPyz1pU.js").then((e) => e.n)),
72
73
  showQrCode: N(() => import("./PkToolShowQrCode-96KzD1rX.js").then((e) => e.n)),
73
- showSources: N(() => import("./PkToolShowSources-D4zjssdh.js").then((e) => e.n)),
74
+ showSources: N(() => import("./PkToolShowSources-C3JjevRj.js").then((e) => e.n)),
74
75
  showSuggestedReply: N(() => import("./PkToolShowSuggestedReply-smfC1hlT.js").then((e) => e.n)),
75
- showVideo: N(() => import("./PkToolShowVideo-C77DAqoZ.js")),
76
+ showVideo: N(() => import("./PkToolShowVideo--qiiAK7R.js")),
76
77
  showWeather: N(() => import("./PkToolShowWeather-BC-Rx-sI.js")),
77
- showWebPages: N(() => import("./PkToolShowWebPages-D_tqGI6o.js").then((e) => e.n))
78
- }, Ze = {
78
+ showWebPages: N(() => import("./PkToolShowWebPages-Cw9FPQuL.js").then((e) => e.n))
79
+ }, Qe = {
79
80
  key: 0,
80
81
  class: "text-12 text-word-3 m-0 mb-xs"
81
- }, Qe = /* @__PURE__ */ P({
82
+ }, $e = /* @__PURE__ */ P({
82
83
  __name: "PkToolApprovalPreviewMessage",
83
84
  props: { input: {} },
84
85
  setup(e) {
@@ -86,12 +87,12 @@ var qe = (e) => e.state, Je = (e) => e.type.startsWith("tool-") ? e.type.slice(5
86
87
  let e = t.input;
87
88
  return typeof e?.message == "string" ? e.message : "";
88
89
  });
89
- return (e, t) => n.value ? (R(), A("p", Ze, B(n.value), 1)) : k("", !0);
90
+ return (e, t) => n.value ? (R(), A("p", Qe, B(n.value), 1)) : k("", !0);
90
91
  }
91
- }), $e = { [fe]: Qe }, et = {
92
+ }), et = { [w]: $e }, tt = {
92
93
  key: 0,
93
94
  class: "text-12 text-word-3 m-0 mb-xs"
94
- }, tt = /* @__PURE__ */ P({
95
+ }, nt = /* @__PURE__ */ P({
95
96
  __name: "PkToolApprovalCard",
96
97
  props: {
97
98
  part: {},
@@ -100,15 +101,15 @@ var qe = (e) => e.state, Je = (e) => e.type.startsWith("tool-") ? e.type.slice(5
100
101
  },
101
102
  emits: ["respond"],
102
103
  setup(e, { emit: t }) {
103
- let n = e, r = t, { t: i, te: a } = Ve({ useScope: "global" }), o = D(() => n.part), c = D(() => m(n.part)), l = D(() => c.value === fe), 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), g = D(() => l.value ? o.value.output === "cancelled" || n.callVerdict === !1 : o.value.approval?.approved === !1 || o.value.state === "output-denied"), _ = D(() => $e[c.value]), v = D(() => _.value ? i("toolApproval.prompt") : i("toolApproval.promptNamed", { tool: _e(c.value, {
104
+ let n = e, r = t, { t: i, te: a } = He({ useScope: "global" }), o = D(() => n.part), c = D(() => h(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), m = D(() => l.value ? o.value.output === "confirmed" || n.callVerdict === !0 : o.value.approval?.approved === !0), g = D(() => l.value ? o.value.output === "cancelled" || n.callVerdict === !1 : o.value.approval?.approved === !1 || o.value.state === "output-denied"), _ = D(() => et[c.value]), ee = D(() => _.value ? i("toolApproval.prompt") : i("toolApproval.promptNamed", { tool: ve(c.value, {
104
105
  t: i,
105
106
  te: a
106
- }) })), y = D(() => {
107
+ }) })), v = D(() => {
107
108
  if (p.value) return {
108
109
  icon: "ri:time-line",
109
110
  message: i("toolApproval.expired")
110
111
  };
111
- if (h.value) return {
112
+ if (m.value) return {
112
113
  icon: "ri:check-line",
113
114
  message: i(l.value ? "toolApproval.confirmed" : "toolApproval.approved")
114
115
  };
@@ -116,27 +117,27 @@ var qe = (e) => e.state, Je = (e) => e.type.startsWith("tool-") ? e.type.slice(5
116
117
  icon: "ri:close-line",
117
118
  message: i(l.value ? "toolApproval.cancelled" : "toolApproval.denied")
118
119
  };
119
- }), b = D(() => !!y.value && !_.value);
120
+ }), y = D(() => !!v.value && !_.value);
120
121
  return (t, n) => {
121
- let a = d, s = Oe, c = ke;
122
- return R(), A("div", { class: I(["w-full overflow-hidden transition-all duration-300", { "bg-surface p-sm rounded-xl border border-surface-3": !b.value }]) }, [
122
+ let a = d, s = ke, c = Ae;
123
+ return R(), A("div", { class: I(["w-full overflow-hidden transition-all duration-300", { "bg-surface p-sm rounded-xl border border-surface-3": !y.value }]) }, [
123
124
  M(E, null, {
124
- default: U(() => [!l.value && u.value ? (R(), A("p", et, B(v.value), 1)) : k("", !0)]),
125
+ default: U(() => [!l.value && u.value ? (R(), A("p", tt, B(ee.value), 1)) : k("", !0)]),
125
126
  _: 1
126
127
  }),
127
- _.value ? (R(), O(Le(_.value), {
128
+ _.value ? (R(), O(Re(_.value), {
128
129
  key: 0,
129
130
  part: e.part,
130
131
  input: o.value.input
131
132
  }, null, 8, ["part", "input"])) : k("", !0),
132
133
  M(E, { mode: "out-in" }, {
133
- default: U(() => [y.value ? (R(), A("p", {
134
+ default: U(() => [v.value ? (R(), A("p", {
134
135
  key: 1,
135
136
  class: I(["flex items-center gap-4 text-12 text-word-3 m-0", { "mt-xs": _.value }])
136
137
  }, [M(c, {
137
- name: y.value.icon,
138
+ name: v.value.icon,
138
139
  class: "shrink-0"
139
- }, null, 8, ["name"]), Ae(" " + B(y.value.message), 1)], 2)) : (R(), O(s, { key: 0 }, {
140
+ }, null, 8, ["name"]), je(" " + B(v.value.message), 1)], 2)) : (R(), O(s, { key: 0 }, {
140
141
  default: U(() => [M(a, {
141
142
  modifiers: "primary-small",
142
143
  disabled: !f.value,
@@ -157,16 +158,16 @@ var qe = (e) => e.state, Je = (e) => e.type.startsWith("tool-") ? e.type.slice(5
157
158
  ], 2);
158
159
  };
159
160
  }
160
- }), q = { class: "pk-host-call-confirm-card w-full bg-surface p-sm rounded-xl border border-surface-3" }, J = { class: "text-14 text-word-2 m-0 mb-xs" }, nt = {
161
+ }), q = { class: "pk-host-call-confirm-card w-full bg-surface p-sm rounded-xl border border-surface-3" }, J = { class: "text-14 text-word-2 m-0 mb-xs" }, rt = {
161
162
  key: 1,
162
163
  class: "pk-host-call-confirm-card__details text-14 m-0 mb-xs"
163
- }, rt = {
164
+ }, it = {
164
165
  key: 0,
165
166
  class: "text-word-3 truncate"
166
- }, it = {
167
+ }, at = {
167
168
  key: 2,
168
169
  class: "text-12 text-word-3 m-0 mb-xs"
169
- }, at = { class: "pk-host-call-confirm-card__details text-12 m-0" }, ot = { class: "text-word-3" }, st = { class: "text-word-2 m-0" }, ct = /* @__PURE__ */ P({
170
+ }, ot = { class: "pk-host-call-confirm-card__details text-12 m-0" }, st = { class: "text-word-3" }, ct = { class: "text-word-2 m-0" }, lt = /* @__PURE__ */ P({
170
171
  __name: "PkHostCallConfirmCard",
171
172
  props: {
172
173
  question: {},
@@ -177,21 +178,21 @@ var qe = (e) => e.state, Je = (e) => e.type.startsWith("tool-") ? e.type.slice(5
177
178
  setup(e, { emit: t }) {
178
179
  let n = e, r = t, i = D(() => n.details?.some((e) => e.before !== void 0) ?? !1);
179
180
  return (t, n) => {
180
- let a = De, o = d, s = Oe;
181
+ let a = Oe, o = d, s = ke;
181
182
  return R(), A("div", q, [
182
183
  j("p", J, B(e.question), 1),
183
- e.details?.length && i.value ? (R(), O(we, {
184
+ e.details?.length && i.value ? (R(), O(Te, {
184
185
  key: 0,
185
186
  changes: e.details,
186
187
  class: "mb-xs"
187
- }, null, 8, ["changes"])) : e.details?.length ? (R(), A("dl", nt, [(R(!0), A(T, null, Fe(e.details, (e, t) => (R(), A(T, { key: t }, [e.label ? (R(), A("dt", rt, B(e.label), 1)) : k("", !0), j("dd", { class: I(["text-word-1 m-0 truncate", { "pk-host-call-confirm-card__alone": !e.label }]) }, B(e.value), 3)], 64))), 128))])) : e.unchanged?.length ? (R(), A("p", it, B(t.$t("toolApproval.noChanges")), 1)) : k("", !0),
188
+ }, null, 8, ["changes"])) : e.details?.length ? (R(), A("dl", rt, [(R(!0), A(T, null, Ie(e.details, (e, t) => (R(), A(T, { key: t }, [e.label ? (R(), A("dt", it, B(e.label), 1)) : k("", !0), j("dd", { class: I(["text-word-1 m-0 truncate", { "pk-host-call-confirm-card__alone": !e.label }]) }, B(e.value), 3)], 64))), 128))])) : e.unchanged?.length ? (R(), A("p", at, B(t.$t("toolApproval.noChanges")), 1)) : k("", !0),
188
189
  e.unchanged?.length ? (R(), O(a, {
189
190
  key: 3,
190
191
  title: t.$t("toolApproval.unchangedFields", e.unchanged.length),
191
192
  modifiers: "compact",
192
193
  class: "mb-xs"
193
194
  }, {
194
- default: U(() => [j("dl", at, [(R(!0), A(T, null, Fe(e.unchanged, (e, t) => (R(), A(T, { key: t }, [j("dt", ot, B(e.label), 1), j("dd", st, B(e.value), 1)], 64))), 128))])]),
195
+ default: U(() => [j("dl", ot, [(R(!0), A(T, null, Ie(e.unchanged, (e, t) => (R(), A(T, { key: t }, [j("dt", st, B(e.label), 1), j("dd", ct, B(e.value), 1)], 64))), 128))])]),
195
196
  _: 1
196
197
  }, 8, ["title"])) : k("", !0),
197
198
  M(s, null, {
@@ -211,8 +212,8 @@ var qe = (e) => e.state, Je = (e) => e.type.startsWith("tool-") ? e.type.slice(5
211
212
  ]);
212
213
  };
213
214
  }
214
- }), lt = 30, Y = 500;
215
- function ut(e) {
215
+ }), ut = 30, Y = 500;
216
+ function dt(e) {
216
217
  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") => {
217
218
  !t.value || l.value ? d = !1 : (d = !0, t.value.scrollTo({
218
219
  top: t.value.scrollHeight,
@@ -220,25 +221,25 @@ function ut(e) {
220
221
  }), setTimeout(() => {
221
222
  d = !1;
222
223
  }, e === "instant" ? 0 : Y));
223
- }, v = (e) => {
224
- e.deltaY < 0 && (l.value = !0);
225
- }, y = 0, b = (e) => {
226
- y = e.touches[0]?.clientY ?? 0;
227
224
  }, ee = (e) => {
225
+ e.deltaY < 0 && (l.value = !0);
226
+ }, v = 0, y = (e) => {
227
+ v = e.touches[0]?.clientY ?? 0;
228
+ }, b = (e) => {
228
229
  let t = e.touches[0]?.clientY ?? 0;
229
- t > y && (l.value = !0), y = t;
230
+ t > v && (l.value = !0), v = t;
230
231
  }, te = () => {
231
232
  if (!t.value) return;
232
233
  let { scrollTop: e, scrollHeight: n, clientHeight: r } = t.value;
233
- u.value = n - r - e < lt, d || (e < g && s?.(), e > g && (u.value && (l.value = !1), c?.())), g = e;
234
- }, ne = () => {
234
+ u.value = n - r - e < ut, d || (e < g && s?.(), e > g && (u.value && (l.value = !1), c?.())), g = e;
235
+ }, x = () => {
235
236
  if (d || l.value || !t.value) return;
236
237
  let e = t.value, n = e.scrollHeight - e.clientHeight;
237
238
  n <= e.scrollTop || (u.value = !0, d = !0, e.scrollTop = n, requestAnimationFrame(() => {
238
239
  d = !1;
239
240
  }));
240
- }, x = () => {
241
- !f && t.value && (f = new MutationObserver(ne), f.observe(t.value, {
241
+ }, ne = () => {
242
+ !f && t.value && (f = new MutationObserver(x), f.observe(t.value, {
242
243
  childList: !0,
243
244
  subtree: !0,
244
245
  characterData: !0
@@ -247,10 +248,10 @@ function ut(e) {
247
248
  f?.disconnect(), f = null;
248
249
  };
249
250
  H(n, (e, t) => {
250
- e === "streaming" || e === "submitted" ? x() : (e !== "ready" || t !== "streaming") && re();
251
+ e === "streaming" || e === "submitted" ? ne() : (e !== "ready" || t !== "streaming") && re();
251
252
  }), H(r, async () => {
252
253
  if (r() && i() !== "assistant") {
253
- C(), l.value = !1, d = !0;
254
+ ae(), l.value = !1, d = !0;
254
255
  try {
255
256
  await F(), await o?.(), await F();
256
257
  } finally {
@@ -259,22 +260,22 @@ function ut(e) {
259
260
  }
260
261
  });
261
262
  let S = null, ie = () => {
262
- t.value && (t.value.scrollHeight <= t.value.clientHeight || (t.value.scrollTop = t.value.scrollHeight, S && clearTimeout(S), S = setTimeout(C, 300)));
263
- }, C = () => {
263
+ t.value && (t.value.scrollHeight <= t.value.clientHeight || (t.value.scrollTop = t.value.scrollHeight, S && clearTimeout(S), S = setTimeout(ae, 300)));
264
+ }, ae = () => {
264
265
  p?.disconnect(), p = null, m?.disconnect(), m = null, S &&= (clearTimeout(S), null);
265
266
  };
266
- return Pe(() => {
267
+ return Fe(() => {
267
268
  if (!t.value) return;
268
- t.value.addEventListener("wheel", v, { passive: !0 }), t.value.addEventListener("touchstart", b, { passive: !0 }), t.value.addEventListener("touchmove", ee, { passive: !0 });
269
+ t.value.addEventListener("wheel", ee, { passive: !0 }), t.value.addEventListener("touchstart", y, { passive: !0 }), t.value.addEventListener("touchmove", b, { passive: !0 });
269
270
  let e = n() === "submitted" || n() === "streaming";
270
- e ? x() : (p = new ResizeObserver(ie), p.observe(t.value), m = new MutationObserver(ie), m.observe(t.value, {
271
+ e ? ne() : (p = new ResizeObserver(ie), p.observe(t.value), m = new MutationObserver(ie), m.observe(t.value, {
271
272
  childList: !0,
272
273
  subtree: !0
273
274
  }));
274
275
  let r = a?.() ?? t.value.firstElementChild;
275
- r && (h = new ResizeObserver(ne), h.observe(r)), e || ie();
276
+ r && (h = new ResizeObserver(x), h.observe(r)), e || ie();
276
277
  }), L(() => {
277
- t.value?.removeEventListener("wheel", v), t.value?.removeEventListener("touchstart", b), t.value?.removeEventListener("touchmove", ee), h?.disconnect(), h = null, re(), C();
278
+ t.value?.removeEventListener("wheel", ee), t.value?.removeEventListener("touchstart", y), t.value?.removeEventListener("touchmove", b), h?.disconnect(), h = null, re(), ae();
278
279
  }), {
279
280
  handleScroll: te,
280
281
  scrollToBottom: _,
@@ -283,8 +284,8 @@ function ut(e) {
283
284
  };
284
285
  }
285
286
  // ../../packages/components/src/chat/wakeupFeed.ts
286
- function dt(e, t = () => !1) {
287
- let n = (e) => Ye(e) && !t(e), r = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Map(), a = 0;
287
+ function ft(e, t = () => !1) {
288
+ let n = (e) => Xe(e) && !t(e), r = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Map(), a = 0;
288
289
  for (; a < e.length;) {
289
290
  let t = e[a];
290
291
  if (G(t) && n(e[a + 1])) {
@@ -302,46 +303,46 @@ function dt(e, t = () => !1) {
302
303
  };
303
304
  }
304
305
  // ../../packages/components/src/chat/PkChatbotMessages.vue?vue&type=script&setup=true&lang.ts
305
- var ft = ["aria-busy"], pt = {
306
+ var pt = ["aria-busy"], mt = {
306
307
  key: 0,
307
308
  class: "pk-chatbot-messages__outline"
308
- }, mt = {
309
+ }, ht = {
309
310
  key: 0,
310
311
  class: "pk-chatbot-divider vv-separator"
311
- }, ht = { class: "pk-chatbot-divider__label" }, gt = {
312
+ }, gt = { class: "pk-chatbot-divider__label" }, _t = {
312
313
  key: 1,
313
314
  class: "pk-chatbot-wakeup"
314
- }, _t = ["title"], vt = { class: "pk-chatbot-message__text" }, yt = ["title"], bt = {
315
+ }, vt = ["title"], yt = { class: "pk-chatbot-message__text" }, bt = ["title"], xt = {
315
316
  key: 0,
316
317
  class: "pk-chatbot-message__reaction-emoji"
317
- }, xt = {
318
+ }, St = {
318
319
  key: 0,
319
320
  class: "flex flex-col items-end gap-8 w-full"
320
- }, St = { class: "pk-chatbot-message__host-step" }, Ct = { class: "pk-chatbot-message__host-call" }, wt = { class: "pk-chatbot-message__host-call-label" }, Tt = {
321
+ }, Ct = { class: "pk-chatbot-message__host-step" }, wt = { class: "pk-chatbot-message__host-call" }, Tt = { class: "pk-chatbot-message__host-call-label" }, Et = {
321
322
  key: 0,
322
323
  class: "pk-chatbot-message__host-call-outcome"
323
- }, Et = {
324
+ }, Dt = {
324
325
  key: 0,
325
326
  class: "pk-chatbot-message__loading-info"
326
- }, Dt = { class: "flex gap-8 items-center" }, Ot = { class: "text-12" }, kt = ["title"], At = { class: "pk-chatbot-message__pointer-label" }, jt = { class: "flex gap-8 items-center" }, Mt = {
327
+ }, Ot = { class: "flex gap-8 items-center" }, kt = { class: "text-12" }, At = ["title"], jt = { class: "pk-chatbot-message__pointer-label" }, Mt = { class: "flex gap-8 items-center" }, Nt = {
327
328
  key: 0,
328
329
  class: "pk-chatbot-message__footer"
329
- }, Nt = {
330
+ }, Pt = {
330
331
  key: 0,
331
332
  class: "pk-chatbot-message__hover-meta"
332
- }, Pt = ["datetime", "title"], Ft = { class: "truncate" }, It = {
333
+ }, Ft = ["datetime", "title"], It = { class: "truncate" }, Lt = {
333
334
  key: 0,
334
335
  class: "flex items-center gap-4 min-w-0"
335
- }, Lt = { class: "truncate" }, Rt = ["title"], zt = {
336
+ }, Rt = { class: "truncate" }, zt = ["title"], Bt = {
336
337
  key: 2,
337
338
  class: "flex items-center gap-4 text-12 text-word-3"
338
- }, Bt = { class: "truncate" }, Vt = ["datetime"], Ht = { class: "truncate" }, Ut = {
339
+ }, Vt = { class: "truncate" }, Ht = ["datetime"], Ut = { class: "truncate" }, Wt = {
339
340
  key: 4,
340
341
  class: "flex items-center gap-4 text-12 text-word-3"
341
- }, Wt = { class: "pk-chatbot-message__loading-info" }, Gt = { class: "flex gap-8 items-center" }, Kt = { class: "text-12" }, qt = {
342
+ }, Gt = { class: "pk-chatbot-message__loading-info" }, Kt = { class: "flex gap-8 items-center" }, qt = { class: "text-12" }, Jt = {
342
343
  key: 0,
343
344
  class: "pk-chatbot-message pk-chatbot-message--assistant"
344
- }, Jt = ["title", "aria-label"], Yt = /* @__PURE__ */ P({
345
+ }, Yt = ["title", "aria-label"], Xt = /* @__PURE__ */ P({
345
346
  __name: "PkChatbotMessages",
346
347
  props: {
347
348
  status: {},
@@ -391,11 +392,11 @@ var ft = ["aria-busy"], pt = {
391
392
  "host-confirm-respond"
392
393
  ],
393
394
  setup(e, { emit: t }) {
394
- let n = e, r = t, { t: i, te: o, d: s, n: c } = Ve({ useScope: "global" }), l = je(de, void 0), u = je(ue, void 0), fe = (e) => {
395
+ let n = e, r = t, { t: i, te: o, d: s, n: c } = He({ useScope: "global" }), l = Me(pe, void 0), u = Me(fe, void 0), w = (e) => {
395
396
  let t = e.toolCallId;
396
397
  return typeof t == "string" ? u?.value[t]?.details : void 0;
397
- }, _e = ze(), N = (e, t) => {
398
- if (le(e)) {
398
+ }, ve = Be(), N = (e, t) => {
399
+ if (de(e)) {
399
400
  let n = e.toolCallId;
400
401
  n && r("confirm-respond", {
401
402
  toolCallId: n,
@@ -403,169 +404,171 @@ var ft = ["aria-busy"], pt = {
403
404
  });
404
405
  return;
405
406
  }
406
- let n = he(e);
407
+ let n = ge(e);
407
408
  n && r("approval-respond", {
408
409
  id: n,
409
410
  approved: t
410
411
  });
411
- }, P = Be("scrollEl"), L = Be("wrapperEl"), Ue = D(() => x(n.textColor, n.mainColor)), { handleScroll: We, scrollToBottom: Ge, userScrolledUp: Ke, isAtBottom: qe } = ut({
412
+ }, P = Ve("scrollEl"), L = Ve("wrapperEl"), We = D(() => re(n.textColor, n.mainColor));
413
+ f(L);
414
+ let { handleScroll: Ge, scrollToBottom: Ke, userScrolledUp: qe, isAtBottom: Je } = dt({
412
415
  scrollEl: P,
413
416
  status: () => n.status,
414
417
  messagesLength: () => n.messages?.length,
415
418
  lastMessageRole: () => n.messages?.[n.messages.length - 1]?.role,
416
419
  contentEl: () => L.value,
417
- beforeNewMessageScroll: () => st(),
420
+ beforeNewMessageScroll: () => ct(),
418
421
  onScrollUp: () => r("scroll-up"),
419
422
  onScrollDown: () => r("scroll-down")
420
- }), Je = () => {
421
- Ke.value = !1, Ge();
423
+ }), Ye = () => {
424
+ qe.value = !1, Ke();
422
425
  }, K = D(() => (n.messages ?? []).filter((e) => e.role === "user" && !G(e)).map((e) => ({
423
426
  id: e.id,
424
- preview: e.parts.find(h)?.text.trim().slice(0, 120) || "…"
425
- }))), Ye = z(), Ze = () => P.value?.querySelectorAll(".pk-chatbot-message--user") ?? [], Qe = () => {
427
+ preview: e.parts.find(g)?.text.trim().slice(0, 120) || "…"
428
+ }))), Xe = z(), Qe = () => P.value?.querySelectorAll(".pk-chatbot-message--user") ?? [], $e = () => {
426
429
  let e = P.value;
427
430
  if (!e || !n.showScrollToBottom) return;
428
431
  let t = e.getBoundingClientRect().top + e.clientHeight / 2, r = K.value[0]?.id;
429
- Ze().forEach((e, n) => {
432
+ Qe().forEach((e, n) => {
430
433
  e.getBoundingClientRect().top <= t && (r = K.value[n]?.id);
431
- }), Ye.value = r;
434
+ }), Xe.value = r;
432
435
  };
433
436
  H(K, async () => {
434
- await F(), Qe();
437
+ await F(), $e();
435
438
  });
436
- let $e = () => {
437
- We(), Qe();
438
- }, et = (e) => {
439
- let t = P.value, n = K.value.findIndex((t) => t.id === e), r = Ze()[n];
440
- t && r && (Ke.value = !0, t.scrollTo({
439
+ let et = () => {
440
+ Ge(), $e();
441
+ }, tt = (e) => {
442
+ let t = P.value, n = K.value.findIndex((t) => t.id === e), r = Qe()[n];
443
+ t && r && (qe.value = !0, t.scrollTo({
441
444
  top: t.scrollTop + r.getBoundingClientRect().top - t.getBoundingClientRect().top - Number.parseFloat(getComputedStyle(t).paddingTop),
442
445
  behavior: "smooth"
443
446
  }));
444
- }, q = D(() => n.status === "submitted" || n.status === "streaming" || n.hostWorking === !0), J = z(0), nt = z(!1), rt = !1, it = Re(), at = () => n.messages?.[n.messages.length - 1]?.role === "user" || q.value, ot = () => {
445
- rt = !1, nt.value = !0, J.value = 0;
446
- }, st = async () => {
447
+ }, q = D(() => n.status === "submitted" || n.status === "streaming" || n.hostWorking === !0), J = z(0), rt = z(!1), it = !1, at = ze(), ot = () => n.messages?.[n.messages.length - 1]?.role === "user" || q.value, st = () => {
448
+ it = !1, rt.value = !0, J.value = 0;
449
+ }, ct = async () => {
447
450
  if (!n.messages?.length || n.disableHeightAdjustment) return;
448
- if (!at()) {
449
- rt && (await F(), P.value?.scrollHeight, at() || ot());
451
+ if (!ot()) {
452
+ it && (await F(), P.value?.scrollHeight, ot() || st());
450
453
  return;
451
454
  }
452
- if (rt = !0, nt.value = !1, await F(), !P.value) return;
453
- let { paddingTop: e, paddingBottom: t } = getComputedStyle(P.value), r = P.value.clientHeight - Number.parseFloat(e) - Number.parseFloat(t), i = L.value && Number.parseFloat(getComputedStyle(L.value).rowGap) || 0, a = Ze();
454
- it.value = a[a.length - 1];
455
- let o = r - (it.value?.clientHeight ?? 0) - i;
455
+ if (it = !0, rt.value = !1, await F(), !P.value) return;
456
+ let { paddingTop: e, paddingBottom: t } = getComputedStyle(P.value), r = P.value.clientHeight - Number.parseFloat(e) - Number.parseFloat(t), i = L.value && Number.parseFloat(getComputedStyle(L.value).rowGap) || 0, a = Qe();
457
+ at.value = a[a.length - 1];
458
+ let o = r - (at.value?.clientHeight ?? 0) - i;
456
459
  r > 0 && (J.value = Math.max(o, 0)), await F();
457
460
  };
458
- H([() => n.messages?.length, () => n.messages?.[n.messages.length - 1]?.id], () => st()), He([P, it], () => {
459
- rt && st();
460
- }), Pe(() => {
461
- (q.value || n.awaitingSpokenAnswer) && st();
461
+ H([() => n.messages?.length, () => n.messages?.[n.messages.length - 1]?.id], () => ct()), Ue([P, at], () => {
462
+ it && ct();
463
+ }), Fe(() => {
464
+ (q.value || n.awaitingSpokenAnswer) && ct();
462
465
  }), H(q, (e) => {
463
- e || ot();
466
+ e || st();
464
467
  });
465
- let lt = (e) => n.revisedAnswers?.some((t) => t.messageId === e), Y = (e) => n.messageFeedbacks?.find((t) => t.messageId === e), Yt = /* @__PURE__ */ new Set([
468
+ let ut = (e) => n.revisedAnswers?.some((t) => t.messageId === e), Y = (e) => n.messageFeedbacks?.find((t) => t.messageId === e), Xt = /* @__PURE__ */ new Set([
466
469
  "showContactForm",
467
470
  "showForm",
468
471
  "showMultipleChoice",
469
472
  "showSuggestedReply"
470
- ]), Xt = /* @__PURE__ */ new Set(["showDiagram", "showLocation"]), Zt = (e) => {
471
- let t = m(e);
473
+ ]), Zt = /* @__PURE__ */ new Set(["showDiagram", "showLocation"]), Qt = (e) => {
474
+ let t = h(e);
472
475
  return {
473
- ...!n.interactive && Yt.has(t) ? { record: !0 } : {},
474
- ...Xt.has(t) ? { isDark: n.isDark } : {}
476
+ ...!n.interactive && Xt.has(t) ? { record: !0 } : {},
477
+ ...Zt.has(t) ? { isDark: n.isDark } : {}
475
478
  };
476
- }, Qt = (e, t) => !n.readonlyFeedback && vn(e, t), $t = (e) => n.readonlyFeedback ? Y(e) : void 0, en = (e) => $t(e)?.vote, tn = (e) => {
477
- let t = $t(e);
479
+ }, $t = (e, t) => !n.readonlyFeedback && yn(e, t), en = (e) => n.readonlyFeedback ? Y(e) : void 0, tn = (e) => en(e)?.vote, nn = (e) => {
480
+ let t = en(e);
478
481
  if (t?.vote) return;
479
482
  let n = t?.metadata?.reactionEmoji;
480
483
  return typeof n == "string" && /\p{Extended_Pictographic}/u.test(n) ? n : void 0;
481
- }, nn = (e) => !!(en(e) || tn(e)), rn = (e) => {
482
- if (tn(e)) return "pk-chatbot-message__reaction--neutral";
483
- let t = en(e);
484
+ }, rn = (e) => !!(tn(e) || nn(e)), an = (e) => {
485
+ if (nn(e)) return "pk-chatbot-message__reaction--neutral";
486
+ let t = tn(e);
484
487
  return t === "upvote" ? "pk-chatbot-message__reaction--positive" : t === "downvote" ? "pk-chatbot-message__reaction--negative" : "pk-chatbot-message__reaction--neutral";
485
- }, an = (e) => {
486
- let t = en(e);
487
- return i(t === "upvote" ? "hint.userFeedbackPositive" : t === "downvote" ? "hint.userFeedbackNegative" : "hint.userFeedbackReaction");
488
488
  }, on = (e) => {
489
- let t = ln(e);
490
- for (let e = t.length - 1; e >= 0; --e) if (h(t[e])) return e;
489
+ let t = tn(e);
490
+ return i(t === "upvote" ? "hint.userFeedbackPositive" : t === "downvote" ? "hint.userFeedbackNegative" : "hint.userFeedbackReaction");
491
+ }, sn = (e) => {
492
+ let t = un(e);
493
+ for (let e = t.length - 1; e >= 0; --e) if (g(t[e])) return e;
491
494
  return -1;
492
- }, sn = D(() => n.messages?.[n.messages.length - 1]), X = D(() => {
493
- let e = sn.value;
495
+ }, cn = D(() => n.messages?.[n.messages.length - 1]), X = D(() => {
496
+ let e = cn.value;
494
497
  return e ? e.parts[e.parts.length - 1] : null;
495
- }), cn = D(() => {
498
+ }), ln = D(() => {
496
499
  let e = /* @__PURE__ */ new Map();
497
- for (let t of n.messages ?? []) t.role === "assistant" && e.set(t.id, ie(pe(re(t.parts))));
500
+ for (let t of n.messages ?? []) t.role === "assistant" && e.set(t.id, ae(me(S(t.parts))));
498
501
  return e;
499
- }), ln = (e) => cn.value.get(e.id) ?? e.parts, un = D(() => n.status === "error"), dn = D(() => n.awaitingSpokenAnswer === !0 && !q.value), fn = D(() => dn.value && sn.value?.role === "user" && !un.value), pn = (e, t) => t(), mn = D(() => {
502
+ }), un = (e) => ln.value.get(e.id) ?? e.parts, dn = D(() => n.status === "error"), fn = D(() => n.awaitingSpokenAnswer === !0 && !q.value), pn = D(() => fn.value && cn.value?.role === "user" && !dn.value), mn = (e, t) => t(), hn = D(() => {
500
503
  let e = X.value;
501
- return C(i, e, l?.value);
502
- }), hn = D(() => {
504
+ return oe(i, e, l?.value);
505
+ }), gn = D(() => {
503
506
  let e = X.value;
504
- return me(e);
505
- }), gn = (e) => n.messages?.findIndex((t) => t.id === e), Z = (e) => e === void 0 || !n.messages ? !1 : e === n.messages.length - 1, _n = (e) => Z(e) && n.status === "ready" && !n.hostWorking && !!n.actions?.includes("regenerate"), vn = (e, t) => (!Z(t) || n.status === "ready" && !n.hostWorking) && !!n.actions?.includes(e), yn = (e) => {
507
+ return he(e);
508
+ }), _n = (e) => n.messages?.findIndex((t) => t.id === e), Z = (e) => e === void 0 || !n.messages ? !1 : e === n.messages.length - 1, vn = (e) => Z(e) && n.status === "ready" && !n.hostWorking && !!n.actions?.includes("regenerate"), yn = (e, t) => (!Z(t) || n.status === "ready" && !n.hostWorking) && !!n.actions?.includes(e), bn = (e) => {
506
509
  let t = e.parts[e.parts.length - 1];
507
- return h(t);
508
- }, bn = (e) => e.parts.some((e) => p(e) || b(e) || !!w(e)), xn = (e) => !!n.showExtendedSteps && Q(e) && bn(e), Sn = (e) => n.hostConfirmation !== void 0 && w(e) !== void 0 && e.toolCallId === n.hostConfirmation.toolCallId, Cn = D(() => n.hostConfirmation !== void 0 && !n.messages?.some((e) => e.parts.some(Sn))), wn = (e, t) => q.value && Z(e) && w(t)?.state === "input-available", Tn = (e, t, n, r) => {
509
- if (!w(n) || xn(e)) return !1;
510
- let i = wn(t, n);
511
- return i && r === ln(e).length - 1 ? !1 : i || S(n) || !_(e);
512
- }, En = (e, t) => {
513
- let n = w(t);
514
- 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" && !wn(e, t) ? i("messagePart.hostToolNoAnswer") : void 0;
515
- }, Dn = (e) => b(e) && !te(e) && !!(Xe[m(e)] || _e[e.type] || n.showAllMessageParts), On = (e) => e.parts.some((e) => h(e) && !!e.text.trim() || v(e) || ne(e) && !te(e) || Dn(e)), Q = (e) => e.role === "assistant", kn = (e) => e.role === "user", An = (e) => n.messages?.slice(0, e).reverse().find((e) => Q(e)), jn = (e) => n.messages?.slice(e + 1).find((e) => Q(e)), Mn = (e) => {
516
- let t = An(e)?.metadata?.createdAt, n = jn(e)?.metadata?.createdAt;
510
+ return g(t);
511
+ }, xn = (e) => e.parts.some((e) => m(e) || b(e) || !!C(e)), Sn = (e) => !!n.showExtendedSteps && Q(e) && xn(e), Cn = (e) => n.hostConfirmation !== void 0 && C(e) !== void 0 && e.toolCallId === n.hostConfirmation.toolCallId, wn = D(() => n.hostConfirmation !== void 0 && !n.messages?.some((e) => e.parts.some(Cn))), Tn = (e, t) => q.value && Z(e) && C(t)?.state === "input-available", En = (e, t, n, r) => {
512
+ if (!C(n) || Sn(e)) return !1;
513
+ let i = Tn(t, n);
514
+ return i && r === un(e).length - 1 ? !1 : i || ie(n) || !ee(e);
515
+ }, Dn = (e, t) => {
516
+ let n = C(t);
517
+ 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" && !Tn(e, t) ? i("messagePart.hostToolNoAnswer") : void 0;
518
+ }, On = (e) => b(e) && !x(e) && !!(Ze[h(e)] || ve[e.type] || n.showAllMessageParts), kn = (e) => e.parts.some((e) => g(e) && !!e.text.trim() || v(e) || ne(e) && !x(e) || On(e)), Q = (e) => e.role === "assistant", An = (e) => e.role === "user", jn = (e) => n.messages?.slice(0, e).reverse().find((e) => Q(e)), Mn = (e) => n.messages?.slice(e + 1).find((e) => Q(e)), Nn = (e) => {
519
+ let t = jn(e)?.metadata?.createdAt, n = Mn(e)?.metadata?.createdAt;
517
520
  if (!t || !n) return;
518
521
  let r = new Date(t), i = new Date(n);
519
522
  return r.toDateString() === i.toDateString() ? void 0 : i;
520
- }, $ = D(() => n.showAllMessageParts ? dt([]) : dt(n.messages ?? [], On)), Nn = D(() => {
523
+ }, $ = D(() => n.showAllMessageParts ? ft([]) : ft(n.messages ?? [], kn)), Pn = D(() => {
521
524
  let e = 0;
522
525
  return (n.messages ?? []).map((t) => t.parts.length > 0 ? ++e : void 0);
523
- }), Pn = (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), Fn = (e) => {
526
+ }), Fn = (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), In = (e) => {
524
527
  let t = new Date(e), n = t.toDateString() === (/* @__PURE__ */ new Date()).toDateString();
525
528
  return s(t, n ? "time" : "date-time");
526
- }, In = (e) => {
529
+ }, Ln = (e) => {
527
530
  let { createdAt: t, completedAt: n } = e.metadata ?? {};
528
- if (t && n) return se(c, n - t);
529
- }, Ln = Be("feedbackMessageEl");
531
+ if (t && n) return le(c, n - t);
532
+ }, Rn = Ve("feedbackMessageEl");
530
533
  return H(() => n.feedbackMessageId, async () => {
531
534
  if (await F(), !n.feedbackMessageId) return;
532
- let e = Ln.value?.[0]?.$el;
533
- e && (Z(gn(n.feedbackMessageId)) ? Ge() : e.scrollIntoView({
535
+ let e = Rn.value?.[0]?.$el;
536
+ e && (Z(_n(n.feedbackMessageId)) ? Ke() : e.scrollIntoView({
534
537
  behavior: "smooth",
535
538
  block: "center"
536
539
  }));
537
540
  }), (t, n) => {
538
- let u = ke, p = De, _ = d, b = Oe;
541
+ let u = Ae, f = Oe, m = d, ee = ke;
539
542
  return R(), A("div", {
540
543
  ref_key: "scrollEl",
541
544
  ref: P,
542
545
  class: I(["pk-chatbot-messages scrollbar-thin", {
543
- "pk-chatbot-messages--settling": nt.value,
546
+ "pk-chatbot-messages--settling": rt.value,
544
547
  "pk-chatbot-messages--parent-scrolls": e.parentScrolls
545
548
  }]),
546
549
  role: "log",
547
550
  "aria-live": "polite",
548
551
  "aria-relevant": "additions text",
549
552
  "aria-busy": q.value,
550
- style: Ne({
553
+ style: Pe({
551
554
  "--chatbot-main-color": e.mainColor,
552
- "--chatbot-contrast-color": Ue.value
555
+ "--chatbot-contrast-color": We.value
553
556
  }),
554
- onScroll: $e
557
+ onScroll: et
555
558
  }, [
556
- e.showScrollToBottom && K.value.length > 1 ? (R(), A("div", pt, [M(Ee, {
559
+ e.showScrollToBottom && K.value.length > 1 ? (R(), A("div", mt, [M(De, {
557
560
  items: K.value,
558
- "active-id": Ye.value,
559
- onSelect: et
561
+ "active-id": Xe.value,
562
+ onSelect: tt
560
563
  }, null, 8, ["items", "active-id"])])) : k("", !0),
561
564
  j("div", {
562
565
  ref_key: "wrapperEl",
563
566
  ref: L,
564
567
  class: "pk-chatbot-messages__wrapper"
565
568
  }, [
566
- (R(!0), A(T, null, Fe(e.messages, (d, x) => (R(), A(T, { key: d.id }, [
567
- kn(d) && Mn(x) ? (R(), A("div", mt, [j("span", ht, B(V(s)(Mn(x), "short")), 1)])) : k("", !0),
568
- $.value.quietRuns.has(d.id) ? (R(), A("div", gt, [M(u, {
569
+ (R(!0), A(T, null, Ie(e.messages, (d, b) => (R(), A(T, { key: d.id }, [
570
+ An(d) && Nn(b) ? (R(), A("div", ht, [j("span", gt, B(V(s)(Nn(b), "short")), 1)])) : k("", !0),
571
+ $.value.quietRuns.has(d.id) ? (R(), A("div", _t, [M(u, {
569
572
  name: "ri:alarm-line",
570
573
  class: "shrink-0"
571
574
  }), j("span", null, B(V(i)("label.wakeupQuietRun", {
@@ -578,21 +581,21 @@ var ft = ["aria-busy"], pt = {
578
581
  }, [M(u, {
579
582
  name: "ri:alarm-line",
580
583
  class: "shrink-0"
581
- }), j("span", null, [Ae(B(V(i)("label.wakeupCheck")) + " ", 1), d.metadata?.createdAt ? (R(), A(T, { key: 0 }, [Ae(" · " + B(V(s)(d.metadata.createdAt, "time")), 1)], 64)) : k("", !0)])], 8, _t)) : k("", !0),
582
- (!V(G)(d) || e.showAllMessageParts) && (!$.value.hidden.has(d.id) || q.value && Z(x)) && (d.parts.length || Z(x) && q.value && Q(d)) ? (R(), A("div", {
584
+ }), j("span", null, [je(B(V(i)("label.wakeupCheck")) + " ", 1), d.metadata?.createdAt ? (R(), A(T, { key: 0 }, [je(" · " + B(V(s)(d.metadata.createdAt, "time")), 1)], 64)) : k("", !0)])], 8, vt)) : k("", !0),
585
+ (!V(G)(d) || e.showAllMessageParts) && (!$.value.hidden.has(d.id) || q.value && Z(b)) && (d.parts.length || Z(b) && q.value && Q(d)) ? (R(), A("div", {
583
586
  key: 3,
584
- class: I(["pk-chatbot-message", [`pk-chatbot-message--${d.role}`, { "pk-chatbot-message--loading": q.value && Z(x) && Q(d) }]]),
585
- style: Ne({ minHeight: Z(x) && Q(d) && !un.value ? `${J.value}px` : void 0 })
587
+ class: I(["pk-chatbot-message", [`pk-chatbot-message--${d.role}`, { "pk-chatbot-message--loading": q.value && Z(b) && Q(d) }]]),
588
+ style: Pe({ minHeight: Z(b) && Q(d) && !dn.value ? `${J.value}px` : void 0 })
586
589
  }, [
587
590
  M(E, {
588
591
  appear: "",
589
592
  name: "pk-chatbot-part"
590
593
  }, {
591
- default: U(() => [xn(d) ? (R(), O(Te, {
594
+ default: U(() => [Sn(d) ? (R(), O(Ee, {
592
595
  key: 0,
593
596
  message: d,
594
- "is-streaming": q.value && Z(x),
595
- "has-content": On(d),
597
+ "is-streaming": q.value && Z(b),
598
+ "has-content": kn(d),
596
599
  "hide-reasoning": e.hideReasoning,
597
600
  "is-dark": e.isDark
598
601
  }, null, 8, [
@@ -604,41 +607,41 @@ var ft = ["aria-busy"], pt = {
604
607
  ])) : k("", !0)]),
605
608
  _: 2
606
609
  }, 1024),
607
- (R(!0), A(T, null, Fe(ln(d), (s, c) => (R(), A(T, { key: V(oe)(s, c) }, [V(h)(s) && s.text.trim() ? (R(), O(E, {
610
+ (R(!0), A(T, null, Ie(un(d), (s, c) => (R(), A(T, { key: V(ce)(s, c) }, [V(g)(s) && s.text.trim() ? (R(), O(E, {
608
611
  key: 0,
609
612
  appear: "",
610
613
  name: "pk-chatbot-part"
611
614
  }, {
612
- default: U(() => [j("div", vt, [Ie(t.$slots, "text", Me({ ref_for: !0 }, {
615
+ default: U(() => [j("div", yt, [Le(t.$slots, "text", Ne({ ref_for: !0 }, {
613
616
  message: d,
614
617
  part: s,
615
- index: x,
618
+ index: b,
616
619
  isLoading: q.value
617
- }), () => [Q(d) ? (R(), O(f, {
620
+ }), () => [Q(d) ? (R(), O(p, {
618
621
  key: 0,
619
622
  class: "wysiwyg",
620
623
  markdown: s.text,
621
624
  "is-dark": e.isDark,
622
- loading: Z(x) && e.status === "streaming"
625
+ loading: Z(b) && e.status === "streaming"
623
626
  }, null, 8, [
624
627
  "markdown",
625
628
  "is-dark",
626
629
  "loading"
627
- ])) : (R(), A(T, { key: 1 }, [Ae(B(s.text), 1)], 64))]), nn(d.id) && !Y(d.id)?.comment && c === on(d) ? (R(), A("span", {
630
+ ])) : (R(), A(T, { key: 1 }, [je(B(s.text), 1)], 64))]), rn(d.id) && !Y(d.id)?.comment && c === sn(d) ? (R(), A("span", {
628
631
  key: 0,
629
- class: I(["pk-chatbot-message__reaction", rn(d.id)]),
630
- title: an(d.id)
631
- }, [tn(d.id) ? (R(), A("span", bt, B(tn(d.id)), 1)) : (R(), O(u, {
632
+ class: I(["pk-chatbot-message__reaction", an(d.id)]),
633
+ title: on(d.id)
634
+ }, [nn(d.id) ? (R(), A("span", xt, B(nn(d.id)), 1)) : (R(), O(u, {
632
635
  key: 1,
633
- name: en(d.id) === "downvote" ? "ri:thumb-down-fill" : "ri:thumb-up-fill"
634
- }, null, 8, ["name"]))], 10, yt)) : k("", !0)])]),
636
+ name: tn(d.id) === "downvote" ? "ri:thumb-down-fill" : "ri:thumb-up-fill"
637
+ }, null, 8, ["name"]))], 10, bt)) : k("", !0)])]),
635
638
  _: 2
636
639
  }, 1024)) : V(v)(s) ? (R(), O(E, {
637
640
  key: 1,
638
641
  appear: "",
639
642
  name: "pk-chatbot-part"
640
643
  }, {
641
- default: U(() => [V(a)(s.filename, s.mediaType) ? (R(), A("div", xt, [M(be, {
644
+ default: U(() => [V(a)(s.filename, s.mediaType) ? (R(), A("div", St, [M(Ce, {
642
645
  "media-type": s.mediaType,
643
646
  url: s.url,
644
647
  filename: s.filename,
@@ -648,15 +651,15 @@ var ft = ["aria-busy"], pt = {
648
651
  "url",
649
652
  "filename",
650
653
  "size"
651
- ]), M(ee, {
654
+ ]), M(te, {
652
655
  url: s.url,
653
- transcript: V(g)(s),
654
- pending: e.status === "submitted" && Z(x)
656
+ transcript: V(_)(s),
657
+ pending: e.status === "submitted" && Z(b)
655
658
  }, null, 8, [
656
659
  "url",
657
660
  "transcript",
658
661
  "pending"
659
- ])])) : (R(), O(be, {
662
+ ])])) : (R(), O(Ce, {
660
663
  key: 1,
661
664
  "media-type": s.mediaType,
662
665
  url: s.url,
@@ -669,15 +672,15 @@ var ft = ["aria-busy"], pt = {
669
672
  "size"
670
673
  ]))]),
671
674
  _: 2
672
- }, 1024)) : V(ne)(s) && !V(te)(s) ? (R(), O(E, {
675
+ }, 1024)) : V(ne)(s) && !V(x)(s) ? (R(), O(E, {
673
676
  key: 2,
674
677
  appear: "",
675
678
  name: "pk-chatbot-part"
676
679
  }, {
677
- default: U(() => [(R(), O(tt, {
680
+ default: U(() => [(R(), O(nt, {
678
681
  key: `approval-${c}`,
679
682
  part: s,
680
- actionable: e.interactive === !0 && (V(le)(s) || Z(x)),
683
+ actionable: e.interactive === !0 && (V(de)(s) || Z(b)),
681
684
  "call-verdict": e.confirmVerdictsOnCall?.get(s.toolCallId ?? ""),
682
685
  onRespond: (e) => N(s, e)
683
686
  }, null, 8, [
@@ -687,13 +690,13 @@ var ft = ["aria-busy"], pt = {
687
690
  "onRespond"
688
691
  ]))]),
689
692
  _: 2
690
- }, 1024)) : Sn(s) ? (R(), O(E, {
693
+ }, 1024)) : Cn(s) ? (R(), O(E, {
691
694
  key: 3,
692
695
  appear: "",
693
696
  name: "pk-chatbot-part"
694
697
  }, {
695
- default: U(() => [M(ct, {
696
- question: e.hostConfirmation?.question ?? V(i)("toolApproval.hostCall", { name: V(C)(V(i), s) }),
698
+ default: U(() => [M(lt, {
699
+ question: e.hostConfirmation?.question ?? V(i)("toolApproval.hostCall", { name: V(oe)(V(i), s) }),
697
700
  details: e.hostConfirmation?.details,
698
701
  unchanged: e.hostConfirmation?.unchanged,
699
702
  onRespond: n[0] ||= (e) => r("host-confirm-respond", e)
@@ -703,101 +706,101 @@ var ft = ["aria-busy"], pt = {
703
706
  "unchanged"
704
707
  ])]),
705
708
  _: 2
706
- }, 1024)) : Tn(d, x, s, c) ? (R(), O(E, {
709
+ }, 1024)) : En(d, b, s, c) ? (R(), O(E, {
707
710
  key: 4,
708
711
  appear: "",
709
712
  name: "pk-chatbot-part"
710
713
  }, {
711
- default: U(() => [j("div", St, [j("div", Ct, [
714
+ default: U(() => [j("div", Ct, [j("div", wt, [
712
715
  M(u, {
713
- name: wn(x, s) ? "loading-loop" : V(me)(s) ?? "ri:apps-line",
716
+ name: Tn(b, s) ? "loading-loop" : V(he)(s) ?? "ri:apps-line",
714
717
  class: "shrink-0"
715
718
  }, null, 8, ["name"]),
716
- j("span", wt, B(V(C)(V(i), s, V(l))), 1),
717
- En(x, s) ? (R(), A("span", Tt, " · " + B(En(x, s)), 1)) : k("", !0)
718
- ]), fe(s)?.length ? (R(), O(p, {
719
+ j("span", Tt, B(V(oe)(V(i), s, V(l))), 1),
720
+ Dn(b, s) ? (R(), A("span", Et, " · " + B(Dn(b, s)), 1)) : k("", !0)
721
+ ]), w(s)?.length ? (R(), O(f, {
719
722
  key: 0,
720
- title: V(i)("toolApproval.changesCount", fe(s).length),
723
+ title: V(i)("toolApproval.changesCount", w(s).length),
721
724
  modifiers: "compact",
722
725
  class: "pk-chatbot-message__host-changes"
723
726
  }, {
724
- default: U(() => [M(we, { changes: fe(s) }, null, 8, ["changes"])]),
727
+ default: U(() => [M(Te, { changes: w(s) }, null, 8, ["changes"])]),
725
728
  _: 2
726
729
  }, 1032, ["title"])) : k("", !0)])]),
727
730
  _: 2
728
- }, 1024)) : Dn(s) ? (R(), O(E, {
731
+ }, 1024)) : On(s) ? (R(), O(E, {
729
732
  key: 5,
730
733
  appear: "",
731
734
  name: "pk-chatbot-part"
732
735
  }, {
733
- default: U(() => [!V(_e)[s.type] && V(Xe)[V(m)(s)] ? (R(), O(Le(V(Xe)[V(m)(s)]), Me({
734
- key: `component-${c}-${V(ge)(s)}`,
736
+ default: U(() => [!V(ve)[s.type] && V(Ze)[V(h)(s)] ? (R(), O(Re(V(Ze)[V(h)(s)]), Ne({
737
+ key: `component-${c}-${V(_e)(s)}`,
735
738
  part: s
736
- }, { ref_for: !0 }, Zt(s)), null, 16, ["part"])) : Ie(t.$slots, s.type, Me({ ref_for: !0 }, {
739
+ }, { ref_for: !0 }, Qt(s)), null, 16, ["part"])) : Le(t.$slots, s.type, Ne({ ref_for: !0 }, {
737
740
  message: d,
738
741
  part: s,
739
- index: x,
742
+ index: b,
740
743
  isLoading: q.value
741
- }), () => [e.showAllMessageParts ? (R(), A("div", Et, [j("div", Dt, [V(me)(s) ? (R(), O(u, {
744
+ }), () => [e.showAllMessageParts ? (R(), A("div", Dt, [j("div", Ot, [V(he)(s) ? (R(), O(u, {
742
745
  key: 0,
743
- name: V(me)(s),
746
+ name: V(he)(s),
744
747
  class: "shrink-0"
745
- }, null, 8, ["name"])) : k("", !0), j("span", Ot, B(V(ae)(s, {
748
+ }, null, 8, ["name"])) : k("", !0), j("span", kt, B(V(se)(s, {
746
749
  t: V(i),
747
750
  te: V(o)
748
751
  })), 1)])])) : k("", !0)], void 0, 1)]),
749
752
  _: 2
750
753
  }, 1024)) : k("", !0), M(E, { mode: "out-in" }, {
751
- default: U(() => [c === on(d) && e.readonlyFeedback && Y(d.id)?.comment ? (R(), O(Se, {
754
+ default: U(() => [c === sn(d) && e.readonlyFeedback && Y(d.id)?.comment ? (R(), O(Se, {
752
755
  key: 0,
753
756
  feedback: Y(d.id)
754
757
  }, null, 8, ["feedback"])) : k("", !0)]),
755
758
  _: 2
756
759
  }, 1024)], 64))), 128)),
757
- kn(d) && d.metadata?.pagePointer ? (R(), A("div", {
760
+ An(d) && d.metadata?.pagePointer ? (R(), A("div", {
758
761
  key: 0,
759
762
  class: "pk-chatbot-message__pointer",
760
763
  title: d.metadata.pagePointer.kind === "text" ? V(i)("pagePointer.selected") : V(i)("pagePointer.pointed")
761
764
  }, [M(u, {
762
765
  name: d.metadata.pagePointer.kind === "text" ? "ri:double-quotes-l" : "ri:focus-3-line",
763
766
  class: "pk-chatbot-message__pointer-icon"
764
- }, null, 8, ["name"]), j("span", At, B(d.metadata.pagePointer.kind === "text" ? `«${d.metadata.pagePointer.label}»` : d.metadata.pagePointer.label), 1)], 8, kt)) : k("", !0),
767
+ }, null, 8, ["name"]), j("span", jt, B(d.metadata.pagePointer.kind === "text" ? `«${d.metadata.pagePointer.label}»` : d.metadata.pagePointer.label), 1)], 8, At)) : k("", !0),
765
768
  M(E, {
766
769
  name: "fade-in",
767
770
  mode: "out-in"
768
771
  }, {
769
- default: U(() => [q.value && Z(x) && !yn(d) && !e.hostConfirmation && Q(d) && (!xn(d) || On(d)) ? (R(), A("div", {
772
+ default: U(() => [q.value && Z(b) && !bn(d) && !e.hostConfirmation && Q(d) && (!Sn(d) || kn(d)) ? (R(), A("div", {
770
773
  key: `loading-info-${d.id}`,
771
774
  class: "pk-chatbot-message__loading-info"
772
- }, [j("div", jt, [
775
+ }, [j("div", Mt, [
773
776
  M(u, {
774
777
  name: "loading-loop",
775
778
  class: "shrink-0"
776
779
  }),
777
780
  M(E, { mode: "out-in" }, {
778
- default: U(() => [hn.value ? (R(), O(u, {
779
- key: hn.value,
781
+ default: U(() => [gn.value ? (R(), O(u, {
782
+ key: gn.value,
780
783
  class: "shrink-0",
781
- name: hn.value
784
+ name: gn.value
782
785
  }, null, 8, ["name"])) : k("", !0)]),
783
786
  _: 1
784
787
  }),
785
788
  M(E, { mode: "out-in" }, {
786
- default: U(() => [mn.value ? (R(), A("span", {
787
- key: mn.value,
789
+ default: U(() => [hn.value ? (R(), A("span", {
790
+ key: hn.value,
788
791
  class: "text-12"
789
- }, B(mn.value), 1)) : k("", !0)]),
792
+ }, B(hn.value), 1)) : k("", !0)]),
790
793
  _: 1
791
794
  })
792
795
  ]), M(E, {
793
796
  name: "fade-in",
794
797
  mode: "out-in"
795
798
  }, {
796
- default: U(() => [!e.hideReasoning && !xn(d) && X.value && "text" in X.value && X.value.text.trim() ? (R(), O(Ce, {
799
+ default: U(() => [!e.hideReasoning && !Sn(d) && X.value && "text" in X.value && X.value.text.trim() ? (R(), O(we, {
797
800
  key: 0,
798
801
  markdown: X.value.text,
799
802
  "is-dark": e.isDark,
800
- "tail-length": V(ce),
803
+ "tail-length": V(ue),
801
804
  "inner-class": "wysiwyg",
802
805
  class: "border border-surface-3 rounded-md p-4 mt-8 bg-surface-1 max-h-64 text-12 w-full"
803
806
  }, null, 8, [
@@ -810,14 +813,14 @@ var ft = ["aria-busy"], pt = {
810
813
  _: 2
811
814
  }, 1024),
812
815
  M(E, { mode: "out-in" }, {
813
- default: U(() => [Pn(d, x) ? (R(), A("div", Mt, [
814
- M(b, {
816
+ default: U(() => [Fn(d, b) ? (R(), A("div", Nt, [
817
+ M(ee, {
815
818
  modifiers: "compact",
816
819
  class: "mr-auto shrink-0"
817
820
  }, {
818
821
  default: U(() => [
819
822
  M(E, { mode: "out-in" }, {
820
- default: U(() => [_n(x) ? (R(), O(_, {
823
+ default: U(() => [vn(b) ? (R(), O(m, {
821
824
  key: 0,
822
825
  icon: "ri:reset-right-line",
823
826
  modifiers: "action-quiet-small",
@@ -828,7 +831,7 @@ var ft = ["aria-busy"], pt = {
828
831
  _: 2
829
832
  }, 1024),
830
833
  M(E, { mode: "out-in" }, {
831
- default: U(() => [vn("show-info", x) ? (R(), O(_, {
834
+ default: U(() => [yn("show-info", b) ? (R(), O(m, {
832
835
  key: 0,
833
836
  icon: "ri:information-line",
834
837
  title: V(i)("action.getMoreInfo"),
@@ -843,13 +846,13 @@ var ft = ["aria-busy"], pt = {
843
846
  _: 2
844
847
  }, 1024),
845
848
  M(E, { mode: "out-in" }, {
846
- default: U(() => [vn("revise", x) ? (R(), O(_, {
849
+ default: U(() => [yn("revise", b) ? (R(), O(m, {
847
850
  key: 0,
848
- icon: lt(d.id) ? "ri:file-edit-fill" : "ri:file-edit-line",
849
- title: lt(d.id) ? V(i)("action.editRevise") : V(i)("action.createRevise"),
850
- "aria-label": lt(d.id) ? V(i)("action.editRevise") : V(i)("action.createRevise"),
851
+ icon: ut(d.id) ? "ri:file-edit-fill" : "ri:file-edit-line",
852
+ title: ut(d.id) ? V(i)("action.editRevise") : V(i)("action.createRevise"),
853
+ "aria-label": ut(d.id) ? V(i)("action.editRevise") : V(i)("action.createRevise"),
851
854
  modifiers: "action-quiet-small",
852
- class: I({ "text-brand-graphic": lt(d.id) }),
855
+ class: I({ "text-brand-graphic": ut(d.id) }),
853
856
  onClick: W((e) => t.$emit("revise", d), ["stop"])
854
857
  }, null, 8, [
855
858
  "icon",
@@ -861,7 +864,7 @@ var ft = ["aria-busy"], pt = {
861
864
  _: 2
862
865
  }, 1024),
863
866
  M(E, { mode: "out-in" }, {
864
- default: U(() => [Qt("upvote", x) ? (R(), O(_, {
867
+ default: U(() => [$t("upvote", b) ? (R(), O(m, {
865
868
  key: 0,
866
869
  icon: Y(d.id)?.vote === "upvote" ? "ri:thumb-up-fill" : "ri:thumb-up-line",
867
870
  title: V(i)("action.upvote"),
@@ -877,7 +880,7 @@ var ft = ["aria-busy"], pt = {
877
880
  _: 2
878
881
  }, 1024),
879
882
  M(E, { mode: "out-in" }, {
880
- default: U(() => [Qt("downvote", x) ? (R(), O(_, {
883
+ default: U(() => [$t("downvote", b) ? (R(), O(m, {
881
884
  key: 0,
882
885
  icon: Y(d.id)?.vote === "downvote" ? "ri:thumb-down-fill" : "ri:thumb-down-line",
883
886
  title: V(i)("action.downvote"),
@@ -893,7 +896,7 @@ var ft = ["aria-busy"], pt = {
893
896
  _: 2
894
897
  }, 1024),
895
898
  M(E, { mode: "out-in" }, {
896
- default: U(() => [Qt("feedback", x) ? (R(), O(_, {
899
+ default: U(() => [$t("feedback", b) ? (R(), O(m, {
897
900
  key: 0,
898
901
  icon: Y(d.id)?.comment ? "ri:feedback-fill" : "ri:feedback-line",
899
902
  title: V(i)("action.feedback"),
@@ -911,26 +914,26 @@ var ft = ["aria-busy"], pt = {
911
914
  ]),
912
915
  _: 2
913
916
  }, 1024),
914
- !e.showMessageDateTime && d.metadata?.createdAt && d.metadata?.completedAt ? (R(), A("div", Nt, [j("time", {
917
+ !e.showMessageDateTime && d.metadata?.createdAt && d.metadata?.completedAt ? (R(), A("div", Pt, [j("time", {
915
918
  datetime: new Date(d.metadata.createdAt).toISOString(),
916
919
  title: V(s)(new Date(d.metadata.createdAt), "date-time"),
917
920
  class: "flex items-center gap-4 min-w-0"
918
921
  }, [M(u, {
919
922
  name: "ri:time-line",
920
923
  class: "shrink-0"
921
- }), j("span", Ft, B(Fn(d.metadata.createdAt)), 1)], 8, Pt), In(d) ? (R(), A("span", It, [M(u, {
924
+ }), j("span", It, B(In(d.metadata.createdAt)), 1)], 8, Ft), Ln(d) ? (R(), A("span", Lt, [M(u, {
922
925
  name: "ri:hourglass-line",
923
926
  class: "shrink-0"
924
- }), j("span", Lt, B(In(d)), 1)])) : k("", !0)])) : k("", !0),
927
+ }), j("span", Rt, B(Ln(d)), 1)])) : k("", !0)])) : k("", !0),
925
928
  e.showMessageNumber ? (R(), A("span", {
926
929
  key: 1,
927
- title: V(i)("label.messageNumber", { n: Nn.value[x] }),
930
+ title: V(i)("label.messageNumber", { n: Pn.value[b] }),
928
931
  class: "text-12 text-word-3 tabular-nums"
929
- }, " #" + B(Nn.value[x]), 9, Rt)) : k("", !0),
930
- e.showMessageTokensCount && d.metadata?.totalTokens ? (R(), A("span", zt, [M(u, {
932
+ }, " #" + B(Pn.value[b]), 9, zt)) : k("", !0),
933
+ e.showMessageTokensCount && d.metadata?.totalTokens ? (R(), A("span", Bt, [M(u, {
931
934
  name: "ri:ai-generate-2-line",
932
935
  class: "shrink-0"
933
- }), j("span", Bt, B(V(c)(d.metadata.totalTokens, "integer")) + " " + B(V(i)("label.tokens")), 1)])) : k("", !0),
936
+ }), j("span", Vt, B(V(c)(d.metadata.totalTokens, "integer")) + " " + B(V(i)("label.tokens")), 1)])) : k("", !0),
934
937
  e.showMessageDateTime && d.metadata?.createdAt ? (R(), A("time", {
935
938
  key: 3,
936
939
  datetime: new Date(d.metadata?.createdAt).toISOString(),
@@ -938,11 +941,11 @@ var ft = ["aria-busy"], pt = {
938
941
  }, [M(u, {
939
942
  name: "ri:time-line",
940
943
  class: "shrink-0"
941
- }), j("span", Ht, B(V(s)(new Date(d.metadata?.createdAt), "date-time")), 1)], 8, Vt)) : k("", !0),
942
- e.showMessageDateTime && d?.metadata?.completedAt && d?.metadata?.createdAt ? (R(), A("div", Ut, [M(u, {
944
+ }), j("span", Ut, B(V(s)(new Date(d.metadata?.createdAt), "date-time")), 1)], 8, Ht)) : k("", !0),
945
+ e.showMessageDateTime && d?.metadata?.completedAt && d?.metadata?.createdAt ? (R(), A("div", Wt, [M(u, {
943
946
  name: "ri:hourglass-line",
944
947
  class: "shrink-0"
945
- }), M(ye, {
948
+ }), M(be, {
946
949
  class: "truncate",
947
950
  date: d.metadata?.createdAt,
948
951
  "end-date": d.metadata?.completedAt
@@ -955,7 +958,7 @@ var ft = ["aria-busy"], pt = {
955
958
  key: 0,
956
959
  ref_for: !0,
957
960
  ref_key: "feedbackMessageEl",
958
- ref: Ln,
961
+ ref: Rn,
959
962
  loading: e.feedbackLoading,
960
963
  submitted: e.feedbackSubmitted,
961
964
  error: e.feedbackError,
@@ -973,23 +976,23 @@ var ft = ["aria-busy"], pt = {
973
976
  M(E, {
974
977
  appear: "",
975
978
  name: "pk-chatbot-part",
976
- onLeave: pn
979
+ onLeave: mn
977
980
  }, {
978
- default: U(() => [dn.value ? (R(), A("div", {
981
+ default: U(() => [fn.value ? (R(), A("div", {
979
982
  key: 0,
980
983
  class: "pk-chatbot-message pk-chatbot-message--assistant pk-chatbot-message--loading",
981
- style: Ne({ minHeight: fn.value ? `${J.value}px` : void 0 })
982
- }, [j("div", Wt, [j("div", Gt, [M(u, {
984
+ style: Pe({ minHeight: pn.value ? `${J.value}px` : void 0 })
985
+ }, [j("div", Gt, [j("div", Kt, [M(u, {
983
986
  name: "loading-loop",
984
987
  class: "shrink-0"
985
- }), j("span", Kt, B(V(i)("label.answeringOnTheCall")), 1)])])], 4)) : k("", !0)]),
988
+ }), j("span", qt, B(V(i)("label.answeringOnTheCall")), 1)])])], 4)) : k("", !0)]),
986
989
  _: 1
987
990
  }),
988
991
  M(E, {
989
992
  appear: "",
990
993
  name: "pk-chatbot-part"
991
994
  }, {
992
- default: U(() => [Cn.value ? (R(), A("div", qt, [M(ct, {
995
+ default: U(() => [wn.value ? (R(), A("div", Jt, [M(lt, {
993
996
  question: e.hostConfirmation?.question ?? V(i)("toolApproval.prompt"),
994
997
  details: e.hostConfirmation?.details,
995
998
  unchanged: e.hostConfirmation?.unchanged,
@@ -1005,7 +1008,7 @@ var ft = ["aria-busy"], pt = {
1005
1008
  appear: "",
1006
1009
  name: "pk-chatbot-part"
1007
1010
  }, {
1008
- default: U(() => [un.value ? (R(), O(ve, {
1011
+ default: U(() => [dn.value ? (R(), O(ye, {
1009
1012
  key: 0,
1010
1013
  error: e.error,
1011
1014
  onRetry: n[5] ||= (e) => t.$emit("auto-retry"),
@@ -1013,27 +1016,27 @@ var ft = ["aria-busy"], pt = {
1013
1016
  }, null, 8, ["error"])) : k("", !0)]),
1014
1017
  _: 1
1015
1018
  }),
1016
- sn.value?.role === "user" && !fn.value || un.value ? (R(), A("div", {
1019
+ cn.value?.role === "user" && !pn.value || dn.value ? (R(), A("div", {
1017
1020
  key: 0,
1018
1021
  class: "pk-chatbot-messages__spacer",
1019
- style: Ne({ minHeight: `${J.value}px` })
1022
+ style: Pe({ minHeight: `${J.value}px` })
1020
1023
  }, null, 4)) : k("", !0)
1021
1024
  ], 512),
1022
1025
  M(E, { name: "pk-chatbot-messages-fab" }, {
1023
- default: U(() => [e.showScrollToBottom && (V(Ke) || !V(qe)) ? (R(), A("button", {
1026
+ default: U(() => [e.showScrollToBottom && (V(qe) || !V(Je)) ? (R(), A("button", {
1024
1027
  key: 0,
1025
1028
  type: "button",
1026
1029
  class: "pk-chatbot-messages__scroll-to-bottom",
1027
1030
  title: V(i)("action.scrollToBottom"),
1028
1031
  "aria-label": V(i)("action.scrollToBottom"),
1029
- onClick: Je
1030
- }, [M(u, { name: "ri:arrow-down-line" })], 8, Jt)) : k("", !0)]),
1032
+ onClick: Ye
1033
+ }, [M(u, { name: "ri:arrow-down-line" })], 8, Yt)) : k("", !0)]),
1031
1034
  _: 1
1032
1035
  })
1033
- ], 46, ft);
1036
+ ], 46, pt);
1034
1037
  };
1035
1038
  }
1036
1039
  });
1037
- export { Yt as t };
1040
+ export { Xt as t };
1038
1041
 
1039
- //# sourceMappingURL=PkChatbotMessages-BxkCGmqV.js.map
1042
+ //# sourceMappingURL=PkChatbotMessages-D-m0cOqM.js.map