@8wave/ai-elements 0.118.0 → 0.119.0-beta.12

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 (92) hide show
  1. package/dist/_chunks/{PkStreamingMarkdown--CcBvs19.js → PkStreamingMarkdown-Bry3y6Ru.js} +789 -780
  2. package/dist/_chunks/PkStreamingMarkdown-Bry3y6Ru.js.map +1 -0
  3. package/dist/_chunks/{PkToolShowArtifact-BVGN7hV2.js → PkToolShowArtifact-CfJLe8vD.js} +2 -2
  4. package/dist/_chunks/{PkToolShowArtifact-BVGN7hV2.js.map → PkToolShowArtifact-CfJLe8vD.js.map} +1 -1
  5. package/dist/_chunks/{PkToolShowContactForm-Blrwqpl0.js → PkToolShowContactForm-CQQ6p4bJ.js} +2 -2
  6. package/dist/_chunks/{PkToolShowContactForm-Blrwqpl0.js.map → PkToolShowContactForm-CQQ6p4bJ.js.map} +1 -1
  7. package/dist/_chunks/{PkToolShowForm-BpGHaN6x.js → PkToolShowForm-CGAc1O6K.js} +4 -4
  8. package/dist/_chunks/{PkToolShowForm-BpGHaN6x.js.map → PkToolShowForm-CGAc1O6K.js.map} +1 -1
  9. package/dist/_chunks/{PkToolShowSources-8c9RvGV1.js → PkToolShowSources-BJ-XFrLD.js} +3 -3
  10. package/dist/_chunks/{PkToolShowSources-8c9RvGV1.js.map → PkToolShowSources-BJ-XFrLD.js.map} +1 -1
  11. package/dist/_chunks/{markdown-c59ir6tw.js → markdown-DpoAzJSk.js} +64 -61
  12. package/dist/_chunks/markdown-DpoAzJSk.js.map +1 -0
  13. package/dist/ai-elements.es.js +1944 -1865
  14. package/dist/ai-elements.es.js.map +1 -1
  15. package/dist-vue/PkChatbot.js +1 -1
  16. package/dist-vue/PkChatbotEmptyState.js +1 -1
  17. package/dist-vue/PkChatbotInput.js +1 -1
  18. package/dist-vue/PkChatbotMessages.js +1 -1
  19. package/dist-vue/PkChatbotStepPayload.js +1 -1
  20. package/dist-vue/PkChatbotStepToolDetail.js +1 -1
  21. package/dist-vue/PkChatbotSteps.js +1 -1
  22. package/dist-vue/PkChatbotViewChat.js +1 -1
  23. package/dist-vue/PkChatbotViewFiles.js +1 -1
  24. package/dist-vue/PkChatbotViewProfile.js +1 -1
  25. package/dist-vue/_chunks/{Document-B-oyVh7v.js → Document-CV-RJu_p.js} +64 -61
  26. package/dist-vue/_chunks/Document-CV-RJu_p.js.map +1 -0
  27. package/dist-vue/_chunks/PkAvatar-BTqu8tn9.js +44 -0
  28. package/dist-vue/_chunks/PkAvatar-BTqu8tn9.js.map +1 -0
  29. package/dist-vue/_chunks/PkChatbot-CcNC2r_E.js +276 -0
  30. package/dist-vue/_chunks/PkChatbot-CcNC2r_E.js.map +1 -0
  31. package/dist-vue/_chunks/{PkChatbotEmptyState-D2dhInfG.js → PkChatbotEmptyState-Toj4CqXV.js} +3 -3
  32. package/dist-vue/_chunks/{PkChatbotEmptyState-D2dhInfG.js.map → PkChatbotEmptyState-Toj4CqXV.js.map} +1 -1
  33. package/dist-vue/_chunks/{PkChatbotInput-CQdxFbBR.js → PkChatbotInput-BfZqRpQ2.js} +2 -2
  34. package/dist-vue/_chunks/{PkChatbotInput-CQdxFbBR.js.map → PkChatbotInput-BfZqRpQ2.js.map} +1 -1
  35. package/dist-vue/_chunks/{PkChatbotMessages-coscJcpy.js → PkChatbotMessages-B6qYZsMZ.js} +283 -283
  36. package/dist-vue/_chunks/{PkChatbotMessages-coscJcpy.js.map → PkChatbotMessages-B6qYZsMZ.js.map} +1 -1
  37. package/dist-vue/_chunks/{PkChatbotStepPayload-DnqFluQZ.js → PkChatbotStepPayload-D0eoPBQ8.js} +2 -2
  38. package/dist-vue/_chunks/{PkChatbotStepPayload-DnqFluQZ.js.map → PkChatbotStepPayload-D0eoPBQ8.js.map} +1 -1
  39. package/dist-vue/_chunks/{PkChatbotStepToolDetail-BMslY_BG.js → PkChatbotStepToolDetail-CMx4cw1D.js} +3 -3
  40. package/dist-vue/_chunks/{PkChatbotStepToolDetail-BMslY_BG.js.map → PkChatbotStepToolDetail-CMx4cw1D.js.map} +1 -1
  41. package/dist-vue/_chunks/{PkChatbotSteps-7FT6Ju6_.js → PkChatbotSteps-DeZQhGRU.js} +38 -38
  42. package/dist-vue/_chunks/{PkChatbotSteps-7FT6Ju6_.js.map → PkChatbotSteps-DeZQhGRU.js.map} +1 -1
  43. package/dist-vue/_chunks/{PkChatbotViewChat-Cko-Cw6c.js → PkChatbotViewChat--Q90F_Kg.js} +7 -7
  44. package/dist-vue/_chunks/PkChatbotViewChat--Q90F_Kg.js.map +1 -0
  45. package/dist-vue/_chunks/{PkChatbotViewFiles-gqCumfod.js → PkChatbotViewFiles-CA20TBFY.js} +2 -2
  46. package/dist-vue/_chunks/{PkChatbotViewFiles-gqCumfod.js.map → PkChatbotViewFiles-CA20TBFY.js.map} +1 -1
  47. package/dist-vue/_chunks/{PkChatbotViewProfile-B57VRVaO.js → PkChatbotViewProfile-CyzRxE3D.js} +2 -2
  48. package/dist-vue/_chunks/{PkChatbotViewProfile-B57VRVaO.js.map → PkChatbotViewProfile-CyzRxE3D.js.map} +1 -1
  49. package/dist-vue/_chunks/{PkStreamingMarkdown-BtyWXY2k.js → PkStreamingMarkdown-C55Fi0Pd.js} +2 -2
  50. package/dist-vue/_chunks/{PkStreamingMarkdown-BtyWXY2k.js.map → PkStreamingMarkdown-C55Fi0Pd.js.map} +1 -1
  51. package/dist-vue/_chunks/{PkToolShowArtifact-Ritx54_X.js → PkToolShowArtifact-z1qTnFkA.js} +2 -2
  52. package/dist-vue/_chunks/{PkToolShowArtifact-Ritx54_X.js.map → PkToolShowArtifact-z1qTnFkA.js.map} +1 -1
  53. package/dist-vue/_chunks/{PkToolShowContactForm-D30IsZGy.js → PkToolShowContactForm-BjNpnv6y.js} +2 -2
  54. package/dist-vue/_chunks/{PkToolShowContactForm-D30IsZGy.js.map → PkToolShowContactForm-BjNpnv6y.js.map} +1 -1
  55. package/dist-vue/_chunks/{PkToolShowDiagram-PEozSAqU.js → PkToolShowDiagram-CqkabP0e.js} +2 -2
  56. package/dist-vue/_chunks/{PkToolShowDiagram-PEozSAqU.js.map → PkToolShowDiagram-CqkabP0e.js.map} +1 -1
  57. package/dist-vue/_chunks/{PkToolShowForm-ZmdM9J9x.js → PkToolShowForm-CZFWZub7.js} +5 -5
  58. package/dist-vue/_chunks/{PkToolShowForm-ZmdM9J9x.js.map → PkToolShowForm-CZFWZub7.js.map} +1 -1
  59. package/dist-vue/_chunks/{PkToolShowImageGallery-Dkjf7Tw_.js → PkToolShowImageGallery-CkfXP_lD.js} +2 -2
  60. package/dist-vue/_chunks/{PkToolShowImageGallery-Dkjf7Tw_.js.map → PkToolShowImageGallery-CkfXP_lD.js.map} +1 -1
  61. package/dist-vue/_chunks/{PkToolShowProductList-CsHYM8vl.js → PkToolShowProductList-De-PtmD-.js} +2 -2
  62. package/dist-vue/_chunks/{PkToolShowProductList-CsHYM8vl.js.map → PkToolShowProductList-De-PtmD-.js.map} +1 -1
  63. package/dist-vue/_chunks/{PkToolShowSources-CKZkcPLA.js → PkToolShowSources-CSN7S0zo.js} +3 -3
  64. package/dist-vue/_chunks/{PkToolShowSources-CKZkcPLA.js.map → PkToolShowSources-CSN7S0zo.js.map} +1 -1
  65. package/dist-vue/_chunks/{PkToolShowVideo-CKm1fVQs.js → PkToolShowVideo-B_Q93E2y.js} +2 -2
  66. package/dist-vue/_chunks/{PkToolShowVideo-CKm1fVQs.js.map → PkToolShowVideo-B_Q93E2y.js.map} +1 -1
  67. package/dist-vue/_chunks/{PkToolShowWebPages-DLEC9cuh.js → PkToolShowWebPages-D3CdjJUc.js} +2 -2
  68. package/dist-vue/_chunks/{PkToolShowWebPages-DLEC9cuh.js.map → PkToolShowWebPages-D3CdjJUc.js.map} +1 -1
  69. package/dist-vue/_chunks/{utils-fxHiCnzf.js → utils-CwIMEuAv.js} +41 -32
  70. package/dist-vue/_chunks/utils-CwIMEuAv.js.map +1 -0
  71. package/dist-vue/apps/web-component/src/composables/useChatbotAgent.d.ts +1 -4
  72. package/dist-vue/composables.js +188 -115
  73. package/dist-vue/composables.js.map +1 -1
  74. package/dist-vue/index.js +4008 -3983
  75. package/dist-vue/index.js.map +1 -1
  76. package/dist-vue/locales.js +4 -0
  77. package/dist-vue/packages/components/src/chat/PkAvatar.d.ts +7 -0
  78. package/dist-vue/packages/components/src/chat/utils.d.ts +10 -0
  79. package/dist-vue/packages/models/src/schema/Document.d.ts +25 -0
  80. package/dist-vue/packages/models/src/schema/Notification.d.ts +2 -0
  81. package/dist-vue/packages/models/src/schema/Platform.d.ts +72 -0
  82. package/dist-vue/style.css +1 -1
  83. package/package.json +1 -1
  84. package/dist/_chunks/PkStreamingMarkdown--CcBvs19.js.map +0 -1
  85. package/dist/_chunks/markdown-c59ir6tw.js.map +0 -1
  86. package/dist-vue/_chunks/Document-B-oyVh7v.js.map +0 -1
  87. package/dist-vue/_chunks/PkAvatar-ZgCsoO-p.js +0 -42
  88. package/dist-vue/_chunks/PkAvatar-ZgCsoO-p.js.map +0 -1
  89. package/dist-vue/_chunks/PkChatbot-Cm45hwYw.js +0 -275
  90. package/dist-vue/_chunks/PkChatbot-Cm45hwYw.js.map +0 -1
  91. package/dist-vue/_chunks/PkChatbotViewChat-Cko-Cw6c.js.map +0 -1
  92. package/dist-vue/_chunks/utils-fxHiCnzf.js.map +0 -1
@@ -1,94 +1,94 @@
1
1
  import { A as e, E as t, S as n, n as r, v as i } from "./schemas-Bu1lick6.js";
2
2
  import { a } from "./Media-C6RS-s98.js";
3
3
  import { S as o, j as s, n as c, x as l } from "./Agent-dGF8mkG9.js";
4
- import { t as u } from "./PkStreamingMarkdown-BtyWXY2k.js";
4
+ import { t as u } from "./PkStreamingMarkdown-C55Fi0Pd.js";
5
5
  import "./src-DCfvejyT.js";
6
6
  import { c as d, i as f, l as p, n as m, o as h, s as g, t as _ } from "./message-BOiF6Bt5.js";
7
7
  import { t as ee } from "./PkChatbotAudioTranscript-BUxBHanA.js";
8
8
  import { t as v } from "./PkChatbotError-CRGbK09-.js";
9
9
  import { t as te } from "./PkRelativeTime--1cIphlA.js";
10
- import { C as y, S as ne, a as re, b, d as x, f as S, i as ie, l as ae, m as oe, n as se, p as ce, t as C, v as le, w as ue, x as de } from "./utils-fxHiCnzf.js";
11
- import { t as fe } from "./PkChatbotFilePreview-DIP8KLkS.js";
12
- import { t as pe } from "./PkChatbotFeedbackForm-CMFXjoKR.js";
13
- import { t as me } from "./PkChatbotMessageFeedback-BYmrVaCE.js";
14
- import { n as he, t as ge } from "./PkChatbotSteps-7FT6Ju6_.js";
15
- import { t as _e } from "./PkChatbotOutlineRail-np4g6vsz.js";
16
- import { VvButton as ve, VvButtonGroup as ye, VvIcon as be } from "@volverjs/ui-vue/components";
17
- import { Fragment as w, Transition as T, computed as E, createBlock as D, createCommentVNode as O, createElementBlock as k, createElementVNode as A, createTextVNode as xe, createVNode as j, defineAsyncComponent as M, defineComponent as Se, mergeProps as Ce, nextTick as N, normalizeClass as P, normalizeStyle as we, onBeforeUnmount as Te, onMounted as Ee, openBlock as F, ref as I, renderList as De, renderSlot as Oe, resolveDynamicComponent as ke, toDisplayString as L, unref as R, useSlots as Ae, useTemplateRef as je, watch as z, withCtx as B, withModifiers as V } from "vue";
18
- import { useI18n as Me } from "vue-i18n";
10
+ import { C as y, S as ne, T as re, a as ie, f as b, h as x, m as ae, n as oe, o as se, p as ce, t as S, u as le, w as ue, x as de, y as fe } from "./utils-CwIMEuAv.js";
11
+ import { t as pe } from "./PkChatbotFilePreview-DIP8KLkS.js";
12
+ import { t as me } from "./PkChatbotFeedbackForm-CMFXjoKR.js";
13
+ import { t as he } from "./PkChatbotMessageFeedback-BYmrVaCE.js";
14
+ import { n as ge, t as _e } from "./PkChatbotSteps-DeZQhGRU.js";
15
+ import { t as ve } from "./PkChatbotOutlineRail-np4g6vsz.js";
16
+ import { VvButton as ye, VvButtonGroup as be, VvIcon as xe } from "@volverjs/ui-vue/components";
17
+ import { Fragment as C, Transition as w, computed as T, createBlock as E, createCommentVNode as D, createElementBlock as O, createElementVNode as k, createTextVNode as Se, createVNode as A, defineAsyncComponent as j, defineComponent as Ce, mergeProps as we, nextTick as M, normalizeClass as N, normalizeStyle as Te, onBeforeUnmount as Ee, onMounted as De, openBlock as P, ref as F, renderList as Oe, renderSlot as ke, resolveDynamicComponent as Ae, toDisplayString as I, unref as L, useSlots as je, useTemplateRef as Me, watch as R, withCtx as z, withModifiers as B } from "vue";
18
+ import { useI18n as Ne } from "vue-i18n";
19
19
  //#region ../../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/classic/iso.js
20
- function Ne(t) {
20
+ function Pe(t) {
21
21
  return e(r, t);
22
22
  }
23
23
  i({
24
24
  platform: n(),
25
25
  threadId: n()
26
26
  });
27
- var Pe = i({
27
+ var Fe = i({
28
28
  wakeId: t(),
29
- dueAt: Ne(),
29
+ dueAt: Pe(),
30
30
  reason: n()
31
31
  });
32
- i({ pendingWakeup: Pe.nullable() }), i({ wakeId: t() });
33
- var H = (e) => e?.role === "user" && !!e.metadata?.wakeup, Fe = /* @__PURE__ */ new Set([
32
+ i({ pendingWakeup: Fe.nullable() }), i({ wakeId: t() });
33
+ var V = (e) => e?.role === "user" && !!e.metadata?.wakeup, Ie = /* @__PURE__ */ new Set([
34
34
  "input-streaming",
35
35
  "input-available",
36
36
  "approval-requested"
37
- ]), Ie = /* @__PURE__ */ new Set([
37
+ ]), Le = /* @__PURE__ */ new Set([
38
38
  ...o,
39
39
  ...l,
40
40
  "editSpreadsheet"
41
41
  ]);
42
42
  [...l, c.ShowContactForm];
43
- var U = (e) => e.state, Le = (e) => e.type.startsWith("tool-") ? e.type.slice(5) : void 0, Re = (e) => e?.role === "assistant" && e.parts.some((e) => {
43
+ var H = (e) => e.state, Re = (e) => e.type.startsWith("tool-") ? e.type.slice(5) : void 0, ze = (e) => e?.role === "assistant" && e.parts.some((e) => {
44
44
  if (e.type === "text") return e.text.trim().length > 0;
45
45
  if (e.type === "file") return !0;
46
- let t = U(e);
47
- if (t && Fe.has(t)) return !0;
48
- let n = Le(e);
49
- return n !== void 0 && Ie.has(n) && t === "output-available";
50
- }), ze = (e) => {
51
- if (e?.role !== "assistant" || Re(e)) return !1;
46
+ let t = H(e);
47
+ if (t && Ie.has(t)) return !0;
48
+ let n = Re(e);
49
+ return n !== void 0 && Le.has(n) && t === "output-available";
50
+ }), Be = (e) => {
51
+ if (e?.role !== "assistant" || ze(e)) return !1;
52
52
  let t = !1;
53
- for (let n of e.parts) n.type === "tool-scheduleWakeup" && (t = U(n) === "output-available" && n.input?.noop === !0);
53
+ for (let n of e.parts) n.type === "tool-scheduleWakeup" && (t = H(n) === "output-available" && n.input?.noop === !0);
54
54
  return t;
55
- }, Be = (e) => e.normalize("NFD").replace(/[\u0300-\u036f]/g, ""), Ve = (e) => e ? e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g, "$1 $2").replace(/[-_]+/g, " ") : "", He = (e) => e ? Be(e).replace(/([a-z0-9])([A-Z])/g, "$1-$2").replace(/[^a-zA-Z0-9]+/g, "-").toLowerCase() : "", W = (e) => e ? Be(e).replace(/([a-z0-9])([A-Z])/g, "$1_$2").replace(/[^a-zA-Z0-9]+/g, "_").toLowerCase() : "", Ue = (e) => e ? e.charAt(0).toUpperCase() + e.slice(1) : "", We = {
56
- requestOAuthConnection: M(() => import("./PkToolRequestOAuthConnection-GfSalEJG.js")),
57
- showArtifact: M(() => import("./PkToolShowArtifact-Ritx54_X.js").then((e) => e.n)),
58
- showCalendarEvent: M(() => import("./PkToolShowCalendarEvent-Dv_rss26.js").then((e) => e.n)),
59
- showComparison: M(() => import("./PkToolShowComparison-DQs3E6-k.js").then((e) => e.n)),
60
- showContactForm: M(() => import("./PkToolShowContactForm-D30IsZGy.js").then((e) => e.n)),
61
- showDiagram: M(() => import("./PkToolShowDiagram-PEozSAqU.js")),
62
- showEmail: M(() => import("./PkToolShowEmail-C591LR5N.js").then((e) => e.n)),
63
- showImageGallery: M(() => import("./PkToolShowImageGallery-Dkjf7Tw_.js").then((e) => e.n)),
64
- showLocation: M(() => import("./PkToolShowLocation-Dyz6h_0n.js").then((e) => e.n)),
65
- showMessage: M(() => import("./PkToolShowMessage-CbXERPHI.js").then((e) => e.n)),
66
- showForm: M(() => import("./PkToolShowForm-ZmdM9J9x.js").then((e) => e.n)),
67
- showMultipleChoice: M(() => import("./PkToolShowForm-ZmdM9J9x.js").then((e) => e.n)),
68
- showProductList: M(() => import("./PkToolShowProductList-CsHYM8vl.js").then((e) => e.n)),
69
- showQrCode: M(() => import("./PkToolShowQrCode-DEAvfLFu.js").then((e) => e.n)),
70
- showSources: M(() => import("./PkToolShowSources-CKZkcPLA.js").then((e) => e.n)),
71
- showSuggestedReply: M(() => import("./PkToolShowSuggestedReply-DjutyiEi.js").then((e) => e.n)),
72
- showVideo: M(() => import("./PkToolShowVideo-CKm1fVQs.js")),
73
- showWeather: M(() => import("./PkToolShowWeather-BH-FtLpk.js")),
74
- showWebPages: M(() => import("./PkToolShowWebPages-DLEC9cuh.js").then((e) => e.n))
55
+ }, Ve = (e) => e.normalize("NFD").replace(/[\u0300-\u036f]/g, ""), He = (e) => e ? e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g, "$1 $2").replace(/[-_]+/g, " ") : "", Ue = (e) => e ? Ve(e).replace(/([a-z0-9])([A-Z])/g, "$1-$2").replace(/[^a-zA-Z0-9]+/g, "-").toLowerCase() : "", U = (e) => e ? Ve(e).replace(/([a-z0-9])([A-Z])/g, "$1_$2").replace(/[^a-zA-Z0-9]+/g, "_").toLowerCase() : "", W = (e) => e ? e.charAt(0).toUpperCase() + e.slice(1) : "", We = {
56
+ requestOAuthConnection: j(() => import("./PkToolRequestOAuthConnection-GfSalEJG.js")),
57
+ showArtifact: j(() => import("./PkToolShowArtifact-z1qTnFkA.js").then((e) => e.n)),
58
+ showCalendarEvent: j(() => import("./PkToolShowCalendarEvent-Dv_rss26.js").then((e) => e.n)),
59
+ showComparison: j(() => import("./PkToolShowComparison-DQs3E6-k.js").then((e) => e.n)),
60
+ showContactForm: j(() => import("./PkToolShowContactForm-BjNpnv6y.js").then((e) => e.n)),
61
+ showDiagram: j(() => import("./PkToolShowDiagram-CqkabP0e.js")),
62
+ showEmail: j(() => import("./PkToolShowEmail-C591LR5N.js").then((e) => e.n)),
63
+ showImageGallery: j(() => import("./PkToolShowImageGallery-CkfXP_lD.js").then((e) => e.n)),
64
+ showLocation: j(() => import("./PkToolShowLocation-Dyz6h_0n.js").then((e) => e.n)),
65
+ showMessage: j(() => import("./PkToolShowMessage-CbXERPHI.js").then((e) => e.n)),
66
+ showForm: j(() => import("./PkToolShowForm-CZFWZub7.js").then((e) => e.n)),
67
+ showMultipleChoice: j(() => import("./PkToolShowForm-CZFWZub7.js").then((e) => e.n)),
68
+ showProductList: j(() => import("./PkToolShowProductList-De-PtmD-.js").then((e) => e.n)),
69
+ showQrCode: j(() => import("./PkToolShowQrCode-DEAvfLFu.js").then((e) => e.n)),
70
+ showSources: j(() => import("./PkToolShowSources-CSN7S0zo.js").then((e) => e.n)),
71
+ showSuggestedReply: j(() => import("./PkToolShowSuggestedReply-DjutyiEi.js").then((e) => e.n)),
72
+ showVideo: j(() => import("./PkToolShowVideo-B_Q93E2y.js")),
73
+ showWeather: j(() => import("./PkToolShowWeather-BH-FtLpk.js")),
74
+ showWebPages: j(() => import("./PkToolShowWebPages-D3CdjJUc.js").then((e) => e.n))
75
75
  }, Ge = {
76
76
  key: 0,
77
77
  class: "text-12 text-word-3 m-0 mb-xs"
78
- }, G = /* @__PURE__ */ Se({
78
+ }, G = /* @__PURE__ */ Ce({
79
79
  __name: "PkToolApprovalPreviewMessage",
80
80
  props: { input: {} },
81
81
  setup(e) {
82
- let t = e, n = E(() => {
82
+ let t = e, n = T(() => {
83
83
  let e = t.input;
84
84
  return typeof e?.message == "string" ? e.message : "";
85
85
  });
86
- return (e, t) => n.value ? (F(), k("p", Ge, L(n.value), 1)) : O("", !0);
86
+ return (e, t) => n.value ? (P(), O("p", Ge, I(n.value), 1)) : D("", !0);
87
87
  }
88
- }), K = { [C]: G }, Ke = {
88
+ }), K = { [S]: G }, Ke = {
89
89
  key: 0,
90
90
  class: "text-12 text-word-3 m-0 mb-xs"
91
- }, qe = /* @__PURE__ */ Se({
91
+ }, qe = /* @__PURE__ */ Ce({
92
92
  __name: "PkToolApprovalCard",
93
93
  props: {
94
94
  part: {},
@@ -97,7 +97,7 @@ var U = (e) => e.state, Le = (e) => e.type.startsWith("tool-") ? e.type.slice(5)
97
97
  },
98
98
  emits: ["respond"],
99
99
  setup(e, { emit: t }) {
100
- let n = e, r = t, { t: i } = Me({ useScope: "global" }), a = E(() => n.part), o = E(() => f(n.part)), c = E(() => o.value === C), l = E(() => c.value ? (a.value.state === "input-available" || s(a.value.output)) && n.callVerdict === void 0 : a.value.state === "approval-requested"), u = E(() => l.value && n.actionable === !0), d = E(() => l.value && n.actionable !== !0), p = E(() => c.value ? a.value.output === "confirmed" || n.callVerdict === !0 : a.value.approval?.approved === !0), m = E(() => c.value ? a.value.output === "cancelled" || n.callVerdict === !1 : a.value.approval?.approved === !1 || a.value.state === "output-denied"), h = E(() => K[o.value]), g = E(() => {
100
+ let n = e, r = t, { t: i } = Ne({ useScope: "global" }), a = T(() => n.part), o = T(() => f(n.part)), c = T(() => o.value === S), l = T(() => c.value ? (a.value.state === "input-available" || s(a.value.output)) && n.callVerdict === void 0 : a.value.state === "approval-requested"), u = T(() => l.value && n.actionable === !0), d = T(() => l.value && n.actionable !== !0), p = T(() => c.value ? a.value.output === "confirmed" || n.callVerdict === !0 : a.value.approval?.approved === !0), m = T(() => c.value ? a.value.output === "cancelled" || n.callVerdict === !1 : a.value.approval?.approved === !1 || a.value.state === "output-denied"), h = T(() => K[o.value]), g = T(() => {
101
101
  if (d.value) return {
102
102
  icon: "ri:time-line",
103
103
  message: i("toolApproval.expired")
@@ -110,39 +110,39 @@ var U = (e) => e.state, Le = (e) => e.type.startsWith("tool-") ? e.type.slice(5)
110
110
  icon: "ri:close-line",
111
111
  message: i(c.value ? "toolApproval.cancelled" : "toolApproval.denied")
112
112
  };
113
- }), _ = E(() => !!g.value && !h.value);
113
+ }), _ = T(() => !!g.value && !h.value);
114
114
  return (t, n) => {
115
- let o = ve, s = ye, d = be;
116
- return F(), k("div", { class: P(["w-full overflow-hidden transition-all duration-300", { "bg-surface p-sm rounded-xl border border-surface-3": !_.value }]) }, [
117
- j(T, null, {
118
- default: B(() => [!c.value && l.value ? (F(), k("p", Ke, L(R(i)("toolApproval.prompt")), 1)) : O("", !0)]),
115
+ let o = ye, s = be, d = xe;
116
+ return P(), O("div", { class: N(["w-full overflow-hidden transition-all duration-300", { "bg-surface p-sm rounded-xl border border-surface-3": !_.value }]) }, [
117
+ A(w, null, {
118
+ default: z(() => [!c.value && l.value ? (P(), O("p", Ke, I(L(i)("toolApproval.prompt")), 1)) : D("", !0)]),
119
119
  _: 1
120
120
  }),
121
- h.value ? (F(), D(ke(h.value), {
121
+ h.value ? (P(), E(Ae(h.value), {
122
122
  key: 0,
123
123
  part: e.part,
124
124
  input: a.value.input
125
- }, null, 8, ["part", "input"])) : O("", !0),
126
- j(T, { mode: "out-in" }, {
127
- default: B(() => [g.value ? (F(), k("p", {
125
+ }, null, 8, ["part", "input"])) : D("", !0),
126
+ A(w, { mode: "out-in" }, {
127
+ default: z(() => [g.value ? (P(), O("p", {
128
128
  key: 1,
129
- class: P(["flex items-center gap-4 text-12 text-word-3 m-0", { "mt-xs": h.value }])
130
- }, [j(d, {
129
+ class: N(["flex items-center gap-4 text-12 text-word-3 m-0", { "mt-xs": h.value }])
130
+ }, [A(d, {
131
131
  name: g.value.icon,
132
132
  class: "shrink-0"
133
- }, null, 8, ["name"]), xe(" " + L(g.value.message), 1)], 2)) : (F(), D(s, { key: 0 }, {
134
- default: B(() => [j(o, {
133
+ }, null, 8, ["name"]), Se(" " + I(g.value.message), 1)], 2)) : (P(), E(s, { key: 0 }, {
134
+ default: z(() => [A(o, {
135
135
  modifiers: "primary-small",
136
136
  disabled: !u.value,
137
137
  icon: "ri:check-line",
138
- label: R(i)("action.proceed"),
139
- onClick: n[0] ||= V((e) => r("respond", !0), ["stop"])
140
- }, null, 8, ["disabled", "label"]), j(o, {
138
+ label: L(i)("action.proceed"),
139
+ onClick: n[0] ||= B((e) => r("respond", !0), ["stop"])
140
+ }, null, 8, ["disabled", "label"]), A(o, {
141
141
  modifiers: "action-quiet-small",
142
142
  disabled: !u.value,
143
143
  icon: "ri:close-line",
144
- label: R(i)("action.cancel"),
145
- onClick: n[1] ||= V((e) => r("respond", !1), ["stop"])
144
+ label: L(i)("action.cancel"),
145
+ onClick: n[1] ||= B((e) => r("respond", !1), ["stop"])
146
146
  }, null, 8, ["disabled", "label"])]),
147
147
  _: 1
148
148
  }))]),
@@ -153,7 +153,7 @@ var U = (e) => e.state, Le = (e) => e.type.startsWith("tool-") ? e.type.slice(5)
153
153
  }
154
154
  }), Je = 30, q = 500;
155
155
  function Ye(e) {
156
- let { scrollEl: t, status: n, messagesLength: r, lastMessageRole: i, contentEl: a, beforeNewMessageScroll: o, onScrollUp: s, onScrollDown: c } = e, l = I(!1), u = I(!0), d = !1, f = null, p = null, m = null, h = null, g = 0, _ = (e = "smooth") => {
156
+ let { scrollEl: t, status: n, messagesLength: r, lastMessageRole: i, contentEl: a, beforeNewMessageScroll: o, onScrollUp: s, onScrollDown: c } = e, l = F(!1), u = F(!0), d = !1, f = null, p = null, m = null, h = null, g = 0, _ = (e = "smooth") => {
157
157
  !t.value || l.value ? d = !1 : (d = !0, t.value.scrollTo({
158
158
  top: t.value.scrollHeight,
159
159
  behavior: e
@@ -177,44 +177,44 @@ function Ye(e) {
177
177
  n <= e.scrollTop || (u.value = !0, d = !0, e.scrollTop = n, requestAnimationFrame(() => {
178
178
  d = !1;
179
179
  }));
180
- }, b = () => {
180
+ }, ie = () => {
181
181
  !f && t.value && (f = new MutationObserver(re), f.observe(t.value, {
182
182
  childList: !0,
183
183
  subtree: !0,
184
184
  characterData: !0
185
185
  }));
186
- }, x = () => {
186
+ }, b = () => {
187
187
  f?.disconnect(), f = null;
188
188
  };
189
- z(n, (e, t) => {
190
- e === "streaming" || e === "submitted" ? b() : (e !== "ready" || t !== "streaming") && x();
191
- }), z(r, async () => {
189
+ R(n, (e, t) => {
190
+ e === "streaming" || e === "submitted" ? ie() : (e !== "ready" || t !== "streaming") && b();
191
+ }), R(r, async () => {
192
192
  if (r() && i() !== "assistant") {
193
- ae(), l.value = !1, d = !0;
193
+ oe(), l.value = !1, d = !0;
194
194
  try {
195
- await N(), await o?.(), await N();
195
+ await M(), await o?.(), await M();
196
196
  } finally {
197
197
  _();
198
198
  }
199
199
  }
200
200
  });
201
- let S = null, ie = () => {
202
- t.value && (t.value.scrollHeight <= t.value.clientHeight || (t.value.scrollTop = t.value.scrollHeight, S && clearTimeout(S), S = setTimeout(ae, 300)));
203
- }, ae = () => {
204
- p?.disconnect(), p = null, m?.disconnect(), m = null, S &&= (clearTimeout(S), null);
201
+ let x = null, ae = () => {
202
+ t.value && (t.value.scrollHeight <= t.value.clientHeight || (t.value.scrollTop = t.value.scrollHeight, x && clearTimeout(x), x = setTimeout(oe, 300)));
203
+ }, oe = () => {
204
+ p?.disconnect(), p = null, m?.disconnect(), m = null, x &&= (clearTimeout(x), null);
205
205
  };
206
- return Ee(() => {
206
+ return De(() => {
207
207
  if (!t.value) return;
208
208
  t.value.addEventListener("wheel", ee, { passive: !0 }), t.value.addEventListener("touchstart", te, { passive: !0 }), t.value.addEventListener("touchmove", y, { passive: !0 });
209
209
  let e = n() === "submitted" || n() === "streaming";
210
- e ? b() : (p = new ResizeObserver(ie), p.observe(t.value), m = new MutationObserver(ie), m.observe(t.value, {
210
+ e ? ie() : (p = new ResizeObserver(ae), p.observe(t.value), m = new MutationObserver(ae), m.observe(t.value, {
211
211
  childList: !0,
212
212
  subtree: !0
213
213
  }));
214
214
  let r = a?.() ?? t.value.firstElementChild;
215
- r && (h = new ResizeObserver(re), h.observe(r)), e || ie();
216
- }), Te(() => {
217
- t.value?.removeEventListener("wheel", ee), t.value?.removeEventListener("touchstart", te), t.value?.removeEventListener("touchmove", y), h?.disconnect(), h = null, x(), ae();
215
+ r && (h = new ResizeObserver(re), h.observe(r)), e || ae();
216
+ }), Ee(() => {
217
+ t.value?.removeEventListener("wheel", ee), t.value?.removeEventListener("touchstart", te), t.value?.removeEventListener("touchmove", y), h?.disconnect(), h = null, b(), oe();
218
218
  }), {
219
219
  handleScroll: ne,
220
220
  scrollToBottom: _,
@@ -225,12 +225,12 @@ function Ye(e) {
225
225
  //#endregion
226
226
  //#region ../../packages/components/src/chat/wakeupFeed.ts
227
227
  function Xe(e, t = () => !1) {
228
- let n = (e) => ze(e) && !t(e), r = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Map(), a = 0;
228
+ let n = (e) => Be(e) && !t(e), r = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Map(), a = 0;
229
229
  for (; a < e.length;) {
230
230
  let t = e[a];
231
- if (H(t) && n(e[a + 1])) {
231
+ if (V(t) && n(e[a + 1])) {
232
232
  let o = t.id, s = 0, c;
233
- for (; H(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;
233
+ for (; V(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;
234
234
  i.set(o, {
235
235
  count: s,
236
236
  lastAt: c
@@ -277,7 +277,7 @@ var Ze = ["aria-busy"], Qe = {
277
277
  }, yt = { class: "truncate" }, bt = ["datetime"], xt = { class: "truncate" }, St = {
278
278
  key: 4,
279
279
  class: "flex items-center gap-4 text-12 text-word-3"
280
- }, Ct = { class: "pk-chatbot-message__loading-info" }, wt = { class: "flex gap-8 items-center" }, Tt = { class: "text-12" }, Et = ["title", "aria-label"], J = /* @__PURE__ */ Se({
280
+ }, Ct = { class: "pk-chatbot-message__loading-info" }, wt = { class: "flex gap-8 items-center" }, Tt = { class: "text-12" }, Et = ["title", "aria-label"], J = /* @__PURE__ */ Ce({
281
281
  __name: "PkChatbotMessages",
282
282
  props: {
283
283
  status: {},
@@ -322,8 +322,8 @@ var Ze = ["aria-busy"], Qe = {
322
322
  "confirm-respond"
323
323
  ],
324
324
  setup(e, { emit: t }) {
325
- let n = e, r = t, { t: i, d: o, n: s } = Me({ useScope: "global" }), c = Ae(), l = (e, t) => {
326
- if (de(e)) {
325
+ let n = e, r = t, { t: i, d: o, n: s } = Ne({ useScope: "global" }), c = je(), l = (e, t) => {
326
+ if (ne(e)) {
327
327
  let n = e.toolCallId;
328
328
  n && r("confirm-respond", {
329
329
  toolCallId: n,
@@ -331,54 +331,54 @@ var Ze = ["aria-busy"], Qe = {
331
331
  });
332
332
  return;
333
333
  }
334
- let n = ce(e);
334
+ let n = ae(e);
335
335
  n && r("approval-respond", {
336
336
  id: n,
337
337
  approved: t
338
338
  });
339
- }, C = je("scrollEl"), M = je("wrapperEl"), Se = E(() => ue(n.textColor, n.mainColor)), { handleScroll: Te, scrollToBottom: Ne, userScrolledUp: Pe, isAtBottom: Fe } = Ye({
340
- scrollEl: C,
339
+ }, S = Me("scrollEl"), j = Me("wrapperEl"), Ce = T(() => re(n.textColor, n.mainColor)), { handleScroll: Ee, scrollToBottom: Pe, userScrolledUp: Fe, isAtBottom: Ie } = Ye({
340
+ scrollEl: S,
341
341
  status: () => n.status,
342
342
  messagesLength: () => n.messages?.length,
343
343
  lastMessageRole: () => n.messages?.[n.messages.length - 1]?.role,
344
- contentEl: () => M.value,
344
+ contentEl: () => j.value,
345
345
  beforeNewMessageScroll: () => Ge(),
346
346
  onScrollUp: () => r("scroll-up"),
347
347
  onScrollDown: () => r("scroll-down")
348
- }), Ie = () => {
349
- Pe.value = !1, Ne();
350
- }, U = E(() => (n.messages ?? []).filter((e) => e.role === "user" && !H(e)).map((e) => ({
348
+ }), Le = () => {
349
+ Fe.value = !1, Pe();
350
+ }, H = T(() => (n.messages ?? []).filter((e) => e.role === "user" && !V(e)).map((e) => ({
351
351
  id: e.id,
352
352
  preview: e.parts.find(d)?.text.trim().slice(0, 120) || "…"
353
- }))), Le = I(), Re = () => C.value?.querySelectorAll(".pk-chatbot-message--user") ?? [], ze = () => {
354
- let e = C.value;
353
+ }))), Re = F(), ze = () => S.value?.querySelectorAll(".pk-chatbot-message--user") ?? [], Be = () => {
354
+ let e = S.value;
355
355
  if (!e || !n.showScrollToBottom) return;
356
- let t = e.getBoundingClientRect().top + e.clientHeight / 2, r = U.value[0]?.id;
357
- Re().forEach((e, n) => {
358
- e.getBoundingClientRect().top <= t && (r = U.value[n]?.id);
359
- }), Le.value = r;
356
+ let t = e.getBoundingClientRect().top + e.clientHeight / 2, r = H.value[0]?.id;
357
+ ze().forEach((e, n) => {
358
+ e.getBoundingClientRect().top <= t && (r = H.value[n]?.id);
359
+ }), Re.value = r;
360
360
  };
361
- z(U, async () => {
362
- await N(), ze();
361
+ R(H, async () => {
362
+ await M(), Be();
363
363
  });
364
- let Be = () => {
365
- Te(), ze();
366
- }, Ve = (e) => {
367
- let t = C.value, n = U.value.findIndex((t) => t.id === e), r = Re()[n];
368
- t && r && (Pe.value = !0, t.scrollTo({
364
+ let Ve = () => {
365
+ Ee(), Be();
366
+ }, He = (e) => {
367
+ let t = S.value, n = H.value.findIndex((t) => t.id === e), r = ze()[n];
368
+ t && r && (Fe.value = !0, t.scrollTo({
369
369
  top: t.scrollTop + r.getBoundingClientRect().top - t.getBoundingClientRect().top - Number.parseFloat(getComputedStyle(t).paddingTop),
370
370
  behavior: "smooth"
371
371
  }));
372
- }, W = I(0), Ue = I(!1), Ge = async () => {
372
+ }, U = F(0), W = F(!1), Ge = async () => {
373
373
  let e = n.messages;
374
- if (!e?.length || n.disableHeightAdjustment || e[e.length - 1].role !== "user" && n.status !== "submitted" && n.status !== "streaming" || (Ue.value = !1, await N(), !C.value)) return;
375
- let { paddingTop: t, paddingBottom: r } = getComputedStyle(C.value), i = C.value.clientHeight - Number.parseFloat(t) - Number.parseFloat(r), a = M.value && Number.parseFloat(getComputedStyle(M.value).rowGap) || 0, o = Re(), s = i - (o[o.length - 1]?.clientHeight ?? 0) - a;
376
- i > 0 && (W.value = Math.max(s, 0)), await N();
374
+ if (!e?.length || n.disableHeightAdjustment || e[e.length - 1].role !== "user" && n.status !== "submitted" && n.status !== "streaming" || (W.value = !1, await M(), !S.value)) return;
375
+ let { paddingTop: t, paddingBottom: r } = getComputedStyle(S.value), i = S.value.clientHeight - Number.parseFloat(t) - Number.parseFloat(r), a = j.value && Number.parseFloat(getComputedStyle(j.value).rowGap) || 0, o = ze(), s = i - (o[o.length - 1]?.clientHeight ?? 0) - a;
376
+ i > 0 && (U.value = Math.max(s, 0)), await M();
377
377
  };
378
- z(() => [n.messages?.length, n.messages?.[n.messages.length - 1]?.id], () => Ge()), Ee(() => {
378
+ R(() => [n.messages?.length, n.messages?.[n.messages.length - 1]?.id], () => Ge()), De(() => {
379
379
  (n.status === "submitted" || n.status === "streaming" || n.awaitingSpokenAnswer) && Ge();
380
- }), z(() => n.status, (e) => {
381
- (e === "ready" || e === "error") && (Ue.value = !0, W.value = 0);
380
+ }), R(() => n.status, (e) => {
381
+ (e === "ready" || e === "error") && (W.value = !0, U.value = 0);
382
382
  });
383
383
  let G = (e) => n.revisedAnswers?.some((t) => t.messageId === e), K = (e) => n.messageFeedbacks?.find((t) => t.messageId === e), Ke = (e, t) => !n.readonlyFeedback && Vt(e, t), Je = (e) => n.readonlyFeedback ? K(e) : void 0, q = (e) => Je(e)?.vote, J = (e) => {
384
384
  let t = Je(e);
@@ -396,28 +396,28 @@ var Ze = ["aria-busy"], Qe = {
396
396
  let t = Nt(e);
397
397
  for (let e = t.length - 1; e >= 0; --e) if (d(t[e])) return e;
398
398
  return -1;
399
- }, jt = E(() => n.messages?.[n.messages.length - 1]), Y = E(() => {
399
+ }, jt = T(() => n.messages?.[n.messages.length - 1]), Y = T(() => {
400
400
  let e = jt.value;
401
401
  return e ? e.parts[e.parts.length - 1] : null;
402
- }), Mt = E(() => {
402
+ }), Mt = T(() => {
403
403
  let e = /* @__PURE__ */ new Map();
404
- for (let t of n.messages ?? []) t.role === "assistant" && e.set(t.id, y(ie(ne(t.parts))));
404
+ for (let t of n.messages ?? []) t.role === "assistant" && e.set(t.id, ue(ie(y(t.parts))));
405
405
  return e;
406
- }), Nt = (e) => Mt.value.get(e.id) ?? e.parts, X = E(() => n.status === "submitted" || n.status === "streaming"), Pt = E(() => n.status === "error"), Ft = E(() => n.awaitingSpokenAnswer === !0 && !X.value), It = E(() => Ft.value && jt.value?.role === "user" && !Pt.value), Lt = E(() => {
406
+ }), Nt = (e) => Mt.value.get(e.id) ?? e.parts, X = T(() => n.status === "submitted" || n.status === "streaming"), Pt = T(() => n.status === "error"), Ft = T(() => n.awaitingSpokenAnswer === !0 && !X.value), It = T(() => Ft.value && jt.value?.role === "user" && !Pt.value), Lt = T(() => {
407
407
  let e = Y.value;
408
- return oe(i, e);
409
- }), Rt = E(() => {
408
+ return x(i, e);
409
+ }), Rt = T(() => {
410
410
  let e = Y.value;
411
- return x(e);
411
+ return b(e);
412
412
  }), zt = (e) => n.messages?.findIndex((t) => t.id === e), Z = (e) => e === void 0 || !n.messages ? !1 : e === n.messages.length - 1, Bt = (e) => Z(e) && n.status === "ready" && !!n.actions?.includes("regenerate"), Vt = (e, t) => (!Z(t) || n.status === "ready") && !!n.actions?.includes(e), Ht = (e) => {
413
413
  let t = e.parts[e.parts.length - 1];
414
414
  return d(t);
415
- }, Ut = (e) => e.parts.some((e) => g(e) || p(e)), Wt = (e) => !!n.showExtendedSteps && Q(e) && Ut(e), Gt = (e) => p(e) && !b(e) && !!(We[f(e)] || c[e.type] || n.showAllMessageParts), Kt = (e) => e.parts.some((e) => d(e) && !!e.text.trim() || h(e) || le(e) && !b(e) || Gt(e)), Q = (e) => e.role === "assistant", qt = (e) => e.role === "user", Jt = (e) => n.messages?.slice(0, e).reverse().find((e) => Q(e)), Yt = (e) => n.messages?.slice(e + 1).find((e) => Q(e)), Xt = (e) => {
415
+ }, Ut = (e) => e.parts.some((e) => g(e) || p(e)), Wt = (e) => !!n.showExtendedSteps && Q(e) && Ut(e), Gt = (e) => p(e) && !de(e) && !!(We[f(e)] || c[e.type] || n.showAllMessageParts), Kt = (e) => e.parts.some((e) => d(e) && !!e.text.trim() || h(e) || fe(e) && !de(e) || Gt(e)), Q = (e) => e.role === "assistant", qt = (e) => e.role === "user", Jt = (e) => n.messages?.slice(0, e).reverse().find((e) => Q(e)), Yt = (e) => n.messages?.slice(e + 1).find((e) => Q(e)), Xt = (e) => {
416
416
  let t = Jt(e)?.metadata?.createdAt, n = Yt(e)?.metadata?.createdAt;
417
417
  if (!t || !n) return;
418
418
  let r = new Date(t), i = new Date(n);
419
419
  return r.toDateString() === i.toDateString() ? void 0 : i;
420
- }, $ = E(() => n.showAllMessageParts ? Xe([]) : Xe(n.messages ?? [], Kt)), Zt = E(() => {
420
+ }, $ = T(() => n.showAllMessageParts ? Xe([]) : Xe(n.messages ?? [], Kt)), Zt = T(() => {
421
421
  let e = 0;
422
422
  return (n.messages ?? []).map((t) => t.parts.length > 0 ? ++e : void 0);
423
423
  }), Qt = (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), $t = (e) => {
@@ -425,67 +425,67 @@ var Ze = ["aria-busy"], Qe = {
425
425
  return o(t, n ? "time" : "date-time");
426
426
  }, en = (e) => {
427
427
  let { createdAt: t, completedAt: n } = e.metadata ?? {};
428
- if (t && n) return ae(s, n - t);
429
- }, tn = je("feedbackMessageEl");
430
- return z(() => n.feedbackMessageId, async () => {
431
- if (await N(), !n.feedbackMessageId) return;
428
+ if (t && n) return le(s, n - t);
429
+ }, tn = Me("feedbackMessageEl");
430
+ return R(() => n.feedbackMessageId, async () => {
431
+ if (await M(), !n.feedbackMessageId) return;
432
432
  let e = tn.value?.[0]?.$el;
433
- e && (Z(zt(n.feedbackMessageId)) ? Ne() : e.scrollIntoView({
433
+ e && (Z(zt(n.feedbackMessageId)) ? Pe() : e.scrollIntoView({
434
434
  behavior: "smooth",
435
435
  block: "center"
436
436
  }));
437
437
  }), (t, n) => {
438
- let r = be, p = ve, g = ye;
439
- return F(), k("div", {
438
+ let r = xe, p = ye, g = be;
439
+ return P(), O("div", {
440
440
  ref_key: "scrollEl",
441
- ref: C,
442
- class: P(["pk-chatbot-messages scrollbar-thin", { "pk-chatbot-messages--settling": Ue.value }]),
441
+ ref: S,
442
+ class: N(["pk-chatbot-messages scrollbar-thin", { "pk-chatbot-messages--settling": W.value }]),
443
443
  role: "log",
444
444
  "aria-live": "polite",
445
445
  "aria-relevant": "additions text",
446
446
  "aria-busy": X.value,
447
- style: we({
447
+ style: Te({
448
448
  "--chatbot-main-color": e.mainColor,
449
- "--chatbot-contrast-color": Se.value
449
+ "--chatbot-contrast-color": Ce.value
450
450
  }),
451
- onScroll: Be
451
+ onScroll: Ve
452
452
  }, [
453
- e.showScrollToBottom && U.value.length > 1 ? (F(), k("div", Qe, [j(_e, {
454
- items: U.value,
455
- "active-id": Le.value,
456
- onSelect: Ve
457
- }, null, 8, ["items", "active-id"])])) : O("", !0),
458
- A("div", {
453
+ e.showScrollToBottom && H.value.length > 1 ? (P(), O("div", Qe, [A(ve, {
454
+ items: H.value,
455
+ "active-id": Re.value,
456
+ onSelect: He
457
+ }, null, 8, ["items", "active-id"])])) : D("", !0),
458
+ k("div", {
459
459
  ref_key: "wrapperEl",
460
- ref: M,
460
+ ref: j,
461
461
  class: "pk-chatbot-messages__wrapper"
462
462
  }, [
463
- (F(!0), k(w, null, De(e.messages, (v, y) => (F(), k(w, { key: v.id }, [
464
- qt(v) && Xt(y) ? (F(), k("div", $e, [A("span", et, L(R(o)(Xt(y), "short")), 1)])) : O("", !0),
465
- $.value.quietRuns.has(v.id) ? (F(), k("div", tt, [j(r, {
463
+ (P(!0), O(C, null, Oe(e.messages, (v, y) => (P(), O(C, { key: v.id }, [
464
+ qt(v) && Xt(y) ? (P(), O("div", $e, [k("span", et, I(L(o)(Xt(y), "short")), 1)])) : D("", !0),
465
+ $.value.quietRuns.has(v.id) ? (P(), O("div", tt, [A(r, {
466
466
  name: "ri:alarm-line",
467
467
  class: "shrink-0"
468
- }), A("span", null, L(R(i)("label.wakeupQuietRun", {
468
+ }), k("span", null, I(L(i)("label.wakeupQuietRun", {
469
469
  count: $.value.quietRuns.get(v.id).count,
470
- time: R(o)($.value.quietRuns.get(v.id).lastAt ?? Date.now(), "time")
471
- }, $.value.quietRuns.get(v.id).count)), 1)])) : R(H)(v) && !$.value.hidden.has(v.id) && !e.showAllMessageParts ? (F(), k("div", {
470
+ time: L(o)($.value.quietRuns.get(v.id).lastAt ?? Date.now(), "time")
471
+ }, $.value.quietRuns.get(v.id).count)), 1)])) : L(V)(v) && !$.value.hidden.has(v.id) && !e.showAllMessageParts ? (P(), O("div", {
472
472
  key: 2,
473
473
  class: "pk-chatbot-wakeup",
474
474
  title: v.metadata?.wakeup?.reason
475
- }, [j(r, {
475
+ }, [A(r, {
476
476
  name: "ri:alarm-line",
477
477
  class: "shrink-0"
478
- }), A("span", null, [xe(L(R(i)("label.wakeupCheck")) + " ", 1), v.metadata?.createdAt ? (F(), k(w, { key: 0 }, [xe(" · " + L(R(o)(v.metadata.createdAt, "time")), 1)], 64)) : O("", !0)])], 8, nt)) : O("", !0),
479
- (!R(H)(v) || e.showAllMessageParts) && (!$.value.hidden.has(v.id) || X.value && Z(y)) && (v.parts.length || Z(y) && X.value && Q(v)) ? (F(), k("div", {
478
+ }), k("span", null, [Se(I(L(i)("label.wakeupCheck")) + " ", 1), v.metadata?.createdAt ? (P(), O(C, { key: 0 }, [Se(" · " + I(L(o)(v.metadata.createdAt, "time")), 1)], 64)) : D("", !0)])], 8, nt)) : D("", !0),
479
+ (!L(V)(v) || e.showAllMessageParts) && (!$.value.hidden.has(v.id) || X.value && Z(y)) && (v.parts.length || Z(y) && X.value && Q(v)) ? (P(), O("div", {
480
480
  key: 3,
481
- class: P(["pk-chatbot-message", [`pk-chatbot-message--${v.role}`, { "pk-chatbot-message--loading": X.value && Z(y) && Q(v) }]]),
482
- style: we({ minHeight: Z(y) && Q(v) && !Pt.value ? `${W.value}px` : void 0 })
481
+ class: N(["pk-chatbot-message", [`pk-chatbot-message--${v.role}`, { "pk-chatbot-message--loading": X.value && Z(y) && Q(v) }]]),
482
+ style: Te({ minHeight: Z(y) && Q(v) && !Pt.value ? `${U.value}px` : void 0 })
483
483
  }, [
484
- j(T, {
484
+ A(w, {
485
485
  appear: "",
486
486
  name: "pk-chatbot-part"
487
487
  }, {
488
- default: B(() => [Wt(v) ? (F(), D(ge, {
488
+ default: z(() => [Wt(v) ? (P(), E(_e, {
489
489
  key: 0,
490
490
  message: v,
491
491
  "is-streaming": X.value && Z(y),
@@ -496,20 +496,20 @@ var Ze = ["aria-busy"], Qe = {
496
496
  "is-streaming",
497
497
  "has-content",
498
498
  "is-dark"
499
- ])) : O("", !0)]),
499
+ ])) : D("", !0)]),
500
500
  _: 2
501
501
  }, 1024),
502
- (F(!0), k(w, null, De(Nt(v), (n, i) => (F(), k(w, { key: R(re)(n, i) }, [R(d)(n) && n.text.trim() ? (F(), D(T, {
502
+ (P(!0), O(C, null, Oe(Nt(v), (n, i) => (P(), O(C, { key: L(se)(n, i) }, [L(d)(n) && n.text.trim() ? (P(), E(w, {
503
503
  key: 0,
504
504
  appear: "",
505
505
  name: "pk-chatbot-part"
506
506
  }, {
507
- default: B(() => [A("div", rt, [Oe(t.$slots, "text", Ce({ ref_for: !0 }, {
507
+ default: z(() => [k("div", rt, [ke(t.$slots, "text", we({ ref_for: !0 }, {
508
508
  message: v,
509
509
  part: n,
510
510
  index: y,
511
511
  isLoading: X.value
512
- }), () => [Q(v) ? (F(), D(u, {
512
+ }), () => [Q(v) ? (P(), E(u, {
513
513
  key: 0,
514
514
  class: "wysiwyg",
515
515
  markdown: n.text,
@@ -519,44 +519,44 @@ var Ze = ["aria-busy"], Qe = {
519
519
  "markdown",
520
520
  "is-dark",
521
521
  "loading"
522
- ])) : (F(), k(w, { key: 1 }, [xe(L(n.text), 1)], 64))]), Dt(v.id) && !K(v.id)?.comment && i === At(v) ? (F(), k("span", {
522
+ ])) : (P(), O(C, { key: 1 }, [Se(I(n.text), 1)], 64))]), Dt(v.id) && !K(v.id)?.comment && i === At(v) ? (P(), O("span", {
523
523
  key: 0,
524
- class: P(["pk-chatbot-message__reaction", Ot(v.id)]),
524
+ class: N(["pk-chatbot-message__reaction", Ot(v.id)]),
525
525
  title: kt(v.id)
526
- }, [J(v.id) ? (F(), k("span", at, L(J(v.id)), 1)) : (F(), D(r, {
526
+ }, [J(v.id) ? (P(), O("span", at, I(J(v.id)), 1)) : (P(), E(r, {
527
527
  key: 1,
528
528
  name: q(v.id) === "downvote" ? "ri:thumb-down-fill" : "ri:thumb-up-fill"
529
- }, null, 8, ["name"]))], 10, it)) : O("", !0)])]),
529
+ }, null, 8, ["name"]))], 10, it)) : D("", !0)])]),
530
530
  _: 2
531
- }, 1024)) : R(h)(n) ? (F(), D(T, {
531
+ }, 1024)) : L(h)(n) ? (P(), E(w, {
532
532
  key: 1,
533
533
  appear: "",
534
534
  name: "pk-chatbot-part"
535
535
  }, {
536
- default: B(() => [R(a)(n.filename, n.mediaType) ? (F(), k("div", ot, [j(fe, {
536
+ default: z(() => [L(a)(n.filename, n.mediaType) ? (P(), O("div", ot, [A(pe, {
537
537
  "media-type": n.mediaType,
538
538
  url: n.url,
539
539
  filename: n.filename,
540
- size: R(_)(n)?.bytesCount
540
+ size: L(_)(n)?.bytesCount
541
541
  }, null, 8, [
542
542
  "media-type",
543
543
  "url",
544
544
  "filename",
545
545
  "size"
546
- ]), j(ee, {
546
+ ]), A(ee, {
547
547
  url: n.url,
548
- transcript: R(m)(n),
548
+ transcript: L(m)(n),
549
549
  pending: e.status === "submitted" && Z(y)
550
550
  }, null, 8, [
551
551
  "url",
552
552
  "transcript",
553
553
  "pending"
554
- ])])) : (F(), D(fe, {
554
+ ])])) : (P(), E(pe, {
555
555
  key: 1,
556
556
  "media-type": n.mediaType,
557
557
  url: n.url,
558
558
  filename: n.filename,
559
- size: R(_)(n)?.bytesCount
559
+ size: L(_)(n)?.bytesCount
560
560
  }, null, 8, [
561
561
  "media-type",
562
562
  "url",
@@ -564,15 +564,15 @@ var Ze = ["aria-busy"], Qe = {
564
564
  "size"
565
565
  ]))]),
566
566
  _: 2
567
- }, 1024)) : R(le)(n) && !R(b)(n) ? (F(), D(T, {
567
+ }, 1024)) : L(fe)(n) && !L(de)(n) ? (P(), E(w, {
568
568
  key: 2,
569
569
  appear: "",
570
570
  name: "pk-chatbot-part"
571
571
  }, {
572
- default: B(() => [(F(), D(qe, {
572
+ default: z(() => [(P(), E(qe, {
573
573
  key: `approval-${i}`,
574
574
  part: n,
575
- actionable: e.interactive === !0 && (R(de)(n) || Z(y)),
575
+ actionable: e.interactive === !0 && (L(ne)(n) || Z(y)),
576
576
  "call-verdict": e.confirmVerdictsOnCall?.get(n.toolCallId ?? ""),
577
577
  onRespond: (e) => l(n, e)
578
578
  }, null, 8, [
@@ -582,222 +582,222 @@ var Ze = ["aria-busy"], Qe = {
582
582
  "onRespond"
583
583
  ]))]),
584
584
  _: 2
585
- }, 1024)) : Gt(n) ? (F(), D(T, {
585
+ }, 1024)) : Gt(n) ? (P(), E(w, {
586
586
  key: 3,
587
587
  appear: "",
588
588
  name: "pk-chatbot-part"
589
589
  }, {
590
- default: B(() => [!R(c)[n.type] && R(We)[R(f)(n)] ? (F(), D(ke(R(We)[R(f)(n)]), {
591
- key: `component-${i}-${R(S)(n)}`,
590
+ default: z(() => [!L(c)[n.type] && L(We)[L(f)(n)] ? (P(), E(Ae(L(We)[L(f)(n)]), {
591
+ key: `component-${i}-${L(ce)(n)}`,
592
592
  part: n
593
- }, null, 8, ["part"])) : Oe(t.$slots, n.type, Ce({ ref_for: !0 }, {
593
+ }, null, 8, ["part"])) : ke(t.$slots, n.type, we({ ref_for: !0 }, {
594
594
  message: v,
595
595
  part: n,
596
596
  index: y,
597
597
  isLoading: X.value
598
- }), () => [e.showAllMessageParts ? (F(), k("div", st, [A("div", ct, [R(x)(n) ? (F(), D(r, {
598
+ }), () => [e.showAllMessageParts ? (P(), O("div", st, [k("div", ct, [L(b)(n) ? (P(), E(r, {
599
599
  key: 0,
600
- name: R(x)(n),
600
+ name: L(b)(n),
601
601
  class: "shrink-0"
602
- }, null, 8, ["name"])) : O("", !0), A("code", lt, L(R(He)(n.type)), 1)])])) : O("", !0)], void 0, 1)]),
602
+ }, null, 8, ["name"])) : D("", !0), k("code", lt, I(L(Ue)(n.type)), 1)])])) : D("", !0)], void 0, 1)]),
603
603
  _: 2
604
- }, 1024)) : O("", !0), j(T, { mode: "out-in" }, {
605
- default: B(() => [i === At(v) && e.readonlyFeedback && K(v.id)?.comment ? (F(), D(me, {
604
+ }, 1024)) : D("", !0), A(w, { mode: "out-in" }, {
605
+ default: z(() => [i === At(v) && e.readonlyFeedback && K(v.id)?.comment ? (P(), E(he, {
606
606
  key: 0,
607
607
  feedback: K(v.id)
608
- }, null, 8, ["feedback"])) : O("", !0)]),
608
+ }, null, 8, ["feedback"])) : D("", !0)]),
609
609
  _: 2
610
610
  }, 1024)], 64))), 128)),
611
- j(T, {
611
+ A(w, {
612
612
  name: "fade-in",
613
613
  mode: "out-in"
614
614
  }, {
615
- default: B(() => [X.value && Z(y) && !Ht(v) && Q(v) && (!Wt(v) || Kt(v)) ? (F(), k("div", {
615
+ default: z(() => [X.value && Z(y) && !Ht(v) && Q(v) && (!Wt(v) || Kt(v)) ? (P(), O("div", {
616
616
  key: `loading-info-${v.id}`,
617
617
  class: "pk-chatbot-message__loading-info"
618
- }, [A("div", ut, [
619
- j(r, {
618
+ }, [k("div", ut, [
619
+ A(r, {
620
620
  name: "loading-loop",
621
621
  class: "shrink-0"
622
622
  }),
623
- j(T, { mode: "out-in" }, {
624
- default: B(() => [Rt.value ? (F(), D(r, {
623
+ A(w, { mode: "out-in" }, {
624
+ default: z(() => [Rt.value ? (P(), E(r, {
625
625
  key: Rt.value,
626
626
  class: "shrink-0",
627
627
  name: Rt.value
628
- }, null, 8, ["name"])) : O("", !0)]),
628
+ }, null, 8, ["name"])) : D("", !0)]),
629
629
  _: 1
630
630
  }),
631
- j(T, { mode: "out-in" }, {
632
- default: B(() => [Lt.value ? (F(), k("span", {
631
+ A(w, { mode: "out-in" }, {
632
+ default: z(() => [Lt.value ? (P(), O("span", {
633
633
  key: Lt.value,
634
634
  class: "text-12"
635
- }, L(Lt.value), 1)) : O("", !0)]),
635
+ }, I(Lt.value), 1)) : D("", !0)]),
636
636
  _: 1
637
637
  })
638
- ]), j(T, {
638
+ ]), A(w, {
639
639
  name: "fade-in",
640
640
  mode: "out-in"
641
641
  }, {
642
- default: B(() => [!Wt(v) && Y.value && "text" in Y.value && Y.value.text.trim() ? (F(), D(he, {
642
+ default: z(() => [!Wt(v) && Y.value && "text" in Y.value && Y.value.text.trim() ? (P(), E(ge, {
643
643
  key: 0,
644
644
  markdown: Y.value.text,
645
645
  "is-dark": e.isDark,
646
- "tail-length": R(se),
646
+ "tail-length": L(oe),
647
647
  "inner-class": "wysiwyg",
648
648
  class: "border border-surface-3 rounded-md p-4 mt-8 bg-surface-1 max-h-64 text-12 w-full"
649
649
  }, null, 8, [
650
650
  "markdown",
651
651
  "is-dark",
652
652
  "tail-length"
653
- ])) : O("", !0)]),
653
+ ])) : D("", !0)]),
654
654
  _: 2
655
- }, 1024)])) : O("", !0)]),
655
+ }, 1024)])) : D("", !0)]),
656
656
  _: 2
657
657
  }, 1024),
658
- j(T, { mode: "out-in" }, {
659
- default: B(() => [Qt(v, y) ? (F(), k("div", dt, [
660
- j(g, {
658
+ A(w, { mode: "out-in" }, {
659
+ default: z(() => [Qt(v, y) ? (P(), O("div", dt, [
660
+ A(g, {
661
661
  modifiers: "compact",
662
662
  class: "mr-auto shrink-0"
663
663
  }, {
664
- default: B(() => [
665
- j(T, { mode: "out-in" }, {
666
- default: B(() => [Bt(y) ? (F(), D(p, {
664
+ default: z(() => [
665
+ A(w, { mode: "out-in" }, {
666
+ default: z(() => [Bt(y) ? (P(), E(p, {
667
667
  key: 0,
668
668
  icon: "ri:reset-right-line",
669
669
  modifiers: "action-quiet-small",
670
- title: R(i)("action.regenerate"),
671
- "aria-label": R(i)("action.regenerate"),
672
- onClick: n[0] ||= V((e) => t.$emit("regenerate"), ["stop"])
673
- }, null, 8, ["title", "aria-label"])) : O("", !0)]),
670
+ title: L(i)("action.regenerate"),
671
+ "aria-label": L(i)("action.regenerate"),
672
+ onClick: n[0] ||= B((e) => t.$emit("regenerate"), ["stop"])
673
+ }, null, 8, ["title", "aria-label"])) : D("", !0)]),
674
674
  _: 2
675
675
  }, 1024),
676
- j(T, { mode: "out-in" }, {
677
- default: B(() => [Vt("show-info", y) ? (F(), D(p, {
676
+ A(w, { mode: "out-in" }, {
677
+ default: z(() => [Vt("show-info", y) ? (P(), E(p, {
678
678
  key: 0,
679
679
  icon: "ri:information-line",
680
- title: R(i)("action.getMoreInfo"),
681
- "aria-label": R(i)("action.getMoreInfo"),
680
+ title: L(i)("action.getMoreInfo"),
681
+ "aria-label": L(i)("action.getMoreInfo"),
682
682
  modifiers: "action-quiet-small",
683
- onClick: V((e) => t.$emit("show-info", v), ["stop"])
683
+ onClick: B((e) => t.$emit("show-info", v), ["stop"])
684
684
  }, null, 8, [
685
685
  "title",
686
686
  "aria-label",
687
687
  "onClick"
688
- ])) : O("", !0)]),
688
+ ])) : D("", !0)]),
689
689
  _: 2
690
690
  }, 1024),
691
- j(T, { mode: "out-in" }, {
692
- default: B(() => [Vt("revise", y) ? (F(), D(p, {
691
+ A(w, { mode: "out-in" }, {
692
+ default: z(() => [Vt("revise", y) ? (P(), E(p, {
693
693
  key: 0,
694
694
  icon: G(v.id) ? "ri:file-edit-fill" : "ri:file-edit-line",
695
- title: G(v.id) ? R(i)("action.editRevise") : R(i)("action.createRevise"),
696
- "aria-label": G(v.id) ? R(i)("action.editRevise") : R(i)("action.createRevise"),
695
+ title: G(v.id) ? L(i)("action.editRevise") : L(i)("action.createRevise"),
696
+ "aria-label": G(v.id) ? L(i)("action.editRevise") : L(i)("action.createRevise"),
697
697
  modifiers: "action-quiet-small",
698
- class: P({ "text-brand-graphic": G(v.id) }),
699
- onClick: V((e) => t.$emit("revise", v), ["stop"])
698
+ class: N({ "text-brand-graphic": G(v.id) }),
699
+ onClick: B((e) => t.$emit("revise", v), ["stop"])
700
700
  }, null, 8, [
701
701
  "icon",
702
702
  "title",
703
703
  "aria-label",
704
704
  "class",
705
705
  "onClick"
706
- ])) : O("", !0)]),
706
+ ])) : D("", !0)]),
707
707
  _: 2
708
708
  }, 1024),
709
- j(T, { mode: "out-in" }, {
710
- default: B(() => [Ke("upvote", y) ? (F(), D(p, {
709
+ A(w, { mode: "out-in" }, {
710
+ default: z(() => [Ke("upvote", y) ? (P(), E(p, {
711
711
  key: 0,
712
712
  icon: K(v.id)?.vote === "upvote" ? "ri:thumb-up-fill" : "ri:thumb-up-line",
713
- title: R(i)("action.upvote"),
714
- "aria-label": R(i)("action.upvote"),
713
+ title: L(i)("action.upvote"),
714
+ "aria-label": L(i)("action.upvote"),
715
715
  modifiers: "action-quiet-small",
716
- onClick: V((e) => t.$emit("upvote", v), ["stop"])
716
+ onClick: B((e) => t.$emit("upvote", v), ["stop"])
717
717
  }, null, 8, [
718
718
  "icon",
719
719
  "title",
720
720
  "aria-label",
721
721
  "onClick"
722
- ])) : O("", !0)]),
722
+ ])) : D("", !0)]),
723
723
  _: 2
724
724
  }, 1024),
725
- j(T, { mode: "out-in" }, {
726
- default: B(() => [Ke("downvote", y) ? (F(), D(p, {
725
+ A(w, { mode: "out-in" }, {
726
+ default: z(() => [Ke("downvote", y) ? (P(), E(p, {
727
727
  key: 0,
728
728
  icon: K(v.id)?.vote === "downvote" ? "ri:thumb-down-fill" : "ri:thumb-down-line",
729
- title: R(i)("action.downvote"),
730
- "aria-label": R(i)("action.downvote"),
729
+ title: L(i)("action.downvote"),
730
+ "aria-label": L(i)("action.downvote"),
731
731
  modifiers: "action-quiet-small",
732
- onClick: V((e) => t.$emit("downvote", v), ["stop"])
732
+ onClick: B((e) => t.$emit("downvote", v), ["stop"])
733
733
  }, null, 8, [
734
734
  "icon",
735
735
  "title",
736
736
  "aria-label",
737
737
  "onClick"
738
- ])) : O("", !0)]),
738
+ ])) : D("", !0)]),
739
739
  _: 2
740
740
  }, 1024),
741
- j(T, { mode: "out-in" }, {
742
- default: B(() => [Ke("feedback", y) ? (F(), D(p, {
741
+ A(w, { mode: "out-in" }, {
742
+ default: z(() => [Ke("feedback", y) ? (P(), E(p, {
743
743
  key: 0,
744
744
  icon: K(v.id)?.comment ? "ri:feedback-fill" : "ri:feedback-line",
745
- title: R(i)("action.feedback"),
746
- "aria-label": R(i)("action.feedback"),
745
+ title: L(i)("action.feedback"),
746
+ "aria-label": L(i)("action.feedback"),
747
747
  modifiers: "action-quiet-small",
748
- onClick: V((e) => t.$emit("feedback", v), ["stop"])
748
+ onClick: B((e) => t.$emit("feedback", v), ["stop"])
749
749
  }, null, 8, [
750
750
  "icon",
751
751
  "title",
752
752
  "aria-label",
753
753
  "onClick"
754
- ])) : O("", !0)]),
754
+ ])) : D("", !0)]),
755
755
  _: 2
756
756
  }, 1024)
757
757
  ]),
758
758
  _: 2
759
759
  }, 1024),
760
- !e.showMessageDateTime && v.metadata?.createdAt && v.metadata?.completedAt ? (F(), k("div", ft, [A("time", {
760
+ !e.showMessageDateTime && v.metadata?.createdAt && v.metadata?.completedAt ? (P(), O("div", ft, [k("time", {
761
761
  datetime: new Date(v.metadata.createdAt).toISOString(),
762
- title: R(o)(new Date(v.metadata.createdAt), "date-time"),
762
+ title: L(o)(new Date(v.metadata.createdAt), "date-time"),
763
763
  class: "flex items-center gap-4 min-w-0"
764
- }, [j(r, {
764
+ }, [A(r, {
765
765
  name: "ri:time-line",
766
766
  class: "shrink-0"
767
- }), A("span", mt, L($t(v.metadata.createdAt)), 1)], 8, pt), en(v) ? (F(), k("span", ht, [j(r, {
767
+ }), k("span", mt, I($t(v.metadata.createdAt)), 1)], 8, pt), en(v) ? (P(), O("span", ht, [A(r, {
768
768
  name: "ri:hourglass-line",
769
769
  class: "shrink-0"
770
- }), A("span", gt, L(en(v)), 1)])) : O("", !0)])) : O("", !0),
771
- e.showMessageNumber ? (F(), k("span", {
770
+ }), k("span", gt, I(en(v)), 1)])) : D("", !0)])) : D("", !0),
771
+ e.showMessageNumber ? (P(), O("span", {
772
772
  key: 1,
773
- title: R(i)("label.messageNumber", { n: Zt.value[y] }),
773
+ title: L(i)("label.messageNumber", { n: Zt.value[y] }),
774
774
  class: "text-12 text-word-3 tabular-nums"
775
- }, " #" + L(Zt.value[y]), 9, _t)) : O("", !0),
776
- e.showMessageTokensCount && v.metadata?.totalTokens ? (F(), k("span", vt, [j(r, {
775
+ }, " #" + I(Zt.value[y]), 9, _t)) : D("", !0),
776
+ e.showMessageTokensCount && v.metadata?.totalTokens ? (P(), O("span", vt, [A(r, {
777
777
  name: "ri:ai-generate-2-line",
778
778
  class: "shrink-0"
779
- }), A("span", yt, L(R(s)(v.metadata.totalTokens, "integer")) + " " + L(R(i)("label.tokens")), 1)])) : O("", !0),
780
- e.showMessageDateTime && v.metadata?.createdAt ? (F(), k("time", {
779
+ }), k("span", yt, I(L(s)(v.metadata.totalTokens, "integer")) + " " + I(L(i)("label.tokens")), 1)])) : D("", !0),
780
+ e.showMessageDateTime && v.metadata?.createdAt ? (P(), O("time", {
781
781
  key: 3,
782
782
  datetime: new Date(v.metadata?.createdAt).toISOString(),
783
783
  class: "flex items-center gap-4 text-12 text-word-3"
784
- }, [j(r, {
784
+ }, [A(r, {
785
785
  name: "ri:time-line",
786
786
  class: "shrink-0"
787
- }), A("span", xt, L(R(o)(new Date(v.metadata?.createdAt), "date-time")), 1)], 8, bt)) : O("", !0),
788
- e.showMessageDateTime && v?.metadata?.completedAt && v?.metadata?.createdAt ? (F(), k("div", St, [j(r, {
787
+ }), k("span", xt, I(L(o)(new Date(v.metadata?.createdAt), "date-time")), 1)], 8, bt)) : D("", !0),
788
+ e.showMessageDateTime && v?.metadata?.completedAt && v?.metadata?.createdAt ? (P(), O("div", St, [A(r, {
789
789
  name: "ri:hourglass-line",
790
790
  class: "shrink-0"
791
- }), j(te, {
791
+ }), A(te, {
792
792
  class: "truncate",
793
793
  date: v.metadata?.createdAt,
794
794
  "end-date": v.metadata?.completedAt
795
- }, null, 8, ["date", "end-date"])])) : O("", !0)
796
- ])) : O("", !0)]),
795
+ }, null, 8, ["date", "end-date"])])) : D("", !0)
796
+ ])) : D("", !0)]),
797
797
  _: 2
798
798
  }, 1024),
799
- j(T, { mode: "out-in" }, {
800
- default: B(() => [v.id === e.feedbackMessageId ? (F(), D(pe, {
799
+ A(w, { mode: "out-in" }, {
800
+ default: z(() => [v.id === e.feedbackMessageId ? (P(), E(me, {
801
801
  key: 0,
802
802
  ref_for: !0,
803
803
  ref_key: "feedbackMessageEl",
@@ -811,52 +811,52 @@ var Ze = ["aria-busy"], Qe = {
811
811
  "loading",
812
812
  "submitted",
813
813
  "error"
814
- ])) : O("", !0)]),
814
+ ])) : D("", !0)]),
815
815
  _: 2
816
816
  }, 1024)
817
- ], 6)) : O("", !0)
817
+ ], 6)) : D("", !0)
818
818
  ], 64))), 128)),
819
- j(T, {
819
+ A(w, {
820
820
  appear: "",
821
821
  name: "pk-chatbot-part"
822
822
  }, {
823
- default: B(() => [Ft.value ? (F(), k("div", {
823
+ default: z(() => [Ft.value ? (P(), O("div", {
824
824
  key: 0,
825
825
  class: "pk-chatbot-message pk-chatbot-message--assistant pk-chatbot-message--loading",
826
- style: we({ minHeight: It.value ? `${W.value}px` : void 0 })
827
- }, [A("div", Ct, [A("div", wt, [j(r, {
826
+ style: Te({ minHeight: It.value ? `${U.value}px` : void 0 })
827
+ }, [k("div", Ct, [k("div", wt, [A(r, {
828
828
  name: "loading-loop",
829
829
  class: "shrink-0"
830
- }), A("span", Tt, L(R(i)("label.answeringOnTheCall")), 1)])])], 4)) : O("", !0)]),
830
+ }), k("span", Tt, I(L(i)("label.answeringOnTheCall")), 1)])])], 4)) : D("", !0)]),
831
831
  _: 1
832
832
  }),
833
- j(T, {
833
+ A(w, {
834
834
  appear: "",
835
835
  name: "pk-chatbot-part"
836
836
  }, {
837
- default: B(() => [Pt.value ? (F(), D(v, {
837
+ default: z(() => [Pt.value ? (P(), E(v, {
838
838
  key: 0,
839
839
  error: e.error,
840
840
  onRetry: n[3] ||= (e) => t.$emit("auto-retry"),
841
841
  onReset: n[4] ||= (e) => t.$emit("reset-chat")
842
- }, null, 8, ["error"])) : O("", !0)]),
842
+ }, null, 8, ["error"])) : D("", !0)]),
843
843
  _: 1
844
844
  }),
845
- jt.value?.role === "user" && !It.value || Pt.value ? (F(), k("div", {
845
+ jt.value?.role === "user" && !It.value || Pt.value ? (P(), O("div", {
846
846
  key: 0,
847
847
  class: "pk-chatbot-messages__spacer",
848
- style: we({ minHeight: `${W.value}px` })
849
- }, null, 4)) : O("", !0)
848
+ style: Te({ minHeight: `${U.value}px` })
849
+ }, null, 4)) : D("", !0)
850
850
  ], 512),
851
- j(T, { name: "pk-chatbot-messages-fab" }, {
852
- default: B(() => [e.showScrollToBottom && (R(Pe) || !R(Fe)) ? (F(), k("button", {
851
+ A(w, { name: "pk-chatbot-messages-fab" }, {
852
+ default: z(() => [e.showScrollToBottom && (L(Fe) || !L(Ie)) ? (P(), O("button", {
853
853
  key: 0,
854
854
  type: "button",
855
855
  class: "pk-chatbot-messages__scroll-to-bottom",
856
- title: R(i)("action.scrollToBottom"),
857
- "aria-label": R(i)("action.scrollToBottom"),
858
- onClick: Ie
859
- }, [j(r, { name: "ri:arrow-down-line" })], 8, Et)) : O("", !0)]),
856
+ title: L(i)("action.scrollToBottom"),
857
+ "aria-label": L(i)("action.scrollToBottom"),
858
+ onClick: Le
859
+ }, [A(r, { name: "ri:arrow-down-line" })], 8, Et)) : D("", !0)]),
860
860
  _: 1
861
861
  })
862
862
  ], 46, Ze);
@@ -864,6 +864,6 @@ var Ze = ["aria-busy"], Qe = {
864
864
  }
865
865
  });
866
866
  //#endregion
867
- export { W as a, He as i, Ue as n, Ve as r, J as t };
867
+ export { U as a, Ue as i, W as n, He as r, J as t };
868
868
 
869
- //# sourceMappingURL=PkChatbotMessages-coscJcpy.js.map
869
+ //# sourceMappingURL=PkChatbotMessages-B6qYZsMZ.js.map