@mechane-ai/elements 0.61.0 → 0.63.0
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/ai.js +211 -212
- package/dist/{article-COShcQPh.js → article-lhByzGCW.js} +6 -6
- package/dist/article.js +1 -1
- package/dist/catalog.json +13 -1
- package/dist/{categorical-values-DdZLdWhL.js → categorical-values-3g2m87_m.js} +1 -1
- package/dist/{cells-BTTLURWI.js → cells-X8SVrZBc.js} +1 -1
- package/dist/charts/cartesian.js +1 -1
- package/dist/charts/cells.js +1 -1
- package/dist/charts/comparison.js +1 -1
- package/dist/charts/distribution.js +1 -1
- package/dist/charts/figure.js +12 -12
- package/dist/charts/graph.js +1 -1
- package/dist/charts/hierarchy.js +1 -1
- package/dist/charts/image.js +1 -1
- package/dist/charts/matrix.js +1 -1
- package/dist/charts/plot.js +4 -4
- package/dist/charts/relationship.js +1 -1
- package/dist/charts/text.js +1 -1
- package/dist/charts/timeline.js +2 -2
- package/dist/charts/trend.js +1 -1
- package/dist/charts.js +2 -2
- package/dist/{code-block-BZsY2sh3.js → code-block-CJkiWSrX.js} +1 -1
- package/dist/collections.js +1 -1
- package/dist/{commands-D0bF2JxV.js → commands-DlitIiMJ.js} +2 -2
- package/dist/content/code.js +1 -1
- package/dist/content/diff.js +10 -10
- package/dist/content/link.js +1 -1
- package/dist/content/markdown.js +1 -1
- package/dist/content/tree.js +2 -2
- package/dist/{content-link-PnpcnTCx.js → content-link-DQ3tt_SK.js} +1 -1
- package/dist/content.js +1 -1
- package/dist/{dates-Cq90-D2X.js → dates-Cvrsj4l9.js} +31 -32
- package/dist/{dumbbell-plot-BeHhL-01.js → dumbbell-plot-CEShrjuI.js} +4 -4
- package/dist/{embedding-map-DbETVJXp.js → embedding-map-CQZn0DCg.js} +7 -7
- package/dist/feedback.js +1 -1
- package/dist/{figure-frame-ClYRIRAq.js → figure-frame-BljHBC77.js} +11 -11
- package/dist/forms/dates.js +1 -1
- package/dist/{forms-CEbwzlRR.js → forms-BYk8t91h.js} +17 -17
- package/dist/forms.js +2 -2
- package/dist/{image-grid-DB5U7Jtx.js → image-grid-ClMUSwqO.js} +3 -3
- package/dist/index.js +1 -1
- package/dist/kits/evaluation.js +5 -5
- package/dist/kits/interpretability.js +12 -12
- package/dist/kits/operations.js +6 -6
- package/dist/kits/research.js +8 -8
- package/dist/kits/training.js +6 -6
- package/dist/layout.js +1 -1
- package/dist/lesson.js +3 -3
- package/dist/{markdown-VpLw_P9T.js → markdown-_4ZFsDyM.js} +2 -2
- package/dist/mdx.js +6 -6
- package/dist/navigation/commands.js +1 -1
- package/dist/navigation-CwXM887i.js +44 -0
- package/dist/navigation.js +3 -3
- package/dist/packages/charts/src/plot/plot-marks.d.ts +2 -1
- package/dist/packages/charts/src/timeline/trace-timeline-layout.d.ts +7 -2
- package/dist/packages/charts/src/timeline/trace-timeline.d.ts +5 -3
- package/dist/packages/charts/src/timeline/waterfall.d.ts +3 -1
- package/dist/packages/core/src/filter-chips.d.ts +21 -0
- package/dist/packages/core/src/index.d.ts +2 -0
- package/dist/packages/navigation/src/navigation.d.ts +4 -0
- package/dist/{param-BdqTpZER.js → param-BxLsoDip.js} +1 -1
- package/dist/{pierre-diff-aGyQK5xK.js → pierre-diff-DwmKtFYy.js} +1 -1
- package/dist/{plot-layout-B-b6tioh.js → plot-layout-oXzW4fgJ.js} +2 -2
- package/dist/{plot-marks-FVsbFkUs.js → plot-marks-DgCtcd3L.js} +7 -6
- package/dist/{plot-surface-BlR44uTL.js → plot-surface-BuXeoeBq.js} +1 -1
- package/dist/{reference-lines-BDfsv8dy.js → reference-lines-Kmxs_hXa.js} +2 -2
- package/dist/{scene-CY05-A1k.js → scene-AWpudPHv.js} +7 -7
- package/dist/scene.js +1 -1
- package/dist/{slope-chart-DTyF1lNG.js → slope-chart-DzbDOBUo.js} +5 -5
- package/dist/{src-Ci8DeY8J.js → src-CJ-0r20F.js} +1 -1
- package/dist/{src-BAlO76fa.js → src-CZyleIH0.js} +40 -40
- package/dist/{src-Dxs3Buo_.js → src-CuTIcRwk.js} +186 -187
- package/dist/{src-4qgpiWvP.js → src-DFkzV7H0.js} +44 -44
- package/dist/{src-9EJskqB_.js → src-DH2Xqu32.js} +659 -428
- package/dist/{src-C-Wg9m9H.js → src-DpVApV62.js} +20 -21
- package/dist/{src-Cuwx-PLT.js → src-yrBVxkaf.js} +119 -120
- package/dist/styles2.css +55 -12
- package/dist/{time-series-BbUBF3IE.js → time-series-D7TCUK56.js} +34 -34
- package/dist/timeline-CR5VPm_f.js +914 -0
- package/dist/{token-heatmap-o_9l6vaq.js → token-heatmap-DEpcsiRR.js} +3 -3
- package/dist/{token-predictions-DaAztlOS.js → token-predictions-DMYbc2-N.js} +4 -4
- package/dist/{transport-4V9rfYHN.js → transport-VwKG58nR.js} +4 -4
- package/dist/{tree-diagram-BDj4TGXb.js → tree-diagram-BqL3fTdB.js} +8 -8
- package/dist/{treemap-DUSFlCPK.js → treemap-C0CeP3PD.js} +4 -4
- package/dist/{use-tween-BsaEO862.js → use-tween-D-wmSMa8.js} +1 -1
- package/dist/{violin-plot-ULdC_dcY.js → violin-plot-6829_9q5.js} +4 -4
- package/dist/waterfall-C5HRWlEe.js +736 -0
- package/package.json +1 -1
- package/dist/control-styles-D3q_Qyxi.js +0 -179
- package/dist/navigation-CveMIuXI.js +0 -39
- package/dist/timeline-kDb6bY7M.js +0 -712
- package/dist/waterfall-Dre6i02Z.js +0 -684
package/dist/ai.js
CHANGED
|
@@ -1,39 +1,38 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as
|
|
3
|
-
import { f as
|
|
4
|
-
import { t as
|
|
5
|
-
import { n as
|
|
6
|
-
import { r as
|
|
7
|
-
import { c as
|
|
8
|
-
import { i as
|
|
9
|
-
import { t as
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import { ScrollArea as z, ScrollAreaContent as B, ScrollAreaScrollToEnd as V, ScrollAreaViewport as H, createScrollAreaController as U } from "@ui-sdk/react/scroll-area";
|
|
1
|
+
import { A as e, E as t, F as n, O as r, h as i, i as a, k as o, m as s, t as c, v as l } from "./src-DH2Xqu32.js";
|
|
2
|
+
import { t as u } from "./code-block-CJkiWSrX.js";
|
|
3
|
+
import { f as d } from "./src-CZyleIH0.js";
|
|
4
|
+
import { t as f } from "./content-link-DQ3tt_SK.js";
|
|
5
|
+
import { n as p, r as m } from "./markdown-_4ZFsDyM.js";
|
|
6
|
+
import { r as h, t as g } from "./src-na2DdkKI.js";
|
|
7
|
+
import { c as _, d as v } from "./src-DpVApV62.js";
|
|
8
|
+
import { i as y, t as b } from "./forms-BYk8t91h.js";
|
|
9
|
+
import { t as ee } from "./accessibility-P89UG9-r.js";
|
|
10
|
+
import * as x from "@stylexjs/stylex";
|
|
11
|
+
import { createParts as S } from "@ui-sdk/react/primitive";
|
|
12
|
+
import { createContext as C, useCallback as w, useContext as T, useEffect as E, useId as te, useLayoutEffect as D, useRef as O, useState as k } from "react";
|
|
13
|
+
import { createInputHistory as ne, definePrimitive as A, dispatch as re, isComposing as ie } from "@ui-sdk/core";
|
|
14
|
+
import { jsx as j, jsxs as M } from "react/jsx-runtime";
|
|
15
|
+
import { ArrowDown as N, ArrowUp as ae, File as P, GitBranch as F, Square as oe, Terminal as I } from "lucide-react";
|
|
16
|
+
import { matchesShortcut as L } from "@ui-sdk/core/shortcuts";
|
|
17
|
+
import { useShortcutHint as se } from "@ui-sdk/react/shortcuts";
|
|
18
|
+
import { ScrollArea as R, ScrollAreaContent as z, ScrollAreaScrollToEnd as B, ScrollAreaViewport as V, createScrollAreaController as H } from "@ui-sdk/react/scroll-area";
|
|
20
19
|
// packages/ai/src/approval.tsx
|
|
21
|
-
function
|
|
22
|
-
return /* @__PURE__ */
|
|
20
|
+
function U(e) {
|
|
21
|
+
return /* @__PURE__ */ M("section", {
|
|
23
22
|
"aria-label": e.title,
|
|
24
23
|
"data-request-id": e.requestId,
|
|
25
24
|
className: "x78zum5 xdt5ytf x1n8ia3y xeuugli x1c8xbx5 xmkeg23 x1y0btm7 x1ey3b81 x1ok0vyi xpvm0e4 xbixft x1hz01jw xtqrqnz x1778rvt xj57cvi",
|
|
26
25
|
children: [
|
|
27
|
-
/* @__PURE__ */
|
|
26
|
+
/* @__PURE__ */ j("h3", {
|
|
28
27
|
className: "x1ghz6dp xtqrqnz x1778rvt xk4h15q xj0a0fe",
|
|
29
28
|
children: e.title
|
|
30
29
|
}),
|
|
31
|
-
e.description !== void 0 && /* @__PURE__ */
|
|
30
|
+
e.description !== void 0 && /* @__PURE__ */ j("p", {
|
|
32
31
|
className: "x1ghz6dp x153jb6y xj0a0fe",
|
|
33
32
|
children: e.description
|
|
34
33
|
}),
|
|
35
34
|
e.children,
|
|
36
|
-
e.status === "pending" ? /* @__PURE__ */
|
|
35
|
+
e.status === "pending" ? /* @__PURE__ */ M(s, { children: [/* @__PURE__ */ j(t, {
|
|
37
36
|
variant: "solid",
|
|
38
37
|
"data-agent-confirm": `Approve ${e.title}?`,
|
|
39
38
|
onClick: e.onApprove,
|
|
@@ -41,23 +40,23 @@ function W(e) {
|
|
|
41
40
|
isPending: e.busy === "approve",
|
|
42
41
|
pendingLabel: "Approving…",
|
|
43
42
|
children: e.approveLabel ?? "Approve"
|
|
44
|
-
}), /* @__PURE__ */
|
|
43
|
+
}), /* @__PURE__ */ j(t, {
|
|
45
44
|
"data-agent-confirm": `Deny ${e.title}?`,
|
|
46
45
|
onClick: e.onDeny,
|
|
47
46
|
disabled: e.isDisabled === !0 || e.busy !== void 0,
|
|
48
47
|
isPending: e.busy === "deny",
|
|
49
48
|
pendingLabel: "Denying…",
|
|
50
49
|
children: e.denyLabel ?? "Deny"
|
|
51
|
-
})] }) : /* @__PURE__ */
|
|
50
|
+
})] }) : /* @__PURE__ */ j(c, { children: e.statusLabel })
|
|
52
51
|
]
|
|
53
52
|
});
|
|
54
53
|
}
|
|
55
54
|
// packages/ai/src/command-details.tsx
|
|
56
|
-
function
|
|
57
|
-
return /* @__PURE__ */
|
|
55
|
+
function W({ command: e, output: t, commandNotice: n, outputNotice: r, outputLanguage: o, isRunning: s = !1 }) {
|
|
56
|
+
return /* @__PURE__ */ M(i, {
|
|
58
57
|
isCompact: !0,
|
|
59
58
|
children: [
|
|
60
|
-
e === "" && n !== void 0 ? /* @__PURE__ */
|
|
59
|
+
e === "" && n !== void 0 ? /* @__PURE__ */ j(a, { children: "Command omitted from this preview." }) : e === void 0 ? /* @__PURE__ */ j(a, { children: s ? "Preparing command…" : "Command unavailable." }) : /* @__PURE__ */ j(u, {
|
|
61
60
|
code: e,
|
|
62
61
|
language: "bash",
|
|
63
62
|
filename: "Command",
|
|
@@ -66,13 +65,13 @@ function G({ command: e, output: t, commandNotice: n, outputNotice: a, outputLan
|
|
|
66
65
|
shouldWrap: !0,
|
|
67
66
|
maxHeight: 240
|
|
68
67
|
}),
|
|
69
|
-
n !== void 0 && /* @__PURE__ */
|
|
70
|
-
t === void 0 || t.length === 0 ? /* @__PURE__ */
|
|
68
|
+
n !== void 0 && /* @__PURE__ */ j(a, { children: n }),
|
|
69
|
+
t === void 0 || t.length === 0 ? /* @__PURE__ */ j(a, { children: s ? "Waiting for output…" : t === void 0 ? "Output unavailable." : r === void 0 ? "No output." : "Output omitted from this preview." }) : o === void 0 ? /* @__PURE__ */ j(d, {
|
|
71
70
|
output: t,
|
|
72
71
|
label: "Output",
|
|
73
72
|
variant: "embedded",
|
|
74
73
|
isRunning: s
|
|
75
|
-
}) : /* @__PURE__ */
|
|
74
|
+
}) : /* @__PURE__ */ j(u, {
|
|
76
75
|
code: t,
|
|
77
76
|
language: o,
|
|
78
77
|
filename: "Output",
|
|
@@ -82,90 +81,90 @@ function G({ command: e, output: t, commandNotice: n, outputNotice: a, outputLan
|
|
|
82
81
|
isStreaming: s,
|
|
83
82
|
maxHeight: 320
|
|
84
83
|
}),
|
|
85
|
-
|
|
84
|
+
r !== void 0 && /* @__PURE__ */ j(a, { children: r })
|
|
86
85
|
]
|
|
87
86
|
});
|
|
88
87
|
}
|
|
89
88
|
// packages/ai/src/command-activity.tsx
|
|
90
|
-
var
|
|
89
|
+
var G = {
|
|
91
90
|
pending: "Preparing",
|
|
92
91
|
running: "Running",
|
|
93
92
|
complete: "",
|
|
94
93
|
failed: "Failed",
|
|
95
94
|
stopped: "Stopped",
|
|
96
95
|
unknown: "Outcome unknown"
|
|
97
|
-
},
|
|
98
|
-
function
|
|
99
|
-
let i = r.command?.trim().split(/\r\n|\n|\r/u)[0], a = i === void 0 || i.length === 0 ? "Command" : i, o = n !== void 0 && n.length > 0, s = t !== void 0 && t.length > 0,
|
|
96
|
+
}, ce = /* @__PURE__ */ new Set(["pending", "running"]);
|
|
97
|
+
function le({ status: e, duration: t, meta: n, ...r }) {
|
|
98
|
+
let i = r.command?.trim().split(/\r\n|\n|\r/u)[0], a = i === void 0 || i.length === 0 ? "Command" : i, o = n !== void 0 && n.length > 0, s = t !== void 0 && t.length > 0, c = o || s, u = c ? /* @__PURE__ */ M("span", {
|
|
100
99
|
className: "x3nfvp2 x6s0dn4 x1hnptsi xvc5jky x2lah0s xy8obcc xss6m8b x153jb6y xuxw1ft",
|
|
101
|
-
children: [o && /* @__PURE__ */
|
|
100
|
+
children: [o && /* @__PURE__ */ j("span", {
|
|
102
101
|
className: "x153jb6y",
|
|
103
102
|
children: n
|
|
104
|
-
}), s && /* @__PURE__ */
|
|
103
|
+
}), s && /* @__PURE__ */ j("span", {
|
|
105
104
|
className: "x153jb6y",
|
|
106
105
|
children: t
|
|
107
106
|
})]
|
|
108
|
-
}) : null, d = /* @__PURE__ */
|
|
107
|
+
}) : null, d = /* @__PURE__ */ M("span", {
|
|
109
108
|
...{
|
|
110
109
|
0: { className: "x3nfvp2 x6s0dn4 x1hnptsi xeuugli x153jb6y xj57cvi" },
|
|
111
110
|
1: { className: "x6s0dn4 x1hnptsi xeuugli x153jb6y xj57cvi x78zum5 x12lumcd" }
|
|
112
|
-
}[!!
|
|
111
|
+
}[!!c | 0],
|
|
113
112
|
children: [
|
|
114
|
-
/* @__PURE__ */
|
|
113
|
+
/* @__PURE__ */ j(I, {
|
|
115
114
|
size: 14,
|
|
116
115
|
"aria-hidden": !0,
|
|
117
116
|
className: "x2lah0s"
|
|
118
117
|
}),
|
|
119
|
-
/* @__PURE__ */
|
|
118
|
+
/* @__PURE__ */ j("span", {
|
|
120
119
|
className: "xiard35 xy8obcc xeuugli xb3r6kr xlyipyv x1sdyfia",
|
|
121
120
|
children: a
|
|
122
121
|
}),
|
|
123
|
-
|
|
122
|
+
G[e].length > 0 && /* @__PURE__ */ j("span", {
|
|
124
123
|
className: "x2lah0s xy8obcc x153jb6y",
|
|
125
|
-
children:
|
|
124
|
+
children: G[e]
|
|
126
125
|
}),
|
|
127
126
|
u
|
|
128
127
|
]
|
|
129
128
|
});
|
|
130
|
-
return /* @__PURE__ */
|
|
129
|
+
return /* @__PURE__ */ M(l.Root, {
|
|
131
130
|
defaultOpen: !1,
|
|
132
|
-
children: [
|
|
131
|
+
children: [c ? /* @__PURE__ */ j(l.Trigger, {
|
|
133
132
|
className: "xt970qd xunmzkg x153jb6y xj57cvi",
|
|
134
133
|
children: d
|
|
135
|
-
}) : /* @__PURE__ */
|
|
134
|
+
}) : /* @__PURE__ */ j(l.Trigger, {
|
|
136
135
|
variant: "inline",
|
|
137
136
|
children: d
|
|
138
|
-
}), /* @__PURE__ */
|
|
137
|
+
}), /* @__PURE__ */ j(l.Panel, { children: /* @__PURE__ */ j(W, {
|
|
139
138
|
...r,
|
|
140
|
-
isRunning:
|
|
139
|
+
isRunning: ce.has(e)
|
|
141
140
|
}) })]
|
|
142
141
|
});
|
|
143
142
|
}
|
|
144
143
|
// packages/ai/src/conversation.tsx
|
|
145
|
-
var
|
|
146
|
-
function
|
|
147
|
-
let e =
|
|
144
|
+
var K = C(void 0);
|
|
145
|
+
function q() {
|
|
146
|
+
let e = T(K);
|
|
148
147
|
if (e === void 0) throw Error("Render the parts of a conversation inside Conversation.Root.");
|
|
149
148
|
return e;
|
|
150
149
|
}
|
|
151
|
-
function
|
|
150
|
+
function J(e) {
|
|
152
151
|
return e.scrollHeight - e.clientHeight - e.scrollTop <= 1;
|
|
153
152
|
}
|
|
154
|
-
function
|
|
155
|
-
let i =
|
|
153
|
+
function ue({ children: e, initialPosition: t = "end", shouldFollow: n = !0, viewportRef: r }) {
|
|
154
|
+
let i = O(null), a = r ?? i, [o] = k(t), [s] = k(H), [c, l] = k(o === "end"), [u] = k(() => ({
|
|
156
155
|
controller: s,
|
|
157
156
|
viewport: a,
|
|
158
157
|
reachEnd: () => l(!0)
|
|
159
158
|
}));
|
|
160
|
-
return
|
|
159
|
+
return D(() => {
|
|
161
160
|
typeof o == "object" && a.current?.scrollTo({
|
|
162
161
|
top: o.top,
|
|
163
162
|
left: o.left ?? 0,
|
|
164
163
|
behavior: "instant"
|
|
165
164
|
});
|
|
166
|
-
}, [o, a]), /* @__PURE__ */
|
|
165
|
+
}, [o, a]), /* @__PURE__ */ j(K.Provider, {
|
|
167
166
|
value: u,
|
|
168
|
-
children: /* @__PURE__ */
|
|
167
|
+
children: /* @__PURE__ */ j(R, {
|
|
169
168
|
stickToEnd: n && c,
|
|
170
169
|
controller: s,
|
|
171
170
|
className: "x1n2onr6 x78zum5 xdt5ytf x5yr21d x2lwn1j xeuugli xpvm0e4 xbixft x1hz01jw xtqrqnz x1778rvt xj57cvi",
|
|
@@ -173,25 +172,25 @@ function le({ children: e, initialPosition: t = "end", shouldFollow: n = !0, vie
|
|
|
173
172
|
})
|
|
174
173
|
});
|
|
175
174
|
}
|
|
176
|
-
function
|
|
177
|
-
let { viewport: r, reachEnd: i } =
|
|
178
|
-
r.current = e, e !== null &&
|
|
175
|
+
function de({ label: e, children: t, scrollRestorationId: n }) {
|
|
176
|
+
let { viewport: r, reachEnd: i } = q(), a = w((e) => {
|
|
177
|
+
r.current = e, e !== null && J(e) && i();
|
|
179
178
|
}, [r, i]);
|
|
180
|
-
return /* @__PURE__ */
|
|
179
|
+
return /* @__PURE__ */ j(V, {
|
|
181
180
|
ref: a,
|
|
182
181
|
role: "region",
|
|
183
182
|
"aria-label": e,
|
|
184
183
|
tabIndex: 0,
|
|
185
184
|
"data-scroll-restoration-id": n,
|
|
186
185
|
onScroll: (e) => {
|
|
187
|
-
|
|
186
|
+
J(e.currentTarget) && i();
|
|
188
187
|
},
|
|
189
188
|
className: "x98rzlu x2lwn1j xeuugli x1odjw0f x1046ku7 x185mbhu xbluxkr x1ok0vyi x1t137rt x13qnu6 x9v5kkp x19rmrnh x1bqaal",
|
|
190
189
|
children: t
|
|
191
190
|
});
|
|
192
191
|
}
|
|
193
|
-
function
|
|
194
|
-
return /* @__PURE__ */
|
|
192
|
+
function fe({ children: e, isStreaming: t = !1 }) {
|
|
193
|
+
return /* @__PURE__ */ j(z, {
|
|
195
194
|
"aria-live": "polite",
|
|
196
195
|
"aria-relevant": "additions",
|
|
197
196
|
"aria-busy": t,
|
|
@@ -199,58 +198,58 @@ function de({ children: e, isStreaming: t = !1 }) {
|
|
|
199
198
|
children: e
|
|
200
199
|
});
|
|
201
200
|
}
|
|
202
|
-
function
|
|
203
|
-
let { controller: r } =
|
|
204
|
-
return
|
|
201
|
+
function Y({ messageId: e, shouldRevealOnAppend: t = !1, children: n }) {
|
|
202
|
+
let { controller: r } = q();
|
|
203
|
+
return D(() => {
|
|
205
204
|
t && r.scrollToEnd({ behavior: "instant" });
|
|
206
205
|
}, [
|
|
207
206
|
e,
|
|
208
207
|
t,
|
|
209
208
|
r
|
|
210
|
-
]), /* @__PURE__ */
|
|
209
|
+
]), /* @__PURE__ */ j("div", {
|
|
211
210
|
"data-message-id": e,
|
|
212
211
|
className: "xeuugli xj0a0fe",
|
|
213
212
|
children: n
|
|
214
213
|
});
|
|
215
214
|
}
|
|
216
215
|
function pe({ children: e }) {
|
|
217
|
-
return /* @__PURE__ */
|
|
216
|
+
return /* @__PURE__ */ j("div", {
|
|
218
217
|
className: "x9f619 x2lah0s xeuugli xh8yej3 xe10afn xvueqy4 xn9t2bk x1m92p3w",
|
|
219
218
|
children: e
|
|
220
219
|
});
|
|
221
220
|
}
|
|
222
221
|
function me({ label: e = "Jump to latest" }) {
|
|
223
|
-
return /* @__PURE__ */
|
|
222
|
+
return /* @__PURE__ */ j(B, { render: (n, { visible: r }) => /* @__PURE__ */ j("div", {
|
|
224
223
|
hidden: !r,
|
|
225
224
|
className: "x10l6tqk xwthv0x x1nrll8i xuuh30 x1tv4vx4 xeuugli",
|
|
226
|
-
children: /* @__PURE__ */
|
|
227
|
-
...
|
|
228
|
-
children: [/* @__PURE__ */
|
|
225
|
+
children: /* @__PURE__ */ M(t, {
|
|
226
|
+
...n,
|
|
227
|
+
children: [/* @__PURE__ */ j(N, {
|
|
229
228
|
size: 14,
|
|
230
229
|
"aria-hidden": !0
|
|
231
230
|
}), e]
|
|
232
231
|
})
|
|
233
232
|
}) });
|
|
234
233
|
}
|
|
235
|
-
function he({ label: e, onActivate:
|
|
236
|
-
let { controller: r, viewport: i } =
|
|
237
|
-
return /* @__PURE__ */
|
|
234
|
+
function he({ label: e, onActivate: n }) {
|
|
235
|
+
let { controller: r, viewport: i } = q();
|
|
236
|
+
return /* @__PURE__ */ M(t, {
|
|
238
237
|
onClick: () => {
|
|
239
|
-
|
|
238
|
+
n?.(), requestAnimationFrame(() => {
|
|
240
239
|
r.scrollToEnd({ behavior: "instant" }), i.current?.focus({ preventScroll: !0 });
|
|
241
240
|
});
|
|
242
241
|
},
|
|
243
|
-
children: [/* @__PURE__ */
|
|
242
|
+
children: [/* @__PURE__ */ j(N, {
|
|
244
243
|
size: 14,
|
|
245
244
|
"aria-hidden": !0
|
|
246
245
|
}), e]
|
|
247
246
|
});
|
|
248
247
|
}
|
|
249
248
|
var ge = {
|
|
250
|
-
Root:
|
|
251
|
-
Viewport:
|
|
252
|
-
Content:
|
|
253
|
-
Item:
|
|
249
|
+
Root: ue,
|
|
250
|
+
Viewport: de,
|
|
251
|
+
Content: fe,
|
|
252
|
+
Item: Y,
|
|
254
253
|
Controls: pe,
|
|
255
254
|
LatestButton: he,
|
|
256
255
|
JumpToLatest: me
|
|
@@ -347,7 +346,7 @@ var ge = {
|
|
|
347
346
|
function Z({ kind: e }) {
|
|
348
347
|
return { kind: e };
|
|
349
348
|
}
|
|
350
|
-
var be =
|
|
349
|
+
var be = A({
|
|
351
350
|
name: "message",
|
|
352
351
|
options: { kind: "string" },
|
|
353
352
|
state: Z,
|
|
@@ -359,7 +358,7 @@ var be = j({
|
|
|
359
358
|
root: e({}),
|
|
360
359
|
description: e({})
|
|
361
360
|
})
|
|
362
|
-
}), { Root: xe, Description: Se } =
|
|
361
|
+
}), { Root: xe, Description: Se } = S(be, {
|
|
363
362
|
root: "article",
|
|
364
363
|
description: "div"
|
|
365
364
|
}), Ce = {
|
|
@@ -367,48 +366,48 @@ var be = j({
|
|
|
367
366
|
$$css: !0
|
|
368
367
|
};
|
|
369
368
|
function we({ author: e, children: t, id: n, kind: r = "assistant", meta: i, avatar: a, actions: o, attachments: s, variant: c = "default", speaker: l, speakerTone: u = "neutral", quote: d }) {
|
|
370
|
-
let
|
|
369
|
+
let f = c === "chat", m = l !== void 0 && l.length > 0, h = d !== void 0 && d.length > 0, g = !f || a !== void 0 || i !== void 0 || m, _ = e.length > 0 && (!m || e !== l), v = e.length > 0 ? e : l ?? "", y = f && r === "assistant", b = g ? /* @__PURE__ */ M("header", {
|
|
371
370
|
className: "x78zum5 x6s0dn4 x1hnptsi x1a02dak xeuugli",
|
|
372
371
|
children: [
|
|
373
|
-
a !== void 0 && /* @__PURE__ */
|
|
372
|
+
a !== void 0 && /* @__PURE__ */ j("span", {
|
|
374
373
|
className: "x3nfvp2 x2lah0s",
|
|
375
374
|
children: a
|
|
376
375
|
}),
|
|
377
|
-
_ && /* @__PURE__ */
|
|
376
|
+
_ && /* @__PURE__ */ j("span", {
|
|
378
377
|
className: "xk4h15q xeuugli xj0a0fe",
|
|
379
378
|
children: e
|
|
380
379
|
}),
|
|
381
|
-
m && /* @__PURE__ */
|
|
382
|
-
...
|
|
380
|
+
m && /* @__PURE__ */ j("span", {
|
|
381
|
+
...x.props(X.speaker, ve[u]),
|
|
383
382
|
children: l
|
|
384
383
|
}),
|
|
385
|
-
i !== void 0 && /* @__PURE__ */
|
|
384
|
+
i !== void 0 && /* @__PURE__ */ j("div", {
|
|
386
385
|
className: "x153jb6y xy8obcc xas2l8k xss6m8b xeuugli xj0a0fe",
|
|
387
386
|
children: i
|
|
388
387
|
})
|
|
389
388
|
]
|
|
390
389
|
}) : null;
|
|
391
|
-
return /* @__PURE__ */
|
|
390
|
+
return /* @__PURE__ */ M(xe, {
|
|
392
391
|
kind: r,
|
|
393
392
|
...n !== void 0 && { id: n },
|
|
394
393
|
"aria-label": v,
|
|
395
|
-
...
|
|
394
|
+
...x.props(X.root, _e[r], f && ye[r], Ce),
|
|
396
395
|
children: [
|
|
397
396
|
b,
|
|
398
|
-
h && /* @__PURE__ */
|
|
397
|
+
h && /* @__PURE__ */ j("p", {
|
|
399
398
|
title: d,
|
|
400
399
|
className: "x1ghz6dp xyibt8p xyumdvf x1t7ytsu x97x49r x153jb6y xy8obcc xas2l8k xb3r6kr xlyipyv xuxw1ft xeuugli x193iq5w",
|
|
401
400
|
children: d
|
|
402
401
|
}),
|
|
403
|
-
/* @__PURE__ */
|
|
402
|
+
/* @__PURE__ */ j(Se, {
|
|
404
403
|
className: "xeuugli xj0a0fe x1ytb0s6",
|
|
405
|
-
children:
|
|
404
|
+
children: f && r === "assistant" && typeof t == "string" ? /* @__PURE__ */ j(p, { children: t }) : t
|
|
406
405
|
}),
|
|
407
|
-
s !== void 0 && /* @__PURE__ */
|
|
406
|
+
s !== void 0 && /* @__PURE__ */ j("div", {
|
|
408
407
|
className: "x78zum5 x1a02dak x1qjc9v5 x1hnptsi xeuugli",
|
|
409
408
|
children: s
|
|
410
409
|
}),
|
|
411
|
-
(o !== void 0 || y) && /* @__PURE__ */
|
|
410
|
+
(o !== void 0 || y) && /* @__PURE__ */ j("footer", {
|
|
412
411
|
...{
|
|
413
412
|
0: { className: "x78zum5 x1a02dak x6s0dn4 xeuugli xunmzkg x1hc1fzr x12vu8c0 xtf8l8m x1thm12b" },
|
|
414
413
|
1: { className: "x78zum5 x1a02dak x6s0dn4 xeuugli xunmzkg x1hc1fzr x12vu8c0 xtf8l8m x1thm12b x17tes2r x17oiadl" }
|
|
@@ -419,25 +418,25 @@ function we({ author: e, children: t, id: n, kind: r = "assistant", meta: i, ava
|
|
|
419
418
|
});
|
|
420
419
|
}
|
|
421
420
|
function Te({ name: e, description: t, href: n, actions: r }) {
|
|
422
|
-
return /* @__PURE__ */
|
|
421
|
+
return /* @__PURE__ */ M("div", {
|
|
423
422
|
className: "x78zum5 x1a02dak x6s0dn4 x1n8ia3y xeuugli x193iq5w x1mvvolr xmkeg23 x1y0btm7 x1ey3b81 x1ok0vyi xpvm0e4 x1hz01jw xtqrqnz x1778rvt xj57cvi",
|
|
424
423
|
children: [
|
|
425
|
-
/* @__PURE__ */
|
|
424
|
+
/* @__PURE__ */ j(P, {
|
|
426
425
|
size: 16,
|
|
427
426
|
"aria-hidden": !0,
|
|
428
427
|
className: "x153jb6y x2lah0s"
|
|
429
428
|
}),
|
|
430
|
-
/* @__PURE__ */
|
|
429
|
+
/* @__PURE__ */ M("div", {
|
|
431
430
|
className: "x78zum5 xdt5ytf xfko13i x1slnebi xeuugli xj0a0fe",
|
|
432
|
-
children: [n === void 0 ? /* @__PURE__ */
|
|
431
|
+
children: [n === void 0 ? /* @__PURE__ */ j("span", { children: e }) : /* @__PURE__ */ j(f, {
|
|
433
432
|
href: n,
|
|
434
433
|
children: e
|
|
435
|
-
}), t !== void 0 && /* @__PURE__ */
|
|
434
|
+
}), t !== void 0 && /* @__PURE__ */ j("span", {
|
|
436
435
|
className: "x153jb6y xy8obcc xas2l8k xss6m8b xeuugli xj0a0fe",
|
|
437
436
|
children: t
|
|
438
437
|
})]
|
|
439
438
|
}),
|
|
440
|
-
r !== void 0 && /* @__PURE__ */
|
|
439
|
+
r !== void 0 && /* @__PURE__ */ j("div", {
|
|
441
440
|
className: "x78zum5 x1a02dak x6s0dn4 x1hnptsi xeuugli",
|
|
442
441
|
children: r
|
|
443
442
|
})
|
|
@@ -445,39 +444,39 @@ function Te({ name: e, description: t, href: n, actions: r }) {
|
|
|
445
444
|
});
|
|
446
445
|
}
|
|
447
446
|
// packages/ai/src/message-action.tsx
|
|
448
|
-
function Ee(
|
|
449
|
-
if (
|
|
450
|
-
let { kind:
|
|
451
|
-
return /* @__PURE__ */
|
|
452
|
-
...
|
|
453
|
-
"aria-label":
|
|
447
|
+
function Ee(e) {
|
|
448
|
+
if (e.kind === "link") {
|
|
449
|
+
let { kind: t, label: n, ...r } = e;
|
|
450
|
+
return /* @__PURE__ */ j(o, {
|
|
451
|
+
...r,
|
|
452
|
+
"aria-label": n
|
|
454
453
|
});
|
|
455
454
|
}
|
|
456
|
-
let { kind:
|
|
457
|
-
return /* @__PURE__ */
|
|
458
|
-
...
|
|
455
|
+
let { kind: t, label: n, ...i } = e;
|
|
456
|
+
return /* @__PURE__ */ j(r, {
|
|
457
|
+
...i,
|
|
459
458
|
variant: "ghost",
|
|
460
|
-
"aria-label":
|
|
459
|
+
"aria-label": n
|
|
461
460
|
});
|
|
462
461
|
}
|
|
463
462
|
function De(e) {
|
|
464
|
-
return /* @__PURE__ */
|
|
463
|
+
return /* @__PURE__ */ M(g.Root, { children: [/* @__PURE__ */ j(g.Trigger, { render: Ee(e) }), /* @__PURE__ */ j(g.Popup, { children: e.label })] });
|
|
465
464
|
}
|
|
466
465
|
// packages/ai/src/message-boundary.tsx
|
|
467
466
|
function Oe({ label: e, children: t }) {
|
|
468
|
-
return /* @__PURE__ */
|
|
467
|
+
return /* @__PURE__ */ M(l.Root, {
|
|
469
468
|
className: "xeuugli x1kbiq1m xykt701 xpu655y",
|
|
470
|
-
children: [/* @__PURE__ */
|
|
469
|
+
children: [/* @__PURE__ */ M(l.Trigger, {
|
|
471
470
|
className: "xlqzeqv x1hnptsi x153jb6y xy8obcc xas2l8k xj57cvi",
|
|
472
|
-
children: [/* @__PURE__ */
|
|
471
|
+
children: [/* @__PURE__ */ j(F, {
|
|
473
472
|
size: 14,
|
|
474
473
|
"aria-hidden": !0,
|
|
475
474
|
className: "x2lah0s"
|
|
476
|
-
}), /* @__PURE__ */
|
|
475
|
+
}), /* @__PURE__ */ j("span", {
|
|
477
476
|
className: "xeuugli xj0a0fe",
|
|
478
477
|
children: e
|
|
479
478
|
})]
|
|
480
|
-
}), /* @__PURE__ */
|
|
479
|
+
}), /* @__PURE__ */ j(l.Panel, {
|
|
481
480
|
className: "x153jb6y xy8obcc xas2l8k",
|
|
482
481
|
children: t
|
|
483
482
|
})]
|
|
@@ -496,24 +495,24 @@ var Q = {
|
|
|
496
495
|
}
|
|
497
496
|
}, $ = "mod+enter";
|
|
498
497
|
function ke({ isCompact: e = !1 }) {
|
|
499
|
-
return /* @__PURE__ */
|
|
498
|
+
return /* @__PURE__ */ j("div", {
|
|
500
499
|
"aria-hidden": !0,
|
|
501
500
|
inert: !0,
|
|
502
501
|
className: "x78zum5 xdt5ytf x1hnptsi xeuugli xh8yej3 xe10afn xvueqy4 xbixft x1hz01jw xtqrqnz x1778rvt xj57cvi",
|
|
503
|
-
children: /* @__PURE__ */
|
|
502
|
+
children: /* @__PURE__ */ M("div", {
|
|
504
503
|
className: "x78zum5 xdt5ytf x1hnptsi xeuugli x1mvvolr xmkeg23 x1y0btm7 x1ey3b81 xy32g2j x1r7kqkb x1gd1hh4 x1u8w8hx x14xc8xn x1nvizq4 xgzwmep",
|
|
505
|
-
children: [/* @__PURE__ */
|
|
506
|
-
...
|
|
507
|
-
children: /* @__PURE__ */
|
|
504
|
+
children: [/* @__PURE__ */ j("div", {
|
|
505
|
+
...x.props(n.base, n.field, n.textarea, n.plainTextarea),
|
|
506
|
+
children: /* @__PURE__ */ j(v, {
|
|
508
507
|
lines: e ? 1 : 2,
|
|
509
508
|
width: "22ch"
|
|
510
509
|
})
|
|
511
|
-
}), /* @__PURE__ */
|
|
510
|
+
}), /* @__PURE__ */ M("div", {
|
|
512
511
|
className: "x78zum5 x1a02dak x6s0dn4 x1qughib x1hnptsi",
|
|
513
|
-
children: [/* @__PURE__ */
|
|
512
|
+
children: [/* @__PURE__ */ j("div", {
|
|
514
513
|
className: "x78zum5 x1a02dak x6s0dn4 x1hnptsi xeuugli x12lumcd xy8obcc xas2l8k",
|
|
515
|
-
children: /* @__PURE__ */
|
|
516
|
-
}), /* @__PURE__ */
|
|
514
|
+
children: /* @__PURE__ */ j(v, { width: "8ch" })
|
|
515
|
+
}), /* @__PURE__ */ j(_, {
|
|
517
516
|
isIconOnly: !0,
|
|
518
517
|
xstyle: Q.action
|
|
519
518
|
})]
|
|
@@ -521,117 +520,117 @@ function ke({ isCompact: e = !1 }) {
|
|
|
521
520
|
})
|
|
522
521
|
});
|
|
523
522
|
}
|
|
524
|
-
function Ae({ label:
|
|
525
|
-
let
|
|
526
|
-
history:
|
|
527
|
-
value:
|
|
528
|
-
onValueChange:
|
|
523
|
+
function Ae({ label: e, value: t, onValueChange: n, onSubmit: i, name: a = "prompt", placeholder: o, maxLength: s, required: c = !0, isPending: l = !1, disabled: u = !1, isSubmitDisabled: d = !1, submitLabel: f = "Send message", pendingLabel: p = "Sending…", enterBehavior: m = "newline", history: h, isCompact: _ = !1, description: v, error: S, controls: C, attachments: w, onStop: T, isStopPending: E = !1, stopLabel: A = "Stop response" }) {
|
|
524
|
+
let N = te(), P = u, F = _ && w === void 0 && C === void 0, I = !P && !l && !d, R = se($), z = O({
|
|
525
|
+
history: h,
|
|
526
|
+
value: t,
|
|
527
|
+
onValueChange: n
|
|
529
528
|
});
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
history:
|
|
533
|
-
value:
|
|
534
|
-
onValueChange:
|
|
529
|
+
D(() => {
|
|
530
|
+
z.current = {
|
|
531
|
+
history: h,
|
|
532
|
+
value: t,
|
|
533
|
+
onValueChange: n
|
|
535
534
|
};
|
|
536
535
|
});
|
|
537
|
-
let [
|
|
538
|
-
entries: () =>
|
|
539
|
-
read: () =>
|
|
540
|
-
write: (e, t) => !
|
|
536
|
+
let [B] = k(() => ne({
|
|
537
|
+
entries: () => z.current.history,
|
|
538
|
+
read: () => z.current.value,
|
|
539
|
+
write: (e, t) => !re({ options: () => z.current }, "onValueChange", e, {
|
|
541
540
|
reason: "input-change",
|
|
542
541
|
event: t
|
|
543
542
|
})
|
|
544
|
-
})),
|
|
545
|
-
|
|
546
|
-
function
|
|
547
|
-
if (
|
|
548
|
-
let t =
|
|
549
|
-
(t || m === "submit" && n) && (e.preventDefault(),
|
|
543
|
+
})), V = `${f} · ${R.text}`;
|
|
544
|
+
T === void 0 ? l ? V = p : m === "submit" && (V = `${f} · Enter`) : V = E ? "Stopping…" : A;
|
|
545
|
+
function H(e) {
|
|
546
|
+
if (B.keydown(e.nativeEvent) || e.key !== "Enter" || e.repeat || ie(e)) return;
|
|
547
|
+
let t = L(e.nativeEvent, $), n = !t && L(e.nativeEvent, "enter");
|
|
548
|
+
(t || m === "submit" && n) && (e.preventDefault(), I && T === void 0 && e.currentTarget.form?.requestSubmit());
|
|
550
549
|
}
|
|
551
|
-
function
|
|
552
|
-
e.preventDefault(),
|
|
550
|
+
function U(e) {
|
|
551
|
+
e.preventDefault(), I && T === void 0 && i(e);
|
|
553
552
|
}
|
|
554
|
-
return /* @__PURE__ */
|
|
555
|
-
onSubmit:
|
|
553
|
+
return /* @__PURE__ */ j("form", {
|
|
554
|
+
onSubmit: U,
|
|
556
555
|
className: "x78zum5 xdt5ytf x1hnptsi xeuugli xh8yej3 xe10afn xvueqy4 xbixft x1hz01jw xtqrqnz x1778rvt xj57cvi",
|
|
557
|
-
children: /* @__PURE__ */
|
|
558
|
-
invalid:
|
|
556
|
+
children: /* @__PURE__ */ M(b.Root, {
|
|
557
|
+
invalid: S !== void 0,
|
|
559
558
|
children: [
|
|
560
|
-
/* @__PURE__ */
|
|
561
|
-
...
|
|
562
|
-
children:
|
|
559
|
+
/* @__PURE__ */ j(b.Label, {
|
|
560
|
+
...x.props(ee.hidden),
|
|
561
|
+
children: e
|
|
563
562
|
}),
|
|
564
|
-
/* @__PURE__ */
|
|
563
|
+
/* @__PURE__ */ M("div", {
|
|
565
564
|
...{
|
|
566
565
|
0: { className: "x78zum5 xdt5ytf x1hnptsi xeuugli x1mvvolr xmkeg23 x1y0btm7 x1ey3b81 xy32g2j x1r7kqkb x1gd1hh4 x1u8w8hx x14xc8xn x1nvizq4 xgzwmep" },
|
|
567
566
|
2: { className: "x78zum5 x1hnptsi xeuugli x1mvvolr xmkeg23 x1y0btm7 x1ey3b81 xy32g2j x1r7kqkb x1gd1hh4 x1u8w8hx x14xc8xn x1nvizq4 xgzwmep x1q0g3np xuk3077 xn9t2bk" },
|
|
568
567
|
1: { className: "x78zum5 xdt5ytf x1hnptsi xeuugli x1mvvolr xmkeg23 x1y0btm7 xy32g2j x1r7kqkb x1gd1hh4 x1u8w8hx x14xc8xn x1nvizq4 xgzwmep x1oddvo6" },
|
|
569
568
|
3: { className: "x78zum5 x1hnptsi xeuugli x1mvvolr xmkeg23 x1y0btm7 xy32g2j x1r7kqkb x1gd1hh4 x1u8w8hx x14xc8xn x1nvizq4 xgzwmep x1q0g3np xuk3077 xn9t2bk x1oddvo6" }
|
|
570
|
-
}[!!
|
|
569
|
+
}[!!F << 1 | S !== void 0],
|
|
571
570
|
children: [
|
|
572
|
-
/* @__PURE__ */
|
|
571
|
+
/* @__PURE__ */ j(y, {
|
|
573
572
|
isSensitive: !0,
|
|
574
573
|
appearance: "plain",
|
|
575
574
|
rows: _ ? 1 : 2,
|
|
576
575
|
isCompact: _,
|
|
577
|
-
shouldGrow:
|
|
578
|
-
xstyle:
|
|
576
|
+
shouldGrow: F,
|
|
577
|
+
xstyle: F ? Q.inlineInput : void 0,
|
|
579
578
|
name: a,
|
|
580
|
-
value:
|
|
581
|
-
onValueChange:
|
|
582
|
-
onKeyDown:
|
|
583
|
-
placeholder: o ??
|
|
579
|
+
value: t,
|
|
580
|
+
onValueChange: n,
|
|
581
|
+
onKeyDown: H,
|
|
582
|
+
placeholder: o ?? e,
|
|
584
583
|
maxLength: s,
|
|
585
584
|
required: c,
|
|
586
585
|
disabled: u,
|
|
587
|
-
"aria-errormessage":
|
|
586
|
+
"aria-errormessage": S === void 0 ? void 0 : N
|
|
588
587
|
}),
|
|
589
|
-
|
|
590
|
-
/* @__PURE__ */
|
|
588
|
+
w,
|
|
589
|
+
/* @__PURE__ */ M("div", {
|
|
591
590
|
...{
|
|
592
591
|
0: { className: "x78zum5 x1a02dak x6s0dn4 x1qughib x1hnptsi" },
|
|
593
592
|
1: { className: "x78zum5 x1a02dak x6s0dn4 x1qughib x1hnptsi x2lah0s" }
|
|
594
|
-
}[!!
|
|
595
|
-
children: [
|
|
593
|
+
}[!!F | 0],
|
|
594
|
+
children: [C !== void 0 && /* @__PURE__ */ j("div", {
|
|
596
595
|
className: "x78zum5 x1a02dak x6s0dn4 x1hnptsi xeuugli x12lumcd",
|
|
597
|
-
children:
|
|
598
|
-
}), /* @__PURE__ */
|
|
596
|
+
children: C
|
|
597
|
+
}), /* @__PURE__ */ M(g.Root, { children: [/* @__PURE__ */ j(g.Trigger, { render: T === void 0 ? /* @__PURE__ */ j(r, {
|
|
599
598
|
xstyle: Q.action,
|
|
600
599
|
type: "submit",
|
|
601
600
|
"data-agent-confirm": f,
|
|
602
601
|
variant: "solid",
|
|
603
602
|
"aria-label": l ? p : f,
|
|
604
|
-
"aria-keyshortcuts": m === "submit" ? `Enter ${
|
|
603
|
+
"aria-keyshortcuts": m === "submit" ? `Enter ${R.ariaKeyshortcuts}` : R.ariaKeyshortcuts,
|
|
605
604
|
disabled: u || d,
|
|
606
605
|
isPending: l,
|
|
607
|
-
children: /* @__PURE__ */
|
|
606
|
+
children: /* @__PURE__ */ j(ae, {
|
|
608
607
|
size: 16,
|
|
609
608
|
"aria-hidden": !0
|
|
610
609
|
})
|
|
611
|
-
}) : /* @__PURE__ */
|
|
610
|
+
}) : /* @__PURE__ */ j(r, {
|
|
612
611
|
xstyle: Q.action,
|
|
613
612
|
type: "button",
|
|
614
|
-
"data-agent-confirm":
|
|
615
|
-
"aria-label":
|
|
613
|
+
"data-agent-confirm": A,
|
|
614
|
+
"aria-label": E ? "Stopping…" : A,
|
|
616
615
|
onClick: (e) => {
|
|
617
|
-
e.preventDefault(),
|
|
616
|
+
e.preventDefault(), T();
|
|
618
617
|
},
|
|
619
618
|
disabled: u,
|
|
620
|
-
isPending:
|
|
621
|
-
children: /* @__PURE__ */
|
|
619
|
+
isPending: E,
|
|
620
|
+
children: /* @__PURE__ */ j(oe, {
|
|
622
621
|
size: 14,
|
|
623
622
|
"aria-hidden": !0
|
|
624
623
|
})
|
|
625
|
-
}) }), /* @__PURE__ */
|
|
624
|
+
}) }), /* @__PURE__ */ j(g.Popup, { children: V })] })]
|
|
626
625
|
})
|
|
627
626
|
]
|
|
628
627
|
}),
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
id:
|
|
628
|
+
v !== void 0 && /* @__PURE__ */ j(b.Description, { children: v }),
|
|
629
|
+
S !== void 0 && /* @__PURE__ */ j(b.Error, {
|
|
630
|
+
id: N,
|
|
632
631
|
match: !0,
|
|
633
632
|
role: "alert",
|
|
634
|
-
children:
|
|
633
|
+
children: S
|
|
635
634
|
})
|
|
636
635
|
]
|
|
637
636
|
})
|
|
@@ -639,14 +638,14 @@ function Ae({ label: t, value: n, onValueChange: r, onSubmit: i, name: a = "prom
|
|
|
639
638
|
}
|
|
640
639
|
// packages/ai/src/reply-indicator.tsx
|
|
641
640
|
function je({ label: e, delayMs: t = 200, isAnimated: n = !0 }) {
|
|
642
|
-
let [r, i] =
|
|
643
|
-
return
|
|
641
|
+
let [r, i] = k(t === 0), { ref: a, isActive: o } = m(n && r);
|
|
642
|
+
return E(() => {
|
|
644
643
|
let e = setTimeout(() => i(!0), t);
|
|
645
644
|
return () => clearTimeout(e);
|
|
646
|
-
}, [t]), /* @__PURE__ */
|
|
645
|
+
}, [t]), /* @__PURE__ */ j("div", {
|
|
647
646
|
ref: a,
|
|
648
647
|
className: "x1tn5z8q x153jb6y x1hz01jw xtqrqnz x1ytb0s6",
|
|
649
|
-
children: r && /* @__PURE__ */
|
|
648
|
+
children: r && /* @__PURE__ */ j("span", {
|
|
650
649
|
role: "status",
|
|
651
650
|
...{
|
|
652
651
|
0: {},
|
|
@@ -660,26 +659,26 @@ function je({ label: e, delayMs: t = 200, isAnimated: n = !0 }) {
|
|
|
660
659
|
}
|
|
661
660
|
// packages/ai/src/sources.tsx
|
|
662
661
|
function Me({ sources: e, label: t = "Sources" }) {
|
|
663
|
-
return /* @__PURE__ */
|
|
662
|
+
return /* @__PURE__ */ M("section", {
|
|
664
663
|
"aria-label": t,
|
|
665
664
|
className: "x78zum5 xdt5ytf x1hnptsi xeuugli x1hz01jw xtqrqnz x1778rvt xj57cvi xbixft",
|
|
666
665
|
children: [
|
|
667
|
-
/* @__PURE__ */
|
|
666
|
+
/* @__PURE__ */ j("h3", {
|
|
668
667
|
className: "x1ghz6dp xtqrqnz x1778rvt xk4h15q xj0a0fe",
|
|
669
668
|
children: t
|
|
670
669
|
}),
|
|
671
|
-
e.length === 0 && /* @__PURE__ */
|
|
670
|
+
e.length === 0 && /* @__PURE__ */ j("p", {
|
|
672
671
|
className: "x1ghz6dp x153jb6y xy8obcc xas2l8k xj0a0fe",
|
|
673
672
|
children: "No sources supplied."
|
|
674
673
|
}),
|
|
675
|
-
/* @__PURE__ */
|
|
674
|
+
/* @__PURE__ */ j("ol", {
|
|
676
675
|
className: "x78zum5 xdt5ytf x1n8ia3y x1ghz6dp x1717udv x3ct3a4",
|
|
677
|
-
children: e.map((e) => /* @__PURE__ */
|
|
676
|
+
children: e.map((e) => /* @__PURE__ */ M("li", {
|
|
678
677
|
className: "x78zum5 xdt5ytf xfko13i xeuugli xj0a0fe",
|
|
679
|
-
children: [/* @__PURE__ */
|
|
678
|
+
children: [/* @__PURE__ */ j("span", { children: /* @__PURE__ */ j(f, {
|
|
680
679
|
href: e.href,
|
|
681
680
|
children: e.title
|
|
682
|
-
}) }), e.description !== void 0 && /* @__PURE__ */
|
|
681
|
+
}) }), e.description !== void 0 && /* @__PURE__ */ j("p", {
|
|
683
682
|
className: "x1ghz6dp x153jb6y xy8obcc xas2l8k xj0a0fe",
|
|
684
683
|
children: e.description
|
|
685
684
|
})]
|
|
@@ -688,22 +687,22 @@ function Me({ sources: e, label: t = "Sources" }) {
|
|
|
688
687
|
]
|
|
689
688
|
});
|
|
690
689
|
}
|
|
691
|
-
function Ne({ source:
|
|
692
|
-
return /* @__PURE__ */
|
|
690
|
+
function Ne({ source: t, label: n }) {
|
|
691
|
+
return /* @__PURE__ */ j("span", {
|
|
693
692
|
className: "xt0psk2 x11njtxf xss6m8b",
|
|
694
|
-
children: /* @__PURE__ */
|
|
695
|
-
render: /* @__PURE__ */
|
|
696
|
-
"aria-label": `Source ${
|
|
697
|
-
children:
|
|
698
|
-
}), /* @__PURE__ */
|
|
693
|
+
children: /* @__PURE__ */ M(h.Root, { children: [/* @__PURE__ */ j(h.Trigger, {
|
|
694
|
+
render: /* @__PURE__ */ j(e, {}),
|
|
695
|
+
"aria-label": `Source ${n}: ${t.title}`,
|
|
696
|
+
children: n
|
|
697
|
+
}), /* @__PURE__ */ j(h.Popup, {
|
|
699
698
|
side: "top",
|
|
700
|
-
children: /* @__PURE__ */
|
|
699
|
+
children: /* @__PURE__ */ M(i, {
|
|
701
700
|
isCompact: !0,
|
|
702
701
|
children: [
|
|
703
|
-
/* @__PURE__ */
|
|
704
|
-
|
|
705
|
-
/* @__PURE__ */
|
|
706
|
-
href:
|
|
702
|
+
/* @__PURE__ */ j(h.Title, { children: t.title }),
|
|
703
|
+
t.description !== void 0 && /* @__PURE__ */ j(h.Description, { children: t.description }),
|
|
704
|
+
/* @__PURE__ */ j(f, {
|
|
705
|
+
href: t.href,
|
|
707
706
|
children: "Open source"
|
|
708
707
|
})
|
|
709
708
|
]
|
|
@@ -711,4 +710,4 @@ function Ne({ source: e, label: t }) {
|
|
|
711
710
|
})] })
|
|
712
711
|
});
|
|
713
712
|
}
|
|
714
|
-
export {
|
|
713
|
+
export { U as Approval, le as CommandActivity, W as CommandDetails, ge as Conversation, Ne as InlineCitation, we as Message, De as MessageAction, Te as MessageAttachment, Oe as MessageBoundary, Ae as PromptInput, ke as PromptInputPlaceholder, je as ReplyIndicator, Me as Sources };
|