@8wave/ai-elements 0.123.0 → 0.124.0-beta.1

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