@actioneer/ads 0.2.2 → 0.2.4
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/bin/ads-init.mjs +176 -28
- package/components/ai-elements/chain-of-thought.d.ts +26 -19
- package/components/ai-elements/chain-of-thought.js +140 -150
- package/components/ai-elements/index.d.ts +0 -1
- package/components/ai-elements/message.d.ts +9 -4
- package/components/ai-elements/message.js +102 -88
- package/components/ai-elements/task-progress.js +69 -66
- package/components/answer.d.ts +3 -0
- package/components/answer.js +251 -212
- package/components/assistant-ui/composer-harness.js +24 -25
- package/components/assistant-ui/message.js +49 -36
- 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 +33 -31
- package/components/chart.d.ts +64 -2
- package/components/chart.js +717 -456
- package/components/command-palette.d.ts +43 -0
- package/components/command-palette.js +146 -0
- package/components/index.d.ts +1 -0
- package/components/index.js +383 -382
- package/components/sidebar.d.ts +4 -1
- package/components/sidebar.js +57 -55
- package/hooks/agents-ui/voice-visualizer-types.js +1 -0
- package/lib/icons.d.ts +12 -0
- package/lib/icons.js +97 -110
- package/lib/motion.js +47 -22
- package/lib/router.js +19 -0
- package/lib/utils.js +5 -0
- package/llms.txt +44 -34
- package/manifest.json +485 -186
- package/package.json +1 -1
- package/styles.css +10 -10
- package/theme.css +9 -9
- package/components/ai-elements/reasoning.d.ts +0 -26
- package/components/ai-elements/reasoning.js +0 -131
|
@@ -1,182 +1,172 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { Badge as
|
|
4
|
-
import { Collapsible as
|
|
5
|
-
import {
|
|
2
|
+
import { jsx as o, jsxs as l, Fragment as c } from "react/jsx-runtime";
|
|
3
|
+
import { Badge as d } from "../badge.js";
|
|
4
|
+
import { Collapsible as u, CollapsibleTrigger as p, CollapsibleContent as f } from "../collapsible.js";
|
|
5
|
+
import { ChevronRight as g } from "../../lib/icons.js";
|
|
6
6
|
import { cn as i } from "../../lib/cn.js";
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
const g = T(
|
|
25
|
-
null
|
|
26
|
-
), x = () => {
|
|
27
|
-
const e = j(g);
|
|
28
|
-
if (!e)
|
|
29
|
-
throw new Error(
|
|
30
|
-
"ChainOfThought components must be used within ChainOfThought"
|
|
31
|
-
);
|
|
32
|
-
return e;
|
|
33
|
-
}, I = c(
|
|
7
|
+
import { memo as r } from "react";
|
|
8
|
+
const m = r(
|
|
9
|
+
({ className: e, role: a = "list", ...t }) => /* @__PURE__ */ o(
|
|
10
|
+
"div",
|
|
11
|
+
{
|
|
12
|
+
"data-slot": "chain-of-thought",
|
|
13
|
+
role: a,
|
|
14
|
+
className: i(
|
|
15
|
+
"w-full",
|
|
16
|
+
"[&>[data-slot=chain-of-thought-step]:not(:has(~_[data-slot=chain-of-thought-step]))]:pb-0",
|
|
17
|
+
"[&>[data-slot=chain-of-thought-step]:not(:has(~_[data-slot=chain-of-thought-step]))]:before:hidden",
|
|
18
|
+
e
|
|
19
|
+
),
|
|
20
|
+
...t
|
|
21
|
+
}
|
|
22
|
+
)
|
|
23
|
+
), b = r(
|
|
34
24
|
({
|
|
35
25
|
className: e,
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
e
|
|
61
|
-
),
|
|
62
|
-
...n,
|
|
63
|
-
children: [
|
|
64
|
-
/* @__PURE__ */ t(v, { className: "size-4" }),
|
|
65
|
-
/* @__PURE__ */ t("span", { className: "flex-1 text-left", children: a ?? "Chain of Thought" }),
|
|
66
|
-
/* @__PURE__ */ t(
|
|
67
|
-
y,
|
|
68
|
-
{
|
|
69
|
-
className: i(
|
|
70
|
-
"size-4 transition-transform duration-(--duration-fast) ease-out motion-reduce:transition-none",
|
|
71
|
-
s ? "rotate-180" : "rotate-0"
|
|
72
|
-
)
|
|
73
|
-
}
|
|
74
|
-
)
|
|
75
|
-
]
|
|
76
|
-
}
|
|
77
|
-
) });
|
|
78
|
-
}
|
|
79
|
-
), H = c(
|
|
26
|
+
defaultOpen: a = !1,
|
|
27
|
+
status: t = "complete",
|
|
28
|
+
role: n = "listitem",
|
|
29
|
+
...s
|
|
30
|
+
}) => /* @__PURE__ */ o(
|
|
31
|
+
u,
|
|
32
|
+
{
|
|
33
|
+
"data-slot": "chain-of-thought-step",
|
|
34
|
+
"data-status": t,
|
|
35
|
+
defaultOpen: a,
|
|
36
|
+
role: n,
|
|
37
|
+
"aria-current": t === "active" ? "step" : void 0,
|
|
38
|
+
className: i(
|
|
39
|
+
"group/cot-step relative pb-2",
|
|
40
|
+
"before:absolute before:top-7 before:-bottom-2 before:left-2 before:w-px before:bg-border before:content-['']",
|
|
41
|
+
t === "complete" && "text-secondary",
|
|
42
|
+
t === "active" && "text-primary",
|
|
43
|
+
t === "pending" && "text-tertiary/60",
|
|
44
|
+
e
|
|
45
|
+
),
|
|
46
|
+
...s
|
|
47
|
+
}
|
|
48
|
+
)
|
|
49
|
+
), x = r(
|
|
80
50
|
({
|
|
81
51
|
className: e,
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
children: l,
|
|
52
|
+
children: a,
|
|
53
|
+
leftIcon: t,
|
|
54
|
+
endContent: n,
|
|
55
|
+
swapIconOnHover: s = !0,
|
|
87
56
|
...h
|
|
88
|
-
}) => /* @__PURE__ */
|
|
89
|
-
"
|
|
57
|
+
}) => /* @__PURE__ */ o(p, { asChild: !0, ...h, children: /* @__PURE__ */ l(
|
|
58
|
+
"button",
|
|
90
59
|
{
|
|
60
|
+
type: "button",
|
|
61
|
+
"data-slot": "chain-of-thought-trigger",
|
|
91
62
|
className: i(
|
|
92
|
-
"flex gap-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
active: "text-primary",
|
|
96
|
-
pending: "text-tertiary/60"
|
|
97
|
-
}[r],
|
|
98
|
-
"fade-in-0 slide-in-from-top-2 animate-in motion-reduce:animate-none",
|
|
63
|
+
"group/cot-trigger flex min-h-9 w-full cursor-pointer items-center gap-3 rounded-sm text-left text-base text-current outline-none",
|
|
64
|
+
"transition-colors duration-(--duration-fast) ease-out hover:text-primary",
|
|
65
|
+
"focus-visible:ring-3 focus-visible:ring-ring motion-reduce:transition-none",
|
|
99
66
|
e
|
|
100
67
|
),
|
|
101
|
-
...h,
|
|
102
68
|
children: [
|
|
103
|
-
/* @__PURE__ */
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
69
|
+
/* @__PURE__ */ o(
|
|
70
|
+
"span",
|
|
71
|
+
{
|
|
72
|
+
"aria-hidden": !0,
|
|
73
|
+
className: "relative z-10 block size-4 shrink-0",
|
|
74
|
+
children: t ? /* @__PURE__ */ l(c, { children: [
|
|
75
|
+
/* @__PURE__ */ o(
|
|
76
|
+
"span",
|
|
77
|
+
{
|
|
78
|
+
className: i(
|
|
79
|
+
"absolute inset-0 flex items-center justify-center transition-opacity duration-(--duration-fast) ease-out [&>svg]:size-4 motion-reduce:transition-none",
|
|
80
|
+
s && "group-hover/cot-trigger:opacity-0 group-data-[state=open]/cot-trigger:opacity-0"
|
|
81
|
+
),
|
|
82
|
+
children: t
|
|
83
|
+
}
|
|
84
|
+
),
|
|
85
|
+
s && /* @__PURE__ */ o(
|
|
86
|
+
g,
|
|
87
|
+
{
|
|
88
|
+
className: i(
|
|
89
|
+
"absolute inset-0 size-4 opacity-0 transition-[opacity,transform] duration-(--duration-fast) ease-out motion-reduce:transition-none",
|
|
90
|
+
"group-hover/cot-trigger:opacity-100 group-data-[state=open]/cot-trigger:opacity-100",
|
|
91
|
+
"group-data-[state=open]/cot-trigger:rotate-90"
|
|
92
|
+
)
|
|
93
|
+
}
|
|
94
|
+
)
|
|
95
|
+
] }) : /* @__PURE__ */ o("span", { className: "absolute top-1/2 left-1/2 size-1.5 -translate-x-1/2 -translate-y-1/2 rounded-dot bg-current" })
|
|
96
|
+
}
|
|
97
|
+
),
|
|
98
|
+
/* @__PURE__ */ o("span", { className: "min-w-0 flex-1", children: a }),
|
|
99
|
+
n != null && /* @__PURE__ */ o("span", { className: "shrink-0 text-xs text-tertiary tabular-nums", children: n })
|
|
122
100
|
]
|
|
123
101
|
}
|
|
102
|
+
) })
|
|
103
|
+
), y = r(
|
|
104
|
+
({ className: e, children: a, ...t }) => /* @__PURE__ */ o(
|
|
105
|
+
f,
|
|
106
|
+
{
|
|
107
|
+
"data-slot": "chain-of-thought-content",
|
|
108
|
+
className: i(
|
|
109
|
+
"overflow-hidden pl-7 pt-2 pb-1 text-foreground outline-none",
|
|
110
|
+
"data-[state=closed]:pointer-events-none data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 data-[state=closed]:animate-out data-[state=open]:animate-in motion-reduce:animate-none",
|
|
111
|
+
e
|
|
112
|
+
),
|
|
113
|
+
...t,
|
|
114
|
+
children: a
|
|
115
|
+
}
|
|
116
|
+
)
|
|
117
|
+
), N = r(
|
|
118
|
+
({ className: e, ...a }) => /* @__PURE__ */ o(
|
|
119
|
+
"div",
|
|
120
|
+
{
|
|
121
|
+
"data-slot": "chain-of-thought-item",
|
|
122
|
+
className: i(
|
|
123
|
+
"relative pl-4 text-base text-secondary",
|
|
124
|
+
"before:absolute before:top-2 before:left-0 before:size-1.5 before:rounded-dot before:bg-current before:content-['']",
|
|
125
|
+
e
|
|
126
|
+
),
|
|
127
|
+
...a
|
|
128
|
+
}
|
|
124
129
|
)
|
|
125
|
-
),
|
|
126
|
-
({ className: e, ...a }) => /* @__PURE__ */
|
|
130
|
+
), C = r(
|
|
131
|
+
({ className: e, ...a }) => /* @__PURE__ */ o(
|
|
127
132
|
"div",
|
|
128
133
|
{
|
|
129
134
|
className: i("flex flex-wrap items-center gap-2", e),
|
|
130
135
|
...a
|
|
131
136
|
}
|
|
132
137
|
)
|
|
133
|
-
),
|
|
134
|
-
({ className: e, children: a, ...
|
|
135
|
-
|
|
138
|
+
), v = r(
|
|
139
|
+
({ className: e, children: a, ...t }) => /* @__PURE__ */ o(
|
|
140
|
+
d,
|
|
136
141
|
{
|
|
137
142
|
className: i("gap-1 font-normal", e),
|
|
138
143
|
color: "default",
|
|
139
144
|
variant: "soft",
|
|
140
|
-
...
|
|
145
|
+
...t,
|
|
141
146
|
children: a
|
|
142
147
|
}
|
|
143
148
|
)
|
|
144
|
-
),
|
|
145
|
-
({ className: e, children: a, ...n }) => {
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
O,
|
|
149
|
-
{
|
|
150
|
-
className: i(
|
|
151
|
-
"mt-2 space-y-3",
|
|
152
|
-
"text-foreground outline-none",
|
|
153
|
-
"data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 data-[state=closed]:animate-out data-[state=open]:animate-in motion-reduce:animate-none",
|
|
154
|
-
e
|
|
155
|
-
),
|
|
156
|
-
...n,
|
|
157
|
-
children: a
|
|
158
|
-
}
|
|
159
|
-
) });
|
|
160
|
-
}
|
|
161
|
-
), E = c(
|
|
162
|
-
({ className: e, children: a, caption: n, ...s }) => /* @__PURE__ */ d("div", { className: i("mt-2 space-y-2", e), ...s, children: [
|
|
163
|
-
/* @__PURE__ */ t("div", { className: "relative flex max-h-88 items-center justify-center overflow-hidden rounded-lg bg-muted p-3", children: a }),
|
|
164
|
-
n && /* @__PURE__ */ t("p", { className: "text-xs text-tertiary", children: n })
|
|
149
|
+
), T = r(
|
|
150
|
+
({ className: e, children: a, caption: t, ...n }) => /* @__PURE__ */ l("div", { className: i("space-y-2", e), ...n, children: [
|
|
151
|
+
/* @__PURE__ */ o("div", { className: "relative flex max-h-88 items-center justify-center overflow-hidden rounded-lg bg-muted p-3", children: a }),
|
|
152
|
+
t && /* @__PURE__ */ o("p", { className: "text-xs text-tertiary", children: t })
|
|
165
153
|
] })
|
|
166
154
|
);
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
155
|
+
m.displayName = "ChainOfThought";
|
|
156
|
+
b.displayName = "ChainOfThoughtStep";
|
|
157
|
+
x.displayName = "ChainOfThoughtTrigger";
|
|
158
|
+
y.displayName = "ChainOfThoughtContent";
|
|
159
|
+
N.displayName = "ChainOfThoughtItem";
|
|
160
|
+
C.displayName = "ChainOfThoughtSearchResults";
|
|
161
|
+
v.displayName = "ChainOfThoughtSearchResult";
|
|
162
|
+
T.displayName = "ChainOfThoughtImage";
|
|
174
163
|
export {
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
164
|
+
m as ChainOfThought,
|
|
165
|
+
y as ChainOfThoughtContent,
|
|
166
|
+
T as ChainOfThoughtImage,
|
|
167
|
+
N as ChainOfThoughtItem,
|
|
168
|
+
v as ChainOfThoughtSearchResult,
|
|
169
|
+
C as ChainOfThoughtSearchResults,
|
|
170
|
+
b as ChainOfThoughtStep,
|
|
171
|
+
x as ChainOfThoughtTrigger
|
|
182
172
|
};
|
|
@@ -19,18 +19,23 @@ export type MessageFilePart = {
|
|
|
19
19
|
mediaType?: string;
|
|
20
20
|
filename?: string;
|
|
21
21
|
};
|
|
22
|
-
|
|
22
|
+
declare const messageVariants: (props?: ({
|
|
23
|
+
align?: "end" | "start" | null | undefined;
|
|
24
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
25
|
+
export type MessageProps = Omit<React.HTMLAttributes<HTMLDivElement>, "align"> & VariantProps<typeof messageVariants> & {
|
|
23
26
|
from: MessageRole;
|
|
24
27
|
};
|
|
25
|
-
export declare const Message: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
|
|
28
|
+
export declare const Message: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<HTMLDivElement>, "align"> & VariantProps<(props?: ({
|
|
29
|
+
align?: "end" | "start" | null | undefined;
|
|
30
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string> & {
|
|
26
31
|
from: MessageRole;
|
|
27
32
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
28
33
|
declare const messageContentVariants: (props?: ({
|
|
29
|
-
variant?: "flat" | "contained" | null | undefined;
|
|
34
|
+
variant?: "flat" | "contained" | "plain" | null | undefined;
|
|
30
35
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
31
36
|
export type MessageContentProps = React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof messageContentVariants>;
|
|
32
37
|
export declare const MessageContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & VariantProps<(props?: ({
|
|
33
|
-
variant?: "flat" | "contained" | null | undefined;
|
|
38
|
+
variant?: "flat" | "contained" | "plain" | null | undefined;
|
|
34
39
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string> & React.RefAttributes<HTMLDivElement>>;
|
|
35
40
|
export type MessageAvatarProps = React.HTMLAttributes<HTMLSpanElement> & {
|
|
36
41
|
src: string;
|