@vadimcomanescu/nadicode-design-system 2.0.8 → 4.0.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/.agents/skills/seed/SKILL.md +19 -10
- package/.agents/skills/seed/contract.md +9 -2
- package/.agents/skills/seed/references/blocks.md +5 -5
- package/.agents/skills/seed/references/components.md +2 -2
- package/.agents/skills/seed/references/nextjs.md +2 -2
- package/README.md +3 -3
- package/contracts/consumer-intent-map.json +1 -2
- package/contracts/release-governance-baseline.json +3 -37
- package/dist/catalog/catalog.d.ts +2220 -0
- package/dist/catalog/catalog.js +1913 -0
- package/dist/catalog/components.d.ts +201 -0
- package/dist/catalog/components.js +407 -0
- package/dist/catalog/types.d.ts +4 -0
- package/dist/catalog/types.js +1 -0
- package/dist/chunk-224KPIOG.js +60 -0
- package/dist/chunk-25BOZMXA.js +169 -0
- package/dist/chunk-32OLQ7FC.js +130 -0
- package/dist/chunk-3JJBJ4VR.js +47 -0
- package/dist/chunk-3U56FXYC.js +30 -0
- package/dist/chunk-4MWKE6F5.js +86 -0
- package/dist/chunk-6HGSU24S.js +94 -0
- package/dist/chunk-7IADIXDV.js +168 -0
- package/dist/chunk-7NS3VFD7.js +86 -0
- package/dist/chunk-7XLZCXUL.js +175 -0
- package/dist/chunk-ALA6OM7K.js +134 -0
- package/dist/chunk-AN5TW4AL.js +50 -0
- package/dist/chunk-AWZFQQGN.js +167 -0
- package/dist/chunk-BRCBJ3S4.js +42 -0
- package/dist/chunk-BRICSLHJ.js +30 -0
- package/dist/chunk-BYEHHZZN.js +115 -0
- package/dist/chunk-C33GUEDY.js +149 -0
- package/dist/chunk-CUDMDYKE.js +150 -0
- package/dist/chunk-CVTMWSNS.js +145 -0
- package/dist/chunk-DEZXWNYF.js +165 -0
- package/dist/chunk-DNJEVMDY.js +40 -0
- package/dist/chunk-DNJOBML6.js +66 -0
- package/dist/chunk-FTGFOK6T.js +69 -0
- package/dist/chunk-HFBJ6L6O.js +104 -0
- package/dist/chunk-HPTHS7SX.js +52 -0
- package/dist/chunk-KNR3WB5C.js +147 -0
- package/dist/chunk-KQ7ZC6EM.js +66 -0
- package/dist/chunk-LGW7FVG5.js +83 -0
- package/dist/chunk-LP6ZZYOQ.js +36 -0
- package/dist/chunk-LV4P7WVM.js +54 -0
- package/dist/chunk-MGSGCARB.js +164 -0
- package/dist/chunk-N3YFYMNZ.js +73 -0
- package/dist/chunk-Q5IYBNA7.js +56 -0
- package/dist/chunk-QJCE7NZF.js +85 -0
- package/dist/chunk-QW5II6YK.js +96 -0
- package/dist/chunk-RMGDDOCD.js +138 -0
- package/dist/chunk-RNCX4JIE.js +70 -0
- package/dist/chunk-RWCL5OPX.js +112 -0
- package/dist/chunk-S5OY2B63.js +28 -0
- package/dist/chunk-SIQNG72C.js +257 -0
- package/dist/chunk-SP7NIZFP.js +117 -0
- package/dist/chunk-SWRJWMGG.js +30 -0
- package/dist/chunk-TCQIJ3DO.js +85 -0
- package/dist/chunk-TPJ6JJ2F.js +290 -0
- package/dist/chunk-TUJZMJXW.js +72 -0
- package/dist/chunk-UR43ANYS.js +159 -0
- package/dist/chunk-VRGPG2YN.js +79 -0
- package/dist/chunk-WSBLCWY7.js +126 -0
- package/dist/chunk-XKKFSFYO.js +93 -0
- package/dist/chunk-XO7TBM47.js +32 -0
- package/dist/chunk-YDYDGG5K.js +132 -0
- package/dist/chunk-YMJOUYMT.js +171 -0
- package/dist/chunk-Z2WION42.js +32 -0
- package/dist/chunk-ZFKSVEYW.js +35 -0
- package/dist/components/blocks/AgentProfileGridBlock.js +8 -86
- package/dist/components/blocks/AgentRunOverviewBlock.js +8 -147
- package/dist/components/blocks/AgentWorkbenchBlock.js +15 -257
- package/dist/components/blocks/AudioVisualizerBlock.js +2 -50
- package/dist/components/blocks/AuthLayout.js +9 -73
- package/dist/components/blocks/BannerBlock.js +8 -66
- package/dist/components/blocks/BarChartBlock.js +5 -47
- package/dist/components/blocks/ChartBlock.js +7 -54
- package/dist/components/blocks/ChartCollectionBlock.js +11 -171
- package/dist/components/blocks/ChatLayout.js +12 -126
- package/dist/components/blocks/CreateBlock.js +9 -104
- package/dist/components/blocks/DataGridBlock.js +9 -117
- package/dist/components/blocks/DirectoryBlock.js +12 -85
- package/dist/components/blocks/FeatureGridBlock.js +6 -56
- package/dist/components/blocks/GalleryBlock.js +6 -69
- package/dist/components/blocks/HeroSectionBlock.js +10 -134
- package/dist/components/blocks/IntegrationsBlock.js +13 -94
- package/dist/components/blocks/InteractiveAreaChartBlock.js +5 -290
- package/dist/components/blocks/KanbanDemoBlock.js +8 -145
- package/dist/components/blocks/LogoCloud.js +4 -35
- package/dist/components/blocks/NavUser.js +5 -85
- package/dist/components/blocks/NotFoundBlock.js +8 -32
- package/dist/components/blocks/OnboardingBlock.js +7 -66
- package/dist/components/blocks/SettingsLayout.js +13 -86
- package/dist/components/blocks/SignUpBlock.js +8 -168
- package/dist/components/blocks/SolutionShowcaseBlock.js +11 -112
- package/dist/components/blocks/StatsBlock.js +6 -60
- package/dist/components/blocks/UsageDonutBlock.js +5 -79
- package/dist/components/blocks/WizardBlock.js +12 -93
- package/dist/components/blocks/user/InviteUserModal.js +10 -132
- package/dist/components/page-kits/AccountLockedPageKit.js +3 -40
- package/dist/components/page-kits/AgentsChatPageKit.js +11 -159
- package/dist/components/page-kits/AnalyticsPageKit.js +12 -150
- package/dist/components/page-kits/BlogContentPageKit.js +12 -167
- package/dist/components/page-kits/CheckoutPageKit.js +9 -83
- package/dist/components/page-kits/CompanySuitePageKit.js +9 -96
- package/dist/components/page-kits/DashboardPageKit.js +11 -149
- package/dist/components/page-kits/ErrorPageKit.js +5 -52
- package/dist/components/page-kits/KanbanBoardPageKit.js +7 -169
- package/dist/components/page-kits/LandingPageKit.js +11 -72
- package/dist/components/page-kits/LoginPageKit.js +3 -32
- package/dist/components/page-kits/OnboardingPageKit.js +6 -115
- package/dist/components/page-kits/PricingPageKit.js +12 -138
- package/dist/components/page-kits/ProfileSettingsPageKit.js +10 -164
- package/dist/components/page-kits/RecoveryPageKit.js +3 -42
- package/dist/components/page-kits/ResetPageKit.js +3 -36
- package/dist/components/page-kits/ServiceSuitePageKit.js +10 -175
- package/dist/components/page-kits/SignupPageKit.js +3 -30
- package/dist/components/page-kits/SuccessPageKit.js +4 -30
- package/dist/components/page-kits/TeamSettingsPageKit.js +9 -165
- package/dist/components/page-kits/TwoFactorPageKit.js +4 -28
- package/dist/components/page-kits/VerifyEmailPageKit.js +4 -30
- package/dist/components/page-kits/VoiceAgentsPageKit.js +13 -130
- package/dist/components/ui/CheckoutForm.js +5 -70
- package/eslint-rules/nadicode/config.js +1 -1
- package/eslint-rules/nadicode/data/catalog-names.json +93 -0
- package/eslint-rules/nadicode/index.js +2 -2
- package/eslint-rules/nadicode/rules/__tests__/require-catalog-component.test.js +77 -0
- package/eslint-rules/nadicode/rules/require-catalog-component.js +79 -0
- package/package.json +18 -25
- package/contracts/block-props-schemas.json +0 -2186
- package/contracts/component-props-schemas.json +0 -8322
- package/contracts/consumer-contract.json +0 -178
- package/contracts/page-kit-props-schemas.json +0 -1894
- package/contracts/public-surface-registry.json +0 -6162
- package/contracts/public-surface-registry.schema.json +0 -227
- package/contracts/spec-manifest.json +0 -46
- package/dist/catalog.json +0 -5221
- package/eslint-rules/nadicode/rules/no-forbidden-page-kit-import.js +0 -99
|
@@ -1,90 +1,12 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
2
|
+
export { AgentProfileGridBlock } from '../../chunk-7NS3VFD7.js';
|
|
3
|
+
import '../../chunk-DQPK2XRL.js';
|
|
4
|
+
import '../../chunk-WI547C47.js';
|
|
5
|
+
import '../../chunk-I23DDSU7.js';
|
|
6
|
+
import '../../chunk-AH6YSYYT.js';
|
|
7
|
+
import '../../chunk-7KIDDF3I.js';
|
|
7
8
|
import '../../chunk-PD2YEH3H.js';
|
|
8
9
|
import '../../chunk-CRY67BIF.js';
|
|
9
10
|
import '../../chunk-HJC6U46F.js';
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
13
|
-
|
|
14
|
-
var defaultAgents = [
|
|
15
|
-
{
|
|
16
|
-
name: "Atlas",
|
|
17
|
-
role: "Data Analyst",
|
|
18
|
-
description: "Transforms raw data into actionable insights with automated reporting.",
|
|
19
|
-
avatar: /* @__PURE__ */ jsx("div", { className: "flex size-16 items-center justify-center rounded-full bg-accent/10 text-2xl font-bold text-accent", children: "A" }),
|
|
20
|
-
capabilities: ["Analytics", "Reporting", "Forecasting"],
|
|
21
|
-
status: "active"
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
name: "Nova",
|
|
25
|
-
role: "Customer Support",
|
|
26
|
-
description: "Handles customer inquiries with empathy and precision, 24/7.",
|
|
27
|
-
avatar: /* @__PURE__ */ jsx("div", { className: "flex size-16 items-center justify-center rounded-full bg-accent/10 text-2xl font-bold text-accent", children: "N" }),
|
|
28
|
-
capabilities: ["Chat", "Email", "Tickets"],
|
|
29
|
-
status: "active"
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
name: "Orion",
|
|
33
|
-
role: "Content Creator",
|
|
34
|
-
description: "Generates and optimizes content across all your marketing channels.",
|
|
35
|
-
avatar: /* @__PURE__ */ jsx("div", { className: "flex size-16 items-center justify-center rounded-full bg-accent/10 text-2xl font-bold text-accent", children: "O" }),
|
|
36
|
-
capabilities: ["Writing", "SEO", "Social"],
|
|
37
|
-
status: "coming-soon"
|
|
38
|
-
}
|
|
39
|
-
];
|
|
40
|
-
var statusVariant = {
|
|
41
|
-
active: "accent",
|
|
42
|
-
idle: "secondary",
|
|
43
|
-
"coming-soon": "outline"
|
|
44
|
-
};
|
|
45
|
-
var statusLabel = {
|
|
46
|
-
active: "Active",
|
|
47
|
-
idle: "Idle",
|
|
48
|
-
"coming-soon": "Coming Soon"
|
|
49
|
-
};
|
|
50
|
-
var columnClasses = {
|
|
51
|
-
2: "grid-cols-1 sm:grid-cols-2",
|
|
52
|
-
3: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",
|
|
53
|
-
4: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-4"
|
|
54
|
-
};
|
|
55
|
-
function AgentProfileGridBlock({
|
|
56
|
-
title = "Meet your AI team",
|
|
57
|
-
description = "Purpose-built agents that work together to accelerate your workflow.",
|
|
58
|
-
agents = defaultAgents,
|
|
59
|
-
columns = 3,
|
|
60
|
-
className
|
|
61
|
-
}) {
|
|
62
|
-
return /* @__PURE__ */ jsx(ScrollFadeIn, { children: /* @__PURE__ */ jsx("section", { className: className ?? "py-16 md:py-32", children: /* @__PURE__ */ jsxs("div", { className: "mx-auto max-w-5xl px-6", children: [
|
|
63
|
-
/* @__PURE__ */ jsxs("div", { className: "text-center", children: [
|
|
64
|
-
/* @__PURE__ */ jsx(Heading, { level: 2, size: "section", className: "text-4xl lg:text-5xl", children: title }),
|
|
65
|
-
/* @__PURE__ */ jsx("p", { className: "mt-4 text-text-secondary", children: description })
|
|
66
|
-
] }),
|
|
67
|
-
/* @__PURE__ */ jsx(
|
|
68
|
-
StaggerChildren,
|
|
69
|
-
{
|
|
70
|
-
staggerMs: 80,
|
|
71
|
-
className: cn("mt-8 grid gap-6 md:mt-16", columnClasses[columns]),
|
|
72
|
-
children: agents.map((agent, i) => /* @__PURE__ */ jsxs(Card, { className: "text-center", children: [
|
|
73
|
-
/* @__PURE__ */ jsxs(CardHeader, { className: "items-center", children: [
|
|
74
|
-
/* @__PURE__ */ jsx("div", { className: "size-16", children: agent.avatar }),
|
|
75
|
-
/* @__PURE__ */ jsx(Heading, { level: 3, size: "title", className: "mt-4 font-medium", children: agent.name }),
|
|
76
|
-
/* @__PURE__ */ jsx("p", { className: "text-sm text-text-tertiary", children: agent.role })
|
|
77
|
-
] }),
|
|
78
|
-
/* @__PURE__ */ jsxs(CardContent, { className: "space-y-4", children: [
|
|
79
|
-
/* @__PURE__ */ jsx("p", { className: "text-sm text-text-secondary", children: agent.description }),
|
|
80
|
-
agent.capabilities && agent.capabilities.length > 0 && /* @__PURE__ */ jsx("div", { className: "flex flex-wrap justify-center gap-1.5", children: agent.capabilities.map((cap) => /* @__PURE__ */ jsx(Badge, { variant: "secondary", className: "text-xs", children: cap }, cap)) }),
|
|
81
|
-
agent.status && /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(Badge, { variant: statusVariant[agent.status], children: statusLabel[agent.status] }) }),
|
|
82
|
-
agent.href && /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(Button, { variant: "link", asChild: true, children: /* @__PURE__ */ jsx("a", { href: agent.href, children: "Learn more" }) }) })
|
|
83
|
-
] })
|
|
84
|
-
] }, i))
|
|
85
|
-
}
|
|
86
|
-
)
|
|
87
|
-
] }) }) });
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
export { AgentProfileGridBlock };
|
|
11
|
+
import '../../chunk-S4JAHKOP.js';
|
|
12
|
+
import '../../chunk-QYZT24TS.js';
|
|
@@ -1,154 +1,15 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
2
|
+
export { AgentRunOverviewBlock } from '../../chunk-KNR3WB5C.js';
|
|
3
|
+
import '../../chunk-VCCI3NRD.js';
|
|
4
|
+
import '../../chunk-N53OMWW2.js';
|
|
5
|
+
import '../../chunk-WI547C47.js';
|
|
6
|
+
import '../../chunk-S2WSXZ7Y.js';
|
|
7
|
+
import '../../chunk-OCQB4IU7.js';
|
|
7
8
|
import '../../chunk-ZJ6PY5ST.js';
|
|
8
9
|
import '../../chunk-PRUXIDBD.js';
|
|
9
10
|
import '../../chunk-NURPUVUV.js';
|
|
10
|
-
import
|
|
11
|
+
import '../../chunk-J3QL5UQ7.js';
|
|
11
12
|
import '../../chunk-S4JAHKOP.js';
|
|
12
13
|
import '../../chunk-HJBXUXTD.js';
|
|
13
14
|
import '../../chunk-ASKFAYYR.js';
|
|
14
|
-
import
|
|
15
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
16
|
-
|
|
17
|
-
var defaultAgents = [
|
|
18
|
-
{
|
|
19
|
-
id: "orchestrator",
|
|
20
|
-
name: "Orchestrator",
|
|
21
|
-
role: "planner",
|
|
22
|
-
status: "active",
|
|
23
|
-
model: "Claude Opus 4",
|
|
24
|
-
currentAction: "Coordinating the next tool run",
|
|
25
|
-
tokenCount: 24800,
|
|
26
|
-
cost: 0.124,
|
|
27
|
-
elapsedMs: 312e3,
|
|
28
|
-
stepsCompleted: 4,
|
|
29
|
-
stepsTotal: 7,
|
|
30
|
-
toolCalls: [
|
|
31
|
-
{ name: "dispatch_task", status: "done" },
|
|
32
|
-
{ name: "plan_next", status: "running" }
|
|
33
|
-
]
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
id: "coder",
|
|
37
|
-
name: "Coder",
|
|
38
|
-
role: "developer",
|
|
39
|
-
status: "active",
|
|
40
|
-
model: "Claude Sonnet 4",
|
|
41
|
-
currentAction: "Editing workflow graph routing",
|
|
42
|
-
tokenCount: 12450,
|
|
43
|
-
cost: 0.042,
|
|
44
|
-
elapsedMs: 154e3,
|
|
45
|
-
stepsCompleted: 3,
|
|
46
|
-
stepsTotal: 7,
|
|
47
|
-
toolCalls: [
|
|
48
|
-
{ name: "search_web", status: "done" },
|
|
49
|
-
{ name: "edit_file", status: "running" }
|
|
50
|
-
]
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
id: "reviewer",
|
|
54
|
-
name: "Reviewer",
|
|
55
|
-
role: "qa",
|
|
56
|
-
status: "idle"
|
|
57
|
-
}
|
|
58
|
-
];
|
|
59
|
-
var defaultMetrics = [
|
|
60
|
-
{ label: "Active Agents", value: 2, trend: "flat" },
|
|
61
|
-
{ label: "Tool Calls", value: 12, trend: "up" },
|
|
62
|
-
{ label: "Latency", value: "1.2", unit: "s", trend: "down" },
|
|
63
|
-
{ label: "Cost", value: "$0.18", trend: "down" }
|
|
64
|
-
];
|
|
65
|
-
var defaultContext = {
|
|
66
|
-
used: 85e3,
|
|
67
|
-
total: 128e3,
|
|
68
|
-
breakdown: { system: 15, user: 35, assistant: 50 }
|
|
69
|
-
};
|
|
70
|
-
var defaultWorkflow = {
|
|
71
|
-
title: "Execution graph",
|
|
72
|
-
nodes: [
|
|
73
|
-
{ id: "plan", label: "Planner", status: "done", type: "llm", duration: 2500 },
|
|
74
|
-
{ id: "search", label: "Web Search", status: "done", type: "tool", duration: 1200 },
|
|
75
|
-
{ id: "code", label: "Coder", status: "active", type: "llm" },
|
|
76
|
-
{ id: "review", label: "Guardrail", status: "pending", type: "conditional" },
|
|
77
|
-
{ id: "deploy", label: "Operator", status: "pending", type: "human" }
|
|
78
|
-
],
|
|
79
|
-
edges: [
|
|
80
|
-
{ from: "plan", to: "search", label: "queries" },
|
|
81
|
-
{ from: "plan", to: "code" },
|
|
82
|
-
{ from: "search", to: "code", label: "context" },
|
|
83
|
-
{ from: "code", to: "review" },
|
|
84
|
-
{ from: "review", to: "deploy", label: "approved" }
|
|
85
|
-
]
|
|
86
|
-
};
|
|
87
|
-
function AgentRunOverviewBlock({
|
|
88
|
-
className,
|
|
89
|
-
title = "Runtime overview",
|
|
90
|
-
description = "A compact operator view of team health, context pressure, and workflow state.",
|
|
91
|
-
teamTitle = "Team",
|
|
92
|
-
metricsTitle = "Run metrics",
|
|
93
|
-
contextTitle = "Context window",
|
|
94
|
-
workflow = defaultWorkflow,
|
|
95
|
-
agents = defaultAgents,
|
|
96
|
-
metrics = defaultMetrics,
|
|
97
|
-
context = defaultContext,
|
|
98
|
-
ref,
|
|
99
|
-
...props
|
|
100
|
-
}) {
|
|
101
|
-
return /* @__PURE__ */ jsxs(
|
|
102
|
-
"section",
|
|
103
|
-
{
|
|
104
|
-
ref,
|
|
105
|
-
className: cn("space-y-4", className),
|
|
106
|
-
...props,
|
|
107
|
-
children: [
|
|
108
|
-
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
109
|
-
/* @__PURE__ */ jsx(Heading, { level: 2, size: "section", children: title }),
|
|
110
|
-
/* @__PURE__ */ jsx(Typography, { variant: "muted", children: description })
|
|
111
|
-
] }),
|
|
112
|
-
/* @__PURE__ */ jsxs("div", { className: "grid gap-4 xl:grid-cols-[320px_minmax(0,1fr)]", children: [
|
|
113
|
-
/* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
114
|
-
/* @__PURE__ */ jsxs("div", { className: "surface-solid rounded-lg p-4", children: [
|
|
115
|
-
/* @__PURE__ */ jsx(Heading, { level: 4, size: "title", className: "mb-4", children: teamTitle }),
|
|
116
|
-
/* @__PURE__ */ jsx(AgentTeamPanel, { agents })
|
|
117
|
-
] }),
|
|
118
|
-
/* @__PURE__ */ jsxs("div", { className: "surface-solid rounded-lg p-4", children: [
|
|
119
|
-
/* @__PURE__ */ jsxs("div", { className: "mb-4 flex items-center justify-between gap-2", children: [
|
|
120
|
-
/* @__PURE__ */ jsx(Heading, { level: 4, size: "title", children: contextTitle }),
|
|
121
|
-
/* @__PURE__ */ jsxs("span", { className: "text-xs text-text-tertiary", children: [
|
|
122
|
-
context.used.toLocaleString(),
|
|
123
|
-
" / ",
|
|
124
|
-
context.total.toLocaleString()
|
|
125
|
-
] })
|
|
126
|
-
] }),
|
|
127
|
-
/* @__PURE__ */ jsx(
|
|
128
|
-
ContextMeter,
|
|
129
|
-
{
|
|
130
|
-
used: context.used,
|
|
131
|
-
total: context.total,
|
|
132
|
-
breakdown: context.breakdown,
|
|
133
|
-
size: "expanded"
|
|
134
|
-
}
|
|
135
|
-
)
|
|
136
|
-
] })
|
|
137
|
-
] }),
|
|
138
|
-
/* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
139
|
-
/* @__PURE__ */ jsxs("div", { className: "surface-solid rounded-lg p-4", children: [
|
|
140
|
-
/* @__PURE__ */ jsx(Heading, { level: 4, size: "title", className: "mb-4", children: metricsTitle }),
|
|
141
|
-
/* @__PURE__ */ jsx(AgentMetricsCard, { metrics })
|
|
142
|
-
] }),
|
|
143
|
-
/* @__PURE__ */ jsxs("div", { className: "surface-solid rounded-lg p-4", children: [
|
|
144
|
-
/* @__PURE__ */ jsx(Heading, { level: 4, size: "title", className: "mb-4", children: workflow.title ?? defaultWorkflow.title }),
|
|
145
|
-
/* @__PURE__ */ jsx(WorkflowGraph, { nodes: workflow.nodes, edges: workflow.edges })
|
|
146
|
-
] })
|
|
147
|
-
] })
|
|
148
|
-
] })
|
|
149
|
-
]
|
|
150
|
-
}
|
|
151
|
-
);
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
export { AgentRunOverviewBlock };
|
|
15
|
+
import '../../chunk-QYZT24TS.js';
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
|
|
2
|
+
export { AgentWorkbenchBlock } from '../../chunk-SIQNG72C.js';
|
|
3
|
+
import '../../chunk-4WPZ6T7V.js';
|
|
3
4
|
import '../../chunk-MDAYDDTC.js';
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
5
|
+
import '../../chunk-N53OMWW2.js';
|
|
6
|
+
import '../../chunk-EYWOKTOY.js';
|
|
7
|
+
import '../../chunk-4OBE2FS2.js';
|
|
8
|
+
import '../../chunk-OSNTB6RY.js';
|
|
9
|
+
import '../../chunk-GLU236NN.js';
|
|
10
|
+
import '../../chunk-WI547C47.js';
|
|
11
|
+
import '../../chunk-DFPXK2JO.js';
|
|
11
12
|
import '../../chunk-LIBXYD5Q.js';
|
|
12
|
-
import
|
|
13
|
-
import
|
|
13
|
+
import '../../chunk-D4NC7WX5.js';
|
|
14
|
+
import '../../chunk-7KIDDF3I.js';
|
|
14
15
|
import '../../chunk-PD2YEH3H.js';
|
|
15
16
|
import '../../chunk-CRY67BIF.js';
|
|
16
17
|
import '../../chunk-HJC6U46F.js';
|
|
17
|
-
import
|
|
18
|
+
import '../../chunk-I66XWYSS.js';
|
|
18
19
|
import '../../chunk-GO35FTNJ.js';
|
|
19
20
|
import '../../chunk-WUO7OONN.js';
|
|
20
21
|
import '../../chunk-FLF5AMNO.js';
|
|
@@ -104,7 +105,7 @@ import '../../chunk-TBKJ34BB.js';
|
|
|
104
105
|
import '../../chunk-BRP6D56U.js';
|
|
105
106
|
import '../../chunk-6G3RRWJT.js';
|
|
106
107
|
import '../../chunk-ZU2GYVAP.js';
|
|
107
|
-
import
|
|
108
|
+
import '../../chunk-CRZ2JE24.js';
|
|
108
109
|
import '../../chunk-PSVQ7ZNX.js';
|
|
109
110
|
import '../../chunk-WKRIKCJC.js';
|
|
110
111
|
import '../../chunk-JHQ5NMLZ.js';
|
|
@@ -125,251 +126,8 @@ import '../../chunk-UIUMTURU.js';
|
|
|
125
126
|
import '../../chunk-PRUXIDBD.js';
|
|
126
127
|
import '../../chunk-NURPUVUV.js';
|
|
127
128
|
import '../../chunk-S4JAHKOP.js';
|
|
128
|
-
import
|
|
129
|
+
import '../../chunk-EK43W2Y6.js';
|
|
129
130
|
import '../../chunk-TV4RSQH4.js';
|
|
130
131
|
import '../../chunk-HJBXUXTD.js';
|
|
131
132
|
import '../../chunk-ASKFAYYR.js';
|
|
132
|
-
import
|
|
133
|
-
import * as React from 'react';
|
|
134
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
135
|
-
|
|
136
|
-
var defaultMessages = [
|
|
137
|
-
{
|
|
138
|
-
id: "1",
|
|
139
|
-
role: "user",
|
|
140
|
-
content: "Review the failing workflow graph and tell me what changed after the last tool run.",
|
|
141
|
-
timestamp: "10:30 AM"
|
|
142
|
-
},
|
|
143
|
-
{
|
|
144
|
-
id: "2",
|
|
145
|
-
role: "assistant",
|
|
146
|
-
content: "I am tracing the run log now. The current issue is a routing regression in the graph layer.",
|
|
147
|
-
timestamp: "10:31 AM",
|
|
148
|
-
isThinking: true,
|
|
149
|
-
reasoning: "Inspecting tool output, render timing, and the latest diff to isolate whether the failure is visual, structural, or data-driven.",
|
|
150
|
-
toolCalls: [
|
|
151
|
-
{
|
|
152
|
-
toolName: "read_file",
|
|
153
|
-
args: { path: "src/components/ui/WorkflowGraph.tsx" },
|
|
154
|
-
status: "complete",
|
|
155
|
-
duration: 340
|
|
156
|
-
}
|
|
157
|
-
]
|
|
158
|
-
},
|
|
159
|
-
{
|
|
160
|
-
id: "3",
|
|
161
|
-
role: "assistant",
|
|
162
|
-
content: "The flow is fixed. Tool nodes are now distinct, and edges route around the boxes rather than clipping them.",
|
|
163
|
-
timestamp: "10:32 AM",
|
|
164
|
-
isStreaming: true
|
|
165
|
-
}
|
|
166
|
-
];
|
|
167
|
-
var defaultArtifacts = [
|
|
168
|
-
{
|
|
169
|
-
id: "artifact-sql",
|
|
170
|
-
type: "code",
|
|
171
|
-
title: "optimized-query.sql",
|
|
172
|
-
language: "sql",
|
|
173
|
-
content: `SELECT u.id, u.name, COUNT(o.id) as order_count
|
|
174
|
-
FROM users u
|
|
175
|
-
LEFT JOIN orders o ON o.user_id = u.id
|
|
176
|
-
GROUP BY u.id, u.name
|
|
177
|
-
ORDER BY order_count DESC
|
|
178
|
-
LIMIT 10;`,
|
|
179
|
-
defaultExpanded: true
|
|
180
|
-
},
|
|
181
|
-
{
|
|
182
|
-
id: "artifact-md",
|
|
183
|
-
type: "markdown",
|
|
184
|
-
title: "Operator summary",
|
|
185
|
-
content: `Workflow graph stabilized.
|
|
186
|
-
|
|
187
|
-
Next steps:
|
|
188
|
-
- Verify dark mode
|
|
189
|
-
- Validate mobile layout
|
|
190
|
-
- Confirm human checkpoint labels`,
|
|
191
|
-
defaultExpanded: true
|
|
192
|
-
}
|
|
193
|
-
];
|
|
194
|
-
var defaultDiffs = [
|
|
195
|
-
{
|
|
196
|
-
id: "diff-workflow",
|
|
197
|
-
filePath: "src/components/ui/WorkflowGraph.tsx",
|
|
198
|
-
language: "typescript",
|
|
199
|
-
hunks: [
|
|
200
|
-
{
|
|
201
|
-
changes: [
|
|
202
|
-
{
|
|
203
|
-
type: "context",
|
|
204
|
-
content: "function WorkflowGraph({ className, nodes, edges, ref, ...props }) {",
|
|
205
|
-
lineNumber: 184
|
|
206
|
-
},
|
|
207
|
-
{
|
|
208
|
-
type: "remove",
|
|
209
|
-
content: "const cx1 = x1 + (x2 - x1) * 0.4",
|
|
210
|
-
lineNumber: 291
|
|
211
|
-
},
|
|
212
|
-
{
|
|
213
|
-
type: "remove",
|
|
214
|
-
content: "const cx2 = x2 - (x2 - x1) * 0.4",
|
|
215
|
-
lineNumber: 292
|
|
216
|
-
},
|
|
217
|
-
{
|
|
218
|
-
type: "add",
|
|
219
|
-
content: "const turnX = x1 + Math.max((x2 - x1) / 2, EDGE_TURN_X)",
|
|
220
|
-
lineNumber: 291
|
|
221
|
-
},
|
|
222
|
-
{
|
|
223
|
-
type: "add",
|
|
224
|
-
content: "d={`M ${x1} ${y1} L ${turnX} ${y1} L ${turnX} ${y2} L ${x2} ${y2}`}",
|
|
225
|
-
lineNumber: 297
|
|
226
|
-
}
|
|
227
|
-
]
|
|
228
|
-
}
|
|
229
|
-
]
|
|
230
|
-
}
|
|
231
|
-
];
|
|
232
|
-
var defaultLogs = [
|
|
233
|
-
{ text: "npm run test -- AgentWorkbenchBlock", type: "stdin" },
|
|
234
|
-
{ text: "vitest run src/components/blocks/AgentWorkbenchBlock.test.tsx", type: "stdout" },
|
|
235
|
-
{ text: "\u2713 renders messages and work panel tabs", type: "stdout" },
|
|
236
|
-
{ text: "\u2713 sends composer input through the provided handler", type: "stdout" },
|
|
237
|
-
{ text: "Done in 1.4s", type: "stdout" }
|
|
238
|
-
];
|
|
239
|
-
var defaultComposer = {
|
|
240
|
-
placeholder: "Type a message for the active agent run...",
|
|
241
|
-
disabled: false
|
|
242
|
-
};
|
|
243
|
-
function AgentWorkbenchBlock({
|
|
244
|
-
className,
|
|
245
|
-
title = "Agent workbench",
|
|
246
|
-
description = "A reusable run surface for conversation, tool traces, artifacts, diffs, and terminal output.",
|
|
247
|
-
threadTitle = "Conversation",
|
|
248
|
-
workTitle = "Work panel",
|
|
249
|
-
defaultWorkTab = "artifacts",
|
|
250
|
-
messages = defaultMessages,
|
|
251
|
-
artifacts = defaultArtifacts,
|
|
252
|
-
diffs = defaultDiffs,
|
|
253
|
-
logs = defaultLogs,
|
|
254
|
-
composer,
|
|
255
|
-
ref,
|
|
256
|
-
...props
|
|
257
|
-
}) {
|
|
258
|
-
const [draft, setDraft] = React.useState(() => composer?.value ?? "");
|
|
259
|
-
const composerValue = composer?.value ?? draft;
|
|
260
|
-
const composerPlaceholder = composer?.placeholder ?? defaultComposer.placeholder;
|
|
261
|
-
const composerDisabled = composer?.disabled ?? defaultComposer.disabled;
|
|
262
|
-
function handleComposerChange(value) {
|
|
263
|
-
if (composer?.value == null) {
|
|
264
|
-
setDraft(value);
|
|
265
|
-
}
|
|
266
|
-
composer?.onChange?.(value);
|
|
267
|
-
}
|
|
268
|
-
function handleSend() {
|
|
269
|
-
const value = composerValue.trim();
|
|
270
|
-
if (!value || composerDisabled) return;
|
|
271
|
-
composer?.onSend?.(value);
|
|
272
|
-
if (composer?.value == null) {
|
|
273
|
-
setDraft("");
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
return /* @__PURE__ */ jsxs(
|
|
277
|
-
"section",
|
|
278
|
-
{
|
|
279
|
-
ref,
|
|
280
|
-
className: cn("space-y-4", className),
|
|
281
|
-
...props,
|
|
282
|
-
children: [
|
|
283
|
-
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
284
|
-
/* @__PURE__ */ jsx(Heading, { level: 2, size: "section", children: title }),
|
|
285
|
-
/* @__PURE__ */ jsx(Typography, { variant: "muted", children: description })
|
|
286
|
-
] }),
|
|
287
|
-
/* @__PURE__ */ jsxs("div", { className: "grid gap-4 xl:grid-cols-[minmax(0,1.3fr)_360px]", children: [
|
|
288
|
-
/* @__PURE__ */ jsxs("div", { className: "surface-solid flex min-h-[560px] flex-col overflow-hidden rounded-lg", children: [
|
|
289
|
-
/* @__PURE__ */ jsx("div", { className: "border-b border-border px-4 py-4", children: /* @__PURE__ */ jsx(Heading, { level: 4, size: "title", children: threadTitle }) }),
|
|
290
|
-
/* @__PURE__ */ jsx(ScrollArea, { className: "flex-1", children: /* @__PURE__ */ jsx("div", { className: "space-y-4 p-4", "aria-live": "polite", children: messages.map((message) => /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
291
|
-
message.isThinking && /* @__PURE__ */ jsx(ThinkingIndicator, { reasoning: message.reasoning }),
|
|
292
|
-
/* @__PURE__ */ jsx(
|
|
293
|
-
AgentMessageBubble,
|
|
294
|
-
{
|
|
295
|
-
role: message.role,
|
|
296
|
-
content: message.content,
|
|
297
|
-
timestamp: message.timestamp,
|
|
298
|
-
isStreaming: message.isStreaming,
|
|
299
|
-
toolCalls: message.toolCalls && message.toolCalls.length > 0 ? /* @__PURE__ */ jsx("div", { className: "space-y-2", children: message.toolCalls.map((toolCall) => /* @__PURE__ */ jsx(
|
|
300
|
-
ToolCallCard,
|
|
301
|
-
{
|
|
302
|
-
toolName: toolCall.toolName,
|
|
303
|
-
args: toolCall.args,
|
|
304
|
-
status: toolCall.status,
|
|
305
|
-
result: toolCall.result,
|
|
306
|
-
duration: toolCall.duration
|
|
307
|
-
},
|
|
308
|
-
`${message.id}-${toolCall.toolName}`
|
|
309
|
-
)) }) : void 0
|
|
310
|
-
}
|
|
311
|
-
)
|
|
312
|
-
] }, message.id)) }) }),
|
|
313
|
-
/* @__PURE__ */ jsx("div", { className: "border-t border-border p-4", children: /* @__PURE__ */ jsxs("div", { className: "flex items-end gap-4", children: [
|
|
314
|
-
/* @__PURE__ */ jsx(
|
|
315
|
-
Textarea,
|
|
316
|
-
{
|
|
317
|
-
"aria-label": "Message input",
|
|
318
|
-
className: "min-h-[88px] flex-1 resize-none",
|
|
319
|
-
placeholder: composerPlaceholder,
|
|
320
|
-
value: composerValue,
|
|
321
|
-
onChange: (event) => handleComposerChange(event.target.value),
|
|
322
|
-
disabled: composerDisabled
|
|
323
|
-
}
|
|
324
|
-
),
|
|
325
|
-
/* @__PURE__ */ jsx(
|
|
326
|
-
Button,
|
|
327
|
-
{
|
|
328
|
-
type: "button",
|
|
329
|
-
size: "icon",
|
|
330
|
-
onClick: handleSend,
|
|
331
|
-
disabled: composerDisabled || !composerValue.trim(),
|
|
332
|
-
"aria-label": "Send message",
|
|
333
|
-
children: /* @__PURE__ */ jsx(SendIcon, { size: 16 })
|
|
334
|
-
}
|
|
335
|
-
)
|
|
336
|
-
] }) })
|
|
337
|
-
] }),
|
|
338
|
-
/* @__PURE__ */ jsxs("div", { className: "surface-solid overflow-hidden rounded-lg p-4", children: [
|
|
339
|
-
/* @__PURE__ */ jsx(Heading, { level: 4, size: "title", className: "mb-4", children: workTitle }),
|
|
340
|
-
/* @__PURE__ */ jsxs(Tabs, { defaultValue: defaultWorkTab, className: "flex h-full flex-col", children: [
|
|
341
|
-
/* @__PURE__ */ jsxs(TabsList, { className: "w-full justify-start", children: [
|
|
342
|
-
/* @__PURE__ */ jsx(TabsTrigger, { value: "artifacts", children: "Artifacts" }),
|
|
343
|
-
/* @__PURE__ */ jsx(TabsTrigger, { value: "diffs", children: "Diffs" }),
|
|
344
|
-
/* @__PURE__ */ jsx(TabsTrigger, { value: "logs", children: "Logs" })
|
|
345
|
-
] }),
|
|
346
|
-
/* @__PURE__ */ jsx(TabsContent, { value: "artifacts", className: "mt-4", children: /* @__PURE__ */ jsx(ScrollArea, { className: "h-[428px]", children: /* @__PURE__ */ jsx("div", { className: "space-y-4 pr-4", children: artifacts.map((artifact) => /* @__PURE__ */ jsx(
|
|
347
|
-
ArtifactCard,
|
|
348
|
-
{
|
|
349
|
-
type: artifact.type,
|
|
350
|
-
title: artifact.title,
|
|
351
|
-
content: artifact.content,
|
|
352
|
-
language: artifact.language,
|
|
353
|
-
defaultExpanded: artifact.defaultExpanded
|
|
354
|
-
},
|
|
355
|
-
artifact.id
|
|
356
|
-
)) }) }) }),
|
|
357
|
-
/* @__PURE__ */ jsx(TabsContent, { value: "diffs", className: "mt-4", children: /* @__PURE__ */ jsx(ScrollArea, { className: "h-[428px]", children: /* @__PURE__ */ jsx("div", { className: "space-y-4 pr-4", children: diffs.map((diff) => /* @__PURE__ */ jsx(
|
|
358
|
-
CodeDiffViewer,
|
|
359
|
-
{
|
|
360
|
-
filePath: diff.filePath,
|
|
361
|
-
language: diff.language,
|
|
362
|
-
hunks: diff.hunks
|
|
363
|
-
},
|
|
364
|
-
diff.id
|
|
365
|
-
)) }) }) }),
|
|
366
|
-
/* @__PURE__ */ jsx(TabsContent, { value: "logs", className: "mt-4", children: /* @__PURE__ */ jsx(AgentTerminal, { title: "run-output", lines: logs }) })
|
|
367
|
-
] })
|
|
368
|
-
] })
|
|
369
|
-
] })
|
|
370
|
-
]
|
|
371
|
-
}
|
|
372
|
-
);
|
|
373
|
-
}
|
|
374
|
-
|
|
375
|
-
export { AgentWorkbenchBlock };
|
|
133
|
+
import '../../chunk-QYZT24TS.js';
|
|
@@ -1,51 +1,3 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
import { jsx } from 'react/jsx-runtime';
|
|
5
|
-
|
|
6
|
-
function AudioVisualizerBlock({
|
|
7
|
-
className,
|
|
8
|
-
bars = 20,
|
|
9
|
-
isPlaying = false
|
|
10
|
-
}) {
|
|
11
|
-
const barsRef = useRef(null);
|
|
12
|
-
const opacityOffsetsRef = useRef(null);
|
|
13
|
-
if (opacityOffsetsRef.current === null || opacityOffsetsRef.current.length !== bars) {
|
|
14
|
-
opacityOffsetsRef.current = Array.from({ length: bars }, (_, i) => (i * 3 + 1) % 10 * 0.05);
|
|
15
|
-
}
|
|
16
|
-
const opacityOffsets = opacityOffsetsRef.current;
|
|
17
|
-
useEffect(() => {
|
|
18
|
-
const container = barsRef.current;
|
|
19
|
-
if (!container) return;
|
|
20
|
-
let interval;
|
|
21
|
-
const applyHeights = (heights) => {
|
|
22
|
-
const children = container.children;
|
|
23
|
-
for (let i = 0; i < children.length; i++) {
|
|
24
|
-
const child = children[i];
|
|
25
|
-
child.style.height = `${Math.max(10, heights[i])}%`;
|
|
26
|
-
child.style.opacity = String(isPlaying ? 0.5 + opacityOffsets[i] : 0.3);
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
if (isPlaying) {
|
|
30
|
-
interval = setInterval(() => {
|
|
31
|
-
applyHeights(Array.from({ length: bars }, () => Math.random() * 100));
|
|
32
|
-
}, 100);
|
|
33
|
-
} else {
|
|
34
|
-
applyHeights(Array(bars).fill(10));
|
|
35
|
-
}
|
|
36
|
-
return () => clearInterval(interval);
|
|
37
|
-
}, [isPlaying, bars, opacityOffsets]);
|
|
38
|
-
return /* @__PURE__ */ jsx("div", { ref: barsRef, className: cn("flex h-16 items-center justify-center gap-1.5", className), children: Array.from({ length: bars }, (_, i) => /* @__PURE__ */ jsx(
|
|
39
|
-
"div",
|
|
40
|
-
{
|
|
41
|
-
className: "w-1 rounded-full bg-accent transition-[height,opacity] duration-micro ease-out",
|
|
42
|
-
style: {
|
|
43
|
-
height: "10%",
|
|
44
|
-
opacity: 0.3
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
|
-
i
|
|
48
|
-
)) });
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
export { AudioVisualizerBlock };
|
|
2
|
+
export { AudioVisualizerBlock } from '../../chunk-AN5TW4AL.js';
|
|
3
|
+
import '../../chunk-QYZT24TS.js';
|