@8wave/ai-elements 0.125.0-beta.42 → 0.125.0-beta.43
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.
- package/dist/_chunks/Chart-1vt0m6l_.js +87 -0
- package/dist/_chunks/Chart-1vt0m6l_.js.map +1 -0
- package/dist/_chunks/{PkChart-CbtMRGWc.js → PkChart-CYFx_UDq.js} +741 -623
- package/dist/_chunks/PkChart-CYFx_UDq.js.map +1 -0
- package/dist/_chunks/PkFilePreview-yjdtArag.js +1745 -0
- package/dist/_chunks/PkFilePreview-yjdtArag.js.map +1 -0
- package/dist/_chunks/{PkFilePreviewDialog-bcTkTcYk.js → PkFilePreviewDialog-Df0Lt40J.js} +2 -2
- package/dist/_chunks/{PkFilePreviewDialog-bcTkTcYk.js.map → PkFilePreviewDialog-Df0Lt40J.js.map} +1 -1
- package/dist/_chunks/{PkImageEditorDialog-FpbyhV3t.js → PkImageEditorDialog-PVf3IHGB.js} +2 -2
- package/dist/_chunks/{PkImageEditorDialog-FpbyhV3t.js.map → PkImageEditorDialog-PVf3IHGB.js.map} +1 -1
- package/dist/_chunks/{PkSelectionActions-BbfVZY0R.js → PkSelectionActions-CMyg_x8h.js} +2 -2
- package/dist/_chunks/{PkSelectionActions-BbfVZY0R.js.map → PkSelectionActions-CMyg_x8h.js.map} +1 -1
- package/dist/_chunks/{PkStreamingMarkdown-COSOOhCg.js → PkStreamingMarkdown-BDXbU2tz.js} +2 -2
- package/dist/_chunks/{PkStreamingMarkdown-COSOOhCg.js.map → PkStreamingMarkdown-BDXbU2tz.js.map} +1 -1
- package/dist/_chunks/{PkToolChatFile-C_gS0X1j.js → PkToolChatFile-CMQdMs-9.js} +3 -3
- package/dist/_chunks/{PkToolChatFile-C_gS0X1j.js.map → PkToolChatFile-CMQdMs-9.js.map} +1 -1
- package/dist/_chunks/{PkToolShowArtifact-fpFtKrZo.js → PkToolShowArtifact-YrC54qxc.js} +2 -2
- package/dist/_chunks/{PkToolShowArtifact-fpFtKrZo.js.map → PkToolShowArtifact-YrC54qxc.js.map} +1 -1
- package/dist/_chunks/PkToolShowChart-D3E_xBJv.js +138 -0
- package/dist/_chunks/PkToolShowChart-D3E_xBJv.js.map +1 -0
- package/dist/_chunks/{PkToolShowContactForm-BAM772bm.js → PkToolShowContactForm-Dio2FNkA.js} +2 -2
- package/dist/_chunks/{PkToolShowContactForm-BAM772bm.js.map → PkToolShowContactForm-Dio2FNkA.js.map} +1 -1
- package/dist/_chunks/{PkToolShowForm-DJcL0bgw.js → PkToolShowForm-w9HGhvCy.js} +3 -3
- package/dist/_chunks/{PkToolShowForm-DJcL0bgw.js.map → PkToolShowForm-w9HGhvCy.js.map} +1 -1
- package/dist/_chunks/{PkToolShowSources-GeWAMHYC.js → PkToolShowSources-DXFvFHOo.js} +2 -2
- package/dist/_chunks/{PkToolShowSources-GeWAMHYC.js.map → PkToolShowSources-DXFvFHOo.js.map} +1 -1
- package/dist/_chunks/chartFormat-B1T7y-16.js +27 -0
- package/dist/_chunks/chartFormat-B1T7y-16.js.map +1 -0
- package/dist/_chunks/{excelNumberFormat-BhQjife9.js → excelNumberFormat-CcXF_wJK.js} +101 -88
- package/dist/_chunks/excelNumberFormat-CcXF_wJK.js.map +1 -0
- package/dist/_chunks/{utils-DMvy5QRR.js → utils-BBoaLDYF.js} +14 -14
- package/dist/_chunks/utils-BBoaLDYF.js.map +1 -0
- package/dist/ai-elements.es.js +178 -172
- package/dist/ai-elements.es.js.map +1 -1
- package/dist-vue/PkChatbot.js +1 -1
- package/dist-vue/PkChatbotEmptyState.js +1 -1
- package/dist-vue/PkChatbotInput.js +1 -1
- package/dist-vue/PkChatbotMessages.js +1 -1
- package/dist-vue/PkChatbotStepPayload.js +1 -1
- package/dist-vue/PkChatbotStepToolDetail.js +1 -1
- package/dist-vue/PkChatbotSteps.js +1 -1
- package/dist-vue/PkChatbotViewChat.js +1 -1
- package/dist-vue/PkChatbotViewConversations.js +1 -1
- package/dist-vue/_chunks/Chart-DsBNs5rS.js +87 -0
- package/dist-vue/_chunks/Chart-DsBNs5rS.js.map +1 -0
- package/dist-vue/_chunks/{PkChart-D-K7nc0g.js → PkChart-CrZqhEpp.js} +112 -74
- package/dist-vue/_chunks/PkChart-CrZqhEpp.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbot-DVQ-Bb7n.js → PkChatbot-CxkTubw8.js} +6 -6
- package/dist-vue/_chunks/{PkChatbot-DVQ-Bb7n.js.map → PkChatbot-CxkTubw8.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotEmptyState-OlgewA4_.js → PkChatbotEmptyState-CUoHkCgO.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotEmptyState-OlgewA4_.js.map → PkChatbotEmptyState-CUoHkCgO.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotInput-D_I0Gf_u.js → PkChatbotInput-CPf7wqiQ.js} +4 -4
- package/dist-vue/_chunks/{PkChatbotInput-D_I0Gf_u.js.map → PkChatbotInput-CPf7wqiQ.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotMessages-CAXnEfXK.js → PkChatbotMessages-CLNu2dTm.js} +307 -307
- package/dist-vue/_chunks/{PkChatbotMessages-CAXnEfXK.js.map → PkChatbotMessages-CLNu2dTm.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotStepPayload-EBri1L10.js → PkChatbotStepPayload-Cf7mJPjL.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotStepPayload-EBri1L10.js.map → PkChatbotStepPayload-Cf7mJPjL.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotStepToolDetail-DiQEa0UV.js → PkChatbotStepToolDetail-D6nwNnHv.js} +16 -16
- package/dist-vue/_chunks/{PkChatbotStepToolDetail-DiQEa0UV.js.map → PkChatbotStepToolDetail-D6nwNnHv.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotSteps-BgLnv2J1.js → PkChatbotSteps-xkxdaX7O.js} +38 -38
- package/dist-vue/_chunks/{PkChatbotSteps-BgLnv2J1.js.map → PkChatbotSteps-xkxdaX7O.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewChat-CmjD1IXf.js → PkChatbotViewChat-BkkyjiFl.js} +22 -22
- package/dist-vue/_chunks/{PkChatbotViewChat-CmjD1IXf.js.map → PkChatbotViewChat-BkkyjiFl.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewConversations-CVZH5dXx.js → PkChatbotViewConversations-hgqSO1hx.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewConversations-CVZH5dXx.js.map → PkChatbotViewConversations-hgqSO1hx.js.map} +1 -1
- package/dist-vue/_chunks/{PkFilePreview-k5gEl3n8.js → PkFilePreview-CmsT6lSP.js} +701 -624
- package/dist-vue/_chunks/PkFilePreview-CmsT6lSP.js.map +1 -0
- package/dist-vue/_chunks/{PkFilePreviewDialog-DUwZPErE.js → PkFilePreviewDialog-DIiTt9iK.js} +2 -2
- package/dist-vue/_chunks/{PkFilePreviewDialog-DUwZPErE.js.map → PkFilePreviewDialog-DIiTt9iK.js.map} +1 -1
- package/dist-vue/_chunks/{PkImageEditorDialog-DQPXePae.js → PkImageEditorDialog-CE0Y5Pwr.js} +2 -2
- package/dist-vue/_chunks/{PkImageEditorDialog-DQPXePae.js.map → PkImageEditorDialog-CE0Y5Pwr.js.map} +1 -1
- package/dist-vue/_chunks/{PkStreamingMarkdown-ZasabxE0.js → PkStreamingMarkdown-BBvCtDlO.js} +2 -2
- package/dist-vue/_chunks/{PkStreamingMarkdown-ZasabxE0.js.map → PkStreamingMarkdown-BBvCtDlO.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolChatFile-CD26Q2xp.js → PkToolChatFile-DVhunkPS.js} +3 -3
- package/dist-vue/_chunks/{PkToolChatFile-CD26Q2xp.js.map → PkToolChatFile-DVhunkPS.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowArtifact-BhVd_ZQ8.js → PkToolShowArtifact-DKOTsP9C.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowArtifact-BhVd_ZQ8.js.map → PkToolShowArtifact-DKOTsP9C.js.map} +1 -1
- package/dist-vue/_chunks/PkToolShowChart-CNBUjDc7.js +133 -0
- package/dist-vue/_chunks/PkToolShowChart-CNBUjDc7.js.map +1 -0
- package/dist-vue/_chunks/{PkToolShowContactForm-CackCDGD.js → PkToolShowContactForm-D1Ff15Zf.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowContactForm-CackCDGD.js.map → PkToolShowContactForm-D1Ff15Zf.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowDiagram-CABPsFi8.js → PkToolShowDiagram-CBwqjy6a.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowDiagram-CABPsFi8.js.map → PkToolShowDiagram-CBwqjy6a.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowForm-BStbk4Iu.js → PkToolShowForm-D-rzzwJa.js} +3 -3
- package/dist-vue/_chunks/{PkToolShowForm-BStbk4Iu.js.map → PkToolShowForm-D-rzzwJa.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowImageGallery-BeeHsdTp.js → PkToolShowImageGallery-Cre2zSGV.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowImageGallery-BeeHsdTp.js.map → PkToolShowImageGallery-Cre2zSGV.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowProductList-BfUiap9U.js → PkToolShowProductList-D4FAfMS-.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowProductList-BfUiap9U.js.map → PkToolShowProductList-D4FAfMS-.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowSources-CgEkcyRg.js → PkToolShowSources-BC6YJl-O.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowSources-CgEkcyRg.js.map → PkToolShowSources-BC6YJl-O.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowVideo-CqSRnDNC.js → PkToolShowVideo-CxN7z_cZ.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowVideo-CqSRnDNC.js.map → PkToolShowVideo-CxN7z_cZ.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowWebPages-B-qIS8qY.js → PkToolShowWebPages-0Ux6n8G1.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowWebPages-B-qIS8qY.js.map → PkToolShowWebPages-0Ux6n8G1.js.map} +1 -1
- package/dist-vue/_chunks/chartFormat-B1T7y-16.js +27 -0
- package/dist-vue/_chunks/chartFormat-B1T7y-16.js.map +1 -0
- package/dist-vue/_chunks/{excelNumberFormat-C1sCQrOz.js → excelNumberFormat-BxRi0Y3e.js} +101 -88
- package/dist-vue/_chunks/excelNumberFormat-BxRi0Y3e.js.map +1 -0
- package/dist-vue/_chunks/{utils-KBB6SDPn.js → utils-C9l078yb.js} +10 -10
- package/dist-vue/_chunks/utils-C9l078yb.js.map +1 -0
- package/dist-vue/composables.js +9 -3
- package/dist-vue/composables.js.map +1 -1
- package/dist-vue/index.js +42 -42
- package/dist-vue/index.js.map +1 -1
- package/dist-vue/locales.js +6 -0
- package/dist-vue/packages/components/src/chat/PkChart.d.ts +8 -0
- package/dist-vue/packages/components/src/chat/PkFileChart.d.ts +14 -0
- package/dist-vue/packages/components/src/chat/PkWordPreviewRuns.d.ts +4 -1
- package/dist-vue/packages/components/src/chat/useChatFilePreview.d.ts +240 -0
- package/dist-vue/packages/components/src/chat/utils.d.ts +6 -1
- package/dist-vue/packages/models/src/schema/Chart.d.ts +91 -0
- package/dist-vue/packages/models/src/schema/SpreadsheetPreview.d.ts +381 -0
- package/dist-vue/packages/models/src/schema/WordPreview.d.ts +304 -0
- package/dist-vue/style.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/PkChart-CbtMRGWc.js.map +0 -1
- package/dist/_chunks/PkFilePreview-DC4iX7Yc.js +0 -1665
- package/dist/_chunks/PkFilePreview-DC4iX7Yc.js.map +0 -1
- package/dist/_chunks/PkToolShowChart-DZWu3Yuo.js +0 -224
- package/dist/_chunks/PkToolShowChart-DZWu3Yuo.js.map +0 -1
- package/dist/_chunks/excelNumberFormat-BhQjife9.js.map +0 -1
- package/dist/_chunks/utils-DMvy5QRR.js.map +0 -1
- package/dist-vue/_chunks/PkChart-D-K7nc0g.js.map +0 -1
- package/dist-vue/_chunks/PkFilePreview-k5gEl3n8.js.map +0 -1
- package/dist-vue/_chunks/PkToolShowChart-BQXxaPIO.js +0 -217
- package/dist-vue/_chunks/PkToolShowChart-BQXxaPIO.js.map +0 -1
- package/dist-vue/_chunks/excelNumberFormat-C1sCQrOz.js.map +0 -1
- package/dist-vue/_chunks/utils-KBB6SDPn.js.map +0 -1
|
@@ -3,37 +3,37 @@ import { c as a } from "./Media-DylqhvaF.js";
|
|
|
3
3
|
import { A as o, H as s, _ as c, k as l, r as u } from "./Agent-B9iJ1WvR.js";
|
|
4
4
|
import { t as d } from "./VvButtonLocalized-C-vx25u4.js";
|
|
5
5
|
import { n as f } from "./useLightbox-DmtNa8bJ.js";
|
|
6
|
-
import { t as p } from "./PkStreamingMarkdown-
|
|
6
|
+
import { t as p } from "./PkStreamingMarkdown-BBvCtDlO.js";
|
|
7
7
|
import "./src-nb8MU1sh.js";
|
|
8
8
|
import { c as m, i as h, l as g, n as _, o as v, s as y, t as b, u as x } from "./message-DuibQyHy.js";
|
|
9
9
|
import { t as ee } from "./PkChatbotAudioTranscript-DgmuXalb.js";
|
|
10
|
-
import {
|
|
11
|
-
import { t as
|
|
12
|
-
import { t as
|
|
13
|
-
import { t as
|
|
14
|
-
import { t as
|
|
15
|
-
import { t as
|
|
16
|
-
import { n as
|
|
17
|
-
import { t as
|
|
18
|
-
import { VvAccordion as
|
|
19
|
-
import { Fragment as
|
|
20
|
-
import { useI18n as
|
|
21
|
-
import { useResizeObserver as
|
|
10
|
+
import { A as te, C as S, I as ne, L as C, N as w, O as T, P as re, S as ie, U as ae, _ as oe, b as se, d as ce, f as le, g as ue, i as de, n as fe, r as pe, t as me, x as he, y as ge, z as _e } from "./utils-C9l078yb.js";
|
|
11
|
+
import { t as ve } from "./PkChatbotError-BS84xuiu.js";
|
|
12
|
+
import { t as ye } from "./PkRelativeTime-CZF5CYHv.js";
|
|
13
|
+
import { t as be } from "./PkChatbotFeedbackForm-D3YNMO7m.js";
|
|
14
|
+
import { t as xe } from "./PkChatbotMessageFeedback-DltXugdR.js";
|
|
15
|
+
import { t as Se } from "./PkChatbotFilePreview-BDU2vY0F.js";
|
|
16
|
+
import { n as Ce, r as we, t as Te } from "./PkChatbotSteps-xkxdaX7O.js";
|
|
17
|
+
import { t as Ee } from "./PkChatbotOutlineRail-BI-DMvZi.js";
|
|
18
|
+
import { VvAccordion as De, VvButtonGroup as Oe, VvIcon as ke } from "@volverjs/ui-vue/components";
|
|
19
|
+
import { Fragment as E, Transition as D, computed as O, createBlock as k, createCommentVNode as A, createElementBlock as j, createElementVNode as M, createTextVNode as Ae, createVNode as N, defineAsyncComponent as P, defineComponent as F, inject as je, mergeProps as Me, nextTick as I, normalizeClass as L, normalizeStyle as Ne, onBeforeUnmount as R, onMounted as Pe, openBlock as z, ref as B, renderList as Fe, renderSlot as Ie, resolveDynamicComponent as Le, shallowRef as Re, toDisplayString as V, unref as H, useSlots as ze, useTemplateRef as Be, watch as U, withCtx as W, withModifiers as G } from "vue";
|
|
20
|
+
import { useI18n as Ve } from "vue-i18n";
|
|
21
|
+
import { useResizeObserver as He } from "@vueuse/core";
|
|
22
22
|
// ../../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/classic/iso.js
|
|
23
|
-
function
|
|
23
|
+
function Ue(t) {
|
|
24
24
|
return e(r, t);
|
|
25
25
|
}
|
|
26
26
|
i({
|
|
27
27
|
platform: n(),
|
|
28
28
|
threadId: n()
|
|
29
29
|
});
|
|
30
|
-
var
|
|
30
|
+
var We = i({
|
|
31
31
|
wakeId: t(),
|
|
32
|
-
dueAt:
|
|
32
|
+
dueAt: Ue(),
|
|
33
33
|
reason: n()
|
|
34
34
|
});
|
|
35
|
-
i({ pendingWakeup:
|
|
36
|
-
var
|
|
35
|
+
i({ pendingWakeup: We.nullable() }), i({ wakeId: t() });
|
|
36
|
+
var Ge = (e) => e?.role === "user" && !!e.metadata?.wakeup, Ke = /* @__PURE__ */ new Set([
|
|
37
37
|
"input-streaming",
|
|
38
38
|
"input-available",
|
|
39
39
|
"approval-requested"
|
|
@@ -56,44 +56,44 @@ var Je = (e) => e.state, Ye = (e) => e.type.startsWith("tool-") ? e.type.slice(5
|
|
|
56
56
|
for (let n of e.parts) n.type === "tool-scheduleWakeup" && (t = Je(n) === "output-available" && n.input?.noop === !0);
|
|
57
57
|
return t;
|
|
58
58
|
}, Ze = {
|
|
59
|
-
requestOAuthConnection:
|
|
60
|
-
shareDocument:
|
|
61
|
-
showArtifact:
|
|
62
|
-
showCalendarEvent:
|
|
63
|
-
showChart:
|
|
64
|
-
showComparison:
|
|
65
|
-
showContactForm:
|
|
66
|
-
showDiagram:
|
|
67
|
-
showEmail:
|
|
68
|
-
showImageGallery:
|
|
69
|
-
showLocation:
|
|
70
|
-
showMessage:
|
|
71
|
-
showForm:
|
|
72
|
-
showMultipleChoice:
|
|
73
|
-
showProductList:
|
|
74
|
-
showQrCode:
|
|
75
|
-
showSources:
|
|
76
|
-
showSuggestedReply:
|
|
77
|
-
showVideo:
|
|
78
|
-
showWeather:
|
|
79
|
-
showWebPages:
|
|
59
|
+
requestOAuthConnection: P(() => import("./PkToolRequestOAuthConnection-8GJlt5G1.js")),
|
|
60
|
+
shareDocument: P(() => import("./PkToolShareDocument-Bf7OE8XA.js").then((e) => e.n)),
|
|
61
|
+
showArtifact: P(() => import("./PkToolShowArtifact-DKOTsP9C.js").then((e) => e.n)),
|
|
62
|
+
showCalendarEvent: P(() => import("./PkToolShowCalendarEvent-CAejFLQI.js").then((e) => e.n)),
|
|
63
|
+
showChart: P(() => import("./PkToolShowChart-CNBUjDc7.js")),
|
|
64
|
+
showComparison: P(() => import("./PkToolShowComparison-BEHyRNXE.js").then((e) => e.n)),
|
|
65
|
+
showContactForm: P(() => import("./PkToolShowContactForm-D1Ff15Zf.js").then((e) => e.n)),
|
|
66
|
+
showDiagram: P(() => import("./PkToolShowDiagram-CBwqjy6a.js")),
|
|
67
|
+
showEmail: P(() => import("./PkToolShowEmail-BehvoNsz.js").then((e) => e.n)),
|
|
68
|
+
showImageGallery: P(() => import("./PkToolShowImageGallery-Cre2zSGV.js").then((e) => e.n)),
|
|
69
|
+
showLocation: P(() => import("./PkToolShowLocation-Nhh_LwmN.js").then((e) => e.n)),
|
|
70
|
+
showMessage: P(() => import("./PkToolShowMessage-Cca7K7GQ.js").then((e) => e.n)),
|
|
71
|
+
showForm: P(() => import("./PkToolShowForm-D-rzzwJa.js").then((e) => e.n)),
|
|
72
|
+
showMultipleChoice: P(() => import("./PkToolShowForm-D-rzzwJa.js").then((e) => e.n)),
|
|
73
|
+
showProductList: P(() => import("./PkToolShowProductList-D4FAfMS-.js").then((e) => e.n)),
|
|
74
|
+
showQrCode: P(() => import("./PkToolShowQrCode-96KzD1rX.js").then((e) => e.n)),
|
|
75
|
+
showSources: P(() => import("./PkToolShowSources-BC6YJl-O.js").then((e) => e.n)),
|
|
76
|
+
showSuggestedReply: P(() => import("./PkToolShowSuggestedReply-DxlGhMvE.js").then((e) => e.n)),
|
|
77
|
+
showVideo: P(() => import("./PkToolShowVideo-CxN7z_cZ.js")),
|
|
78
|
+
showWeather: P(() => import("./PkToolShowWeather-1NJwawC7.js")),
|
|
79
|
+
showWebPages: P(() => import("./PkToolShowWebPages-0Ux6n8G1.js").then((e) => e.n))
|
|
80
80
|
}, Qe = {
|
|
81
81
|
key: 0,
|
|
82
82
|
class: "text-12 text-word-3 m-0 mb-xs"
|
|
83
|
-
}, $e = /* @__PURE__ */
|
|
83
|
+
}, $e = /* @__PURE__ */ F({
|
|
84
84
|
__name: "PkToolApprovalPreviewMessage",
|
|
85
85
|
props: { input: {} },
|
|
86
86
|
setup(e) {
|
|
87
|
-
let t = e, n =
|
|
87
|
+
let t = e, n = O(() => {
|
|
88
88
|
let e = t.input;
|
|
89
89
|
return typeof e?.message == "string" ? e.message : "";
|
|
90
90
|
});
|
|
91
|
-
return (e, t) => n.value ? (
|
|
91
|
+
return (e, t) => n.value ? (z(), j("p", Qe, V(n.value), 1)) : A("", !0);
|
|
92
92
|
}
|
|
93
93
|
}), et = { [me]: $e }, tt = {
|
|
94
94
|
key: 0,
|
|
95
95
|
class: "text-12 text-word-3 m-0 mb-xs"
|
|
96
|
-
}, nt = /* @__PURE__ */
|
|
96
|
+
}, nt = /* @__PURE__ */ F({
|
|
97
97
|
__name: "PkToolApprovalCard",
|
|
98
98
|
props: {
|
|
99
99
|
part: {},
|
|
@@ -102,10 +102,10 @@ var Je = (e) => e.state, Ye = (e) => e.type.startsWith("tool-") ? e.type.slice(5
|
|
|
102
102
|
},
|
|
103
103
|
emits: ["respond"],
|
|
104
104
|
setup(e, { emit: t }) {
|
|
105
|
-
let n = e, r = t, { t: i, te: a } =
|
|
105
|
+
let n = e, r = t, { t: i, te: a } = Ve({ useScope: "global" }), o = O(() => n.part), c = O(() => h(n.part)), l = O(() => c.value === me), 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), m = 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(() => et[c.value]), v = O(() => _.value ? i("toolApproval.prompt") : i("toolApproval.promptNamed", { tool: ae(c.value, {
|
|
106
106
|
t: i,
|
|
107
107
|
te: a
|
|
108
|
-
}) })), y =
|
|
108
|
+
}) })), y = O(() => {
|
|
109
109
|
if (p.value) return {
|
|
110
110
|
icon: "ri:time-line",
|
|
111
111
|
message: i("toolApproval.expired")
|
|
@@ -118,39 +118,39 @@ var Je = (e) => e.state, Ye = (e) => e.type.startsWith("tool-") ? e.type.slice(5
|
|
|
118
118
|
icon: "ri:close-line",
|
|
119
119
|
message: i(l.value ? "toolApproval.cancelled" : "toolApproval.denied")
|
|
120
120
|
};
|
|
121
|
-
}), b =
|
|
121
|
+
}), b = O(() => !!y.value && !_.value);
|
|
122
122
|
return (t, n) => {
|
|
123
|
-
let a = d, s =
|
|
124
|
-
return
|
|
125
|
-
|
|
126
|
-
default:
|
|
123
|
+
let a = d, s = Oe, c = ke;
|
|
124
|
+
return z(), j("div", { class: L(["w-full overflow-hidden transition-all duration-300", { "bg-surface p-sm rounded-xl border border-surface-3": !b.value }]) }, [
|
|
125
|
+
N(D, null, {
|
|
126
|
+
default: W(() => [!l.value && u.value ? (z(), j("p", tt, V(v.value), 1)) : A("", !0)]),
|
|
127
127
|
_: 1
|
|
128
128
|
}),
|
|
129
|
-
_.value ? (
|
|
129
|
+
_.value ? (z(), k(Le(_.value), {
|
|
130
130
|
key: 0,
|
|
131
131
|
part: e.part,
|
|
132
132
|
input: o.value.input
|
|
133
|
-
}, null, 8, ["part", "input"])) :
|
|
134
|
-
|
|
135
|
-
default:
|
|
133
|
+
}, null, 8, ["part", "input"])) : A("", !0),
|
|
134
|
+
N(D, { mode: "out-in" }, {
|
|
135
|
+
default: W(() => [y.value ? (z(), j("p", {
|
|
136
136
|
key: 1,
|
|
137
|
-
class:
|
|
138
|
-
}, [
|
|
137
|
+
class: L(["flex items-center gap-4 text-12 text-word-3 m-0", { "mt-xs": _.value }])
|
|
138
|
+
}, [N(c, {
|
|
139
139
|
name: y.value.icon,
|
|
140
140
|
class: "shrink-0"
|
|
141
|
-
}, null, 8, ["name"]),
|
|
142
|
-
default:
|
|
141
|
+
}, null, 8, ["name"]), Ae(" " + V(y.value.message), 1)], 2)) : (z(), k(s, { key: 0 }, {
|
|
142
|
+
default: W(() => [N(a, {
|
|
143
143
|
modifiers: "primary-small",
|
|
144
144
|
disabled: !f.value,
|
|
145
145
|
icon: "ri:check-line",
|
|
146
|
-
label:
|
|
147
|
-
onClick: n[0] ||=
|
|
148
|
-
}, null, 8, ["disabled", "label"]),
|
|
146
|
+
label: H(i)("action.proceed"),
|
|
147
|
+
onClick: n[0] ||= G((e) => r("respond", !0), ["stop"])
|
|
148
|
+
}, null, 8, ["disabled", "label"]), N(a, {
|
|
149
149
|
modifiers: "action-quiet-small",
|
|
150
150
|
disabled: !f.value,
|
|
151
151
|
icon: "ri:close-line",
|
|
152
|
-
label:
|
|
153
|
-
onClick: n[1] ||=
|
|
152
|
+
label: H(i)("action.cancel"),
|
|
153
|
+
onClick: n[1] ||= G((e) => r("respond", !1), ["stop"])
|
|
154
154
|
}, null, 8, ["disabled", "label"])]),
|
|
155
155
|
_: 1
|
|
156
156
|
}))]),
|
|
@@ -168,7 +168,7 @@ var Je = (e) => e.state, Ye = (e) => e.type.startsWith("tool-") ? e.type.slice(5
|
|
|
168
168
|
}, at = {
|
|
169
169
|
key: 2,
|
|
170
170
|
class: "text-12 text-word-3 m-0 mb-xs"
|
|
171
|
-
}, ot = { class: "pk-host-call-confirm-card__details text-12 m-0" }, st = { class: "text-word-3" }, ct = { class: "text-word-2 m-0" }, lt = /* @__PURE__ */
|
|
171
|
+
}, ot = { class: "pk-host-call-confirm-card__details text-12 m-0" }, st = { class: "text-word-3" }, ct = { class: "text-word-2 m-0" }, lt = /* @__PURE__ */ F({
|
|
172
172
|
__name: "PkHostCallConfirmCard",
|
|
173
173
|
props: {
|
|
174
174
|
question: {},
|
|
@@ -177,36 +177,36 @@ var Je = (e) => e.state, Ye = (e) => e.type.startsWith("tool-") ? e.type.slice(5
|
|
|
177
177
|
},
|
|
178
178
|
emits: ["respond"],
|
|
179
179
|
setup(e, { emit: t }) {
|
|
180
|
-
let n = e, r = t, i =
|
|
180
|
+
let n = e, r = t, i = O(() => n.details?.some((e) => e.before !== void 0) ?? !1);
|
|
181
181
|
return (t, n) => {
|
|
182
|
-
let a =
|
|
183
|
-
return
|
|
184
|
-
|
|
185
|
-
e.details?.length && i.value ? (
|
|
182
|
+
let a = De, o = d, s = Oe;
|
|
183
|
+
return z(), j("div", q, [
|
|
184
|
+
M("p", J, V(e.question), 1),
|
|
185
|
+
e.details?.length && i.value ? (z(), k(we, {
|
|
186
186
|
key: 0,
|
|
187
187
|
changes: e.details,
|
|
188
188
|
class: "mb-xs"
|
|
189
|
-
}, null, 8, ["changes"])) : e.details?.length ? (
|
|
190
|
-
e.unchanged?.length ? (
|
|
189
|
+
}, null, 8, ["changes"])) : e.details?.length ? (z(), j("dl", rt, [(z(!0), j(E, null, Fe(e.details, (e, t) => (z(), j(E, { key: t }, [e.label ? (z(), j("dt", it, 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 ? (z(), j("p", at, V(t.$t("toolApproval.noChanges")), 1)) : A("", !0),
|
|
190
|
+
e.unchanged?.length ? (z(), k(a, {
|
|
191
191
|
key: 3,
|
|
192
192
|
title: t.$t("toolApproval.unchangedFields", e.unchanged.length),
|
|
193
193
|
modifiers: "compact",
|
|
194
194
|
class: "mb-xs"
|
|
195
195
|
}, {
|
|
196
|
-
default:
|
|
196
|
+
default: W(() => [M("dl", ot, [(z(!0), j(E, null, Fe(e.unchanged, (e, t) => (z(), j(E, { key: t }, [M("dt", st, V(e.label), 1), M("dd", ct, V(e.value), 1)], 64))), 128))])]),
|
|
197
197
|
_: 1
|
|
198
|
-
}, 8, ["title"])) :
|
|
199
|
-
|
|
200
|
-
default:
|
|
198
|
+
}, 8, ["title"])) : A("", !0),
|
|
199
|
+
N(s, null, {
|
|
200
|
+
default: W(() => [N(o, {
|
|
201
201
|
modifiers: "primary-small",
|
|
202
202
|
icon: "ri:check-line",
|
|
203
203
|
label: t.$t("action.proceed"),
|
|
204
|
-
onClick: n[0] ||=
|
|
205
|
-
}, null, 8, ["label"]),
|
|
204
|
+
onClick: n[0] ||= G((e) => r("respond", !0), ["stop"])
|
|
205
|
+
}, null, 8, ["label"]), N(o, {
|
|
206
206
|
modifiers: "action-quiet-small",
|
|
207
207
|
icon: "ri:close-line",
|
|
208
208
|
label: t.$t("action.cancel"),
|
|
209
|
-
onClick: n[1] ||=
|
|
209
|
+
onClick: n[1] ||= G((e) => r("respond", !1), ["stop"])
|
|
210
210
|
}, null, 8, ["label"])]),
|
|
211
211
|
_: 1
|
|
212
212
|
})
|
|
@@ -215,7 +215,7 @@ var Je = (e) => e.state, Ye = (e) => e.type.startsWith("tool-") ? e.type.slice(5
|
|
|
215
215
|
}
|
|
216
216
|
}), ut = 30, Y = 500;
|
|
217
217
|
function dt(e) {
|
|
218
|
-
let { scrollEl: t, status: n, messagesLength: r, lastMessageRole: i, contentEl: a, beforeNewMessageScroll: o, onScrollUp: s, onScrollDown: c } = e, l =
|
|
218
|
+
let { scrollEl: t, status: n, messagesLength: r, lastMessageRole: i, contentEl: a, beforeNewMessageScroll: o, onScrollUp: s, onScrollDown: c } = e, l = B(!1), u = B(!0), d = !1, f = null, p = null, m = null, h = null, g = 0, _ = (e = "smooth") => {
|
|
219
219
|
!t.value || l.value ? d = !1 : (d = !0, t.value.scrollTo({
|
|
220
220
|
top: t.value.scrollHeight,
|
|
221
221
|
behavior: e
|
|
@@ -239,44 +239,44 @@ function dt(e) {
|
|
|
239
239
|
n <= e.scrollTop || (u.value = !0, d = !0, e.scrollTop = n, requestAnimationFrame(() => {
|
|
240
240
|
d = !1;
|
|
241
241
|
}));
|
|
242
|
-
},
|
|
242
|
+
}, S = () => {
|
|
243
243
|
!f && t.value && (f = new MutationObserver(te), f.observe(t.value, {
|
|
244
244
|
childList: !0,
|
|
245
245
|
subtree: !0,
|
|
246
246
|
characterData: !0
|
|
247
247
|
}));
|
|
248
|
-
},
|
|
248
|
+
}, ne = () => {
|
|
249
249
|
f?.disconnect(), f = null;
|
|
250
250
|
};
|
|
251
|
-
|
|
252
|
-
e === "streaming" || e === "submitted" ?
|
|
253
|
-
}),
|
|
251
|
+
U(n, (e, t) => {
|
|
252
|
+
e === "streaming" || e === "submitted" ? S() : (e !== "ready" || t !== "streaming") && ne();
|
|
253
|
+
}), U(r, async () => {
|
|
254
254
|
if (r() && i() !== "assistant") {
|
|
255
|
-
|
|
255
|
+
T(), l.value = !1, d = !0;
|
|
256
256
|
try {
|
|
257
|
-
await
|
|
257
|
+
await I(), await o?.(), await I();
|
|
258
258
|
} finally {
|
|
259
259
|
_();
|
|
260
260
|
}
|
|
261
261
|
}
|
|
262
262
|
});
|
|
263
263
|
let C = null, w = () => {
|
|
264
|
-
t.value && (t.value.scrollHeight <= t.value.clientHeight || (t.value.scrollTop = t.value.scrollHeight, C && clearTimeout(C), C = setTimeout(
|
|
265
|
-
},
|
|
264
|
+
t.value && (t.value.scrollHeight <= t.value.clientHeight || (t.value.scrollTop = t.value.scrollHeight, C && clearTimeout(C), C = setTimeout(T, 300)));
|
|
265
|
+
}, T = () => {
|
|
266
266
|
p?.disconnect(), p = null, m?.disconnect(), m = null, C &&= (clearTimeout(C), null);
|
|
267
267
|
};
|
|
268
|
-
return
|
|
268
|
+
return Pe(() => {
|
|
269
269
|
if (!t.value) return;
|
|
270
270
|
t.value.addEventListener("wheel", v, { passive: !0 }), t.value.addEventListener("touchstart", b, { passive: !0 }), t.value.addEventListener("touchmove", x, { passive: !0 });
|
|
271
271
|
let e = n() === "submitted" || n() === "streaming";
|
|
272
|
-
e ?
|
|
272
|
+
e ? S() : (p = new ResizeObserver(w), p.observe(t.value), m = new MutationObserver(w), m.observe(t.value, {
|
|
273
273
|
childList: !0,
|
|
274
274
|
subtree: !0
|
|
275
275
|
}));
|
|
276
276
|
let r = a?.() ?? t.value.firstElementChild;
|
|
277
277
|
r && (h = new ResizeObserver(te), h.observe(r)), e || w();
|
|
278
|
-
}),
|
|
279
|
-
t.value?.removeEventListener("wheel", v), t.value?.removeEventListener("touchstart", b), t.value?.removeEventListener("touchmove", x), h?.disconnect(), h = null,
|
|
278
|
+
}), R(() => {
|
|
279
|
+
t.value?.removeEventListener("wheel", v), t.value?.removeEventListener("touchstart", b), t.value?.removeEventListener("touchmove", x), h?.disconnect(), h = null, ne(), T();
|
|
280
280
|
}), {
|
|
281
281
|
handleScroll: ee,
|
|
282
282
|
scrollToBottom: _,
|
|
@@ -289,9 +289,9 @@ function ft(e, t = () => !1) {
|
|
|
289
289
|
let n = (e) => Xe(e) && !t(e), r = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Map(), a = 0;
|
|
290
290
|
for (; a < e.length;) {
|
|
291
291
|
let t = e[a];
|
|
292
|
-
if (
|
|
292
|
+
if (Ge(t) && n(e[a + 1])) {
|
|
293
293
|
let o = t.id, s = 0, c;
|
|
294
|
-
for (;
|
|
294
|
+
for (; Ge(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;
|
|
295
295
|
i.set(o, {
|
|
296
296
|
count: s,
|
|
297
297
|
lastAt: c
|
|
@@ -343,7 +343,7 @@ var pt = ["aria-busy"], mt = {
|
|
|
343
343
|
}, qt = { class: "pk-chatbot-message__loading-info" }, Jt = { class: "flex gap-8 items-center" }, Yt = { class: "text-12" }, Xt = {
|
|
344
344
|
key: 0,
|
|
345
345
|
class: "pk-chatbot-message pk-chatbot-message--assistant"
|
|
346
|
-
}, Zt = ["title", "aria-label"], Qt = /* @__PURE__ */
|
|
346
|
+
}, Zt = ["title", "aria-label"], Qt = /* @__PURE__ */ F({
|
|
347
347
|
__name: "PkChatbotMessages",
|
|
348
348
|
props: {
|
|
349
349
|
status: {},
|
|
@@ -393,10 +393,10 @@ var pt = ["aria-busy"], mt = {
|
|
|
393
393
|
"host-confirm-respond"
|
|
394
394
|
],
|
|
395
395
|
setup(e, { emit: t }) {
|
|
396
|
-
let n = e, r = t, { t: i, te: o, d: s, n: c } =
|
|
396
|
+
let n = e, r = t, { t: i, te: o, d: s, n: c } = Ve({ useScope: "global" }), l = je(pe, void 0), u = je(fe, void 0), ae = (e) => {
|
|
397
397
|
let t = e.toolCallId;
|
|
398
398
|
return typeof t == "string" ? u?.value[t]?.details : void 0;
|
|
399
|
-
}, me =
|
|
399
|
+
}, me = ze(), P = (e, t) => {
|
|
400
400
|
if (re(e)) {
|
|
401
401
|
let n = e.toolCallId;
|
|
402
402
|
n && r("confirm-respond", {
|
|
@@ -405,65 +405,65 @@ var pt = ["aria-busy"], mt = {
|
|
|
405
405
|
});
|
|
406
406
|
return;
|
|
407
407
|
}
|
|
408
|
-
let n =
|
|
408
|
+
let n = ie(e);
|
|
409
409
|
n && r("approval-respond", {
|
|
410
410
|
id: n,
|
|
411
411
|
approved: t
|
|
412
412
|
});
|
|
413
|
-
},
|
|
414
|
-
f(
|
|
415
|
-
let { handleScroll:
|
|
416
|
-
scrollEl:
|
|
413
|
+
}, F = Be("scrollEl"), R = Be("wrapperEl"), Ue = O(() => _e(n.textColor, n.mainColor));
|
|
414
|
+
f(R);
|
|
415
|
+
let { handleScroll: We, scrollToBottom: Ke, userScrolledUp: qe, isAtBottom: Je } = dt({
|
|
416
|
+
scrollEl: F,
|
|
417
417
|
status: () => n.status,
|
|
418
418
|
messagesLength: () => n.messages?.length,
|
|
419
419
|
lastMessageRole: () => n.messages?.[n.messages.length - 1]?.role,
|
|
420
|
-
contentEl: () =>
|
|
420
|
+
contentEl: () => R.value,
|
|
421
421
|
beforeNewMessageScroll: () => ct(),
|
|
422
422
|
onScrollUp: () => r("scroll-up"),
|
|
423
423
|
onScrollDown: () => r("scroll-down")
|
|
424
424
|
}), Ye = () => {
|
|
425
425
|
qe.value = !1, Ke();
|
|
426
|
-
}, K =
|
|
426
|
+
}, K = O(() => (n.messages ?? []).filter((e) => e.role === "user" && !Ge(e)).map((e) => ({
|
|
427
427
|
id: e.id,
|
|
428
428
|
preview: e.parts.find(g)?.text.trim().slice(0, 120) || "…"
|
|
429
|
-
}))), Xe =
|
|
430
|
-
let e =
|
|
429
|
+
}))), Xe = B(), Qe = () => F.value?.querySelectorAll(".pk-chatbot-message--user") ?? [], $e = () => {
|
|
430
|
+
let e = F.value;
|
|
431
431
|
if (!e || !n.showScrollToBottom) return;
|
|
432
432
|
let t = e.getBoundingClientRect().top + e.clientHeight / 2, r = K.value[0]?.id;
|
|
433
433
|
Qe().forEach((e, n) => {
|
|
434
434
|
e.getBoundingClientRect().top <= t && (r = K.value[n]?.id);
|
|
435
435
|
}), Xe.value = r;
|
|
436
436
|
};
|
|
437
|
-
|
|
438
|
-
await
|
|
437
|
+
U(K, async () => {
|
|
438
|
+
await I(), $e();
|
|
439
439
|
});
|
|
440
440
|
let et = () => {
|
|
441
|
-
|
|
441
|
+
We(), $e();
|
|
442
442
|
}, tt = (e) => {
|
|
443
|
-
let t =
|
|
443
|
+
let t = F.value, n = K.value.findIndex((t) => t.id === e), r = Qe()[n];
|
|
444
444
|
t && r && (qe.value = !0, t.scrollTo({
|
|
445
445
|
top: t.scrollTop + r.getBoundingClientRect().top - t.getBoundingClientRect().top - Number.parseFloat(getComputedStyle(t).paddingTop),
|
|
446
446
|
behavior: "smooth"
|
|
447
447
|
}));
|
|
448
|
-
}, q =
|
|
448
|
+
}, q = O(() => n.status === "submitted" || n.status === "streaming" || n.hostWorking === !0), J = B(0), rt = B(!1), it = !1, at = Re(), ot = () => n.messages?.[n.messages.length - 1]?.role === "user" || q.value, st = () => {
|
|
449
449
|
it = !1, rt.value = !0, J.value = 0;
|
|
450
450
|
}, ct = async () => {
|
|
451
451
|
if (!n.messages?.length || n.disableHeightAdjustment) return;
|
|
452
452
|
if (!ot()) {
|
|
453
|
-
it && (await
|
|
453
|
+
it && (await I(), F.value?.scrollHeight, ot() || st());
|
|
454
454
|
return;
|
|
455
455
|
}
|
|
456
|
-
if (it = !0, rt.value = !1, await
|
|
457
|
-
let { paddingTop: e, paddingBottom: t } = getComputedStyle(
|
|
456
|
+
if (it = !0, rt.value = !1, await I(), !F.value) return;
|
|
457
|
+
let { paddingTop: e, paddingBottom: t } = getComputedStyle(F.value), r = F.value.clientHeight - Number.parseFloat(e) - Number.parseFloat(t), i = R.value && Number.parseFloat(getComputedStyle(R.value).rowGap) || 0, a = Qe();
|
|
458
458
|
at.value = a[a.length - 1];
|
|
459
459
|
let o = r - (at.value?.clientHeight ?? 0) - i;
|
|
460
|
-
r > 0 && (J.value = Math.max(o, 0)), await
|
|
460
|
+
r > 0 && (J.value = Math.max(o, 0)), await I();
|
|
461
461
|
};
|
|
462
|
-
|
|
462
|
+
U([() => n.messages?.length, () => n.messages?.[n.messages.length - 1]?.id], () => ct()), He([F, at], () => {
|
|
463
463
|
it && ct();
|
|
464
|
-
}),
|
|
464
|
+
}), Pe(() => {
|
|
465
465
|
(q.value || n.awaitingSpokenAnswer) && ct();
|
|
466
|
-
}),
|
|
466
|
+
}), U(q, (e) => {
|
|
467
467
|
e || st();
|
|
468
468
|
});
|
|
469
469
|
let ut = (e) => n.revisedAnswers?.some((t) => t.messageId === e), Y = (e) => n.messageFeedbacks?.find((t) => t.messageId === e), Qt = /* @__PURE__ */ new Set([
|
|
@@ -497,35 +497,35 @@ var pt = ["aria-busy"], mt = {
|
|
|
497
497
|
let t = fn(e);
|
|
498
498
|
for (let e = t.length - 1; e >= 0; --e) if (g(t[e])) return e;
|
|
499
499
|
return -1;
|
|
500
|
-
}, un =
|
|
500
|
+
}, un = O(() => n.messages?.[n.messages.length - 1]), X = O(() => {
|
|
501
501
|
let e = un.value;
|
|
502
502
|
return e ? e.parts[e.parts.length - 1] : null;
|
|
503
|
-
}), dn =
|
|
503
|
+
}), dn = O(() => {
|
|
504
504
|
let e = /* @__PURE__ */ new Map();
|
|
505
|
-
for (let t of n.messages ?? []) t.role === "assistant" && e.set(t.id, C(
|
|
505
|
+
for (let t of n.messages ?? []) t.role === "assistant" && e.set(t.id, C(ce(ne(t.parts))));
|
|
506
506
|
return e;
|
|
507
|
-
}), fn = (e) => dn.value.get(e.id) ?? e.parts, pn =
|
|
507
|
+
}), fn = (e) => dn.value.get(e.id) ?? e.parts, pn = O(() => n.status === "error"), mn = O(() => n.awaitingSpokenAnswer === !0 && !q.value), hn = O(() => mn.value && un.value?.role === "user" && !pn.value), gn = (e, t) => t(), _n = O(() => {
|
|
508
508
|
let e = X.value;
|
|
509
|
-
return
|
|
510
|
-
}), vn =
|
|
509
|
+
return S(i, e, l?.value);
|
|
510
|
+
}), vn = O(() => {
|
|
511
511
|
let e = X.value;
|
|
512
512
|
return ge(e);
|
|
513
513
|
}), yn = (e) => n.messages?.findIndex((t) => t.id === e), Z = (e) => e === void 0 || !n.messages ? !1 : e === n.messages.length - 1, bn = (e) => Z(e) && n.status === "ready" && !n.hostWorking && !!n.actions?.includes("regenerate"), xn = (e, t) => (!Z(t) || n.status === "ready" && !n.hostWorking) && !!n.actions?.includes(e), Sn = (e) => {
|
|
514
514
|
let t = e.parts[e.parts.length - 1];
|
|
515
515
|
return g(t);
|
|
516
|
-
}, Cn = (e) => e.parts.some((e) => m(e) || x(e) || !!
|
|
517
|
-
if (!
|
|
516
|
+
}, Cn = (e) => e.parts.some((e) => m(e) || x(e) || !!oe(e)), wn = (e) => !!n.showExtendedSteps && Q(e) && Cn(e), Tn = (e) => n.hostConfirmation !== void 0 && oe(e) !== void 0 && e.toolCallId === n.hostConfirmation.toolCallId, En = O(() => n.hostConfirmation !== void 0 && !n.messages?.some((e) => e.parts.some(Tn))), Dn = (e, t) => q.value && Z(e) && oe(t)?.state === "input-available", On = (e, t, n, r) => {
|
|
517
|
+
if (!oe(n) || wn(e)) return !1;
|
|
518
518
|
let i = Dn(t, n);
|
|
519
|
-
return i && r === fn(e).length - 1 ? !1 : i ||
|
|
519
|
+
return i && r === fn(e).length - 1 ? !1 : i || te(n) || !v(e);
|
|
520
520
|
}, kn = (e, t) => {
|
|
521
|
-
let n =
|
|
521
|
+
let n = oe(t);
|
|
522
522
|
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" && !Dn(e, t) ? i("messagePart.hostToolNoAnswer") : void 0;
|
|
523
|
-
}, An = (e) => x(e) && !w(e) && !!(Ze[h(e)] || me[e.type] || n.showAllMessageParts), jn = (e) => e.parts.some((e) => g(e) && !!e.text.trim() || y(e) ||
|
|
523
|
+
}, An = (e) => x(e) && !w(e) && !!(Ze[h(e)] || me[e.type] || n.showAllMessageParts), jn = (e) => e.parts.some((e) => g(e) && !!e.text.trim() || y(e) || T(e) && !w(e) || An(e)), Q = (e) => e.role === "assistant", Mn = (e) => e.role === "user", Nn = (e) => n.messages?.slice(0, e).reverse().find((e) => Q(e)), Pn = (e) => n.messages?.slice(e + 1).find((e) => Q(e)), Fn = (e) => {
|
|
524
524
|
let t = Nn(e)?.metadata?.createdAt, n = Pn(e)?.metadata?.createdAt;
|
|
525
525
|
if (!t || !n) return;
|
|
526
526
|
let r = new Date(t), i = new Date(n);
|
|
527
527
|
return r.toDateString() === i.toDateString() ? void 0 : i;
|
|
528
|
-
}, $ =
|
|
528
|
+
}, $ = O(() => n.showAllMessageParts ? ft([]) : ft(n.messages ?? [], jn)), In = O(() => {
|
|
529
529
|
let e = 0;
|
|
530
530
|
return (n.messages ?? []).map((t) => t.parts.length > 0 ? ++e : void 0);
|
|
531
531
|
}), Ln = (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), Rn = (e) => {
|
|
@@ -533,21 +533,21 @@ var pt = ["aria-busy"], mt = {
|
|
|
533
533
|
return s(t, n ? "time" : "date-time");
|
|
534
534
|
}, zn = (e) => {
|
|
535
535
|
let { createdAt: t, completedAt: n } = e.metadata ?? {};
|
|
536
|
-
if (t && n) return
|
|
537
|
-
}, Bn =
|
|
538
|
-
return
|
|
539
|
-
if (await
|
|
536
|
+
if (t && n) return ue(c, n - t);
|
|
537
|
+
}, Bn = Be("feedbackMessageEl");
|
|
538
|
+
return U(() => n.feedbackMessageId, async () => {
|
|
539
|
+
if (await I(), !n.feedbackMessageId) return;
|
|
540
540
|
let e = Bn.value?.[0]?.$el;
|
|
541
541
|
e && (Z(yn(n.feedbackMessageId)) ? Ke() : e.scrollIntoView({
|
|
542
542
|
behavior: "smooth",
|
|
543
543
|
block: "center"
|
|
544
544
|
}));
|
|
545
545
|
}), (t, n) => {
|
|
546
|
-
let u =
|
|
547
|
-
return
|
|
546
|
+
let u = ke, f = De, m = d, v = Oe;
|
|
547
|
+
return z(), j("div", {
|
|
548
548
|
ref_key: "scrollEl",
|
|
549
|
-
ref:
|
|
550
|
-
class:
|
|
549
|
+
ref: F,
|
|
550
|
+
class: L(["pk-chatbot-messages scrollbar-thin", {
|
|
551
551
|
"pk-chatbot-messages--settling": rt.value,
|
|
552
552
|
"pk-chatbot-messages--parent-scrolls": e.parentScrolls
|
|
553
553
|
}]),
|
|
@@ -555,48 +555,48 @@ var pt = ["aria-busy"], mt = {
|
|
|
555
555
|
"aria-live": "polite",
|
|
556
556
|
"aria-relevant": "additions text",
|
|
557
557
|
"aria-busy": q.value,
|
|
558
|
-
style:
|
|
558
|
+
style: Ne({
|
|
559
559
|
"--chatbot-main-color": e.mainColor,
|
|
560
|
-
"--chatbot-contrast-color":
|
|
560
|
+
"--chatbot-contrast-color": Ue.value
|
|
561
561
|
}),
|
|
562
562
|
onScroll: et
|
|
563
563
|
}, [
|
|
564
|
-
e.showScrollToBottom && K.value.length > 1 ? (
|
|
564
|
+
e.showScrollToBottom && K.value.length > 1 ? (z(), j("div", mt, [N(Ee, {
|
|
565
565
|
items: K.value,
|
|
566
566
|
"active-id": Xe.value,
|
|
567
567
|
onSelect: tt
|
|
568
|
-
}, null, 8, ["items", "active-id"])])) :
|
|
569
|
-
|
|
568
|
+
}, null, 8, ["items", "active-id"])])) : A("", !0),
|
|
569
|
+
M("div", {
|
|
570
570
|
ref_key: "wrapperEl",
|
|
571
|
-
ref:
|
|
571
|
+
ref: R,
|
|
572
572
|
class: "pk-chatbot-messages__wrapper"
|
|
573
573
|
}, [
|
|
574
|
-
(
|
|
575
|
-
Mn(d) && Fn(x) ? (
|
|
576
|
-
$.value.quietRuns.has(d.id) ? (
|
|
574
|
+
(z(!0), j(E, null, Fe(e.messages, (d, x) => (z(), j(E, { key: d.id }, [
|
|
575
|
+
Mn(d) && Fn(x) ? (z(), j("div", ht, [M("span", gt, V(H(s)(Fn(x), "short")), 1)])) : A("", !0),
|
|
576
|
+
$.value.quietRuns.has(d.id) ? (z(), j("div", _t, [N(u, {
|
|
577
577
|
name: "ri:alarm-line",
|
|
578
578
|
class: "shrink-0"
|
|
579
|
-
}),
|
|
579
|
+
}), M("span", null, V(H(i)("label.wakeupQuietRun", {
|
|
580
580
|
count: $.value.quietRuns.get(d.id).count,
|
|
581
|
-
time:
|
|
582
|
-
}, $.value.quietRuns.get(d.id).count)), 1)])) :
|
|
581
|
+
time: H(s)($.value.quietRuns.get(d.id).lastAt ?? Date.now(), "time")
|
|
582
|
+
}, $.value.quietRuns.get(d.id).count)), 1)])) : H(Ge)(d) && !$.value.hidden.has(d.id) && !e.showAllMessageParts ? (z(), j("div", {
|
|
583
583
|
key: 2,
|
|
584
584
|
class: "pk-chatbot-wakeup",
|
|
585
585
|
title: d.metadata?.wakeup?.reason
|
|
586
|
-
}, [
|
|
586
|
+
}, [N(u, {
|
|
587
587
|
name: "ri:alarm-line",
|
|
588
588
|
class: "shrink-0"
|
|
589
|
-
}),
|
|
590
|
-
(!
|
|
589
|
+
}), M("span", null, [Ae(V(H(i)("label.wakeupCheck")) + " ", 1), d.metadata?.createdAt ? (z(), j(E, { key: 0 }, [Ae(" · " + V(H(s)(d.metadata.createdAt, "time")), 1)], 64)) : A("", !0)])], 8, vt)) : A("", !0),
|
|
590
|
+
(!H(Ge)(d) || e.showAllMessageParts) && (!$.value.hidden.has(d.id) || q.value && Z(x)) && (d.parts.length || Z(x) && q.value && Q(d)) ? (z(), j("div", {
|
|
591
591
|
key: 3,
|
|
592
|
-
class:
|
|
593
|
-
style:
|
|
592
|
+
class: L(["pk-chatbot-message", [`pk-chatbot-message--${d.role}`, { "pk-chatbot-message--loading": q.value && Z(x) && Q(d) }]]),
|
|
593
|
+
style: Ne({ minHeight: Z(x) && Q(d) && !pn.value ? `${J.value}px` : void 0 })
|
|
594
594
|
}, [
|
|
595
|
-
|
|
595
|
+
N(D, {
|
|
596
596
|
appear: "",
|
|
597
597
|
name: "pk-chatbot-part"
|
|
598
598
|
}, {
|
|
599
|
-
default:
|
|
599
|
+
default: W(() => [wn(d) ? (z(), k(Te, {
|
|
600
600
|
key: 0,
|
|
601
601
|
message: d,
|
|
602
602
|
"is-streaming": q.value && Z(x),
|
|
@@ -609,20 +609,20 @@ var pt = ["aria-busy"], mt = {
|
|
|
609
609
|
"has-content",
|
|
610
610
|
"hide-reasoning",
|
|
611
611
|
"is-dark"
|
|
612
|
-
])) :
|
|
612
|
+
])) : A("", !0)]),
|
|
613
613
|
_: 2
|
|
614
614
|
}, 1024),
|
|
615
|
-
(
|
|
615
|
+
(z(!0), j(E, null, Fe(fn(d), (s, c) => (z(), j(E, { key: H(le)(s, c) }, [H(g)(s) && s.text.trim() ? (z(), k(D, {
|
|
616
616
|
key: 0,
|
|
617
617
|
appear: "",
|
|
618
618
|
name: "pk-chatbot-part"
|
|
619
619
|
}, {
|
|
620
|
-
default:
|
|
620
|
+
default: W(() => [M("div", yt, [Ie(t.$slots, "text", Me({ ref_for: !0 }, {
|
|
621
621
|
message: d,
|
|
622
622
|
part: s,
|
|
623
623
|
index: x,
|
|
624
624
|
isLoading: q.value
|
|
625
|
-
}), () => [Q(d) ? (
|
|
625
|
+
}), () => [Q(d) ? (z(), k(p, {
|
|
626
626
|
key: 0,
|
|
627
627
|
class: "wysiwyg",
|
|
628
628
|
markdown: s.text,
|
|
@@ -632,44 +632,44 @@ var pt = ["aria-busy"], mt = {
|
|
|
632
632
|
"markdown",
|
|
633
633
|
"is-dark",
|
|
634
634
|
"loading"
|
|
635
|
-
])) : (
|
|
635
|
+
])) : (z(), j(E, { key: 1 }, [Ae(V(s.text), 1)], 64))]), on(d.id) && !Y(d.id)?.comment && c === ln(d) ? (z(), j("span", {
|
|
636
636
|
key: 0,
|
|
637
|
-
class:
|
|
637
|
+
class: L(["pk-chatbot-message__reaction", sn(d.id)]),
|
|
638
638
|
title: cn(d.id)
|
|
639
|
-
}, [an(d.id) ? (
|
|
639
|
+
}, [an(d.id) ? (z(), j("span", xt, V(an(d.id)), 1)) : (z(), k(u, {
|
|
640
640
|
key: 1,
|
|
641
641
|
name: rn(d.id) === "downvote" ? "ri:thumb-down-fill" : "ri:thumb-up-fill"
|
|
642
|
-
}, null, 8, ["name"]))], 10, bt)) :
|
|
642
|
+
}, null, 8, ["name"]))], 10, bt)) : A("", !0)])]),
|
|
643
643
|
_: 2
|
|
644
|
-
}, 1024)) :
|
|
644
|
+
}, 1024)) : H(y)(s) ? (z(), k(D, {
|
|
645
645
|
key: 1,
|
|
646
646
|
appear: "",
|
|
647
647
|
name: "pk-chatbot-part"
|
|
648
648
|
}, {
|
|
649
|
-
default:
|
|
649
|
+
default: W(() => [H(a)(s.filename, s.mediaType) ? (z(), j("div", St, [N(Se, {
|
|
650
650
|
"media-type": s.mediaType,
|
|
651
651
|
url: s.url,
|
|
652
652
|
filename: s.filename,
|
|
653
|
-
size:
|
|
653
|
+
size: H(b)(s)?.bytesCount
|
|
654
654
|
}, null, 8, [
|
|
655
655
|
"media-type",
|
|
656
656
|
"url",
|
|
657
657
|
"filename",
|
|
658
658
|
"size"
|
|
659
|
-
]),
|
|
659
|
+
]), N(ee, {
|
|
660
660
|
url: s.url,
|
|
661
|
-
transcript:
|
|
661
|
+
transcript: H(_)(s),
|
|
662
662
|
pending: e.status === "submitted" && Z(x)
|
|
663
663
|
}, null, 8, [
|
|
664
664
|
"url",
|
|
665
665
|
"transcript",
|
|
666
666
|
"pending"
|
|
667
|
-
])])) : (
|
|
667
|
+
])])) : (z(), k(Se, {
|
|
668
668
|
key: 1,
|
|
669
669
|
"media-type": s.mediaType,
|
|
670
670
|
url: s.url,
|
|
671
671
|
filename: s.filename,
|
|
672
|
-
size:
|
|
672
|
+
size: H(b)(s)?.bytesCount
|
|
673
673
|
}, null, 8, [
|
|
674
674
|
"media-type",
|
|
675
675
|
"url",
|
|
@@ -677,17 +677,17 @@ var pt = ["aria-busy"], mt = {
|
|
|
677
677
|
"size"
|
|
678
678
|
]))]),
|
|
679
679
|
_: 2
|
|
680
|
-
}, 1024)) :
|
|
680
|
+
}, 1024)) : H(T)(s) && !H(w)(s) ? (z(), k(D, {
|
|
681
681
|
key: 2,
|
|
682
682
|
appear: "",
|
|
683
683
|
name: "pk-chatbot-part"
|
|
684
684
|
}, {
|
|
685
|
-
default:
|
|
685
|
+
default: W(() => [(z(), k(nt, {
|
|
686
686
|
key: `approval-${c}`,
|
|
687
687
|
part: s,
|
|
688
|
-
actionable: e.interactive === !0 && (
|
|
688
|
+
actionable: e.interactive === !0 && (H(re)(s) || Z(x)),
|
|
689
689
|
"call-verdict": e.confirmVerdictsOnCall?.get(s.toolCallId ?? ""),
|
|
690
|
-
onRespond: (e) =>
|
|
690
|
+
onRespond: (e) => P(s, e)
|
|
691
691
|
}, null, 8, [
|
|
692
692
|
"part",
|
|
693
693
|
"actionable",
|
|
@@ -695,13 +695,13 @@ var pt = ["aria-busy"], mt = {
|
|
|
695
695
|
"onRespond"
|
|
696
696
|
]))]),
|
|
697
697
|
_: 2
|
|
698
|
-
}, 1024)) : Tn(s) ? (
|
|
698
|
+
}, 1024)) : Tn(s) ? (z(), k(D, {
|
|
699
699
|
key: 3,
|
|
700
700
|
appear: "",
|
|
701
701
|
name: "pk-chatbot-part"
|
|
702
702
|
}, {
|
|
703
|
-
default:
|
|
704
|
-
question: e.hostConfirmation?.question ??
|
|
703
|
+
default: W(() => [N(lt, {
|
|
704
|
+
question: e.hostConfirmation?.question ?? H(i)("toolApproval.hostCall", { name: H(S)(H(i), s) }),
|
|
705
705
|
details: e.hostConfirmation?.details,
|
|
706
706
|
unchanged: e.hostConfirmation?.unchanged,
|
|
707
707
|
onRespond: n[0] ||= (e) => r("host-confirm-respond", e)
|
|
@@ -711,262 +711,262 @@ var pt = ["aria-busy"], mt = {
|
|
|
711
711
|
"unchanged"
|
|
712
712
|
])]),
|
|
713
713
|
_: 2
|
|
714
|
-
}, 1024)) : On(d, x, s, c) ? (
|
|
714
|
+
}, 1024)) : On(d, x, s, c) ? (z(), k(D, {
|
|
715
715
|
key: 4,
|
|
716
716
|
appear: "",
|
|
717
717
|
name: "pk-chatbot-part"
|
|
718
718
|
}, {
|
|
719
|
-
default:
|
|
720
|
-
|
|
721
|
-
name: Dn(x, s) ? "loading-loop" :
|
|
719
|
+
default: W(() => [M("div", Ct, [M("div", wt, [
|
|
720
|
+
N(u, {
|
|
721
|
+
name: Dn(x, s) ? "loading-loop" : H(ge)(s) ?? "ri:apps-line",
|
|
722
722
|
class: "shrink-0"
|
|
723
723
|
}, null, 8, ["name"]),
|
|
724
|
-
|
|
725
|
-
kn(x, s) ? (
|
|
726
|
-
]),
|
|
724
|
+
M("span", Tt, V(H(S)(H(i), s, H(l))), 1),
|
|
725
|
+
kn(x, s) ? (z(), j("span", Et, " · " + V(kn(x, s)), 1)) : A("", !0)
|
|
726
|
+
]), ae(s)?.length ? (z(), k(f, {
|
|
727
727
|
key: 0,
|
|
728
|
-
title:
|
|
728
|
+
title: H(i)("toolApproval.changesCount", ae(s).length),
|
|
729
729
|
modifiers: "compact",
|
|
730
730
|
class: "pk-chatbot-message__host-changes"
|
|
731
731
|
}, {
|
|
732
|
-
default:
|
|
732
|
+
default: W(() => [N(we, { changes: ae(s) }, null, 8, ["changes"])]),
|
|
733
733
|
_: 2
|
|
734
|
-
}, 1032, ["title"])) :
|
|
734
|
+
}, 1032, ["title"])) : A("", !0)])]),
|
|
735
735
|
_: 2
|
|
736
|
-
}, 1024)) : An(s) ? (
|
|
736
|
+
}, 1024)) : An(s) ? (z(), k(D, {
|
|
737
737
|
key: 5,
|
|
738
738
|
appear: "",
|
|
739
739
|
name: "pk-chatbot-part"
|
|
740
740
|
}, {
|
|
741
|
-
default:
|
|
742
|
-
key: `component-${c}-${
|
|
741
|
+
default: W(() => [!H(me)[s.type] && H(Ze)[H(h)(s)] ? (z(), k(Le(H(Ze)[H(h)(s)]), Me({
|
|
742
|
+
key: `component-${c}-${H(se)(s)}`,
|
|
743
743
|
part: s
|
|
744
|
-
}, { ref_for: !0 }, en(s)), null, 16, ["part"])) :
|
|
744
|
+
}, { ref_for: !0 }, en(s)), null, 16, ["part"])) : Ie(t.$slots, s.type, Me({ ref_for: !0 }, {
|
|
745
745
|
message: d,
|
|
746
746
|
part: s,
|
|
747
747
|
index: x,
|
|
748
748
|
isLoading: q.value
|
|
749
|
-
}), () => [e.showAllMessageParts ? (
|
|
749
|
+
}), () => [e.showAllMessageParts ? (z(), j("div", Dt, [M("div", Ot, [H(ge)(s) ? (z(), k(u, {
|
|
750
750
|
key: 0,
|
|
751
|
-
name:
|
|
751
|
+
name: H(ge)(s),
|
|
752
752
|
class: "shrink-0"
|
|
753
|
-
}, null, 8, ["name"])) :
|
|
754
|
-
t:
|
|
755
|
-
te:
|
|
756
|
-
})), 1)])])) :
|
|
753
|
+
}, null, 8, ["name"])) : A("", !0), M("span", kt, V(H(he)(s, {
|
|
754
|
+
t: H(i),
|
|
755
|
+
te: H(o)
|
|
756
|
+
})), 1)])])) : A("", !0)], void 0, 1)]),
|
|
757
757
|
_: 2
|
|
758
|
-
}, 1024)) :
|
|
759
|
-
default:
|
|
758
|
+
}, 1024)) : A("", !0), N(D, { mode: "out-in" }, {
|
|
759
|
+
default: W(() => [c === ln(d) && e.readonlyFeedback && Y(d.id)?.comment ? (z(), k(xe, {
|
|
760
760
|
key: 0,
|
|
761
761
|
feedback: Y(d.id)
|
|
762
|
-
}, null, 8, ["feedback"])) :
|
|
762
|
+
}, null, 8, ["feedback"])) : A("", !0)]),
|
|
763
763
|
_: 2
|
|
764
764
|
}, 1024)], 64))), 128)),
|
|
765
|
-
Mn(d) && d.metadata?.pagePointer ? (
|
|
765
|
+
Mn(d) && d.metadata?.pagePointer ? (z(), j("div", {
|
|
766
766
|
key: 0,
|
|
767
767
|
class: "pk-chatbot-message__pointer",
|
|
768
|
-
title: d.metadata.pagePointer.kind === "text" ?
|
|
769
|
-
}, [
|
|
768
|
+
title: d.metadata.pagePointer.kind === "text" ? H(i)("pagePointer.selected") : H(i)("pagePointer.pointed")
|
|
769
|
+
}, [N(u, {
|
|
770
770
|
name: d.metadata.pagePointer.kind === "text" ? "ri:double-quotes-l" : "ri:focus-3-line",
|
|
771
771
|
class: "pk-chatbot-message__pointer-icon"
|
|
772
|
-
}, null, 8, ["name"]),
|
|
772
|
+
}, null, 8, ["name"]), M("span", jt, V(d.metadata.pagePointer.kind === "text" ? `«${d.metadata.pagePointer.label}»` : d.metadata.pagePointer.label), 1)], 8, At)) : Mn(d) && d.metadata?.filePointer ? (z(), j("div", {
|
|
773
773
|
key: 1,
|
|
774
774
|
class: "pk-chatbot-message__pointer",
|
|
775
|
-
title:
|
|
776
|
-
}, [
|
|
775
|
+
title: H(i)("selectionActions.selectedInFile")
|
|
776
|
+
}, [N(u, {
|
|
777
777
|
name: d.metadata.filePointer.format === "docx" ? "ri:file-word-2-line" : "ri:file-excel-2-line",
|
|
778
778
|
class: "pk-chatbot-message__pointer-icon"
|
|
779
|
-
}, null, 8, ["name"]),
|
|
780
|
-
|
|
779
|
+
}, null, 8, ["name"]), M("span", Nt, V(d.metadata.filePointer.label), 1)], 8, Mt)) : A("", !0),
|
|
780
|
+
N(D, {
|
|
781
781
|
name: "fade-in",
|
|
782
782
|
mode: "out-in"
|
|
783
783
|
}, {
|
|
784
|
-
default:
|
|
784
|
+
default: W(() => [q.value && Z(x) && !Sn(d) && !e.hostConfirmation && Q(d) && (!wn(d) || jn(d)) ? (z(), j("div", {
|
|
785
785
|
key: `loading-info-${d.id}`,
|
|
786
786
|
class: "pk-chatbot-message__loading-info"
|
|
787
|
-
}, [
|
|
788
|
-
|
|
787
|
+
}, [M("div", Pt, [
|
|
788
|
+
N(u, {
|
|
789
789
|
name: "loading-loop",
|
|
790
790
|
class: "shrink-0"
|
|
791
791
|
}),
|
|
792
|
-
|
|
793
|
-
default:
|
|
792
|
+
N(D, { mode: "out-in" }, {
|
|
793
|
+
default: W(() => [vn.value ? (z(), k(u, {
|
|
794
794
|
key: vn.value,
|
|
795
795
|
class: "shrink-0",
|
|
796
796
|
name: vn.value
|
|
797
|
-
}, null, 8, ["name"])) :
|
|
797
|
+
}, null, 8, ["name"])) : A("", !0)]),
|
|
798
798
|
_: 1
|
|
799
799
|
}),
|
|
800
|
-
|
|
801
|
-
default:
|
|
800
|
+
N(D, { mode: "out-in" }, {
|
|
801
|
+
default: W(() => [_n.value ? (z(), j("span", {
|
|
802
802
|
key: _n.value,
|
|
803
803
|
class: "text-12"
|
|
804
|
-
},
|
|
804
|
+
}, V(_n.value), 1)) : A("", !0)]),
|
|
805
805
|
_: 1
|
|
806
806
|
})
|
|
807
|
-
]),
|
|
807
|
+
]), N(D, {
|
|
808
808
|
name: "fade-in",
|
|
809
809
|
mode: "out-in"
|
|
810
810
|
}, {
|
|
811
|
-
default:
|
|
811
|
+
default: W(() => [!e.hideReasoning && !wn(d) && X.value && "text" in X.value && X.value.text.trim() ? (z(), k(Ce, {
|
|
812
812
|
key: 0,
|
|
813
813
|
markdown: X.value.text,
|
|
814
814
|
"is-dark": e.isDark,
|
|
815
|
-
"tail-length":
|
|
815
|
+
"tail-length": H(de),
|
|
816
816
|
"inner-class": "wysiwyg",
|
|
817
817
|
class: "border border-surface-3 rounded-md p-4 mt-8 bg-surface-1 max-h-64 text-12 w-full"
|
|
818
818
|
}, null, 8, [
|
|
819
819
|
"markdown",
|
|
820
820
|
"is-dark",
|
|
821
821
|
"tail-length"
|
|
822
|
-
])) :
|
|
822
|
+
])) : A("", !0)]),
|
|
823
823
|
_: 2
|
|
824
|
-
}, 1024)])) :
|
|
824
|
+
}, 1024)])) : A("", !0)]),
|
|
825
825
|
_: 2
|
|
826
826
|
}, 1024),
|
|
827
|
-
|
|
828
|
-
default:
|
|
829
|
-
|
|
827
|
+
N(D, { mode: "out-in" }, {
|
|
828
|
+
default: W(() => [Ln(d, x) ? (z(), j("div", Ft, [
|
|
829
|
+
N(v, {
|
|
830
830
|
modifiers: "compact",
|
|
831
831
|
class: "mr-auto shrink-0"
|
|
832
832
|
}, {
|
|
833
|
-
default:
|
|
834
|
-
|
|
835
|
-
default:
|
|
833
|
+
default: W(() => [
|
|
834
|
+
N(D, { mode: "out-in" }, {
|
|
835
|
+
default: W(() => [bn(x) ? (z(), k(m, {
|
|
836
836
|
key: 0,
|
|
837
837
|
icon: "ri:reset-right-line",
|
|
838
838
|
modifiers: "action-quiet-small",
|
|
839
|
-
title:
|
|
840
|
-
"aria-label":
|
|
841
|
-
onClick: n[1] ||=
|
|
842
|
-
}, null, 8, ["title", "aria-label"])) :
|
|
839
|
+
title: H(i)("action.regenerate"),
|
|
840
|
+
"aria-label": H(i)("action.regenerate"),
|
|
841
|
+
onClick: n[1] ||= G((e) => t.$emit("regenerate"), ["stop"])
|
|
842
|
+
}, null, 8, ["title", "aria-label"])) : A("", !0)]),
|
|
843
843
|
_: 2
|
|
844
844
|
}, 1024),
|
|
845
|
-
|
|
846
|
-
default:
|
|
845
|
+
N(D, { mode: "out-in" }, {
|
|
846
|
+
default: W(() => [xn("show-info", x) ? (z(), k(m, {
|
|
847
847
|
key: 0,
|
|
848
848
|
icon: "ri:information-line",
|
|
849
|
-
title:
|
|
850
|
-
"aria-label":
|
|
849
|
+
title: H(i)("action.getMoreInfo"),
|
|
850
|
+
"aria-label": H(i)("action.getMoreInfo"),
|
|
851
851
|
modifiers: "action-quiet-small",
|
|
852
|
-
onClick:
|
|
852
|
+
onClick: G((e) => t.$emit("show-info", d), ["stop"])
|
|
853
853
|
}, null, 8, [
|
|
854
854
|
"title",
|
|
855
855
|
"aria-label",
|
|
856
856
|
"onClick"
|
|
857
|
-
])) :
|
|
857
|
+
])) : A("", !0)]),
|
|
858
858
|
_: 2
|
|
859
859
|
}, 1024),
|
|
860
|
-
|
|
861
|
-
default:
|
|
860
|
+
N(D, { mode: "out-in" }, {
|
|
861
|
+
default: W(() => [xn("revise", x) ? (z(), k(m, {
|
|
862
862
|
key: 0,
|
|
863
863
|
icon: ut(d.id) ? "ri:file-edit-fill" : "ri:file-edit-line",
|
|
864
|
-
title: ut(d.id) ?
|
|
865
|
-
"aria-label": ut(d.id) ?
|
|
864
|
+
title: ut(d.id) ? H(i)("action.editRevise") : H(i)("action.createRevise"),
|
|
865
|
+
"aria-label": ut(d.id) ? H(i)("action.editRevise") : H(i)("action.createRevise"),
|
|
866
866
|
modifiers: "action-quiet-small",
|
|
867
|
-
class:
|
|
868
|
-
onClick:
|
|
867
|
+
class: L({ "text-brand-graphic": ut(d.id) }),
|
|
868
|
+
onClick: G((e) => t.$emit("revise", d), ["stop"])
|
|
869
869
|
}, null, 8, [
|
|
870
870
|
"icon",
|
|
871
871
|
"title",
|
|
872
872
|
"aria-label",
|
|
873
873
|
"class",
|
|
874
874
|
"onClick"
|
|
875
|
-
])) :
|
|
875
|
+
])) : A("", !0)]),
|
|
876
876
|
_: 2
|
|
877
877
|
}, 1024),
|
|
878
|
-
|
|
879
|
-
default:
|
|
878
|
+
N(D, { mode: "out-in" }, {
|
|
879
|
+
default: W(() => [tn("upvote", x) ? (z(), k(m, {
|
|
880
880
|
key: 0,
|
|
881
881
|
icon: Y(d.id)?.vote === "upvote" ? "ri:thumb-up-fill" : "ri:thumb-up-line",
|
|
882
|
-
title:
|
|
883
|
-
"aria-label":
|
|
882
|
+
title: H(i)("action.upvote"),
|
|
883
|
+
"aria-label": H(i)("action.upvote"),
|
|
884
884
|
modifiers: "action-quiet-small",
|
|
885
|
-
onClick:
|
|
885
|
+
onClick: G((e) => t.$emit("upvote", d), ["stop"])
|
|
886
886
|
}, null, 8, [
|
|
887
887
|
"icon",
|
|
888
888
|
"title",
|
|
889
889
|
"aria-label",
|
|
890
890
|
"onClick"
|
|
891
|
-
])) :
|
|
891
|
+
])) : A("", !0)]),
|
|
892
892
|
_: 2
|
|
893
893
|
}, 1024),
|
|
894
|
-
|
|
895
|
-
default:
|
|
894
|
+
N(D, { mode: "out-in" }, {
|
|
895
|
+
default: W(() => [tn("downvote", x) ? (z(), k(m, {
|
|
896
896
|
key: 0,
|
|
897
897
|
icon: Y(d.id)?.vote === "downvote" ? "ri:thumb-down-fill" : "ri:thumb-down-line",
|
|
898
|
-
title:
|
|
899
|
-
"aria-label":
|
|
898
|
+
title: H(i)("action.downvote"),
|
|
899
|
+
"aria-label": H(i)("action.downvote"),
|
|
900
900
|
modifiers: "action-quiet-small",
|
|
901
|
-
onClick:
|
|
901
|
+
onClick: G((e) => t.$emit("downvote", d), ["stop"])
|
|
902
902
|
}, null, 8, [
|
|
903
903
|
"icon",
|
|
904
904
|
"title",
|
|
905
905
|
"aria-label",
|
|
906
906
|
"onClick"
|
|
907
|
-
])) :
|
|
907
|
+
])) : A("", !0)]),
|
|
908
908
|
_: 2
|
|
909
909
|
}, 1024),
|
|
910
|
-
|
|
911
|
-
default:
|
|
910
|
+
N(D, { mode: "out-in" }, {
|
|
911
|
+
default: W(() => [tn("feedback", x) ? (z(), k(m, {
|
|
912
912
|
key: 0,
|
|
913
913
|
icon: Y(d.id)?.comment ? "ri:feedback-fill" : "ri:feedback-line",
|
|
914
|
-
title:
|
|
915
|
-
"aria-label":
|
|
914
|
+
title: H(i)("action.feedback"),
|
|
915
|
+
"aria-label": H(i)("action.feedback"),
|
|
916
916
|
modifiers: "action-quiet-small",
|
|
917
|
-
onClick:
|
|
917
|
+
onClick: G((e) => t.$emit("feedback", d), ["stop"])
|
|
918
918
|
}, null, 8, [
|
|
919
919
|
"icon",
|
|
920
920
|
"title",
|
|
921
921
|
"aria-label",
|
|
922
922
|
"onClick"
|
|
923
|
-
])) :
|
|
923
|
+
])) : A("", !0)]),
|
|
924
924
|
_: 2
|
|
925
925
|
}, 1024)
|
|
926
926
|
]),
|
|
927
927
|
_: 2
|
|
928
928
|
}, 1024),
|
|
929
|
-
!e.showMessageDateTime && d.metadata?.createdAt && d.metadata?.completedAt ? (
|
|
929
|
+
!e.showMessageDateTime && d.metadata?.createdAt && d.metadata?.completedAt ? (z(), j("div", It, [M("time", {
|
|
930
930
|
datetime: new Date(d.metadata.createdAt).toISOString(),
|
|
931
|
-
title:
|
|
931
|
+
title: H(s)(new Date(d.metadata.createdAt), "date-time"),
|
|
932
932
|
class: "flex items-center gap-4 min-w-0"
|
|
933
|
-
}, [
|
|
933
|
+
}, [N(u, {
|
|
934
934
|
name: "ri:time-line",
|
|
935
935
|
class: "shrink-0"
|
|
936
|
-
}),
|
|
936
|
+
}), M("span", Rt, V(Rn(d.metadata.createdAt)), 1)], 8, Lt), zn(d) ? (z(), j("span", zt, [N(u, {
|
|
937
937
|
name: "ri:hourglass-line",
|
|
938
938
|
class: "shrink-0"
|
|
939
|
-
}),
|
|
940
|
-
e.showMessageNumber ? (
|
|
939
|
+
}), M("span", Bt, V(zn(d)), 1)])) : A("", !0)])) : A("", !0),
|
|
940
|
+
e.showMessageNumber ? (z(), j("span", {
|
|
941
941
|
key: 1,
|
|
942
|
-
title:
|
|
942
|
+
title: H(i)("label.messageNumber", { n: In.value[x] }),
|
|
943
943
|
class: "text-12 text-word-3 tabular-nums"
|
|
944
|
-
}, " #" +
|
|
945
|
-
e.showMessageTokensCount && d.metadata?.totalTokens ? (
|
|
944
|
+
}, " #" + V(In.value[x]), 9, Vt)) : A("", !0),
|
|
945
|
+
e.showMessageTokensCount && d.metadata?.totalTokens ? (z(), j("span", Ht, [N(u, {
|
|
946
946
|
name: "ri:ai-generate-2-line",
|
|
947
947
|
class: "shrink-0"
|
|
948
|
-
}),
|
|
949
|
-
e.showMessageDateTime && d.metadata?.createdAt ? (
|
|
948
|
+
}), M("span", Ut, V(H(c)(d.metadata.totalTokens, "integer")) + " " + V(H(i)("label.tokens")), 1)])) : A("", !0),
|
|
949
|
+
e.showMessageDateTime && d.metadata?.createdAt ? (z(), j("time", {
|
|
950
950
|
key: 3,
|
|
951
951
|
datetime: new Date(d.metadata?.createdAt).toISOString(),
|
|
952
952
|
class: "flex items-center gap-4 text-12 text-word-3"
|
|
953
|
-
}, [
|
|
953
|
+
}, [N(u, {
|
|
954
954
|
name: "ri:time-line",
|
|
955
955
|
class: "shrink-0"
|
|
956
|
-
}),
|
|
957
|
-
e.showMessageDateTime && d?.metadata?.completedAt && d?.metadata?.createdAt ? (
|
|
956
|
+
}), M("span", Gt, V(H(s)(new Date(d.metadata?.createdAt), "date-time")), 1)], 8, Wt)) : A("", !0),
|
|
957
|
+
e.showMessageDateTime && d?.metadata?.completedAt && d?.metadata?.createdAt ? (z(), j("div", Kt, [N(u, {
|
|
958
958
|
name: "ri:hourglass-line",
|
|
959
959
|
class: "shrink-0"
|
|
960
|
-
}),
|
|
960
|
+
}), N(ye, {
|
|
961
961
|
class: "truncate",
|
|
962
962
|
date: d.metadata?.createdAt,
|
|
963
963
|
"end-date": d.metadata?.completedAt
|
|
964
|
-
}, null, 8, ["date", "end-date"])])) :
|
|
965
|
-
])) :
|
|
964
|
+
}, null, 8, ["date", "end-date"])])) : A("", !0)
|
|
965
|
+
])) : A("", !0)]),
|
|
966
966
|
_: 2
|
|
967
967
|
}, 1024),
|
|
968
|
-
|
|
969
|
-
default:
|
|
968
|
+
N(D, { mode: "out-in" }, {
|
|
969
|
+
default: W(() => [d.id === e.feedbackMessageId ? (z(), k(be, {
|
|
970
970
|
key: 0,
|
|
971
971
|
ref_for: !0,
|
|
972
972
|
ref_key: "feedbackMessageEl",
|
|
@@ -980,32 +980,32 @@ var pt = ["aria-busy"], mt = {
|
|
|
980
980
|
"loading",
|
|
981
981
|
"submitted",
|
|
982
982
|
"error"
|
|
983
|
-
])) :
|
|
983
|
+
])) : A("", !0)]),
|
|
984
984
|
_: 2
|
|
985
985
|
}, 1024)
|
|
986
|
-
], 6)) :
|
|
986
|
+
], 6)) : A("", !0)
|
|
987
987
|
], 64))), 128)),
|
|
988
|
-
|
|
988
|
+
N(D, {
|
|
989
989
|
appear: "",
|
|
990
990
|
name: "pk-chatbot-part",
|
|
991
991
|
onLeave: gn
|
|
992
992
|
}, {
|
|
993
|
-
default:
|
|
993
|
+
default: W(() => [mn.value ? (z(), j("div", {
|
|
994
994
|
key: 0,
|
|
995
995
|
class: "pk-chatbot-message pk-chatbot-message--assistant pk-chatbot-message--loading",
|
|
996
|
-
style:
|
|
997
|
-
}, [
|
|
996
|
+
style: Ne({ minHeight: hn.value ? `${J.value}px` : void 0 })
|
|
997
|
+
}, [M("div", qt, [M("div", Jt, [N(u, {
|
|
998
998
|
name: "loading-loop",
|
|
999
999
|
class: "shrink-0"
|
|
1000
|
-
}),
|
|
1000
|
+
}), M("span", Yt, V(H(i)("label.answeringOnTheCall")), 1)])])], 4)) : A("", !0)]),
|
|
1001
1001
|
_: 1
|
|
1002
1002
|
}),
|
|
1003
|
-
|
|
1003
|
+
N(D, {
|
|
1004
1004
|
appear: "",
|
|
1005
1005
|
name: "pk-chatbot-part"
|
|
1006
1006
|
}, {
|
|
1007
|
-
default:
|
|
1008
|
-
question: e.hostConfirmation?.question ??
|
|
1007
|
+
default: W(() => [En.value ? (z(), j("div", Xt, [N(lt, {
|
|
1008
|
+
question: e.hostConfirmation?.question ?? H(i)("toolApproval.prompt"),
|
|
1009
1009
|
details: e.hostConfirmation?.details,
|
|
1010
1010
|
unchanged: e.hostConfirmation?.unchanged,
|
|
1011
1011
|
onRespond: n[4] ||= (e) => r("host-confirm-respond", e)
|
|
@@ -1013,36 +1013,36 @@ var pt = ["aria-busy"], mt = {
|
|
|
1013
1013
|
"question",
|
|
1014
1014
|
"details",
|
|
1015
1015
|
"unchanged"
|
|
1016
|
-
])])) :
|
|
1016
|
+
])])) : A("", !0)]),
|
|
1017
1017
|
_: 1
|
|
1018
1018
|
}),
|
|
1019
|
-
|
|
1019
|
+
N(D, {
|
|
1020
1020
|
appear: "",
|
|
1021
1021
|
name: "pk-chatbot-part"
|
|
1022
1022
|
}, {
|
|
1023
|
-
default:
|
|
1023
|
+
default: W(() => [pn.value ? (z(), k(ve, {
|
|
1024
1024
|
key: 0,
|
|
1025
1025
|
error: e.error,
|
|
1026
1026
|
onRetry: n[5] ||= (e) => t.$emit("auto-retry"),
|
|
1027
1027
|
onReset: n[6] ||= (e) => t.$emit("reset-chat")
|
|
1028
|
-
}, null, 8, ["error"])) :
|
|
1028
|
+
}, null, 8, ["error"])) : A("", !0)]),
|
|
1029
1029
|
_: 1
|
|
1030
1030
|
}),
|
|
1031
|
-
un.value?.role === "user" && !hn.value || pn.value ? (
|
|
1031
|
+
un.value?.role === "user" && !hn.value || pn.value ? (z(), j("div", {
|
|
1032
1032
|
key: 0,
|
|
1033
1033
|
class: "pk-chatbot-messages__spacer",
|
|
1034
|
-
style:
|
|
1035
|
-
}, null, 4)) :
|
|
1034
|
+
style: Ne({ minHeight: `${J.value}px` })
|
|
1035
|
+
}, null, 4)) : A("", !0)
|
|
1036
1036
|
], 512),
|
|
1037
|
-
|
|
1038
|
-
default:
|
|
1037
|
+
N(D, { name: "pk-chatbot-messages-fab" }, {
|
|
1038
|
+
default: W(() => [e.showScrollToBottom && (H(qe) || !H(Je)) ? (z(), j("button", {
|
|
1039
1039
|
key: 0,
|
|
1040
1040
|
type: "button",
|
|
1041
1041
|
class: "pk-chatbot-messages__scroll-to-bottom",
|
|
1042
|
-
title:
|
|
1043
|
-
"aria-label":
|
|
1042
|
+
title: H(i)("action.scrollToBottom"),
|
|
1043
|
+
"aria-label": H(i)("action.scrollToBottom"),
|
|
1044
1044
|
onClick: Ye
|
|
1045
|
-
}, [
|
|
1045
|
+
}, [N(u, { name: "ri:arrow-down-line" })], 8, Zt)) : A("", !0)]),
|
|
1046
1046
|
_: 1
|
|
1047
1047
|
})
|
|
1048
1048
|
], 46, pt);
|
|
@@ -1051,4 +1051,4 @@ var pt = ["aria-busy"], mt = {
|
|
|
1051
1051
|
});
|
|
1052
1052
|
export { Qt as t };
|
|
1053
1053
|
|
|
1054
|
-
//# sourceMappingURL=PkChatbotMessages-
|
|
1054
|
+
//# sourceMappingURL=PkChatbotMessages-CLNu2dTm.js.map
|