@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,29 +1,98 @@
|
|
|
1
1
|
import { Badge } from '../badge';
|
|
2
|
-
import { CollapsibleContent, CollapsibleTrigger } from '../collapsible';
|
|
3
|
-
import { ComponentProps,
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from '../collapsible';
|
|
3
|
+
import { ComponentProps, ReactNode } from 'react';
|
|
4
|
+
/**
|
|
5
|
+
* A step-first reasoning trace. The root is intentionally only a list: each
|
|
6
|
+
* step owns its own disclosure so the trace does not need a redundant global
|
|
7
|
+
* "Chain of Thought" trigger above it.
|
|
8
|
+
*/
|
|
9
|
+
export type ChainOfThoughtProps = ComponentProps<"div">;
|
|
10
|
+
export declare const ChainOfThought: import('react').MemoExoticComponent<({ className, role, ...props }: ChainOfThoughtProps) => import("react").JSX.Element>;
|
|
11
|
+
/**
|
|
12
|
+
* Step lifecycle mirrors the production work-trace statuses: steps stream in
|
|
13
|
+
* as `active`, settle to `complete`, and surface failures as `error` — an
|
|
14
|
+
* error is an execution fact shown in place, not a hidden retry.
|
|
15
|
+
*/
|
|
16
|
+
export type ChainOfThoughtStatus = "complete" | "active" | "pending" | "error";
|
|
17
|
+
export type ChainOfThoughtStepProps = ComponentProps<typeof Collapsible> & {
|
|
18
|
+
status?: ChainOfThoughtStatus;
|
|
8
19
|
};
|
|
9
|
-
export declare const
|
|
10
|
-
export type
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
status?: "complete" | "active" | "pending";
|
|
20
|
+
export declare const ChainOfThoughtStep: import('react').MemoExoticComponent<({ className, defaultOpen, open: controlledOpen, onOpenChange, status, role, "aria-busy": ariaBusy, ...props }: ChainOfThoughtStepProps) => import("react").JSX.Element>;
|
|
21
|
+
export type ChainOfThoughtTriggerProps = Omit<ComponentProps<typeof CollapsibleTrigger>, "asChild" | "children"> & {
|
|
22
|
+
children: ReactNode;
|
|
23
|
+
/** Semantic icon rendered on the reasoning rail. */
|
|
24
|
+
leftIcon?: ReactNode;
|
|
25
|
+
/** Optional trailing metadata such as elapsed time. */
|
|
26
|
+
endContent?: ReactNode;
|
|
27
|
+
/** Swap the semantic icon for a disclosure affordance on hover. */
|
|
28
|
+
swapIconOnHover?: boolean;
|
|
19
29
|
};
|
|
20
|
-
export declare const
|
|
30
|
+
export declare const ChainOfThoughtTrigger: import('react').MemoExoticComponent<({ className, children, leftIcon, endContent, swapIconOnHover, ...props }: ChainOfThoughtTriggerProps) => import("react").JSX.Element>;
|
|
31
|
+
export type ChainOfThoughtContentProps = ComponentProps<typeof CollapsibleContent>;
|
|
32
|
+
export declare const ChainOfThoughtContent: import('react').MemoExoticComponent<({ className, children, ...props }: ChainOfThoughtContentProps) => import("react").JSX.Element>;
|
|
33
|
+
export type ChainOfThoughtItemProps = ComponentProps<"div">;
|
|
34
|
+
export declare const ChainOfThoughtItem: import('react').MemoExoticComponent<({ className, ...props }: ChainOfThoughtItemProps) => import("react").JSX.Element>;
|
|
21
35
|
export type ChainOfThoughtSearchResultsProps = ComponentProps<"div">;
|
|
22
36
|
export declare const ChainOfThoughtSearchResults: import('react').MemoExoticComponent<({ className, ...props }: ChainOfThoughtSearchResultsProps) => import("react").JSX.Element>;
|
|
23
37
|
export type ChainOfThoughtSearchResultProps = ComponentProps<typeof Badge>;
|
|
24
38
|
export declare const ChainOfThoughtSearchResult: import('react').MemoExoticComponent<({ className, children, ...props }: ChainOfThoughtSearchResultProps) => import("react").JSX.Element>;
|
|
25
|
-
export type
|
|
26
|
-
|
|
39
|
+
export type ChainOfThoughtEvidenceProps = Omit<ComponentProps<typeof Collapsible>, "title"> & {
|
|
40
|
+
/** Short artifact name, e.g. "NPA movement — last 4 quarters". */
|
|
41
|
+
title: ReactNode;
|
|
42
|
+
/** Stable result tag badge, e.g. "E1". */
|
|
43
|
+
tag?: ReactNode;
|
|
44
|
+
/** Trailing scale hint on the closed chip, e.g. "128 rows" or "chart". */
|
|
45
|
+
meta?: ReactNode;
|
|
46
|
+
/** Provenance footer under the preview, e.g. "core_banking.npa_movement". */
|
|
47
|
+
source?: ReactNode;
|
|
48
|
+
/** Execution failure shown in place of (or alongside) the preview. */
|
|
49
|
+
error?: ReactNode;
|
|
50
|
+
/** Swap the leading Database glyph. Errors default to a warning glyph. */
|
|
51
|
+
icon?: ReactNode;
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* A bounded evidence preview riding inside a step: collapsed to a one-line
|
|
55
|
+
* chip by default, expanding to a capped artifact preview (table, chart) with
|
|
56
|
+
* its provenance. Evidence stays visually secondary to the step's finding —
|
|
57
|
+
* supporting detail on demand, never competing with the answer. Errors render
|
|
58
|
+
* in place as facts.
|
|
59
|
+
*/
|
|
60
|
+
export declare const ChainOfThoughtEvidence: import('react').MemoExoticComponent<({ className, title, tag, meta, source, error, icon, defaultOpen, children, ...props }: ChainOfThoughtEvidenceProps) => import("react").JSX.Element>;
|
|
61
|
+
export interface ChainOfThoughtEvidenceColumn {
|
|
62
|
+
key: string;
|
|
63
|
+
label: ReactNode;
|
|
64
|
+
align?: "start" | "end";
|
|
65
|
+
}
|
|
66
|
+
export type ChainOfThoughtEvidenceTableProps = Omit<ComponentProps<"div">, "children"> & {
|
|
67
|
+
columns: ChainOfThoughtEvidenceColumn[];
|
|
68
|
+
/** Bounded preview rows — the deterministic capped preview, never the full artifact. */
|
|
69
|
+
rows: Record<string, ReactNode>[];
|
|
70
|
+
/** True row count in the committed artifact; a truncation footer appears when larger. */
|
|
71
|
+
totalRows?: number;
|
|
72
|
+
/** Flags the matching row for emphasis, e.g. the risk outlier. */
|
|
73
|
+
flag?: {
|
|
74
|
+
key: string;
|
|
75
|
+
value: string | number;
|
|
76
|
+
color?: "default" | "danger" | "warning";
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
/**
|
|
80
|
+
* The capped tabular preview inside {@link ChainOfThoughtEvidence}: sticky
|
|
81
|
+
* header, quiet surface fill, optional flagged-row emphasis, and an explicit
|
|
82
|
+
* "N of M rows" footer whenever the preview is truncated.
|
|
83
|
+
*/
|
|
84
|
+
export declare const ChainOfThoughtEvidenceTable: import('react').MemoExoticComponent<({ className, columns, rows, totalRows, flag, ...props }: ChainOfThoughtEvidenceTableProps) => import("react").JSX.Element>;
|
|
85
|
+
export type ChainOfThoughtMetricsProps = ComponentProps<"div">;
|
|
86
|
+
/** A quiet inline stat row — no fills, separated by spacing alone. */
|
|
87
|
+
export declare const ChainOfThoughtMetrics: import('react').MemoExoticComponent<({ className, role, ...props }: ChainOfThoughtMetricsProps) => import("react").JSX.Element>;
|
|
88
|
+
export type ChainOfThoughtMetricProps = Omit<ComponentProps<"div">, "children" | "color"> & {
|
|
89
|
+
label: ReactNode;
|
|
90
|
+
value: ReactNode;
|
|
91
|
+
/** Qualifier under the value, e.g. "of ₹8,400 Cr book". */
|
|
92
|
+
sub?: ReactNode;
|
|
93
|
+
color?: "default" | "danger" | "warning" | "success" | "info";
|
|
94
|
+
};
|
|
95
|
+
export declare const ChainOfThoughtMetric: import('react').MemoExoticComponent<({ className, label, value, sub, color, role, ...props }: ChainOfThoughtMetricProps) => import("react").JSX.Element>;
|
|
27
96
|
export type ChainOfThoughtImageProps = ComponentProps<"div"> & {
|
|
28
97
|
caption?: string;
|
|
29
98
|
};
|
|
@@ -1,182 +1,391 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as t, jsxs as d } from "react/jsx-runtime";
|
|
3
|
-
import { Badge as
|
|
4
|
-
import { Collapsible as
|
|
5
|
-
import {
|
|
6
|
-
import { cn as
|
|
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(
|
|
2
|
+
import { jsx as t, jsxs as d, Fragment as C } from "react/jsx-runtime";
|
|
3
|
+
import { Badge as b } from "../badge.js";
|
|
4
|
+
import { Collapsible as v, CollapsibleTrigger as y, CollapsibleContent as N } from "../collapsible.js";
|
|
5
|
+
import { ChevronRight as w, WarningCircle as O, Database as k, ChevronDown as S } from "../../lib/icons.js";
|
|
6
|
+
import { cn as r } from "../../lib/cn.js";
|
|
7
|
+
import { memo as c, useState as z, useRef as E, useEffect as R } from "react";
|
|
8
|
+
const j = c(
|
|
9
|
+
({ className: o, role: i = "list", ...a }) => /* @__PURE__ */ t(
|
|
10
|
+
"div",
|
|
11
|
+
{
|
|
12
|
+
"data-slot": "chain-of-thought",
|
|
13
|
+
role: i,
|
|
14
|
+
className: r(
|
|
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
|
+
o
|
|
19
|
+
),
|
|
20
|
+
...a
|
|
21
|
+
}
|
|
22
|
+
)
|
|
23
|
+
), M = c(
|
|
34
24
|
({
|
|
35
|
-
className:
|
|
25
|
+
className: o,
|
|
26
|
+
defaultOpen: i,
|
|
36
27
|
open: a,
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
28
|
+
onOpenChange: n,
|
|
29
|
+
status: e = "complete",
|
|
30
|
+
role: s = "listitem",
|
|
31
|
+
"aria-busy": h,
|
|
32
|
+
...m
|
|
41
33
|
}) => {
|
|
42
|
-
const [
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
()
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
return /* @__PURE__ */ t(g.Provider, { value: u, children: /* @__PURE__ */ t("div", { className: i("max-w-prose space-y-4", e), ...l, children: r }) });
|
|
51
|
-
}
|
|
52
|
-
), B = c(
|
|
53
|
-
({ className: e, children: a, ...n }) => {
|
|
54
|
-
const { isOpen: s, setIsOpen: r } = x();
|
|
55
|
-
return /* @__PURE__ */ t(p, { onOpenChange: r, open: s, children: /* @__PURE__ */ d(
|
|
56
|
-
N,
|
|
34
|
+
const l = a !== void 0, [g, u] = z(
|
|
35
|
+
i ?? e === "active"
|
|
36
|
+
), f = E(e), p = f.current !== "active" && e === "active", T = l ? a : p || g;
|
|
37
|
+
return R(() => {
|
|
38
|
+
const x = f.current;
|
|
39
|
+
f.current = e, !(x === "active" || e !== "active") && (l || u(!0), n == null || n(!0));
|
|
40
|
+
}, [l, n, e]), /* @__PURE__ */ t(
|
|
41
|
+
v,
|
|
57
42
|
{
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
43
|
+
"data-slot": "chain-of-thought-step",
|
|
44
|
+
"data-status": e,
|
|
45
|
+
open: T,
|
|
46
|
+
onOpenChange: (x) => {
|
|
47
|
+
l || u(x), n == null || n(x);
|
|
48
|
+
},
|
|
49
|
+
role: s,
|
|
50
|
+
"aria-current": e === "active" ? "step" : void 0,
|
|
51
|
+
"aria-busy": h ?? (e === "active" || void 0),
|
|
52
|
+
className: r(
|
|
53
|
+
"group/cot-step relative pb-2",
|
|
54
|
+
// Connector rail: a 16px segment centred in the 28px gap between a
|
|
55
|
+
// collapsed step's icon and the next one (top-8 = 32px from the step
|
|
56
|
+
// top, ending 4px past its box). It stretches with an open step.
|
|
57
|
+
"before:absolute before:top-8 before:-bottom-1 before:left-2 before:w-px before:bg-border before:content-['']",
|
|
58
|
+
e === "complete" && "text-secondary",
|
|
59
|
+
e === "active" && "text-primary",
|
|
60
|
+
e === "pending" && "text-tertiary/60",
|
|
61
|
+
e === "error" && "text-danger",
|
|
62
|
+
o
|
|
61
63
|
),
|
|
62
|
-
...
|
|
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
|
-
]
|
|
64
|
+
...m
|
|
76
65
|
}
|
|
77
|
-
)
|
|
66
|
+
);
|
|
78
67
|
}
|
|
79
|
-
),
|
|
68
|
+
), _ = c(
|
|
80
69
|
({
|
|
81
|
-
className:
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
"div",
|
|
70
|
+
className: o,
|
|
71
|
+
children: i,
|
|
72
|
+
leftIcon: a,
|
|
73
|
+
endContent: n,
|
|
74
|
+
swapIconOnHover: e = !0,
|
|
75
|
+
...s
|
|
76
|
+
}) => /* @__PURE__ */ t(y, { asChild: !0, ...s, children: /* @__PURE__ */ d(
|
|
77
|
+
"button",
|
|
90
78
|
{
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
"fade-in-0 slide-in-from-top-2 animate-in motion-reduce:animate-none",
|
|
99
|
-
e
|
|
79
|
+
type: "button",
|
|
80
|
+
"data-slot": "chain-of-thought-trigger",
|
|
81
|
+
className: r(
|
|
82
|
+
"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",
|
|
83
|
+
"transition-colors duration-(--duration-fast) ease-out hover:text-primary",
|
|
84
|
+
"focus-visible:ring-3 focus-visible:ring-ring motion-reduce:transition-none",
|
|
85
|
+
o
|
|
100
86
|
),
|
|
101
|
-
...h,
|
|
102
87
|
children: [
|
|
103
|
-
/* @__PURE__ */
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
88
|
+
/* @__PURE__ */ t(
|
|
89
|
+
"span",
|
|
90
|
+
{
|
|
91
|
+
"aria-hidden": !0,
|
|
92
|
+
className: "relative z-10 block size-4 shrink-0",
|
|
93
|
+
children: a ? /* @__PURE__ */ d(C, { children: [
|
|
94
|
+
/* @__PURE__ */ t(
|
|
95
|
+
"span",
|
|
96
|
+
{
|
|
97
|
+
className: r(
|
|
98
|
+
"absolute inset-0 flex items-center justify-center transition-opacity duration-(--duration-fast) ease-out [&>svg]:size-4 motion-reduce:transition-none",
|
|
99
|
+
e && "group-hover/cot-trigger:opacity-0 group-data-[state=open]/cot-trigger:opacity-0"
|
|
100
|
+
),
|
|
101
|
+
children: a
|
|
102
|
+
}
|
|
103
|
+
),
|
|
104
|
+
e && /* @__PURE__ */ t(
|
|
105
|
+
w,
|
|
106
|
+
{
|
|
107
|
+
className: r(
|
|
108
|
+
"absolute inset-0 size-4 opacity-0 transition-[opacity,transform] duration-(--duration-fast) ease-out motion-reduce:transition-none",
|
|
109
|
+
"group-hover/cot-trigger:opacity-100 group-data-[state=open]/cot-trigger:opacity-100",
|
|
110
|
+
"group-data-[state=open]/cot-trigger:rotate-90"
|
|
111
|
+
)
|
|
112
|
+
}
|
|
113
|
+
)
|
|
114
|
+
] }) : /* @__PURE__ */ t("span", { className: "absolute top-1/2 left-1/2 size-1.5 -translate-x-1/2 -translate-y-1/2 rounded-dot bg-current" })
|
|
115
|
+
}
|
|
116
|
+
),
|
|
117
|
+
/* @__PURE__ */ t("span", { className: "min-w-0 flex-1", children: i }),
|
|
118
|
+
n != null && /* @__PURE__ */ t("span", { className: "shrink-0 text-xs text-tertiary tabular-nums", children: n })
|
|
122
119
|
]
|
|
123
120
|
}
|
|
121
|
+
) })
|
|
122
|
+
), D = c(
|
|
123
|
+
({ className: o, children: i, ...a }) => /* @__PURE__ */ t(
|
|
124
|
+
N,
|
|
125
|
+
{
|
|
126
|
+
"data-slot": "chain-of-thought-content",
|
|
127
|
+
className: r(
|
|
128
|
+
"overflow-hidden pl-7 pt-2 pb-1 text-foreground outline-none",
|
|
129
|
+
"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",
|
|
130
|
+
o
|
|
131
|
+
),
|
|
132
|
+
...a,
|
|
133
|
+
children: i
|
|
134
|
+
}
|
|
124
135
|
)
|
|
125
|
-
),
|
|
126
|
-
({ className:
|
|
136
|
+
), A = c(
|
|
137
|
+
({ className: o, ...i }) => /* @__PURE__ */ t(
|
|
127
138
|
"div",
|
|
128
139
|
{
|
|
129
|
-
|
|
130
|
-
|
|
140
|
+
"data-slot": "chain-of-thought-item",
|
|
141
|
+
className: r(
|
|
142
|
+
"relative pl-4 text-base text-secondary",
|
|
143
|
+
"before:absolute before:top-2 before:left-0 before:size-1.5 before:rounded-dot before:bg-current before:content-['']",
|
|
144
|
+
o
|
|
145
|
+
),
|
|
146
|
+
...i
|
|
147
|
+
}
|
|
148
|
+
)
|
|
149
|
+
), B = c(
|
|
150
|
+
({ className: o, ...i }) => /* @__PURE__ */ t(
|
|
151
|
+
"div",
|
|
152
|
+
{
|
|
153
|
+
className: r("flex flex-wrap items-center gap-2", o),
|
|
154
|
+
...i
|
|
131
155
|
}
|
|
132
156
|
)
|
|
133
|
-
),
|
|
134
|
-
({ className:
|
|
135
|
-
|
|
157
|
+
), F = c(
|
|
158
|
+
({ className: o, children: i, ...a }) => /* @__PURE__ */ t(
|
|
159
|
+
b,
|
|
136
160
|
{
|
|
137
|
-
className:
|
|
161
|
+
className: r("gap-1 font-normal", o),
|
|
138
162
|
color: "default",
|
|
139
163
|
variant: "soft",
|
|
140
|
-
...
|
|
141
|
-
children:
|
|
164
|
+
...a,
|
|
165
|
+
children: i
|
|
142
166
|
}
|
|
143
167
|
)
|
|
144
|
-
),
|
|
145
|
-
({
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
168
|
+
), I = c(
|
|
169
|
+
({
|
|
170
|
+
className: o,
|
|
171
|
+
title: i,
|
|
172
|
+
tag: a,
|
|
173
|
+
meta: n,
|
|
174
|
+
source: e,
|
|
175
|
+
error: s,
|
|
176
|
+
icon: h,
|
|
177
|
+
defaultOpen: m = !1,
|
|
178
|
+
children: l,
|
|
179
|
+
...g
|
|
180
|
+
}) => /* @__PURE__ */ d(
|
|
181
|
+
v,
|
|
182
|
+
{
|
|
183
|
+
"data-slot": "chain-of-thought-evidence",
|
|
184
|
+
"data-error": s != null || void 0,
|
|
185
|
+
defaultOpen: m,
|
|
186
|
+
className: r("w-full", o),
|
|
187
|
+
...g,
|
|
188
|
+
children: [
|
|
189
|
+
/* @__PURE__ */ t(y, { asChild: !0, children: /* @__PURE__ */ d(
|
|
190
|
+
"button",
|
|
191
|
+
{
|
|
192
|
+
type: "button",
|
|
193
|
+
"data-slot": "chain-of-thought-evidence-trigger",
|
|
194
|
+
className: r(
|
|
195
|
+
"group/cot-evidence flex min-h-8 w-full cursor-pointer items-center gap-2 rounded-md text-left outline-none",
|
|
196
|
+
"transition-colors duration-(--duration-fast) ease-out hover:text-primary",
|
|
197
|
+
"focus-visible:ring-3 focus-visible:ring-ring motion-reduce:transition-none"
|
|
198
|
+
),
|
|
199
|
+
children: [
|
|
200
|
+
/* @__PURE__ */ t(
|
|
201
|
+
"span",
|
|
202
|
+
{
|
|
203
|
+
"aria-hidden": !0,
|
|
204
|
+
className: r(
|
|
205
|
+
"shrink-0 [&>svg]:size-3.5",
|
|
206
|
+
s != null ? "text-danger" : "text-tertiary"
|
|
207
|
+
),
|
|
208
|
+
children: h ?? (s != null ? /* @__PURE__ */ t(O, {}) : /* @__PURE__ */ t(k, {}))
|
|
209
|
+
}
|
|
210
|
+
),
|
|
211
|
+
/* @__PURE__ */ t("span", { className: "min-w-0 flex-1 truncate text-sm font-medium text-secondary", children: i }),
|
|
212
|
+
a != null && /* @__PURE__ */ t(
|
|
213
|
+
b,
|
|
214
|
+
{
|
|
215
|
+
color: "default",
|
|
216
|
+
variant: "soft",
|
|
217
|
+
className: "shrink-0 font-normal tabular-nums",
|
|
218
|
+
children: a
|
|
219
|
+
}
|
|
220
|
+
),
|
|
221
|
+
n != null && /* @__PURE__ */ t("span", { className: "shrink-0 text-xs text-tertiary tabular-nums", children: n }),
|
|
222
|
+
/* @__PURE__ */ t(
|
|
223
|
+
S,
|
|
224
|
+
{
|
|
225
|
+
"aria-hidden": !0,
|
|
226
|
+
className: r(
|
|
227
|
+
"size-3.5 shrink-0 text-tertiary transition-transform duration-(--duration-fast) ease-out motion-reduce:transition-none",
|
|
228
|
+
"group-data-[state=open]/cot-evidence:rotate-180"
|
|
229
|
+
)
|
|
230
|
+
}
|
|
231
|
+
)
|
|
232
|
+
]
|
|
233
|
+
}
|
|
234
|
+
) }),
|
|
235
|
+
/* @__PURE__ */ t(
|
|
236
|
+
N,
|
|
237
|
+
{
|
|
238
|
+
"data-slot": "chain-of-thought-evidence-content",
|
|
239
|
+
className: r(
|
|
240
|
+
"overflow-hidden outline-none",
|
|
241
|
+
"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"
|
|
242
|
+
),
|
|
243
|
+
children: /* @__PURE__ */ d("div", { className: "flex flex-col gap-1.5 pt-1.5", children: [
|
|
244
|
+
s != null && /* @__PURE__ */ t("p", { className: "text-xs text-danger", children: s }),
|
|
245
|
+
l,
|
|
246
|
+
e != null && /* @__PURE__ */ t("p", { className: "text-xs text-tertiary", children: e })
|
|
247
|
+
] })
|
|
248
|
+
}
|
|
249
|
+
)
|
|
250
|
+
]
|
|
251
|
+
}
|
|
252
|
+
)
|
|
253
|
+
), L = c(
|
|
254
|
+
({
|
|
255
|
+
className: o,
|
|
256
|
+
columns: i,
|
|
257
|
+
rows: a,
|
|
258
|
+
totalRows: n,
|
|
259
|
+
flag: e,
|
|
260
|
+
...s
|
|
261
|
+
}) => {
|
|
262
|
+
const h = n != null && n > a.length, m = (e == null ? void 0 : e.color) ?? "default";
|
|
263
|
+
return /* @__PURE__ */ d(
|
|
264
|
+
"div",
|
|
149
265
|
{
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
266
|
+
"data-slot": "chain-of-thought-evidence-table",
|
|
267
|
+
className: r("overflow-hidden rounded-lg bg-surface", o),
|
|
268
|
+
...s,
|
|
269
|
+
children: [
|
|
270
|
+
/* @__PURE__ */ t("div", { className: "max-h-56 overflow-auto", children: /* @__PURE__ */ d("table", { className: "w-full border-collapse text-xs tabular-nums", children: [
|
|
271
|
+
/* @__PURE__ */ t("thead", { children: /* @__PURE__ */ t("tr", { className: "text-tertiary", children: i.map((l) => /* @__PURE__ */ t(
|
|
272
|
+
"th",
|
|
273
|
+
{
|
|
274
|
+
className: r(
|
|
275
|
+
"sticky top-0 bg-surface px-2.5 py-1.5 font-medium whitespace-nowrap",
|
|
276
|
+
l.align === "end" ? "text-right" : "text-left"
|
|
277
|
+
),
|
|
278
|
+
children: l.label
|
|
279
|
+
},
|
|
280
|
+
l.key
|
|
281
|
+
)) }) }),
|
|
282
|
+
/* @__PURE__ */ t("tbody", { children: a.map((l, g) => {
|
|
283
|
+
const u = e != null && String(l[e.key]) === String(e.value);
|
|
284
|
+
return /* @__PURE__ */ t("tr", { className: r(u && "bg-muted"), children: i.map((f, p) => /* @__PURE__ */ t(
|
|
285
|
+
"td",
|
|
286
|
+
{
|
|
287
|
+
className: r(
|
|
288
|
+
"px-2.5 py-1 whitespace-nowrap",
|
|
289
|
+
f.align === "end" ? "text-right" : "text-left",
|
|
290
|
+
p === 0 ? "text-foreground" : "text-secondary",
|
|
291
|
+
u && p === 0 && "font-semibold",
|
|
292
|
+
u && p === 0 && m === "danger" && "text-danger",
|
|
293
|
+
u && p === 0 && m === "warning" && "text-warning"
|
|
294
|
+
),
|
|
295
|
+
children: l[f.key]
|
|
296
|
+
},
|
|
297
|
+
f.key
|
|
298
|
+
)) }, g);
|
|
299
|
+
}) })
|
|
300
|
+
] }) }),
|
|
301
|
+
h && /* @__PURE__ */ d("p", { className: "px-2.5 py-1.5 text-xs text-tertiary tabular-nums", children: [
|
|
302
|
+
a.length,
|
|
303
|
+
" of ",
|
|
304
|
+
n,
|
|
305
|
+
" rows"
|
|
306
|
+
] })
|
|
307
|
+
]
|
|
158
308
|
}
|
|
159
|
-
)
|
|
309
|
+
);
|
|
160
310
|
}
|
|
161
|
-
),
|
|
162
|
-
({ className:
|
|
163
|
-
|
|
164
|
-
|
|
311
|
+
), W = c(
|
|
312
|
+
({ className: o, role: i = "list", ...a }) => /* @__PURE__ */ t(
|
|
313
|
+
"div",
|
|
314
|
+
{
|
|
315
|
+
"data-slot": "chain-of-thought-metrics",
|
|
316
|
+
role: i,
|
|
317
|
+
className: r("flex flex-wrap items-stretch gap-x-6 gap-y-2", o),
|
|
318
|
+
...a
|
|
319
|
+
}
|
|
320
|
+
)
|
|
321
|
+
), X = {
|
|
322
|
+
default: "text-foreground",
|
|
323
|
+
danger: "text-danger",
|
|
324
|
+
warning: "text-warning",
|
|
325
|
+
success: "text-success",
|
|
326
|
+
info: "text-info"
|
|
327
|
+
}, q = c(
|
|
328
|
+
({
|
|
329
|
+
className: o,
|
|
330
|
+
label: i,
|
|
331
|
+
value: a,
|
|
332
|
+
sub: n,
|
|
333
|
+
color: e = "default",
|
|
334
|
+
role: s = "listitem",
|
|
335
|
+
...h
|
|
336
|
+
}) => /* @__PURE__ */ d(
|
|
337
|
+
"div",
|
|
338
|
+
{
|
|
339
|
+
"data-slot": "chain-of-thought-metric",
|
|
340
|
+
"data-color": e,
|
|
341
|
+
role: s,
|
|
342
|
+
className: r("min-w-0", o),
|
|
343
|
+
...h,
|
|
344
|
+
children: [
|
|
345
|
+
/* @__PURE__ */ t("div", { className: "text-xs text-tertiary", children: i }),
|
|
346
|
+
/* @__PURE__ */ t(
|
|
347
|
+
"div",
|
|
348
|
+
{
|
|
349
|
+
className: r(
|
|
350
|
+
"text-base font-semibold tabular-nums",
|
|
351
|
+
X[e]
|
|
352
|
+
),
|
|
353
|
+
children: a
|
|
354
|
+
}
|
|
355
|
+
),
|
|
356
|
+
n != null && /* @__PURE__ */ t("div", { className: "text-xs text-tertiary", children: n })
|
|
357
|
+
]
|
|
358
|
+
}
|
|
359
|
+
)
|
|
360
|
+
), G = c(
|
|
361
|
+
({ className: o, children: i, caption: a, ...n }) => /* @__PURE__ */ d("div", { className: r("space-y-2", o), ...n, children: [
|
|
362
|
+
/* @__PURE__ */ t("div", { className: "relative flex max-h-88 items-center justify-center overflow-hidden rounded-lg bg-muted p-3", children: i }),
|
|
363
|
+
a && /* @__PURE__ */ t("p", { className: "text-xs text-tertiary", children: a })
|
|
165
364
|
] })
|
|
166
365
|
);
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
P.displayName = "ChainOfThoughtSearchResults";
|
|
171
|
-
k.displayName = "ChainOfThoughtSearchResult";
|
|
366
|
+
j.displayName = "ChainOfThought";
|
|
367
|
+
M.displayName = "ChainOfThoughtStep";
|
|
368
|
+
_.displayName = "ChainOfThoughtTrigger";
|
|
172
369
|
D.displayName = "ChainOfThoughtContent";
|
|
173
|
-
|
|
370
|
+
A.displayName = "ChainOfThoughtItem";
|
|
371
|
+
B.displayName = "ChainOfThoughtSearchResults";
|
|
372
|
+
F.displayName = "ChainOfThoughtSearchResult";
|
|
373
|
+
I.displayName = "ChainOfThoughtEvidence";
|
|
374
|
+
L.displayName = "ChainOfThoughtEvidenceTable";
|
|
375
|
+
W.displayName = "ChainOfThoughtMetrics";
|
|
376
|
+
q.displayName = "ChainOfThoughtMetric";
|
|
377
|
+
G.displayName = "ChainOfThoughtImage";
|
|
174
378
|
export {
|
|
175
|
-
|
|
379
|
+
j as ChainOfThought,
|
|
176
380
|
D as ChainOfThoughtContent,
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
381
|
+
I as ChainOfThoughtEvidence,
|
|
382
|
+
L as ChainOfThoughtEvidenceTable,
|
|
383
|
+
G as ChainOfThoughtImage,
|
|
384
|
+
A as ChainOfThoughtItem,
|
|
385
|
+
q as ChainOfThoughtMetric,
|
|
386
|
+
W as ChainOfThoughtMetrics,
|
|
387
|
+
F as ChainOfThoughtSearchResult,
|
|
388
|
+
B as ChainOfThoughtSearchResults,
|
|
389
|
+
M as ChainOfThoughtStep,
|
|
390
|
+
_ as ChainOfThoughtTrigger
|
|
182
391
|
};
|