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