@actioneer/ads 0.2.3 → 0.3.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/components/ai-elements/chain-of-thought.d.ts +88 -19
- package/components/ai-elements/chain-of-thought.js +358 -149
- package/components/ai-elements/chart.d.ts +30 -0
- package/components/ai-elements/chart.js +303 -0
- package/components/ai-elements/index.d.ts +2 -1
- package/components/ai-elements/message.d.ts +19 -4
- package/components/ai-elements/message.js +177 -130
- package/components/ai-elements/research-activity.d.ts +45 -0
- package/components/ai-elements/research-activity.js +260 -0
- package/components/ai-elements/task-progress.js +69 -66
- package/components/ai-elements/tool.js +42 -38
- package/components/answer.d.ts +19 -0
- package/components/answer.js +363 -300
- package/components/assistant-ui/attachment.js +5 -1
- package/components/assistant-ui/composer-deep-research.js +44 -29
- package/components/assistant-ui/composer-harness.js +55 -38
- package/components/assistant-ui/composer.js +16 -16
- package/components/assistant-ui/index.d.ts +0 -1
- package/components/assistant-ui/message.d.ts +7 -0
- package/components/assistant-ui/message.js +64 -51
- package/components/assistant-ui/primitives.d.ts +1 -1
- package/components/assistant-ui/thread-context.d.ts +2 -0
- package/components/assistant-ui/thread.js +34 -32
- package/components/brand-texture.d.ts +37 -0
- package/components/brand-texture.js +54 -0
- package/components/chart.d.ts +64 -2
- package/components/chart.js +717 -456
- package/components/code-block.d.ts +36 -0
- package/components/code-block.js +136 -0
- package/components/command-palette.d.ts +43 -0
- package/components/command-palette.js +146 -0
- package/components/drawer.d.ts +1 -1
- package/components/file-dropzone.d.ts +32 -0
- package/components/file-dropzone.js +134 -0
- package/components/index.d.ts +11 -0
- package/components/index.js +480 -430
- package/components/infinite-canvas.d.ts +50 -0
- package/components/infinite-canvas.js +215 -0
- package/components/page-header.d.ts +22 -0
- package/components/page-header.js +52 -0
- package/components/resizable-panel.d.ts +29 -0
- package/components/resizable-panel.js +102 -0
- package/components/reveal.d.ts +36 -0
- package/components/reveal.js +35 -0
- package/components/scroll-area.d.ts +19 -0
- package/components/scroll-area.js +57 -0
- package/components/setting-row.d.ts +35 -0
- package/components/setting-row.js +86 -0
- package/components/sidebar.d.ts +4 -1
- package/components/sidebar.js +134 -132
- package/components/stepper.d.ts +32 -0
- package/components/stepper.js +113 -0
- package/components/table.js +16 -15
- package/components/tabs.js +1 -1
- package/hooks/agents-ui/voice-visualizer-types.js +1 -0
- package/lib/icons.d.ts +24 -0
- package/lib/icons.js +100 -110
- package/lib/motion.d.ts +5 -3
- package/lib/motion.js +46 -20
- package/lib/router.js +19 -0
- package/lib/utils.js +5 -0
- package/llms.txt +143 -39
- package/manifest.json +1232 -100
- package/package.json +2 -2
- package/styles.css +71 -28
- package/theme.css +19 -15
- package/components/ai-elements/reasoning.d.ts +0 -26
- package/components/ai-elements/reasoning.js +0 -131
- package/components/assistant-ui/smart-message-text.d.ts +0 -15
- package/components/assistant-ui/smart-message-text.js +0 -29
|
@@ -1,65 +1,102 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as r, jsxs as
|
|
2
|
+
import { jsx as r, jsxs as h, Fragment as w } from "react/jsx-runtime";
|
|
3
3
|
import * as o from "react";
|
|
4
|
-
import { cva as
|
|
5
|
-
import { cn as
|
|
6
|
-
import { Button as
|
|
7
|
-
import { Avatar as
|
|
8
|
-
import { Tooltip as
|
|
4
|
+
import { cva as x } from "class-variance-authority";
|
|
5
|
+
import { cn as i } from "../../lib/cn.js";
|
|
6
|
+
import { Button as f } from "../button.js";
|
|
7
|
+
import { Avatar as M } from "../avatar.js";
|
|
8
|
+
import { Tooltip as b } from "../tooltip.js";
|
|
9
9
|
import { ChevronLeft as B, ChevronRight as R, Paperclip as A, Close as C } from "../../lib/icons.js";
|
|
10
|
-
const z =
|
|
11
|
-
|
|
10
|
+
const z = x("group flex w-full max-w-[95%] flex-col gap-2", {
|
|
11
|
+
variants: {
|
|
12
|
+
align: {
|
|
13
|
+
start: "is-align-start mr-auto items-start",
|
|
14
|
+
end: "is-align-end ml-auto items-end"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
defaultVariants: { align: "start" }
|
|
18
|
+
}), k = o.forwardRef(
|
|
19
|
+
({ align: e, className: t, from: a, ...s }, n) => /* @__PURE__ */ r(
|
|
12
20
|
"div",
|
|
13
21
|
{
|
|
14
|
-
ref:
|
|
15
|
-
className:
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
22
|
+
ref: n,
|
|
23
|
+
className: i(
|
|
24
|
+
z({ align: e ?? "start" }),
|
|
25
|
+
a === "user" ? "is-user" : "is-assistant",
|
|
26
|
+
t
|
|
19
27
|
),
|
|
20
28
|
...s
|
|
21
29
|
}
|
|
22
30
|
)
|
|
23
31
|
);
|
|
24
|
-
|
|
25
|
-
const
|
|
26
|
-
"flex
|
|
32
|
+
k.displayName = "Message";
|
|
33
|
+
const P = x(
|
|
34
|
+
"flex max-w-full min-w-0 flex-col gap-2 overflow-hidden text-base",
|
|
27
35
|
{
|
|
28
36
|
variants: {
|
|
29
37
|
variant: {
|
|
30
38
|
// Contained: the user turn reads as a quiet filled bubble; the
|
|
31
39
|
// assistant turn is plain full-width text.
|
|
32
|
-
contained: "
|
|
40
|
+
contained: "w-fit group-[.is-user]:rounded-xl group-[.is-user]:bg-muted group-[.is-user]:px-4 group-[.is-user]:py-2.5 group-[.is-user]:text-foreground group-[.is-assistant]:text-foreground",
|
|
33
41
|
// Flat: the user turn steps to a recessed tint (no bubble); the
|
|
34
42
|
// assistant turn is full-width plain text — a cleaner, modern look.
|
|
35
|
-
flat: "
|
|
43
|
+
flat: "w-fit group-[.is-user]:rounded-lg group-[.is-user]:bg-surface group-[.is-user]:px-3 group-[.is-user]:py-2 group-[.is-user]:text-foreground group-[.is-assistant]:text-foreground",
|
|
44
|
+
// Plain: no fill, radius, or padding. Pair `align="start"` with a
|
|
45
|
+
// user turn for the clean, left-aligned prompt treatment.
|
|
46
|
+
plain: "w-full text-foreground group-[.is-user]:text-lg",
|
|
47
|
+
// Request: the user turn is a brief put forward for research, not a
|
|
48
|
+
// chat utterance — no fill, no rule, full width, set large and light
|
|
49
|
+
// so it leads the turn on size alone. The answer below is its body.
|
|
50
|
+
// `text-2xl` (26px) is the TOP of the type scale — the request must
|
|
51
|
+
// outrank every heading around it, including a `Heading level={1}`
|
|
52
|
+
// page title, or it stops reading as the thing being asked.
|
|
53
|
+
// `gap-4` sets the question-to-MessageMeta distance (16px): the
|
|
54
|
+
// parameters read as part of the request, and the thread's own
|
|
55
|
+
// turn gap (32px) is the larger break before the answer.
|
|
56
|
+
request: "w-full text-foreground group-[.is-user]:gap-4 group-[.is-user]:text-2xl group-[.is-user]:leading-snug"
|
|
36
57
|
}
|
|
37
58
|
},
|
|
38
|
-
defaultVariants: { variant: "
|
|
59
|
+
defaultVariants: { variant: "request" }
|
|
39
60
|
}
|
|
40
|
-
),
|
|
61
|
+
), T = o.forwardRef(({ children: e, className: t, variant: a, ...s }, n) => /* @__PURE__ */ r(
|
|
41
62
|
"div",
|
|
42
63
|
{
|
|
43
64
|
ref: n,
|
|
44
|
-
className:
|
|
45
|
-
...
|
|
65
|
+
className: i(P({ variant: a }), t),
|
|
66
|
+
...s,
|
|
46
67
|
children: e
|
|
47
68
|
}
|
|
48
69
|
));
|
|
49
|
-
|
|
50
|
-
const
|
|
51
|
-
|
|
70
|
+
T.displayName = "MessageContent";
|
|
71
|
+
const j = o.forwardRef(
|
|
72
|
+
({ className: e, ...t }, a) => /* @__PURE__ */ r(
|
|
73
|
+
"div",
|
|
74
|
+
{
|
|
75
|
+
ref: a,
|
|
76
|
+
"data-slot": "message-meta",
|
|
77
|
+
className: i(
|
|
78
|
+
"flex flex-wrap items-center gap-x-2 gap-y-1.5",
|
|
79
|
+
"text-xs font-normal leading-normal tracking-normal text-tertiary",
|
|
80
|
+
e
|
|
81
|
+
),
|
|
82
|
+
...t
|
|
83
|
+
}
|
|
84
|
+
)
|
|
85
|
+
);
|
|
86
|
+
j.displayName = "MessageMeta";
|
|
87
|
+
const V = o.forwardRef(({ src: e, name: t, className: a, ...s }, n) => /* @__PURE__ */ r(
|
|
88
|
+
M,
|
|
52
89
|
{
|
|
53
90
|
ref: n,
|
|
54
91
|
src: e,
|
|
55
92
|
name: t,
|
|
56
93
|
size: "sm",
|
|
57
|
-
className:
|
|
58
|
-
...
|
|
94
|
+
className: i("ring-2 ring-background", a),
|
|
95
|
+
...s
|
|
59
96
|
}
|
|
60
97
|
));
|
|
61
|
-
|
|
62
|
-
const
|
|
98
|
+
V.displayName = "MessageAvatar";
|
|
99
|
+
const S = i(
|
|
63
100
|
"size-full text-base leading-relaxed text-foreground",
|
|
64
101
|
"[&>*:first-child]:mt-0 [&>*:last-child]:mb-0",
|
|
65
102
|
"[&_p]:my-2",
|
|
@@ -70,83 +107,89 @@ const j = l(
|
|
|
70
107
|
"[&_a]:font-medium [&_a]:underline [&_a]:underline-offset-2",
|
|
71
108
|
"[&_code]:rounded-xs [&_code]:bg-muted [&_code]:px-1 [&_code]:py-0.5 [&_code]:text-xs [&_code]:tabular-nums",
|
|
72
109
|
"[&_pre]:my-3 [&_pre]:overflow-x-auto [&_pre]:rounded-lg [&_pre]:bg-surface [&_pre]:p-3 [&_pre]:text-xs [&_pre_code]:bg-transparent [&_pre_code]:p-0",
|
|
73
|
-
|
|
74
|
-
|
|
110
|
+
// Markdown tables only. Scoped off `[data-slot=table]` so a composed ADS
|
|
111
|
+
// <Table> nested in a response keeps its own padding and per-column
|
|
112
|
+
// alignment — unscoped, these descendant rules silently beat it.
|
|
113
|
+
"[&_table:not([data-slot=table])]:my-3 [&_table:not([data-slot=table])]:w-full [&_table:not([data-slot=table])]:text-xs",
|
|
114
|
+
"[&_table:not([data-slot=table])_th]:px-2 [&_table:not([data-slot=table])_th]:py-1.5 [&_table:not([data-slot=table])_th]:text-left [&_table:not([data-slot=table])_th]:font-bold",
|
|
115
|
+
"[&_table:not([data-slot=table])_td]:px-2 [&_table:not([data-slot=table])_td]:py-1.5",
|
|
116
|
+
"[&_table:not([data-slot=table])_thead]:text-secondary"
|
|
117
|
+
), W = o.memo(
|
|
75
118
|
o.forwardRef(
|
|
76
|
-
({ className: e, children: t, ...
|
|
119
|
+
({ className: e, children: t, ...a }, s) => /* @__PURE__ */ r("div", { ref: s, className: i(S, e), ...a, children: t })
|
|
77
120
|
),
|
|
78
121
|
(e, t) => e.children === t.children
|
|
79
122
|
);
|
|
80
|
-
|
|
81
|
-
const
|
|
123
|
+
W.displayName = "MessageResponse";
|
|
124
|
+
const q = o.forwardRef(({ className: e, children: t, ...a }, s) => /* @__PURE__ */ r(
|
|
82
125
|
"div",
|
|
83
126
|
{
|
|
84
|
-
ref:
|
|
85
|
-
className:
|
|
86
|
-
...
|
|
127
|
+
ref: s,
|
|
128
|
+
className: i("flex items-center gap-1", e),
|
|
129
|
+
...a,
|
|
87
130
|
children: t
|
|
88
131
|
}
|
|
89
132
|
));
|
|
90
|
-
|
|
91
|
-
const
|
|
92
|
-
({ tooltip: e, children: t, label:
|
|
93
|
-
const c = /* @__PURE__ */ f
|
|
133
|
+
q.displayName = "MessageActions";
|
|
134
|
+
const E = o.forwardRef(
|
|
135
|
+
({ tooltip: e, children: t, label: a, variant: s = "ghost", size: n = "icon-sm", ...l }, d) => {
|
|
136
|
+
const c = /* @__PURE__ */ h(f, { ref: d, size: n, type: "button", variant: s, ...l, children: [
|
|
94
137
|
t,
|
|
95
|
-
/* @__PURE__ */ r("span", { className: "sr-only", children:
|
|
138
|
+
/* @__PURE__ */ r("span", { className: "sr-only", children: a || e })
|
|
96
139
|
] });
|
|
97
|
-
return e ? /* @__PURE__ */ r(
|
|
140
|
+
return e ? /* @__PURE__ */ r(b, { content: e, children: c }) : c;
|
|
98
141
|
}
|
|
99
142
|
);
|
|
100
|
-
|
|
101
|
-
const _ = o.createContext(null),
|
|
143
|
+
E.displayName = "MessageAction";
|
|
144
|
+
const _ = o.createContext(null), g = () => {
|
|
102
145
|
const e = o.useContext(_);
|
|
103
146
|
if (!e)
|
|
104
147
|
throw new Error(
|
|
105
148
|
"MessageBranch components must be used within MessageBranch"
|
|
106
149
|
);
|
|
107
150
|
return e;
|
|
108
|
-
},
|
|
109
|
-
const [
|
|
151
|
+
}, I = o.forwardRef(({ defaultBranch: e = 0, onBranchChange: t, className: a, ...s }, n) => {
|
|
152
|
+
const [l, d] = o.useState(e), [c, m] = o.useState([]), p = (u) => {
|
|
110
153
|
d(u), t == null || t(u);
|
|
111
|
-
},
|
|
112
|
-
const u =
|
|
113
|
-
|
|
154
|
+
}, v = () => {
|
|
155
|
+
const u = l > 0 ? l - 1 : c.length - 1;
|
|
156
|
+
p(u);
|
|
114
157
|
}, y = () => {
|
|
115
|
-
const u =
|
|
116
|
-
|
|
117
|
-
},
|
|
118
|
-
currentBranch:
|
|
158
|
+
const u = l < c.length - 1 ? l + 1 : 0;
|
|
159
|
+
p(u);
|
|
160
|
+
}, N = {
|
|
161
|
+
currentBranch: l,
|
|
119
162
|
totalBranches: c.length,
|
|
120
|
-
goToPrevious:
|
|
163
|
+
goToPrevious: v,
|
|
121
164
|
goToNext: y,
|
|
122
165
|
branches: c,
|
|
123
|
-
setBranches:
|
|
166
|
+
setBranches: m
|
|
124
167
|
};
|
|
125
|
-
return /* @__PURE__ */ r(_.Provider, { value:
|
|
168
|
+
return /* @__PURE__ */ r(_.Provider, { value: N, children: /* @__PURE__ */ r(
|
|
126
169
|
"div",
|
|
127
170
|
{
|
|
128
171
|
ref: n,
|
|
129
|
-
className:
|
|
130
|
-
...
|
|
172
|
+
className: i("grid w-full gap-2 [&>div]:pb-0", a),
|
|
173
|
+
...s
|
|
131
174
|
}
|
|
132
175
|
) });
|
|
133
176
|
});
|
|
134
|
-
|
|
135
|
-
const
|
|
177
|
+
I.displayName = "MessageBranch";
|
|
178
|
+
const L = ({
|
|
136
179
|
children: e,
|
|
137
180
|
...t
|
|
138
181
|
}) => {
|
|
139
|
-
const { currentBranch:
|
|
182
|
+
const { currentBranch: a, setBranches: s, branches: n } = g(), l = o.Children.toArray(
|
|
140
183
|
e
|
|
141
184
|
);
|
|
142
185
|
return o.useEffect(() => {
|
|
143
|
-
n.length !==
|
|
144
|
-
}, [
|
|
186
|
+
n.length !== l.length && s(l);
|
|
187
|
+
}, [l, n, s]), /* @__PURE__ */ r(w, { children: l.map((d, c) => /* @__PURE__ */ r(
|
|
145
188
|
"div",
|
|
146
189
|
{
|
|
147
|
-
className:
|
|
190
|
+
className: i(
|
|
148
191
|
"grid gap-2 overflow-hidden [&>div]:pb-0",
|
|
149
|
-
c ===
|
|
192
|
+
c === a ? "block" : "hidden"
|
|
150
193
|
),
|
|
151
194
|
...t,
|
|
152
195
|
children: d
|
|
@@ -154,28 +197,28 @@ const I = ({
|
|
|
154
197
|
d.key
|
|
155
198
|
)) });
|
|
156
199
|
};
|
|
157
|
-
|
|
158
|
-
const
|
|
159
|
-
const { totalBranches: n } =
|
|
200
|
+
L.displayName = "MessageBranchContent";
|
|
201
|
+
const F = o.forwardRef(({ className: e, from: t, ...a }, s) => {
|
|
202
|
+
const { totalBranches: n } = g();
|
|
160
203
|
return n <= 1 ? null : /* @__PURE__ */ r(
|
|
161
204
|
"div",
|
|
162
205
|
{
|
|
163
|
-
ref:
|
|
164
|
-
className:
|
|
165
|
-
...
|
|
206
|
+
ref: s,
|
|
207
|
+
className: i("inline-flex items-center gap-0.5", e),
|
|
208
|
+
...a
|
|
166
209
|
}
|
|
167
210
|
);
|
|
168
211
|
});
|
|
169
|
-
|
|
170
|
-
const
|
|
171
|
-
const { goToPrevious:
|
|
212
|
+
F.displayName = "MessageBranchSelector";
|
|
213
|
+
const D = o.forwardRef(({ children: e, ...t }, a) => {
|
|
214
|
+
const { goToPrevious: s, totalBranches: n } = g();
|
|
172
215
|
return /* @__PURE__ */ r(
|
|
173
|
-
|
|
216
|
+
f,
|
|
174
217
|
{
|
|
175
|
-
ref:
|
|
218
|
+
ref: a,
|
|
176
219
|
"aria-label": "Previous branch",
|
|
177
220
|
disabled: n <= 1,
|
|
178
|
-
onClick:
|
|
221
|
+
onClick: s,
|
|
179
222
|
size: "icon-sm",
|
|
180
223
|
type: "button",
|
|
181
224
|
variant: "ghost",
|
|
@@ -184,16 +227,16 @@ const F = o.forwardRef(({ children: e, ...t }, s) => {
|
|
|
184
227
|
}
|
|
185
228
|
);
|
|
186
229
|
});
|
|
187
|
-
|
|
188
|
-
const
|
|
189
|
-
const { goToNext:
|
|
230
|
+
D.displayName = "MessageBranchPrevious";
|
|
231
|
+
const G = o.forwardRef(({ children: e, ...t }, a) => {
|
|
232
|
+
const { goToNext: s, totalBranches: n } = g();
|
|
190
233
|
return /* @__PURE__ */ r(
|
|
191
|
-
|
|
234
|
+
f,
|
|
192
235
|
{
|
|
193
|
-
ref:
|
|
236
|
+
ref: a,
|
|
194
237
|
"aria-label": "Next branch",
|
|
195
238
|
disabled: n <= 1,
|
|
196
|
-
onClick:
|
|
239
|
+
onClick: s,
|
|
197
240
|
size: "icon-sm",
|
|
198
241
|
type: "button",
|
|
199
242
|
variant: "ghost",
|
|
@@ -202,39 +245,39 @@ const q = o.forwardRef(({ children: e, ...t }, s) => {
|
|
|
202
245
|
}
|
|
203
246
|
);
|
|
204
247
|
});
|
|
205
|
-
|
|
206
|
-
const
|
|
207
|
-
const { currentBranch:
|
|
208
|
-
return /* @__PURE__ */
|
|
248
|
+
G.displayName = "MessageBranchNext";
|
|
249
|
+
const H = o.forwardRef(({ className: e, ...t }, a) => {
|
|
250
|
+
const { currentBranch: s, totalBranches: n } = g();
|
|
251
|
+
return /* @__PURE__ */ h(
|
|
209
252
|
"span",
|
|
210
253
|
{
|
|
211
|
-
ref:
|
|
212
|
-
className:
|
|
254
|
+
ref: a,
|
|
255
|
+
className: i(
|
|
213
256
|
"px-1.5 text-xs tabular-nums text-tertiary select-none",
|
|
214
257
|
e
|
|
215
258
|
),
|
|
216
259
|
...t,
|
|
217
260
|
children: [
|
|
218
|
-
|
|
261
|
+
s + 1,
|
|
219
262
|
" of ",
|
|
220
263
|
n
|
|
221
264
|
]
|
|
222
265
|
}
|
|
223
266
|
);
|
|
224
267
|
});
|
|
225
|
-
|
|
226
|
-
const
|
|
227
|
-
var
|
|
228
|
-
const
|
|
229
|
-
return /* @__PURE__ */
|
|
268
|
+
H.displayName = "MessageBranchPage";
|
|
269
|
+
const J = o.forwardRef(({ data: e, className: t, onRemove: a, ...s }, n) => {
|
|
270
|
+
var m;
|
|
271
|
+
const l = e.filename || "", d = !!((m = e.mediaType) != null && m.startsWith("image/") && e.url), c = l || (d ? "Image" : "Attachment");
|
|
272
|
+
return /* @__PURE__ */ h(
|
|
230
273
|
"div",
|
|
231
274
|
{
|
|
232
275
|
ref: n,
|
|
233
|
-
className:
|
|
276
|
+
className: i(
|
|
234
277
|
"group/attachment relative size-24 overflow-hidden rounded-lg bg-muted",
|
|
235
278
|
t
|
|
236
279
|
),
|
|
237
|
-
...
|
|
280
|
+
...s,
|
|
238
281
|
children: [
|
|
239
282
|
d ? /* @__PURE__ */ r(
|
|
240
283
|
"img",
|
|
@@ -243,17 +286,17 @@ const G = o.forwardRef(({ data: e, className: t, onRemove: s, ...a }, n) => {
|
|
|
243
286
|
className: "size-full object-cover",
|
|
244
287
|
src: e.url
|
|
245
288
|
}
|
|
246
|
-
) : /* @__PURE__ */ r(
|
|
247
|
-
|
|
248
|
-
|
|
289
|
+
) : /* @__PURE__ */ r(b, { content: c, children: /* @__PURE__ */ r("div", { className: "flex size-full items-center justify-center text-muted-foreground", children: /* @__PURE__ */ r(A, { className: "size-4" }) }) }),
|
|
290
|
+
a && /* @__PURE__ */ r(
|
|
291
|
+
f,
|
|
249
292
|
{
|
|
250
293
|
"aria-label": "Remove attachment",
|
|
251
|
-
className:
|
|
294
|
+
className: i(
|
|
252
295
|
"absolute top-1.5 right-1.5 size-6 rounded-full p-0 opacity-0 transition-opacity group-hover/attachment:opacity-100",
|
|
253
296
|
d && "bg-elevated/80 backdrop-blur-sm hover:bg-elevated"
|
|
254
297
|
),
|
|
255
|
-
onClick: (
|
|
256
|
-
|
|
298
|
+
onClick: (p) => {
|
|
299
|
+
p.stopPropagation(), a();
|
|
257
300
|
},
|
|
258
301
|
size: "icon-xs",
|
|
259
302
|
type: "button",
|
|
@@ -265,44 +308,48 @@ const G = o.forwardRef(({ data: e, className: t, onRemove: s, ...a }, n) => {
|
|
|
265
308
|
}
|
|
266
309
|
);
|
|
267
310
|
});
|
|
268
|
-
|
|
269
|
-
const
|
|
311
|
+
J.displayName = "MessageAttachment";
|
|
312
|
+
const K = o.forwardRef(({ children: e, className: t, ...a }, s) => e ? /* @__PURE__ */ r(
|
|
270
313
|
"div",
|
|
271
314
|
{
|
|
272
|
-
ref:
|
|
273
|
-
className:
|
|
274
|
-
|
|
315
|
+
ref: s,
|
|
316
|
+
className: i(
|
|
317
|
+
"flex w-fit flex-wrap items-start gap-2 group-[.is-align-start]:mr-auto group-[.is-align-end]:ml-auto",
|
|
318
|
+
t
|
|
319
|
+
),
|
|
320
|
+
...a,
|
|
275
321
|
children: e
|
|
276
322
|
}
|
|
277
323
|
) : null);
|
|
278
|
-
|
|
279
|
-
const
|
|
324
|
+
K.displayName = "MessageAttachments";
|
|
325
|
+
const O = o.forwardRef(({ className: e, children: t, ...a }, s) => /* @__PURE__ */ r(
|
|
280
326
|
"div",
|
|
281
327
|
{
|
|
282
|
-
ref:
|
|
283
|
-
className:
|
|
328
|
+
ref: s,
|
|
329
|
+
className: i(
|
|
284
330
|
"mt-3 flex w-full items-center justify-between gap-4",
|
|
285
331
|
e
|
|
286
332
|
),
|
|
287
|
-
...
|
|
333
|
+
...a,
|
|
288
334
|
children: t
|
|
289
335
|
}
|
|
290
336
|
));
|
|
291
|
-
|
|
337
|
+
O.displayName = "MessageToolbar";
|
|
292
338
|
export {
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
339
|
+
k as Message,
|
|
340
|
+
E as MessageAction,
|
|
341
|
+
q as MessageActions,
|
|
342
|
+
J as MessageAttachment,
|
|
343
|
+
K as MessageAttachments,
|
|
344
|
+
V as MessageAvatar,
|
|
345
|
+
I as MessageBranch,
|
|
346
|
+
L as MessageBranchContent,
|
|
347
|
+
G as MessageBranchNext,
|
|
348
|
+
H as MessageBranchPage,
|
|
349
|
+
D as MessageBranchPrevious,
|
|
350
|
+
F as MessageBranchSelector,
|
|
351
|
+
T as MessageContent,
|
|
352
|
+
j as MessageMeta,
|
|
353
|
+
W as MessageResponse,
|
|
354
|
+
O as MessageToolbar
|
|
308
355
|
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export type ResearchActivityStatus = "active" | "complete";
|
|
3
|
+
export interface ResearchActivityProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "children"> {
|
|
4
|
+
status: ResearchActivityStatus;
|
|
5
|
+
/** Consumer-formatted elapsed or total time, for example `0:36`. */
|
|
6
|
+
elapsed: React.ReactNode;
|
|
7
|
+
sourceCount: number;
|
|
8
|
+
/** Consumer-formatted time to the first useful result. */
|
|
9
|
+
firstInsight?: React.ReactNode;
|
|
10
|
+
/**
|
|
11
|
+
* What the agent is doing right now, e.g. "Querying NPA movement". When
|
|
12
|
+
* provided, the active state renders as a single live line that morphs
|
|
13
|
+
* between steps — the trace stays behind a click instead of stacking above
|
|
14
|
+
* the answer. Without it, the active trace opens in full (legacy behavior).
|
|
15
|
+
*/
|
|
16
|
+
activity?: React.ReactNode;
|
|
17
|
+
/** Keys the live-line morph. Required when `activity` is not a string. */
|
|
18
|
+
activityKey?: string | number;
|
|
19
|
+
/** 1-based position of the current step — renders a quiet "3 of 7" before the elapsed time. */
|
|
20
|
+
stepIndex?: number;
|
|
21
|
+
/** Total planned steps; the counter renders only when both are provided. */
|
|
22
|
+
stepCount?: number;
|
|
23
|
+
/** Replaces the generated completed summary. */
|
|
24
|
+
summary?: React.ReactNode;
|
|
25
|
+
/**
|
|
26
|
+
* Pin the summary/live line to the top of the scroll container while the
|
|
27
|
+
* trace beneath it scrolls. For long open traces, where the line would
|
|
28
|
+
* otherwise scroll away exactly when the run is still moving.
|
|
29
|
+
*/
|
|
30
|
+
sticky?: boolean;
|
|
31
|
+
/** Controlled disclosure of the trace. */
|
|
32
|
+
open?: boolean;
|
|
33
|
+
/** Initial disclosure state. */
|
|
34
|
+
defaultOpen?: boolean;
|
|
35
|
+
onOpenChange?: (open: boolean) => void;
|
|
36
|
+
children: React.ReactNode;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Streaming research disclosure. With an `activity`, the run reads as a single
|
|
40
|
+
* live line — the current step morphing in place while the full trace waits
|
|
41
|
+
* one click away — and completion settles the same line into a source/timing
|
|
42
|
+
* summary. A reader's expand/collapse choice sticks across the transition.
|
|
43
|
+
* Without an `activity`, the active trace stays fully open (legacy behavior).
|
|
44
|
+
*/
|
|
45
|
+
export declare const ResearchActivity: React.ForwardRefExoticComponent<ResearchActivityProps & React.RefAttributes<HTMLDivElement>>;
|