@actioneer/ads 0.2.3 → 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/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 +35 -25
- package/manifest.json +419 -85
- package/package.json +1 -1
- package/components/ai-elements/reasoning.d.ts +0 -26
- package/components/ai-elements/reasoning.js +0 -131
package/package.json
CHANGED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from '../collapsible';
|
|
2
|
-
import { ComponentProps, ReactNode } from 'react';
|
|
3
|
-
type ReasoningContextValue = {
|
|
4
|
-
isStreaming: boolean;
|
|
5
|
-
isOpen: boolean;
|
|
6
|
-
setIsOpen: (open: boolean) => void;
|
|
7
|
-
duration: number | undefined;
|
|
8
|
-
};
|
|
9
|
-
export declare const useReasoning: () => ReasoningContextValue;
|
|
10
|
-
export type ReasoningProps = ComponentProps<typeof Collapsible> & {
|
|
11
|
-
isStreaming?: boolean;
|
|
12
|
-
open?: boolean;
|
|
13
|
-
defaultOpen?: boolean;
|
|
14
|
-
onOpenChange?: (open: boolean) => void;
|
|
15
|
-
duration?: number;
|
|
16
|
-
};
|
|
17
|
-
export declare const Reasoning: import('react').MemoExoticComponent<({ className, isStreaming, open, defaultOpen, onOpenChange, duration: durationProp, children, ...props }: ReasoningProps) => import("react").JSX.Element>;
|
|
18
|
-
export type ReasoningTriggerProps = ComponentProps<typeof CollapsibleTrigger> & {
|
|
19
|
-
getThinkingMessage?: (isStreaming: boolean, duration?: number) => ReactNode;
|
|
20
|
-
};
|
|
21
|
-
export declare const ReasoningTrigger: import('react').MemoExoticComponent<({ className, children, getThinkingMessage, ...props }: ReasoningTriggerProps) => import("react").JSX.Element>;
|
|
22
|
-
export type ReasoningContentProps = Omit<ComponentProps<typeof CollapsibleContent>, "children"> & {
|
|
23
|
-
children: ReactNode;
|
|
24
|
-
};
|
|
25
|
-
export declare const ReasoningContent: import('react').MemoExoticComponent<({ className, children, ...props }: ReasoningContentProps) => import("react").JSX.Element>;
|
|
26
|
-
export {};
|
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as n, jsxs as b, Fragment as y } from "react/jsx-runtime";
|
|
3
|
-
import { Collapsible as D, CollapsibleTrigger as A, CollapsibleContent as E } from "../collapsible.js";
|
|
4
|
-
import { Brain as O, ChevronDown as _ } from "../../lib/icons.js";
|
|
5
|
-
import { cn as p } from "../../lib/cn.js";
|
|
6
|
-
import { createContext as k, memo as g, useState as f, useEffect as N, useRef as M, useCallback as P, useContext as S } from "react";
|
|
7
|
-
function T({
|
|
8
|
-
prop: t,
|
|
9
|
-
defaultProp: e,
|
|
10
|
-
onChange: o
|
|
11
|
-
}) {
|
|
12
|
-
const [s, c] = f(e), a = t !== void 0, u = a ? t : s, i = M(o);
|
|
13
|
-
i.current = o;
|
|
14
|
-
const l = P(
|
|
15
|
-
(r) => {
|
|
16
|
-
var d;
|
|
17
|
-
a || c(r), (d = i.current) == null || d.call(i, r);
|
|
18
|
-
},
|
|
19
|
-
[a]
|
|
20
|
-
);
|
|
21
|
-
return [u, l];
|
|
22
|
-
}
|
|
23
|
-
const w = k(null), j = () => {
|
|
24
|
-
const t = S(w);
|
|
25
|
-
if (!t)
|
|
26
|
-
throw new Error("Reasoning components must be used within Reasoning");
|
|
27
|
-
return t;
|
|
28
|
-
}, z = 1e3, I = 1e3, L = g(
|
|
29
|
-
({
|
|
30
|
-
className: t,
|
|
31
|
-
isStreaming: e = !1,
|
|
32
|
-
open: o,
|
|
33
|
-
defaultOpen: s = !0,
|
|
34
|
-
onOpenChange: c,
|
|
35
|
-
duration: a,
|
|
36
|
-
children: u,
|
|
37
|
-
...i
|
|
38
|
-
}) => {
|
|
39
|
-
const [l, r] = T({
|
|
40
|
-
prop: o,
|
|
41
|
-
defaultProp: s,
|
|
42
|
-
onChange: c
|
|
43
|
-
}), [d, h] = T({
|
|
44
|
-
prop: a,
|
|
45
|
-
defaultProp: void 0
|
|
46
|
-
}), [C, R] = f(!1), [m, x] = f(null);
|
|
47
|
-
return N(() => {
|
|
48
|
-
e ? m === null && x(Date.now()) : m !== null && (h(Math.ceil((Date.now() - m) / I)), x(null));
|
|
49
|
-
}, [e, m, h]), N(() => {
|
|
50
|
-
if (s && !e && l && !C) {
|
|
51
|
-
const v = setTimeout(() => {
|
|
52
|
-
r(!1), R(!0);
|
|
53
|
-
}, z);
|
|
54
|
-
return () => clearTimeout(v);
|
|
55
|
-
}
|
|
56
|
-
}, [e, l, s, r, C]), /* @__PURE__ */ n(
|
|
57
|
-
w.Provider,
|
|
58
|
-
{
|
|
59
|
-
value: { isStreaming: e, isOpen: l, setIsOpen: r, duration: d },
|
|
60
|
-
children: /* @__PURE__ */ n(
|
|
61
|
-
D,
|
|
62
|
-
{
|
|
63
|
-
className: p("mb-4", t),
|
|
64
|
-
onOpenChange: r,
|
|
65
|
-
open: l,
|
|
66
|
-
...i,
|
|
67
|
-
children: u
|
|
68
|
-
}
|
|
69
|
-
)
|
|
70
|
-
}
|
|
71
|
-
);
|
|
72
|
-
}
|
|
73
|
-
), U = (t, e) => t || e === 0 ? /* @__PURE__ */ n("span", { className: "shimmer text-foreground/40", children: "Thinking…" }) : e === void 0 ? /* @__PURE__ */ n("span", { children: "Thought for a few seconds" }) : /* @__PURE__ */ b("span", { children: [
|
|
74
|
-
"Thought for ",
|
|
75
|
-
/* @__PURE__ */ n("span", { className: "tabular-nums", children: e }),
|
|
76
|
-
" seconds"
|
|
77
|
-
] }), B = g(
|
|
78
|
-
({
|
|
79
|
-
className: t,
|
|
80
|
-
children: e,
|
|
81
|
-
getThinkingMessage: o = U,
|
|
82
|
-
...s
|
|
83
|
-
}) => {
|
|
84
|
-
const { isStreaming: c, isOpen: a, duration: u } = j();
|
|
85
|
-
return /* @__PURE__ */ n(
|
|
86
|
-
A,
|
|
87
|
-
{
|
|
88
|
-
className: p(
|
|
89
|
-
"flex w-full items-center gap-2 text-base text-secondary transition-colors hover:text-foreground",
|
|
90
|
-
t
|
|
91
|
-
),
|
|
92
|
-
...s,
|
|
93
|
-
children: e ?? /* @__PURE__ */ b(y, { children: [
|
|
94
|
-
/* @__PURE__ */ n(O, { className: "size-4" }),
|
|
95
|
-
o(c, u),
|
|
96
|
-
/* @__PURE__ */ n(
|
|
97
|
-
_,
|
|
98
|
-
{
|
|
99
|
-
className: p(
|
|
100
|
-
"size-4 transition-transform duration-(--duration-fast) ease-out motion-reduce:transition-none",
|
|
101
|
-
a ? "rotate-180" : "rotate-0"
|
|
102
|
-
)
|
|
103
|
-
}
|
|
104
|
-
)
|
|
105
|
-
] })
|
|
106
|
-
}
|
|
107
|
-
);
|
|
108
|
-
}
|
|
109
|
-
), F = g(
|
|
110
|
-
({ className: t, children: e, ...o }) => /* @__PURE__ */ n(
|
|
111
|
-
E,
|
|
112
|
-
{
|
|
113
|
-
className: p(
|
|
114
|
-
"mt-4 text-base text-secondary outline-none",
|
|
115
|
-
"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",
|
|
116
|
-
t
|
|
117
|
-
),
|
|
118
|
-
...o,
|
|
119
|
-
children: /* @__PURE__ */ n("div", { className: "leading-relaxed whitespace-pre-wrap", children: e })
|
|
120
|
-
}
|
|
121
|
-
)
|
|
122
|
-
);
|
|
123
|
-
L.displayName = "Reasoning";
|
|
124
|
-
B.displayName = "ReasoningTrigger";
|
|
125
|
-
F.displayName = "ReasoningContent";
|
|
126
|
-
export {
|
|
127
|
-
L as Reasoning,
|
|
128
|
-
F as ReasoningContent,
|
|
129
|
-
B as ReasoningTrigger,
|
|
130
|
-
j as useReasoning
|
|
131
|
-
};
|