@pagelines/sdk 1.0.718 → 1.0.719
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/AgentWrap.js +133 -139
- package/dist/AgentWrap.js.map +1 -1
- package/dist/widget.js +1 -1
- package/package.json +1 -1
package/dist/AgentWrap.js
CHANGED
|
@@ -3472,7 +3472,7 @@ g.options = g.setOptions = function(e) {
|
|
|
3472
3472
|
}, g.parseInline = pr.parseInline, g.Parser = dr, g.parser = dr.parse, g.Renderer = y, g.TextRenderer = L, g.Lexer = ur, g.lexer = ur.lex, g.Tokenizer = w, g.Hooks = fr, g.parse = g, g.options, g.setOptions, g.use, g.walkTokens, g.parseInline, dr.parse, ur.lex;
|
|
3473
3473
|
//#endregion
|
|
3474
3474
|
//#region agent/ui/ChatCardBlock.vue?vue&type=script&setup=true&lang.ts
|
|
3475
|
-
var mr = ["aria-label"], hr = ["innerHTML"],
|
|
3475
|
+
var mr = ["aria-label"], hr = { class: "px-4 pb-2 pt-4" }, gr = ["innerHTML"], _r = ["onClick"], vr = /* @__PURE__ */ x({
|
|
3476
3476
|
__name: "ChatCardBlock",
|
|
3477
3477
|
props: {
|
|
3478
3478
|
spec: {},
|
|
@@ -3484,38 +3484,32 @@ var mr = ["aria-label"], hr = ["innerHTML"], gr = ["onClick"], _r = /* @__PURE__
|
|
|
3484
3484
|
if (!n.spec.body) return "";
|
|
3485
3485
|
let e = g.parse(n.spec.body, { async: !1 });
|
|
3486
3486
|
return Qt.sanitize(e, { ADD_ATTR: ["target"] });
|
|
3487
|
-
}), a = p(() => n.inverted ? "rgba(255, 255, 255, 0.
|
|
3487
|
+
}), a = p(() => n.inverted ? "rgba(255, 255, 255, 0.22)" : "rgba(0, 0, 0, 0.16)"), o = p(() => n.inverted ? "rgba(255, 255, 255, 0.12)" : "color-mix(in oklch, var(--color-theme-200) 80%, transparent)"), s = p(() => n.inverted ? "rgba(255, 255, 255, 0.95)" : "var(--color-theme-900)"), c = p(() => n.inverted ? "rgba(255, 255, 255, 0.8)" : "var(--color-theme-800)"), u = p(() => n.inverted ? `inset 0 0 0 1px ${a.value}` : `inset 0 0 0 1px ${a.value}, 0 4px 16px rgba(15, 23, 42, 0.05)`);
|
|
3488
3488
|
function actionStyle(e) {
|
|
3489
|
-
return e === "primary" ? {
|
|
3489
|
+
return e === "primary" || e === "destructive" ? {
|
|
3490
3490
|
background: n.inverted ? "rgba(255, 255, 255, 0.92)" : "var(--color-theme-900)",
|
|
3491
3491
|
color: n.inverted ? "var(--color-theme-900)" : "#fff"
|
|
3492
|
-
} : e === "destructive" ? {
|
|
3493
|
-
background: "transparent",
|
|
3494
|
-
color: "#D93025"
|
|
3495
3492
|
} : {
|
|
3496
|
-
background: "
|
|
3493
|
+
background: "var(--color-theme-100)",
|
|
3497
3494
|
color: s.value
|
|
3498
3495
|
};
|
|
3499
3496
|
}
|
|
3500
3497
|
return (t, n) => (T(), _("div", {
|
|
3501
3498
|
"data-test": "chat-card",
|
|
3502
|
-
class: "my-6 w-full max-w-[55ch] self-start overflow-hidden rounded-
|
|
3499
|
+
class: "my-6 w-full max-w-[55ch] self-start overflow-hidden rounded-2xl",
|
|
3503
3500
|
style: C({ boxShadow: u.value }),
|
|
3504
3501
|
"aria-label": e.spec.title
|
|
3505
3502
|
}, [
|
|
3506
|
-
v("div", {
|
|
3507
|
-
class: "px-4 pb-3 pt-3.5",
|
|
3508
|
-
style: C(i.value ? { borderBottom: `1px solid ${o.value}` } : void 0)
|
|
3509
|
-
}, [v("div", {
|
|
3503
|
+
v("div", hr, [v("div", {
|
|
3510
3504
|
class: "text-[14px] font-semibold leading-tight",
|
|
3511
3505
|
style: C({ color: s.value })
|
|
3512
|
-
}, P(e.spec.title), 5)]
|
|
3506
|
+
}, P(e.spec.title), 5)]),
|
|
3513
3507
|
i.value ? (T(), _("div", {
|
|
3514
3508
|
key: 0,
|
|
3515
|
-
class: "chat-msg-prose px-4
|
|
3509
|
+
class: "chat-msg-prose px-4 pb-4 pt-2 text-[14px] leading-relaxed",
|
|
3516
3510
|
style: C({ color: c.value }),
|
|
3517
3511
|
innerHTML: i.value
|
|
3518
|
-
}, null, 12,
|
|
3512
|
+
}, null, 12, gr)) : h("", !0),
|
|
3519
3513
|
e.spec.actions?.length ? (T(), _("div", {
|
|
3520
3514
|
key: 1,
|
|
3521
3515
|
class: "flex flex-wrap items-center gap-2 px-3 py-2.5",
|
|
@@ -3527,15 +3521,15 @@ var mr = ["aria-label"], hr = ["innerHTML"], gr = ["onClick"], _r = /* @__PURE__
|
|
|
3527
3521
|
class: "inline-flex h-10 items-center justify-center rounded-full px-5 text-[14px] font-semibold transition-colors duration-150 active:opacity-80",
|
|
3528
3522
|
style: C(actionStyle(e.style)),
|
|
3529
3523
|
onClick: (t) => r("action", e.reply)
|
|
3530
|
-
}, P(e.label), 13,
|
|
3524
|
+
}, P(e.label), 13, _r))), 128))], 4)) : h("", !0)
|
|
3531
3525
|
], 12, mr));
|
|
3532
3526
|
}
|
|
3533
|
-
}),
|
|
3527
|
+
}), yr = 112, br = 52, xr = 14, Sr = 54, Cr = 34, wr = 260;
|
|
3534
3528
|
function nodeWidthFor(e) {
|
|
3535
3529
|
let { orientation: t, maxRows: n, maxWidth: r } = e;
|
|
3536
|
-
if (t === "horizontal" || !r) return
|
|
3537
|
-
let i = r -
|
|
3538
|
-
return Math.min(
|
|
3530
|
+
if (t === "horizontal" || !r) return yr;
|
|
3531
|
+
let i = r - xr * 2 - (n - 1) * Sr;
|
|
3532
|
+
return Math.min(wr, Math.max(yr, Math.floor(i / n)));
|
|
3539
3533
|
}
|
|
3540
3534
|
function orientationFor(e) {
|
|
3541
3535
|
return e.layout === "left-to-right" || e.layout === "radial" ? "horizontal" : e.layout === "top-to-bottom" ? "vertical" : e.diagramType === "sequence" ? "horizontal" : "vertical";
|
|
@@ -3572,11 +3566,11 @@ function buildLayout(e, t, n) {
|
|
|
3572
3566
|
orientation: t,
|
|
3573
3567
|
maxRows: o,
|
|
3574
3568
|
...n === void 0 ? {} : { maxWidth: n }
|
|
3575
|
-
}), u = t === "horizontal" ?
|
|
3569
|
+
}), u = t === "horizontal" ? xr * 2 + s * c + (s - 1) * Sr : xr * 2 + o * c + (o - 1) * Sr, f = t === "horizontal" ? xr * 2 + o * br + (o - 1) * Cr : xr * 2 + s * br + (s - 1) * Cr, p = [];
|
|
3576
3570
|
for (let [e, [, n]] of a.entries()) {
|
|
3577
|
-
let r = (o - n.length) * (t === "horizontal" ? 86 : c +
|
|
3571
|
+
let r = (o - n.length) * (t === "horizontal" ? 86 : c + Sr) / 2;
|
|
3578
3572
|
for (let [i, a] of n.entries()) {
|
|
3579
|
-
let n = t === "horizontal" ?
|
|
3573
|
+
let n = t === "horizontal" ? xr + e * (c + Sr) : xr + r + i * (c + Sr), o = t === "horizontal" ? xr + r + i * 86 : xr + e * 86;
|
|
3580
3574
|
p.push({
|
|
3581
3575
|
id: a.id,
|
|
3582
3576
|
label: a.label,
|
|
@@ -3585,7 +3579,7 @@ function buildLayout(e, t, n) {
|
|
|
3585
3579
|
x: n,
|
|
3586
3580
|
y: o,
|
|
3587
3581
|
width: c,
|
|
3588
|
-
height:
|
|
3582
|
+
height: br
|
|
3589
3583
|
});
|
|
3590
3584
|
}
|
|
3591
3585
|
}
|
|
@@ -3662,14 +3656,14 @@ function formatChatVisualTick(e) {
|
|
|
3662
3656
|
let { prefix: r, suffix: i } = affixes(n);
|
|
3663
3657
|
return `${r}${formatChatVisualValue({ value: t })}${i}`;
|
|
3664
3658
|
}
|
|
3665
|
-
var
|
|
3659
|
+
var Tr = 5.4, Er = 10, Dr = 15, Or = 16;
|
|
3666
3660
|
function planChatVisualXLabels(e) {
|
|
3667
3661
|
let { labels: t, plotWidth: n } = e;
|
|
3668
3662
|
if (!t.length || n <= 0) return {
|
|
3669
3663
|
mode: "horizontal",
|
|
3670
3664
|
entries: []
|
|
3671
3665
|
};
|
|
3672
|
-
let r = t.map((e) => e.length >
|
|
3666
|
+
let r = t.map((e) => e.length > Or ? `${e.slice(0, Or - 1).trimEnd()}\u2026` : e), i = t.length - 1;
|
|
3673
3667
|
if (i === 0) return {
|
|
3674
3668
|
mode: "horizontal",
|
|
3675
3669
|
entries: [{
|
|
@@ -3677,14 +3671,14 @@ function planChatVisualXLabels(e) {
|
|
|
3677
3671
|
text: r[0]
|
|
3678
3672
|
}]
|
|
3679
3673
|
};
|
|
3680
|
-
if ((Math.max(...r.map((e) => e.length *
|
|
3674
|
+
if ((Math.max(...r.map((e) => e.length * Tr)) + Er) * t.length <= n) return {
|
|
3681
3675
|
mode: "horizontal",
|
|
3682
3676
|
entries: r.map((e, t) => ({
|
|
3683
3677
|
index: t,
|
|
3684
3678
|
text: e
|
|
3685
3679
|
}))
|
|
3686
3680
|
};
|
|
3687
|
-
let a = Math.max(2, Math.floor(n /
|
|
3681
|
+
let a = Math.max(2, Math.floor(n / Dr));
|
|
3688
3682
|
if (t.length <= a) return {
|
|
3689
3683
|
mode: "angled",
|
|
3690
3684
|
entries: r.map((e, t) => ({
|
|
@@ -3704,22 +3698,22 @@ function planChatVisualXLabels(e) {
|
|
|
3704
3698
|
}
|
|
3705
3699
|
//#endregion
|
|
3706
3700
|
//#region agent/ui/ChatVisualBlock.vue?vue&type=script&setup=true&lang.ts
|
|
3707
|
-
var
|
|
3701
|
+
var kr = [
|
|
3708
3702
|
"data-visual-type",
|
|
3709
3703
|
"data-chart-type",
|
|
3710
3704
|
"data-stacking",
|
|
3711
3705
|
"data-diagram-type",
|
|
3712
3706
|
"aria-label"
|
|
3713
|
-
],
|
|
3707
|
+
], Ar = { class: "mb-2.5" }, jr = ["aria-label"], Mr = {
|
|
3714
3708
|
key: 0,
|
|
3715
3709
|
"data-test": "chat-visual-horizontal-bars",
|
|
3716
3710
|
class: "grid gap-3"
|
|
3717
|
-
},
|
|
3711
|
+
}, Nr = { class: "mb-1 flex items-start justify-between gap-3 text-[12px]" }, Pr = ["viewBox"], Fr = [
|
|
3718
3712
|
"x1",
|
|
3719
3713
|
"x2",
|
|
3720
3714
|
"y1",
|
|
3721
3715
|
"y2"
|
|
3722
|
-
],
|
|
3716
|
+
], Ir = ["x", "y"], Lr = [
|
|
3723
3717
|
"data-row-index",
|
|
3724
3718
|
"data-series-index",
|
|
3725
3719
|
"data-data-key",
|
|
@@ -3727,35 +3721,35 @@ var Or = [
|
|
|
3727
3721
|
"y",
|
|
3728
3722
|
"width",
|
|
3729
3723
|
"height"
|
|
3730
|
-
],
|
|
3724
|
+
], Rr = ["data-trend-key", "d"], zr = ["d"], Br = ["cx", "cy"], Vr = ["cx", "cy"], Hr = [
|
|
3731
3725
|
"x",
|
|
3732
3726
|
"y",
|
|
3733
3727
|
"text-anchor",
|
|
3734
3728
|
"transform"
|
|
3735
|
-
],
|
|
3729
|
+
], Ur = {
|
|
3736
3730
|
key: 2,
|
|
3737
3731
|
class: "mt-2.5 flex flex-wrap items-center gap-x-4 gap-y-1.5"
|
|
3738
|
-
},
|
|
3732
|
+
}, Wr = {
|
|
3739
3733
|
key: 1,
|
|
3740
3734
|
class: "grid gap-3"
|
|
3741
|
-
},
|
|
3735
|
+
}, Gr = { class: "mb-1 flex items-baseline justify-between gap-3 text-[12px]" }, Kr = { class: "shrink-0 tabular-nums" }, qr = {
|
|
3742
3736
|
key: 2,
|
|
3743
3737
|
class: "overflow-x-auto"
|
|
3744
|
-
},
|
|
3738
|
+
}, Jr = ["viewBox", "aria-label"], Yr = [
|
|
3745
3739
|
"data-from",
|
|
3746
3740
|
"data-to",
|
|
3747
3741
|
"x1",
|
|
3748
3742
|
"y1",
|
|
3749
3743
|
"x2",
|
|
3750
3744
|
"y2"
|
|
3751
|
-
],
|
|
3745
|
+
], Xr = ["cx", "cy"], Zr = ["x", "y"], Qr = [
|
|
3752
3746
|
"data-node-id",
|
|
3753
3747
|
"data-node-kind",
|
|
3754
3748
|
"transform"
|
|
3755
|
-
],
|
|
3749
|
+
], $r = ["points"], ei = ["width", "height"], ti = ["width", "height"], ni = {
|
|
3756
3750
|
xmlns: "http://www.w3.org/1999/xhtml",
|
|
3757
3751
|
class: "flex h-full min-w-0 flex-col items-center justify-center text-center"
|
|
3758
|
-
},
|
|
3752
|
+
}, ri = /* @__PURE__ */ x({
|
|
3759
3753
|
__name: "ChatVisualBlock",
|
|
3760
3754
|
props: {
|
|
3761
3755
|
result: {},
|
|
@@ -4057,7 +4051,7 @@ var Or = [
|
|
|
4057
4051
|
style: C({ boxShadow: `inset 0 0 0 1px ${W.value}` }),
|
|
4058
4052
|
"aria-label": o.value.meta.title
|
|
4059
4053
|
}, [
|
|
4060
|
-
v("header",
|
|
4054
|
+
v("header", Ar, [v("h4", {
|
|
4061
4055
|
class: "text-[13px] font-semibold leading-tight",
|
|
4062
4056
|
style: C({ color: B.value })
|
|
4063
4057
|
}, P(o.value.meta.title), 5), o.value.meta.description ? (T(), _("p", {
|
|
@@ -4072,11 +4066,11 @@ var Or = [
|
|
|
4072
4066
|
key: 0,
|
|
4073
4067
|
role: "img",
|
|
4074
4068
|
"aria-label": o.value.meta.title
|
|
4075
|
-
}, [pe.value.length ? (T(), _("div",
|
|
4069
|
+
}, [pe.value.length ? (T(), _("div", Mr, [(T(!0), _(f, null, A(pe.value, (e) => (T(), _("div", {
|
|
4076
4070
|
key: e.key,
|
|
4077
4071
|
"data-test": "chat-visual-horizontal-bar",
|
|
4078
4072
|
class: "min-w-0"
|
|
4079
|
-
}, [v("div",
|
|
4073
|
+
}, [v("div", Nr, [v("span", {
|
|
4080
4074
|
class: "line-clamp-2 min-w-0 font-medium leading-snug",
|
|
4081
4075
|
style: C({ color: B.value })
|
|
4082
4076
|
}, P(e.label), 5), v("span", {
|
|
@@ -4108,7 +4102,7 @@ var Or = [
|
|
|
4108
4102
|
"stroke-width": "1",
|
|
4109
4103
|
"vector-effect": "non-scaling-stroke",
|
|
4110
4104
|
style: C({ stroke: e === 0 ? U.value : be.value })
|
|
4111
|
-
}, null, 12,
|
|
4105
|
+
}, null, 12, Fr))), 128)),
|
|
4112
4106
|
v("g", null, [(T(!0), _(f, null, A(S.value.ticks, (e) => (T(), _("text", {
|
|
4113
4107
|
key: `y-${e}`,
|
|
4114
4108
|
x: j.value.left - 7,
|
|
@@ -4119,7 +4113,7 @@ var Or = [
|
|
|
4119
4113
|
}, P(ce(formatChatVisualTick)({
|
|
4120
4114
|
value: e,
|
|
4121
4115
|
shared: ae.value
|
|
4122
|
-
})), 13,
|
|
4116
|
+
})), 13, Ir))), 128))]),
|
|
4123
4117
|
m.value.chartType === "bar" ? (T(!0), _(f, { key: 0 }, A(de.value, (e) => (T(), _("rect", {
|
|
4124
4118
|
key: e.key,
|
|
4125
4119
|
"data-test": "chat-visual-bar",
|
|
@@ -4132,7 +4126,7 @@ var Or = [
|
|
|
4132
4126
|
height: e.height,
|
|
4133
4127
|
rx: "2.5",
|
|
4134
4128
|
style: C({ fill: seriesColor(e.seriesIndex) })
|
|
4135
|
-
}, null, 12,
|
|
4129
|
+
}, null, 12, Lr))), 128)) : (T(), _(f, { key: 1 }, [
|
|
4136
4130
|
ue.value ? (T(), _("path", {
|
|
4137
4131
|
key: 0,
|
|
4138
4132
|
"data-test": "chat-visual-trend-line",
|
|
@@ -4145,7 +4139,7 @@ var Or = [
|
|
|
4145
4139
|
"stroke-dasharray": "4 3",
|
|
4146
4140
|
"vector-effect": "non-scaling-stroke",
|
|
4147
4141
|
style: C({ stroke: seriesColor(ue.value.seriesIndex) })
|
|
4148
|
-
}, null, 12,
|
|
4142
|
+
}, null, 12, Rr)) : h("", !0),
|
|
4149
4143
|
(T(!0), _(f, null, A(te.value, (e, t) => (T(), _("g", { key: e.dataKey }, [m.value.chartType === "line" ? (T(), _("path", {
|
|
4150
4144
|
key: 0,
|
|
4151
4145
|
d: pathForSeries(e.dataKey),
|
|
@@ -4155,20 +4149,20 @@ var Or = [
|
|
|
4155
4149
|
"stroke-linejoin": "round",
|
|
4156
4150
|
"vector-effect": "non-scaling-stroke",
|
|
4157
4151
|
style: C({ stroke: seriesColor(t) })
|
|
4158
|
-
}, null, 12,
|
|
4152
|
+
}, null, 12, zr)) : h("", !0), (T(!0), _(f, null, A(u.value, (n, r) => (T(), _(f, { key: `${e.dataKey}-${r}` }, [m.value.chartType === "scatter" ? (T(), _("circle", {
|
|
4159
4153
|
key: 0,
|
|
4160
4154
|
cx: xForIndex(r, u.value.length),
|
|
4161
4155
|
cy: yForValue(numericValue(n[e.dataKey]) ?? 0),
|
|
4162
4156
|
r: "2.6",
|
|
4163
4157
|
style: C({ fill: seriesColor(t) })
|
|
4164
|
-
}, null, 12,
|
|
4158
|
+
}, null, 12, Br)) : h("", !0)], 64))), 128))]))), 128)),
|
|
4165
4159
|
(T(!0), _(f, null, A(I.value, (e) => (T(), _("circle", {
|
|
4166
4160
|
key: `marker-${e.key}`,
|
|
4167
4161
|
cx: e.cx,
|
|
4168
4162
|
cy: e.cy,
|
|
4169
4163
|
r: "3",
|
|
4170
4164
|
style: C({ fill: seriesColor(e.seriesIndex) })
|
|
4171
|
-
}, null, 12,
|
|
4165
|
+
}, null, 12, Vr))), 128))
|
|
4172
4166
|
], 64)),
|
|
4173
4167
|
(T(!0), _(f, null, A(F.value, (e) => (T(), _("text", {
|
|
4174
4168
|
key: e.key,
|
|
@@ -4178,8 +4172,8 @@ var Or = [
|
|
|
4178
4172
|
"font-size": "9.5",
|
|
4179
4173
|
transform: e.angled ? `rotate(${ce(-40)} ${e.x} ${j.value.height - j.value.bottom + 12})` : void 0,
|
|
4180
4174
|
style: C({ fill: H.value })
|
|
4181
|
-
}, P(e.label), 13,
|
|
4182
|
-
], 12,
|
|
4175
|
+
}, P(e.label), 13, Hr))), 128))
|
|
4176
|
+
], 12, Pr)), he.value.length > 1 || m.value.chartType !== "bar" ? (T(), _("div", Ur, [(T(!0), _(f, null, A(he.value, (e) => (T(), _("div", {
|
|
4183
4177
|
key: e.key,
|
|
4184
4178
|
class: "inline-flex items-center gap-1.5 text-[11.5px] leading-none"
|
|
4185
4179
|
}, [
|
|
@@ -4192,10 +4186,10 @@ var Or = [
|
|
|
4192
4186
|
class: "font-semibold tabular-nums",
|
|
4193
4187
|
style: C({ color: B.value })
|
|
4194
4188
|
}, P(e.value), 5)
|
|
4195
|
-
]))), 128))])) : h("", !0)], 8,
|
|
4189
|
+
]))), 128))])) : h("", !0)], 8, jr)) : b.value ? (T(), _("div", Wr, [(T(!0), _(f, null, A(R.value, (e, t) => (T(), _("div", { key: e.key }, [v("div", Gr, [v("span", {
|
|
4196
4190
|
class: "truncate font-medium",
|
|
4197
4191
|
style: C({ color: B.value })
|
|
4198
|
-
}, P(e.name), 5), v("span",
|
|
4192
|
+
}, P(e.name), 5), v("span", Kr, [v("span", {
|
|
4199
4193
|
class: "font-semibold",
|
|
4200
4194
|
style: C({ color: B.value })
|
|
4201
4195
|
}, P(e.display), 5), v("span", {
|
|
@@ -4210,7 +4204,7 @@ var Or = [
|
|
|
4210
4204
|
width: `${Math.max(2, e.percent * 100)}%`,
|
|
4211
4205
|
background: seriesColor(t)
|
|
4212
4206
|
})
|
|
4213
|
-
}, null, 4)], 4)]))), 128))])) : c.value && z.value ? (T(), _("div",
|
|
4207
|
+
}, null, 4)], 4)]))), 128))])) : c.value && z.value ? (T(), _("div", qr, [(T(), _("svg", {
|
|
4214
4208
|
"data-test": "chat-visual-diagram-svg",
|
|
4215
4209
|
class: "block h-auto overflow-visible",
|
|
4216
4210
|
viewBox: `0 0 ${z.value.width} ${z.value.height}`,
|
|
@@ -4234,14 +4228,14 @@ var Or = [
|
|
|
4234
4228
|
"stroke-linecap": "round",
|
|
4235
4229
|
"vector-effect": "non-scaling-stroke",
|
|
4236
4230
|
style: C({ stroke: Ce.value })
|
|
4237
|
-
}, null, 12,
|
|
4231
|
+
}, null, 12, Yr))), 128)),
|
|
4238
4232
|
(T(!0), _(f, null, A(z.value.edges, (e) => (T(), _("circle", {
|
|
4239
4233
|
key: `${e.key}-dot`,
|
|
4240
4234
|
cx: e.x2,
|
|
4241
4235
|
cy: e.y2,
|
|
4242
4236
|
r: "2.4",
|
|
4243
4237
|
style: C({ fill: Ce.value })
|
|
4244
|
-
}, null, 12,
|
|
4238
|
+
}, null, 12, Xr))), 128)),
|
|
4245
4239
|
(T(!0), _(f, null, A(z.value.edges.filter((e) => e.label), (e) => (T(), _("foreignObject", {
|
|
4246
4240
|
key: `${e.key}-label`,
|
|
4247
4241
|
x: e.labelX - 55,
|
|
@@ -4255,7 +4249,7 @@ var Or = [
|
|
|
4255
4249
|
color: ye.value,
|
|
4256
4250
|
background: t.inverted ? "var(--color-theme-900)" : "var(--color-theme-0)"
|
|
4257
4251
|
})
|
|
4258
|
-
}, P(e.label), 5)], 8,
|
|
4252
|
+
}, P(e.label), 5)], 8, Zr))), 128)),
|
|
4259
4253
|
(T(!0), _(f, null, A(z.value.nodes, (e) => (T(), _("g", {
|
|
4260
4254
|
key: e.id,
|
|
4261
4255
|
"data-test": "chat-visual-diagram-node",
|
|
@@ -4271,7 +4265,7 @@ var Or = [
|
|
|
4271
4265
|
fill: diagramNodeFill(e.kind),
|
|
4272
4266
|
stroke: diagramNodeStroke(e.kind)
|
|
4273
4267
|
})
|
|
4274
|
-
}, null, 12,
|
|
4268
|
+
}, null, 12, $r)) : (T(), _("rect", {
|
|
4275
4269
|
key: 1,
|
|
4276
4270
|
width: e.width,
|
|
4277
4271
|
height: e.height,
|
|
@@ -4282,28 +4276,28 @@ var Or = [
|
|
|
4282
4276
|
fill: diagramNodeFill(e.kind),
|
|
4283
4277
|
stroke: diagramNodeStroke(e.kind)
|
|
4284
4278
|
})
|
|
4285
|
-
}, null, 12,
|
|
4279
|
+
}, null, 12, ei)), (T(), _("foreignObject", {
|
|
4286
4280
|
x: "8",
|
|
4287
4281
|
y: "5",
|
|
4288
4282
|
width: e.width - 16,
|
|
4289
4283
|
height: e.height - 10
|
|
4290
|
-
}, [v("div",
|
|
4284
|
+
}, [v("div", ni, [v("div", {
|
|
4291
4285
|
class: "line-clamp-2 text-[13px] font-semibold leading-tight",
|
|
4292
4286
|
style: C({ color: B.value })
|
|
4293
4287
|
}, P(e.label), 5), e.detail ? (T(), _("div", {
|
|
4294
4288
|
key: 0,
|
|
4295
4289
|
class: "mt-0.5 line-clamp-1 text-[10.5px] leading-none",
|
|
4296
4290
|
style: C({ color: ye.value })
|
|
4297
|
-
}, P(e.detail), 5)) : h("", !0)])], 8,
|
|
4298
|
-
], 12,
|
|
4291
|
+
}, P(e.detail), 5)) : h("", !0)])], 8, ti))], 8, Qr))), 128))
|
|
4292
|
+
], 12, Jr))])) : h("", !0)], 512),
|
|
4299
4293
|
o.value.meta.footer ? (T(), _("footer", {
|
|
4300
4294
|
key: 0,
|
|
4301
4295
|
class: "mt-3 text-[11px] leading-snug",
|
|
4302
4296
|
style: C({ color: H.value })
|
|
4303
4297
|
}, P(o.value.meta.footer), 5)) : h("", !0)
|
|
4304
|
-
], 12,
|
|
4298
|
+
], 12, kr)) : h("", !0);
|
|
4305
4299
|
}
|
|
4306
|
-
}),
|
|
4300
|
+
}), ii = ["innerHTML"], ai = /* @__PURE__ */ x({
|
|
4307
4301
|
__name: "ChatRichText",
|
|
4308
4302
|
props: {
|
|
4309
4303
|
text: {},
|
|
@@ -4481,11 +4475,11 @@ var Or = [
|
|
|
4481
4475
|
key: 0,
|
|
4482
4476
|
class: S(["chat-msg-prose", e.inverted ? "chat-msg-prose-invert" : ""]),
|
|
4483
4477
|
innerHTML: t.html
|
|
4484
|
-
}, null, 10,
|
|
4478
|
+
}, null, 10, ii)) : t.kind === "visual" ? (T(), m(ri, {
|
|
4485
4479
|
key: 1,
|
|
4486
4480
|
result: t.result,
|
|
4487
4481
|
inverted: e.inverted
|
|
4488
|
-
}, null, 8, ["result", "inverted"])) : t.kind === "card" ? (T(), m(
|
|
4482
|
+
}, null, 8, ["result", "inverted"])) : t.kind === "card" ? (T(), m(vr, {
|
|
4489
4483
|
key: 2,
|
|
4490
4484
|
spec: t.spec,
|
|
4491
4485
|
inverted: e.inverted,
|
|
@@ -4504,7 +4498,7 @@ var Or = [
|
|
|
4504
4498
|
style: { background: "currentcolor" }
|
|
4505
4499
|
}, null, -1), te(" Preparing chart… ", -1)])], 4))], 64))), 128))], 32));
|
|
4506
4500
|
}
|
|
4507
|
-
}),
|
|
4501
|
+
}), oi = 80, si = 600, ci = /* @__PURE__ */ x({
|
|
4508
4502
|
__name: "ChatScroller",
|
|
4509
4503
|
setup(e, { expose: t }) {
|
|
4510
4504
|
let n = k(), r = k(), i = k(!0), a, o = 0;
|
|
@@ -4514,10 +4508,10 @@ var Or = [
|
|
|
4514
4508
|
}
|
|
4515
4509
|
function onScroll() {
|
|
4516
4510
|
let e = n.value;
|
|
4517
|
-
e && (i.value = e.scrollHeight - e.scrollTop - e.clientHeight <=
|
|
4511
|
+
e && (i.value = e.scrollHeight - e.scrollTop - e.clientHeight <= oi);
|
|
4518
4512
|
}
|
|
4519
4513
|
function markUserGesture() {
|
|
4520
|
-
o = Date.now() +
|
|
4514
|
+
o = Date.now() + si;
|
|
4521
4515
|
}
|
|
4522
4516
|
function pin() {
|
|
4523
4517
|
i.value = !0, scrollToBottom();
|
|
@@ -4543,24 +4537,24 @@ var Or = [
|
|
|
4543
4537
|
class: "flex-1 flex flex-col"
|
|
4544
4538
|
}, [oe(e.$slots, "default")], 512)], 34));
|
|
4545
4539
|
}
|
|
4546
|
-
}),
|
|
4540
|
+
}), li = {
|
|
4547
4541
|
key: 0,
|
|
4548
4542
|
class: "pb-4"
|
|
4549
|
-
},
|
|
4543
|
+
}, ui = {
|
|
4550
4544
|
key: 1,
|
|
4551
4545
|
"data-test": "messaging-sdk-header",
|
|
4552
4546
|
class: "shrink-0 border-b border-theme-100 px-4 py-3"
|
|
4553
|
-
},
|
|
4547
|
+
}, di = { class: "min-w-0 flex-1" }, fi = { class: "truncate text-base font-semibold leading-tight text-theme-900" }, pi = { class: "mt-1 truncate text-sm leading-tight text-theme-500" }, mi = {
|
|
4554
4548
|
key: 0,
|
|
4555
4549
|
class: "shrink-0 rounded-full bg-theme-50 px-2.5 py-1 font-mono text-[11px] font-medium text-theme-500"
|
|
4556
|
-
},
|
|
4550
|
+
}, hi = {
|
|
4557
4551
|
key: 0,
|
|
4558
4552
|
"data-test": "messaging-empty-state",
|
|
4559
4553
|
class: "flex flex-col items-center justify-center px-4"
|
|
4560
|
-
},
|
|
4554
|
+
}, gi = ["title"], _i = {
|
|
4561
4555
|
key: 0,
|
|
4562
4556
|
class: "flex items-center gap-3 py-3 px-2"
|
|
4563
|
-
},
|
|
4557
|
+
}, vi = ["data-journal-outcome"], yi = [
|
|
4564
4558
|
"data-message-id",
|
|
4565
4559
|
"data-message-sender",
|
|
4566
4560
|
"data-conversation-id",
|
|
@@ -4571,7 +4565,7 @@ var Or = [
|
|
|
4571
4565
|
"data-issue-action-label",
|
|
4572
4566
|
"data-issue-action-url",
|
|
4573
4567
|
"data-streaming"
|
|
4574
|
-
],
|
|
4568
|
+
], bi = { class: "max-w-[85%] min-w-0" }, xi = ["href"], Si = [
|
|
4575
4569
|
"data-message-id",
|
|
4576
4570
|
"data-message-sender",
|
|
4577
4571
|
"data-conversation-id",
|
|
@@ -4580,7 +4574,7 @@ var Or = [
|
|
|
4580
4574
|
"data-issue-code",
|
|
4581
4575
|
"data-issue-bucket",
|
|
4582
4576
|
"data-streaming"
|
|
4583
|
-
],
|
|
4577
|
+
], Ci = [
|
|
4584
4578
|
"data-test",
|
|
4585
4579
|
"data-message-id",
|
|
4586
4580
|
"data-message-sender",
|
|
@@ -4588,51 +4582,51 @@ var Or = [
|
|
|
4588
4582
|
"data-message-sequence",
|
|
4589
4583
|
"data-system-kind",
|
|
4590
4584
|
"data-streaming"
|
|
4591
|
-
],
|
|
4585
|
+
], wi = ["src", "alt"], Ti = ["src"], Ei = ["href"], Di = {
|
|
4592
4586
|
key: 0,
|
|
4593
4587
|
"data-test": "messaging-message-text-part"
|
|
4594
|
-
},
|
|
4588
|
+
}, Oi = [
|
|
4595
4589
|
"src",
|
|
4596
4590
|
"alt",
|
|
4597
4591
|
"data-attachment-placement"
|
|
4598
|
-
],
|
|
4592
|
+
], ki = ["src", "data-attachment-placement"], Ai = ["href", "data-attachment-placement"], ji = ["data-journal-outcome"], Mi = {
|
|
4599
4593
|
key: 2,
|
|
4600
4594
|
"data-test": "messaging-tool-activity-tail",
|
|
4601
4595
|
"aria-label": "Assistant is still working",
|
|
4602
4596
|
class: "mb-4 grid h-[17px] w-5 place-items-center"
|
|
4603
|
-
},
|
|
4597
|
+
}, Ni = ["data-journal-outcome"], Pi = ["data-working-description"], Fi = { class: "truncate" }, Ii = ["data-issue-code"], Li = ["href"], Ri = {
|
|
4604
4598
|
key: 3,
|
|
4605
4599
|
"data-test": "messaging-thinking-indicator",
|
|
4606
4600
|
class: "flex gap-2 justify-start items-center mb-4"
|
|
4607
|
-
},
|
|
4601
|
+
}, zi = ["src", "alt"], Bi = { class: "max-w-20 truncate" }, Vi = ["onClick"], Hi = {
|
|
4608
4602
|
key: 0,
|
|
4609
4603
|
class: "shrink-0 flex items-center justify-center size-14"
|
|
4610
|
-
},
|
|
4604
|
+
}, Ui = ["data-composer-action"], Wi = ["placeholder", "disabled"], Gi = { class: "font-mono text-sm tabular-nums" }, Ki = { class: "mt-2.5 flex items-center" }, qi = [
|
|
4611
4605
|
"disabled",
|
|
4612
4606
|
"aria-label",
|
|
4613
4607
|
"title"
|
|
4614
|
-
],
|
|
4608
|
+
], Ji = {
|
|
4615
4609
|
key: 0,
|
|
4616
4610
|
class: "i-svg-spinners-ring-resize size-5"
|
|
4617
|
-
},
|
|
4611
|
+
}, Yi = {
|
|
4618
4612
|
key: 1,
|
|
4619
4613
|
class: "i-tabler-plus size-5"
|
|
4620
|
-
},
|
|
4614
|
+
}, Xi = { class: "sr-only" }, Zi = { class: "flex items-center gap-2" }, Qi = ["aria-label", "title"], $i = { class: "sr-only" }, ea = [
|
|
4621
4615
|
"data-composer-action",
|
|
4622
4616
|
"disabled",
|
|
4623
4617
|
"aria-label",
|
|
4624
4618
|
"title"
|
|
4625
|
-
],
|
|
4619
|
+
], ta = {
|
|
4626
4620
|
key: 0,
|
|
4627
4621
|
class: "i-tabler-player-stop-filled size-3.5"
|
|
4628
|
-
},
|
|
4622
|
+
}, na = {
|
|
4629
4623
|
key: 1,
|
|
4630
4624
|
class: "i-tabler-arrow-up size-[17px]"
|
|
4631
|
-
},
|
|
4625
|
+
}, ra = { class: "sr-only" }, ia = {
|
|
4632
4626
|
key: 2,
|
|
4633
4627
|
"data-test": "messaging-suggested-prompts",
|
|
4634
4628
|
class: "mt-5 w-full sm:mx-auto sm:max-w-[720px]"
|
|
4635
|
-
},
|
|
4629
|
+
}, aa = { class: "flex flex-col gap-2 sm:flex-row sm:flex-wrap sm:items-center sm:justify-center" }, oa = ["disabled", "onClick"], sa = ["aria-expanded"], ca = /* @__PURE__ */ x({
|
|
4636
4630
|
__name: "ElAgentChat",
|
|
4637
4631
|
props: {
|
|
4638
4632
|
chatController: {},
|
|
@@ -4843,17 +4837,17 @@ var Or = [
|
|
|
4843
4837
|
})}, ${a}`;
|
|
4844
4838
|
}
|
|
4845
4839
|
return (t, s) => (T(), _("div", { class: S(["@container/chat relative flex h-full flex-col", R.value.length === 0 ? "min-h-0 [justify-content:safe_center] overflow-y-auto" : ""]) }, [
|
|
4846
|
-
e.showHeader && !K.value ? (T(), _("div",
|
|
4840
|
+
e.showHeader && !K.value ? (T(), _("div", li, [b(Pe, {
|
|
4847
4841
|
agent: e.agent,
|
|
4848
4842
|
"is-online": c.value
|
|
4849
|
-
}, null, 8, ["agent", "is-online"])])) : e.showHeader ? (T(), _("div",
|
|
4843
|
+
}, null, 8, ["agent", "is-online"])])) : e.showHeader ? (T(), _("div", ui, [v("div", { class: S(["flex items-center gap-3", e.centered ? "max-w-[720px] mx-auto" : ""]) }, [
|
|
4850
4844
|
b(ze, {
|
|
4851
4845
|
agent: e.agent,
|
|
4852
4846
|
"is-light": K.value,
|
|
4853
4847
|
class: "size-10"
|
|
4854
4848
|
}, null, 8, ["agent", "is-light"]),
|
|
4855
|
-
v("div",
|
|
4856
|
-
e.headerMeta ? (T(), _("span",
|
|
4849
|
+
v("div", di, [v("div", fi, P(e.agent.displayName.value), 1), v("div", pi, P(e.agent.title.value || "Assistant"), 1)]),
|
|
4850
|
+
e.headerMeta ? (T(), _("span", mi, P(e.headerMeta), 1)) : h("", !0)
|
|
4857
4851
|
], 2)])) : h("", !0),
|
|
4858
4852
|
C.value ? (T(), _("div", {
|
|
4859
4853
|
key: 2,
|
|
@@ -4862,13 +4856,13 @@ var Or = [
|
|
|
4862
4856
|
key: 3,
|
|
4863
4857
|
class: S(["flex items-center justify-center gap-1.5 py-2 text-[11px]", He.value])
|
|
4864
4858
|
}, [s[20] || (s[20] = v("i", { class: "i-tabler-tool size-3" }, null, -1)), v("span", null, P(e.setupHint), 1)], 2)) : h("", !0),
|
|
4865
|
-
b(
|
|
4859
|
+
b(ci, {
|
|
4866
4860
|
ref_key: "chatScroller",
|
|
4867
4861
|
ref: i,
|
|
4868
4862
|
class: S(R.value.length === 0 ? "flex-none" : "flex-1")
|
|
4869
4863
|
}, {
|
|
4870
4864
|
default: F(() => [v("div", { class: S([R.value.length === 0 ? "flex flex-col items-center justify-center px-3 py-4" : e.centered ? "pt-20 pb-[120px] px-3 space-y-2" : "pt-4 pb-[120px] px-3 space-y-2", e.centered ? R.value.length === 0 ? "max-w-[900px] mx-auto w-full" : "max-w-[720px] mx-auto w-full" : ""]) }, [
|
|
4871
|
-
R.value.length === 0 && !C.value ? (T(), _("div",
|
|
4865
|
+
R.value.length === 0 && !C.value ? (T(), _("div", hi, [oe(t.$slots, "empty-heading", {
|
|
4872
4866
|
agent: e.agent,
|
|
4873
4867
|
isLight: K.value
|
|
4874
4868
|
}, () => [b(ze, {
|
|
@@ -4878,9 +4872,9 @@ var Or = [
|
|
|
4878
4872
|
}, null, 8, ["agent", "is-light"]), v("div", { class: S(["text-base @sm/chat:text-lg font-semibold", K.value ? "text-theme-900" : "text-white"]) }, P(e.agent.displayName.value), 3)]), e.emptyStateMessage === "" ? h("", !0) : (T(), _(f, { key: 0 }, [v("p", { class: S(["mt-1 text-center text-xs @sm/chat:text-sm", He.value]) }, P(e.emptyStateMessage || "Type your message to get started."), 3), v("div", {
|
|
4879
4873
|
class: S(["inline-flex items-center gap-1.5 mt-5 px-2.5 py-1 rounded-full text-[11px]", K.value ? "bg-theme-50 border border-theme-100 text-theme-400" : "bg-white/10 border border-white/20 text-white/40"]),
|
|
4880
4874
|
title: n.value.tooltip
|
|
4881
|
-
}, [v("i", { class: S([n.value.icon, "size-3"]) }, null, 2), v("span", null, P(n.value.label), 1)], 10,
|
|
4875
|
+
}, [v("i", { class: S([n.value.icon, "size-3"]) }, null, 2), v("span", null, P(n.value.label), 1)], 10, gi)], 64))])) : h("", !0),
|
|
4882
4876
|
(T(!0), _(f, null, A(R.value, (e, t) => (T(), _(f, { key: e.id }, [
|
|
4883
|
-
shouldShowTimeDivider(R.value, t) ? (T(), _("div",
|
|
4877
|
+
shouldShowTimeDivider(R.value, t) ? (T(), _("div", _i, [
|
|
4884
4878
|
v("div", { class: S(["flex-1 h-px", Ve.value]) }, null, 2),
|
|
4885
4879
|
v("span", { class: S(["text-[10px] @sm/chat:text-[11px] font-medium shrink-0 tracking-widest uppercase", He.value]) }, P(shouldShowTimeDivider(R.value, t)), 3),
|
|
4886
4880
|
v("div", { class: S(["flex-1 h-px", Ve.value]) }, null, 2)
|
|
@@ -4893,7 +4887,7 @@ var Or = [
|
|
|
4893
4887
|
}, [b(qe, {
|
|
4894
4888
|
model: messageWorkJournal(e),
|
|
4895
4889
|
"is-light": K.value
|
|
4896
|
-
}, null, 8, ["model", "is-light"])], 8,
|
|
4890
|
+
}, null, 8, ["model", "is-light"])], 8, vi)) : h("", !0),
|
|
4897
4891
|
isSystemExplainerMessage(e) ? (T(), _("div", {
|
|
4898
4892
|
key: 2,
|
|
4899
4893
|
"data-test": "messaging-system-msg",
|
|
@@ -4908,7 +4902,7 @@ var Or = [
|
|
|
4908
4902
|
"data-issue-action-url": e.issue?.actionUrl,
|
|
4909
4903
|
"data-streaming": e.id === be.value ? "true" : void 0,
|
|
4910
4904
|
class: "flex gap-2 items-end justify-start mb-4"
|
|
4911
|
-
}, [v("div",
|
|
4905
|
+
}, [v("div", bi, [v("div", { class: S(["mb-1 pl-1 text-[11px] font-medium", K.value ? "text-theme-500" : "text-white/45"]) }, " System Message ", 2), v("div", { class: S(["rounded-[20px] rounded-bl-[4px] px-4 py-2.5 border system-msg-content", K.value ? "bg-theme-25 border-theme-200 text-theme-700" : "bg-white/[0.08] border-white/10 text-white/85"]) }, [e.text ? (T(), m(ai, {
|
|
4912
4906
|
key: 0,
|
|
4913
4907
|
text: e.text,
|
|
4914
4908
|
inverted: !K.value,
|
|
@@ -4919,7 +4913,7 @@ var Or = [
|
|
|
4919
4913
|
"text",
|
|
4920
4914
|
"inverted",
|
|
4921
4915
|
"streaming"
|
|
4922
|
-
])) : e.issue?.help ? (T(), m(
|
|
4916
|
+
])) : e.issue?.help ? (T(), m(ai, {
|
|
4923
4917
|
key: 1,
|
|
4924
4918
|
text: e.issue.help,
|
|
4925
4919
|
inverted: !K.value
|
|
@@ -4929,7 +4923,7 @@ var Or = [
|
|
|
4929
4923
|
"data-test": "messaging-system-msg-action",
|
|
4930
4924
|
class: S(["mt-2 text-[12px] font-medium inline-flex items-center gap-1", K.value ? "text-theme-900 hover:text-theme-700" : "text-white hover:text-white/80"]),
|
|
4931
4925
|
onClick: s[1] || (s[1] = I(() => {}, ["stop"]))
|
|
4932
|
-
}, [te(P(e.issue.actionLabel) + " ", 1), s[21] || (s[21] = v("i", { class: "i-tabler-arrow-right size-3" }, null, -1))], 10,
|
|
4926
|
+
}, [te(P(e.issue.actionLabel) + " ", 1), s[21] || (s[21] = v("i", { class: "i-tabler-arrow-right size-3" }, null, -1))], 10, xi)) : h("", !0)], 2)])], 8, yi)) : e.sender === "system" ? (T(), _("div", {
|
|
4933
4927
|
key: 3,
|
|
4934
4928
|
"data-test": "messaging-system-status-msg",
|
|
4935
4929
|
"data-message-id": e.id,
|
|
@@ -4941,11 +4935,11 @@ var Or = [
|
|
|
4941
4935
|
"data-issue-bucket": e.issue?.bucket,
|
|
4942
4936
|
"data-streaming": e.id === be.value ? "true" : void 0,
|
|
4943
4937
|
class: S(["flex items-start gap-2 px-3 py-2 text-[13px] leading-relaxed", K.value ? "text-theme-500" : "text-white/60"])
|
|
4944
|
-
}, [s[22] || (s[22] = v("i", { class: "i-tabler-info-circle size-4 mt-0.5 shrink-0" }, null, -1)), b(
|
|
4938
|
+
}, [s[22] || (s[22] = v("i", { class: "i-tabler-info-circle size-4 mt-0.5 shrink-0" }, null, -1)), b(ai, {
|
|
4945
4939
|
text: e.text,
|
|
4946
4940
|
inverted: !K.value,
|
|
4947
4941
|
onClick: s[2] || (s[2] = I(() => {}, ["stop"]))
|
|
4948
|
-
}, null, 8, ["text", "inverted"])], 10,
|
|
4942
|
+
}, null, 8, ["text", "inverted"])], 10, Si)) : (T(), _("div", {
|
|
4949
4943
|
key: 4,
|
|
4950
4944
|
"data-test": e.sender === "agent" ? "messaging-assistant-msg" : e.sender === "user" ? "messaging-user-msg" : void 0,
|
|
4951
4945
|
"data-message-id": e.id,
|
|
@@ -4972,14 +4966,14 @@ var Or = [
|
|
|
4972
4966
|
"data-test": "messaging-attachment",
|
|
4973
4967
|
"data-attachment-placement": "block",
|
|
4974
4968
|
class: "rounded-xl object-cover max-h-48 max-w-[240px] @sm/chat:max-w-[320px]"
|
|
4975
|
-
}, null, 8,
|
|
4969
|
+
}, null, 8, wi)) : e.type === "audio" ? (T(), _("audio", {
|
|
4976
4970
|
key: 1,
|
|
4977
4971
|
src: e.src,
|
|
4978
4972
|
controls: "",
|
|
4979
4973
|
"data-test": "messaging-attachment",
|
|
4980
4974
|
"data-attachment-placement": "block",
|
|
4981
4975
|
class: "max-w-full"
|
|
4982
|
-
}, null, 8,
|
|
4976
|
+
}, null, 8, Ti)) : (T(), _("a", {
|
|
4983
4977
|
key: 2,
|
|
4984
4978
|
href: e.src,
|
|
4985
4979
|
target: "_blank",
|
|
@@ -4987,11 +4981,11 @@ var Or = [
|
|
|
4987
4981
|
"data-test": "messaging-attachment",
|
|
4988
4982
|
"data-attachment-placement": "block",
|
|
4989
4983
|
class: S(["inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs", K.value ? "bg-theme-100 text-theme-600 hover:bg-theme-200" : "bg-white/10 text-white/80 hover:bg-white/20"])
|
|
4990
|
-
}, [s[23] || (s[23] = v("i", { class: "i-tabler-file size-3.5" }, null, -1)), te(" " + P(e.filename), 1)], 10,
|
|
4984
|
+
}, [s[23] || (s[23] = v("i", { class: "i-tabler-file size-3.5" }, null, -1)), te(" " + P(e.filename), 1)], 10, Ei))], 64))), 128))], 2)) : h("", !0), messageRenderParts(e).length ? (T(), _("div", {
|
|
4991
4985
|
key: 1,
|
|
4992
4986
|
"data-test": "messaging-message-content",
|
|
4993
4987
|
class: S(e.sender === "user" ? K.value ? "rounded-[20px] rounded-br-[4px] px-4 py-2.5 bg-theme-900 text-theme-0 shadow-[0_1px_2px_rgba(5,15,25,0.14)]" : "rounded-[20px] rounded-br-[4px] px-4 py-2.5 bg-theme-0 text-theme-950" : K.value ? "text-theme-800" : "text-white/95")
|
|
4994
|
-
}, [(T(!0), _(f, null, A(messageRenderParts(e), (t) => (T(), _(f, { key: t.key }, [t.kind === "text" && t.text ? (T(), _("div",
|
|
4988
|
+
}, [(T(!0), _(f, null, A(messageRenderParts(e), (t) => (T(), _(f, { key: t.key }, [t.kind === "text" && t.text ? (T(), _("div", Di, [b(ai, {
|
|
4995
4989
|
text: t.text,
|
|
4996
4990
|
inverted: e.sender === "user" || !K.value,
|
|
4997
4991
|
streaming: e.id === be.value,
|
|
@@ -5008,14 +5002,14 @@ var Or = [
|
|
|
5008
5002
|
"data-test": "messaging-attachment",
|
|
5009
5003
|
"data-attachment-placement": t.placement,
|
|
5010
5004
|
class: "my-2 rounded-xl object-cover max-h-48 max-w-[240px] @sm/chat:max-w-[320px]"
|
|
5011
|
-
}, null, 8,
|
|
5005
|
+
}, null, 8, Oi)) : t.kind === "attachment" && t.attachment.type === "audio" ? (T(), _("audio", {
|
|
5012
5006
|
key: 2,
|
|
5013
5007
|
src: t.attachment.src,
|
|
5014
5008
|
controls: "",
|
|
5015
5009
|
"data-test": "messaging-attachment",
|
|
5016
5010
|
"data-attachment-placement": t.placement,
|
|
5017
5011
|
class: "my-2 max-w-full"
|
|
5018
|
-
}, null, 8,
|
|
5012
|
+
}, null, 8, ki)) : t.kind === "attachment" ? (T(), _("a", {
|
|
5019
5013
|
key: 3,
|
|
5020
5014
|
href: t.attachment.src,
|
|
5021
5015
|
target: "_blank",
|
|
@@ -5023,7 +5017,7 @@ var Or = [
|
|
|
5023
5017
|
"data-test": "messaging-attachment",
|
|
5024
5018
|
"data-attachment-placement": t.placement,
|
|
5025
5019
|
class: S(["my-2 inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs", K.value ? "bg-theme-100 text-theme-600 hover:bg-theme-200" : "bg-white/10 text-white/80 hover:bg-white/20"])
|
|
5026
|
-
}, [s[24] || (s[24] = v("i", { class: "i-tabler-file size-3.5" }, null, -1)), te(" " + P(t.attachment.filename), 1)], 10,
|
|
5020
|
+
}, [s[24] || (s[24] = v("i", { class: "i-tabler-file size-3.5" }, null, -1)), te(" " + P(t.attachment.filename), 1)], 10, Ai)) : h("", !0)], 64))), 128))], 2)) : h("", !0)], 2)], 10, Ci)),
|
|
5027
5021
|
e.id === B.value ? (T(), _(f, { key: 5 }, [j.value.length ? (T(!0), _(f, { key: 0 }, A(j.value, (e) => (T(), _(f, { key: e.id }, [e.kind === "work" ? (T(), _("div", {
|
|
5028
5022
|
key: 0,
|
|
5029
5023
|
"data-test": "messaging-tool-activity",
|
|
@@ -5032,11 +5026,11 @@ var Or = [
|
|
|
5032
5026
|
}, [b(qe, {
|
|
5033
5027
|
model: e.journal,
|
|
5034
5028
|
"is-light": K.value
|
|
5035
|
-
}, null, 8, ["model", "is-light"])], 8,
|
|
5029
|
+
}, null, 8, ["model", "is-light"])], 8, ji)) : e.kind === "text" && e.content ? (T(), _("div", {
|
|
5036
5030
|
key: 1,
|
|
5037
5031
|
"data-test": "messaging-live-text-block",
|
|
5038
5032
|
class: S(["mb-4 @sm/chat:pr-[1em] @lg/chat:pr-[2em]", K.value ? "text-theme-800" : "text-white/95"])
|
|
5039
|
-
}, [b(
|
|
5033
|
+
}, [b(ai, {
|
|
5040
5034
|
text: e.content,
|
|
5041
5035
|
inverted: !K.value,
|
|
5042
5036
|
streaming: e.id === se.value,
|
|
@@ -5046,7 +5040,7 @@ var Or = [
|
|
|
5046
5040
|
"text",
|
|
5047
5041
|
"inverted",
|
|
5048
5042
|
"streaming"
|
|
5049
|
-
])], 2)) : (T(), _("div",
|
|
5043
|
+
])], 2)) : (T(), _("div", Mi, [b(_e, { class: S(["size-3.5", K.value ? "text-theme-500" : "text-white/70"]) }, null, 8, ["class"])]))], 64))), 128)) : ve.value ? (T(), _("div", {
|
|
5050
5044
|
key: 1,
|
|
5051
5045
|
"data-test": "messaging-tool-activity",
|
|
5052
5046
|
"data-journal-outcome": ve.value.outcome,
|
|
@@ -5054,7 +5048,7 @@ var Or = [
|
|
|
5054
5048
|
}, [b(qe, {
|
|
5055
5049
|
model: ve.value,
|
|
5056
5050
|
"is-light": K.value
|
|
5057
|
-
}, null, 8, ["model", "is-light"])], 8,
|
|
5051
|
+
}, null, 8, ["model", "is-light"])], 8, Ni)) : h("", !0)], 64)) : h("", !0)
|
|
5058
5052
|
], 64))), 128)),
|
|
5059
5053
|
z.value ? (T(), _("div", {
|
|
5060
5054
|
key: 1,
|
|
@@ -5064,7 +5058,7 @@ var Or = [
|
|
|
5064
5058
|
}, [s[25] || (s[25] = v("i", {
|
|
5065
5059
|
class: "i-tabler-loader-2 size-3.5 shrink-0 animate-spin opacity-70",
|
|
5066
5060
|
"aria-hidden": "true"
|
|
5067
|
-
}, null, -1)), v("span",
|
|
5061
|
+
}, null, -1)), v("span", Fi, P(z.value), 1)], 10, Pi)) : h("", !0),
|
|
5068
5062
|
H.value ? (T(), _("div", {
|
|
5069
5063
|
key: 2,
|
|
5070
5064
|
"data-test": "messaging-transient-issue",
|
|
@@ -5081,9 +5075,9 @@ var Or = [
|
|
|
5081
5075
|
href: H.value.actionUrl,
|
|
5082
5076
|
class: "shrink-0 underline underline-offset-2",
|
|
5083
5077
|
onClick: s[5] || (s[5] = I(() => {}, ["stop"]))
|
|
5084
|
-
}, P(H.value.actionLabel), 9,
|
|
5085
|
-
], 10,
|
|
5086
|
-
U.value ? (T(), _("div",
|
|
5078
|
+
}, P(H.value.actionLabel), 9, Li)) : h("", !0)
|
|
5079
|
+
], 10, Ii)) : h("", !0),
|
|
5080
|
+
U.value ? (T(), _("div", Ri, [v("i", {
|
|
5087
5081
|
class: S(["i-svg-spinners-3-dots-bounce size-7", K.value ? "text-theme-400" : "text-white/50"]),
|
|
5088
5082
|
"aria-hidden": "true"
|
|
5089
5083
|
}, null, 2)])) : h("", !0)
|
|
@@ -5102,13 +5096,13 @@ var Or = [
|
|
|
5102
5096
|
src: e.src,
|
|
5103
5097
|
alt: e.filename,
|
|
5104
5098
|
class: S(["size-14 rounded-xl object-cover border", K.value ? "border-black/10" : "border-white/20"])
|
|
5105
|
-
}, null, 10,
|
|
5099
|
+
}, null, 10, zi)) : (T(), _("div", {
|
|
5106
5100
|
key: 1,
|
|
5107
5101
|
class: S(["h-14 px-3 rounded-xl flex items-center gap-1.5 text-xs border", K.value ? "border-black/10 bg-theme-50 text-theme-600" : "border-white/20 bg-white/10 text-white/70"])
|
|
5108
|
-
}, [s[27] || (s[27] = v("i", { class: "i-tabler-file size-4" }, null, -1)), v("span",
|
|
5102
|
+
}, [s[27] || (s[27] = v("i", { class: "i-tabler-file size-4" }, null, -1)), v("span", Bi, P(e.filename), 1)], 2)), v("button", {
|
|
5109
5103
|
class: "absolute -top-1.5 -right-1.5 size-5 flex items-center justify-center rounded-full bg-theme-800 text-white text-xs scale-0 group-hover:scale-100 transition-transform cursor-pointer",
|
|
5110
5104
|
onClick: (e) => removeAttachment(t)
|
|
5111
|
-
}, [...s[28] || (s[28] = [v("i", { class: "i-tabler-x size-3" }, null, -1)])], 8,
|
|
5105
|
+
}, [...s[28] || (s[28] = [v("i", { class: "i-tabler-x size-3" }, null, -1)])], 8, Vi)]))), 128)), De.value ? (T(), _("div", Hi, [b(_e, { class: "size-5" })])) : h("", !0)], 2)) : h("", !0),
|
|
5112
5106
|
G.value ? (T(), _("input", {
|
|
5113
5107
|
key: 1,
|
|
5114
5108
|
ref_key: "fileInput",
|
|
@@ -5129,7 +5123,7 @@ var Or = [
|
|
|
5129
5123
|
class: S(["flex min-w-0 items-center gap-2 py-1", K.value ? "text-theme-700" : "text-white/80"])
|
|
5130
5124
|
}, [
|
|
5131
5125
|
s[29] || (s[29] = v("span", { class: "size-2.5 shrink-0 rounded-full bg-red-500" }, null, -1)),
|
|
5132
|
-
v("span",
|
|
5126
|
+
v("span", Gi, P(Le.value), 1),
|
|
5133
5127
|
v("span", { class: S(["min-w-0 truncate text-sm", K.value ? "text-theme-400" : "text-white/45"]) }, P(Re.value), 3)
|
|
5134
5128
|
], 2)) : pe((T(), _("textarea", {
|
|
5135
5129
|
key: 0,
|
|
@@ -5149,7 +5143,7 @@ var Or = [
|
|
|
5149
5143
|
onKeydown: handleKeydown,
|
|
5150
5144
|
onFocus: s[7] || (s[7] = (e) => r.value = !0),
|
|
5151
5145
|
onBlur: s[8] || (s[8] = (e) => r.value = !1)
|
|
5152
|
-
}, null, 42,
|
|
5146
|
+
}, null, 42, Wi)), [[ue, Te.value]]), v("div", Ki, [
|
|
5153
5147
|
v("button", {
|
|
5154
5148
|
class: S(["-ml-2 flex size-8 items-center justify-center transition-opacity hover:opacity-70", [
|
|
5155
5149
|
G.value ? "cursor-pointer" : "cursor-default",
|
|
@@ -5160,9 +5154,9 @@ var Or = [
|
|
|
5160
5154
|
"aria-label": G.value ? "Attach file" : "File attachments unavailable",
|
|
5161
5155
|
title: G.value ? "Attach file" : "File attachments unavailable",
|
|
5162
5156
|
onClick: s[9] || (s[9] = (e) => G.value && triggerFileInput())
|
|
5163
|
-
}, [De.value ? (T(), _("i",
|
|
5157
|
+
}, [De.value ? (T(), _("i", Ji)) : (T(), _("i", Yi)), v("span", Xi, P(G.value ? "Attach file" : "File attachments unavailable"), 1)], 10, qi),
|
|
5164
5158
|
s[30] || (s[30] = v("div", { class: "flex-1" }, null, -1)),
|
|
5165
|
-
v("div",
|
|
5159
|
+
v("div", Zi, [Fe.value || Ie.value ? (T(), _("button", {
|
|
5166
5160
|
key: 0,
|
|
5167
5161
|
"data-test": "messaging-record-audio-btn",
|
|
5168
5162
|
class: S(["flex size-8 cursor-pointer items-center justify-center transition-[opacity,transform] duration-200 hover:opacity-70", Ie.value ? K.value ? "text-theme-900 scale-110" : "text-white scale-110" : K.value ? "text-theme-500" : "text-white/60"]),
|
|
@@ -5177,7 +5171,7 @@ var Or = [
|
|
|
5177
5171
|
s[17] || (s[17] = he(I((e) => finishRecording({ cancelled: !0 }), ["prevent"]), ["escape"]))
|
|
5178
5172
|
],
|
|
5179
5173
|
onKeyup: [s[14] || (s[14] = he(I((e) => finishRecording({ cancelled: !1 }), ["prevent"]), ["enter"])), s[16] || (s[16] = he(I((e) => finishRecording({ cancelled: !1 }), ["prevent"]), ["space"]))]
|
|
5180
|
-
}, [v("i", { class: S([Ie.value ? "i-tabler-microphone-filled" : "i-tabler-microphone", "size-[18px]"]) }, null, 2), v("span",
|
|
5174
|
+
}, [v("i", { class: S([Ie.value ? "i-tabler-microphone-filled" : "i-tabler-microphone", "size-[18px]"]) }, null, 2), v("span", $i, P(Be.value), 1)], 42, Qi)) : h("", !0), Ie.value ? h("", !0) : (T(), _("button", {
|
|
5181
5175
|
key: 1,
|
|
5182
5176
|
"data-test": "messaging-send-btn",
|
|
5183
5177
|
"data-composer-action": je.value,
|
|
@@ -5186,36 +5180,36 @@ var Or = [
|
|
|
5186
5180
|
"aria-label": Ne.value,
|
|
5187
5181
|
title: Ne.value,
|
|
5188
5182
|
onClick: s[18] || (s[18] = (e) => handleComposerAction())
|
|
5189
|
-
}, [je.value === "stop" ? (T(), _("i",
|
|
5190
|
-
])], 10,
|
|
5191
|
-
R.value.length === 0 && e.suggestedPrompts.length > 0 ? (T(), _("div",
|
|
5183
|
+
}, [je.value === "stop" ? (T(), _("i", ta)) : (T(), _("i", na)), v("span", ra, P(Ne.value), 1)], 10, ea))])
|
|
5184
|
+
])], 10, Ui),
|
|
5185
|
+
R.value.length === 0 && e.suggestedPrompts.length > 0 ? (T(), _("div", ia, [v("div", aa, [(T(!0), _(f, null, A(e.suggestedPrompts, (e, t) => (T(), _("button", {
|
|
5192
5186
|
key: e.id,
|
|
5193
5187
|
type: "button",
|
|
5194
5188
|
disabled: W.value,
|
|
5195
5189
|
"data-test": "messaging-suggested-prompt",
|
|
5196
5190
|
class: S(["w-full rounded-2xl bg-theme-50 px-4 py-3 text-left text-[14.5px] font-medium transition-colors sm:w-auto sm:rounded-full sm:py-2 sm:text-center sm:text-[14px]", [W.value ? "cursor-not-allowed text-theme-300" : "cursor-pointer text-theme-600 hover:bg-theme-100 hover:text-theme-900", !re.value && t >= 3 ? "max-sm:hidden" : ""]]),
|
|
5197
5191
|
onClick: (t) => sendSuggestedPrompt(e)
|
|
5198
|
-
}, P(e.label), 11,
|
|
5192
|
+
}, P(e.label), 11, oa))), 128)), e.suggestedPrompts.length > 3 ? (T(), _("button", {
|
|
5199
5193
|
key: 0,
|
|
5200
5194
|
type: "button",
|
|
5201
5195
|
"data-test": "messaging-suggested-prompts-more",
|
|
5202
5196
|
"aria-expanded": re.value,
|
|
5203
5197
|
class: "flex w-full cursor-pointer items-center justify-center gap-1.5 rounded-2xl px-4 py-3 text-[14px] font-medium text-theme-600 ring-1 ring-theme-200 transition-colors hover:bg-theme-50 hover:text-theme-900 sm:hidden",
|
|
5204
5198
|
onClick: s[19] || (s[19] = (e) => re.value = !re.value)
|
|
5205
|
-
}, [te(P(re.value ? "See less" : "See more") + " ", 1), v("i", { class: S(["i-tabler-chevron-down size-4 transition-transform", re.value ? "rotate-180" : ""]) }, null, 2)], 8,
|
|
5199
|
+
}, [te(P(re.value ? "See less" : "See more") + " ", 1), v("i", { class: S(["i-tabler-chevron-down size-4 transition-transform", re.value ? "rotate-180" : ""]) }, null, 2)], 8, sa)) : h("", !0)])])) : h("", !0)
|
|
5206
5200
|
], 2)
|
|
5207
5201
|
], 2));
|
|
5208
5202
|
}
|
|
5209
|
-
}),
|
|
5203
|
+
}), la = { class: "agent-wrap" }, ua = {
|
|
5210
5204
|
key: 0,
|
|
5211
5205
|
class: "flex items-center justify-center h-full"
|
|
5212
|
-
},
|
|
5206
|
+
}, da = {
|
|
5213
5207
|
key: 2,
|
|
5214
5208
|
class: "flex h-full flex-col items-center justify-center gap-4 px-6 text-center",
|
|
5215
5209
|
role: "status",
|
|
5216
5210
|
"aria-live": "polite",
|
|
5217
5211
|
"data-test": "agent-unavailable"
|
|
5218
|
-
},
|
|
5212
|
+
}, fa = /* @__PURE__ */ x({
|
|
5219
5213
|
__name: "AgentWrap",
|
|
5220
5214
|
props: {
|
|
5221
5215
|
sdk: {},
|
|
@@ -5311,7 +5305,7 @@ var Or = [
|
|
|
5311
5305
|
});
|
|
5312
5306
|
}
|
|
5313
5307
|
}
|
|
5314
|
-
return ie(loadAgent), (t, n) => (T(), _("div",
|
|
5308
|
+
return ie(loadAgent), (t, n) => (T(), _("div", la, [s.value ? (T(), _("div", ua, [v("div", { class: S(["size-6 animate-spin rounded-full border-b-2", i.bare ? "border-theme-400" : "border-white"]) }, null, 2)])) : c.value ? oe(t.$slots, "default", {
|
|
5315
5309
|
sdk: ce(o),
|
|
5316
5310
|
agent: c.value,
|
|
5317
5311
|
context: e.clientContext ?? e.context,
|
|
@@ -5319,7 +5313,7 @@ var Or = [
|
|
|
5319
5313
|
buttonText: e.buttonText,
|
|
5320
5314
|
buttonIcon: e.buttonIcon,
|
|
5321
5315
|
loading: s.value
|
|
5322
|
-
}, void 0, void 0, 1) : u.value ? (T(), _("div",
|
|
5316
|
+
}, void 0, void 0, 1) : u.value ? (T(), _("div", da, [n[0] || (n[0] = v("p", { class: "text-sm font-medium text-theme-600" }, " This assistant is unavailable right now. ", -1)), v("button", {
|
|
5323
5317
|
type: "button",
|
|
5324
5318
|
class: "min-h-11 rounded-full bg-theme-900 px-5 text-sm font-semibold text-theme-0 transition-colors hover:bg-theme-700",
|
|
5325
5319
|
"data-test": "agent-unavailable-retry",
|
|
@@ -5328,6 +5322,6 @@ var Or = [
|
|
|
5328
5322
|
}
|
|
5329
5323
|
});
|
|
5330
5324
|
//#endregion
|
|
5331
|
-
export { ke as a, getAgentAvatarUrl as c, AgentChatController as d, ve as f, Pe as i, handleImageError as l, _e as m,
|
|
5325
|
+
export { ke as a, getAgentAvatarUrl as c, AgentChatController as d, ve as f, Pe as i, handleImageError as l, _e as m, ca as n, De as o, n as p, ai as r, Te as s, fa as t, parseButtonTemplate as u };
|
|
5332
5326
|
|
|
5333
5327
|
//# sourceMappingURL=AgentWrap.js.map
|