@datatechsolutions/ui 3.8.0 → 3.9.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/dist/astrlabe/index.js +107 -107
- package/dist/astrlabe/index.mjs +3 -3
- package/dist/astrlabe/workflow-canvas.js +3 -3
- package/dist/astrlabe/workflow-canvas.mjs +2 -2
- package/dist/{chunk-KKXI7CPF.mjs → chunk-2E7HYTS7.mjs} +3 -3
- package/dist/{chunk-KKXI7CPF.mjs.map → chunk-2E7HYTS7.mjs.map} +1 -1
- package/dist/{chunk-EWYAM4WJ.mjs → chunk-2ZY3IQ2I.mjs} +3 -3
- package/dist/{chunk-EWYAM4WJ.mjs.map → chunk-2ZY3IQ2I.mjs.map} +1 -1
- package/dist/{chunk-VPFVW7ZF.js → chunk-6E2YH67A.js} +35 -35
- package/dist/{chunk-VPFVW7ZF.js.map → chunk-6E2YH67A.js.map} +1 -1
- package/dist/{chunk-A4A3SQTV.mjs → chunk-6QJI5YOJ.mjs} +3 -3
- package/dist/{chunk-A4A3SQTV.mjs.map → chunk-6QJI5YOJ.mjs.map} +1 -1
- package/dist/{chunk-3X3IYDG6.js → chunk-7AM2SXEF.js} +68 -68
- package/dist/{chunk-3X3IYDG6.js.map → chunk-7AM2SXEF.js.map} +1 -1
- package/dist/{chunk-H37VDL7Y.js → chunk-A2RIX2RK.js} +4 -4
- package/dist/{chunk-H37VDL7Y.js.map → chunk-A2RIX2RK.js.map} +1 -1
- package/dist/{chunk-32DHEVOH.mjs → chunk-ARLYOLSO.mjs} +3 -3
- package/dist/{chunk-32DHEVOH.mjs.map → chunk-ARLYOLSO.mjs.map} +1 -1
- package/dist/{chunk-5YVOLHSW.mjs → chunk-AXBD6OAF.mjs} +4 -4
- package/dist/{chunk-5YVOLHSW.mjs.map → chunk-AXBD6OAF.mjs.map} +1 -1
- package/dist/{chunk-ZP37M2QK.mjs → chunk-BWUFLW5W.mjs} +6 -6
- package/dist/{chunk-ZP37M2QK.mjs.map → chunk-BWUFLW5W.mjs.map} +1 -1
- package/dist/{chunk-HBOORO52.js → chunk-CLTNCBSP.js} +4 -4
- package/dist/{chunk-HBOORO52.js.map → chunk-CLTNCBSP.js.map} +1 -1
- package/dist/{chunk-F35GFICG.js → chunk-CRBGZA6Y.js} +13 -13
- package/dist/{chunk-F35GFICG.js.map → chunk-CRBGZA6Y.js.map} +1 -1
- package/dist/{chunk-7JZFNKJD.js → chunk-DQIEVLA3.js} +35 -35
- package/dist/{chunk-7JZFNKJD.js.map → chunk-DQIEVLA3.js.map} +1 -1
- package/dist/{chunk-57E4TCB2.mjs → chunk-EAIE4QGD.mjs} +3 -3
- package/dist/{chunk-57E4TCB2.mjs.map → chunk-EAIE4QGD.mjs.map} +1 -1
- package/dist/{chunk-5W6LMDXV.mjs → chunk-GQWC4EKE.mjs} +4 -4
- package/dist/{chunk-5W6LMDXV.mjs.map → chunk-GQWC4EKE.mjs.map} +1 -1
- package/dist/{chunk-FKUIVS6I.js → chunk-IVKFXPLO.js} +28 -28
- package/dist/{chunk-FKUIVS6I.js.map → chunk-IVKFXPLO.js.map} +1 -1
- package/dist/{chunk-FNA66TT4.js → chunk-MT66VKLS.js} +163 -219
- package/dist/chunk-MT66VKLS.js.map +1 -0
- package/dist/{chunk-74BU2EBZ.mjs → chunk-OEZ7GAJY.mjs} +6 -6
- package/dist/{chunk-74BU2EBZ.mjs.map → chunk-OEZ7GAJY.mjs.map} +1 -1
- package/dist/{chunk-CZZOCKEA.mjs → chunk-OVQ4MKCV.mjs} +3 -3
- package/dist/{chunk-CZZOCKEA.mjs.map → chunk-OVQ4MKCV.mjs.map} +1 -1
- package/dist/{chunk-WDBVIU7W.mjs → chunk-PD3JLDA5.mjs} +3 -3
- package/dist/{chunk-WDBVIU7W.mjs.map → chunk-PD3JLDA5.mjs.map} +1 -1
- package/dist/{chunk-TJPPZU77.js → chunk-R6GEJBFC.js} +34 -34
- package/dist/{chunk-TJPPZU77.js.map → chunk-R6GEJBFC.js.map} +1 -1
- package/dist/{chunk-Q4QORAMH.js → chunk-RFUSH7WD.js} +10 -10
- package/dist/{chunk-Q4QORAMH.js.map → chunk-RFUSH7WD.js.map} +1 -1
- package/dist/{chunk-VS6PTRQ7.mjs → chunk-SJ6SUS7H.mjs} +3 -3
- package/dist/{chunk-VS6PTRQ7.mjs.map → chunk-SJ6SUS7H.mjs.map} +1 -1
- package/dist/{chunk-E57RZXOR.js → chunk-T4IYOKHR.js} +25 -25
- package/dist/{chunk-E57RZXOR.js.map → chunk-T4IYOKHR.js.map} +1 -1
- package/dist/{chunk-3H5CFLVK.js → chunk-U6VFS3RD.js} +135 -135
- package/dist/{chunk-3H5CFLVK.js.map → chunk-U6VFS3RD.js.map} +1 -1
- package/dist/{chunk-RCHTRG7R.js → chunk-UZIICTIY.js} +55 -55
- package/dist/{chunk-RCHTRG7R.js.map → chunk-UZIICTIY.js.map} +1 -1
- package/dist/{chunk-TCP45Q4B.js → chunk-WJENX6KB.js} +9 -9
- package/dist/{chunk-TCP45Q4B.js.map → chunk-WJENX6KB.js.map} +1 -1
- package/dist/{chunk-PYNXIDG3.mjs → chunk-WS3IJFPW.mjs} +3 -3
- package/dist/{chunk-PYNXIDG3.mjs.map → chunk-WS3IJFPW.mjs.map} +1 -1
- package/dist/{chunk-Q7HRCCFT.js → chunk-ZDXEGSCF.js} +45 -45
- package/dist/{chunk-Q7HRCCFT.js.map → chunk-ZDXEGSCF.js.map} +1 -1
- package/dist/{chunk-PCUINUIC.mjs → chunk-ZQEMKEEH.mjs} +3 -3
- package/dist/{chunk-PCUINUIC.mjs.map → chunk-ZQEMKEEH.mjs.map} +1 -1
- package/dist/{chunk-E6C7MFHJ.mjs → chunk-ZQRUAXGP.mjs} +164 -218
- package/dist/chunk-ZQRUAXGP.mjs.map +1 -0
- package/dist/index.d.mts +43 -42
- package/dist/index.d.ts +43 -42
- package/dist/index.js +662 -670
- package/dist/index.mjs +1 -1
- package/dist/platform/admin/index.js +9 -9
- package/dist/platform/admin/index.mjs +3 -3
- package/dist/platform/agents-workspace.js +6 -6
- package/dist/platform/agents-workspace.mjs +5 -5
- package/dist/platform/app-shell.js +3 -3
- package/dist/platform/app-shell.mjs +2 -2
- package/dist/platform/auth/index.js +21 -21
- package/dist/platform/auth/index.mjs +3 -3
- package/dist/platform/billing/index.js +3 -3
- package/dist/platform/billing/index.mjs +2 -2
- package/dist/platform/impersonation/index.js +3 -3
- package/dist/platform/impersonation/index.mjs +2 -2
- package/dist/platform/index.d.mts +1 -1
- package/dist/platform/index.d.ts +1 -1
- package/dist/platform/index.js +74 -74
- package/dist/platform/index.mjs +17 -17
- package/dist/platform/pages/index.d.mts +93 -4
- package/dist/platform/pages/index.d.ts +93 -4
- package/dist/platform/pages/index.js +1009 -575
- package/dist/platform/pages/index.js.map +1 -1
- package/dist/platform/pages/index.mjs +805 -372
- package/dist/platform/pages/index.mjs.map +1 -1
- package/dist/platform/settings/index.js +6 -6
- package/dist/platform/settings/index.mjs +5 -5
- package/dist/platform/workflow-canvas-shell.js +4 -4
- package/dist/platform/workflow-canvas-shell.mjs +3 -3
- package/package.json +1 -1
- package/dist/chunk-E6C7MFHJ.mjs.map +0 -1
- package/dist/chunk-FNA66TT4.js.map +0 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { adaptWorkflowGraphToUi, formatDurationMs } from '../../chunk-UQXVCVAN.mjs';
|
|
3
|
-
import { WorkflowWorkspace } from '../../chunk-
|
|
4
|
-
export { RolesPageView, UsersPageView } from '../../chunk-
|
|
5
|
-
import { DatasourceModal, findCategory, DIALECT_CATEGORIES } from '../../chunk-
|
|
6
|
-
export { DIALECT_CATEGORIES, DatasourceFormModal, DatasourceModal, findCategory, findDialect } from '../../chunk-
|
|
7
|
-
import { defaultRuleForm, RuleForm, ExecutionTimelinePanel } from '../../chunk-
|
|
3
|
+
import { WorkflowWorkspace } from '../../chunk-GQWC4EKE.mjs';
|
|
4
|
+
export { RolesPageView, UsersPageView } from '../../chunk-GQWC4EKE.mjs';
|
|
5
|
+
import { DatasourceModal, findCategory, DIALECT_CATEGORIES } from '../../chunk-6QJI5YOJ.mjs';
|
|
6
|
+
export { DIALECT_CATEGORIES, DatasourceFormModal, DatasourceModal, findCategory, findDialect } from '../../chunk-6QJI5YOJ.mjs';
|
|
7
|
+
import { defaultRuleForm, RuleForm, ExecutionTimelinePanel } from '../../chunk-AXBD6OAF.mjs';
|
|
8
8
|
import '../../chunk-JB6RNAD2.mjs';
|
|
9
9
|
import '../../chunk-LEXBTVGM.mjs';
|
|
10
|
-
import '../../chunk-
|
|
11
|
-
import { HeroSection, PageLoadingState, PageEmptyState, SearchBar, EntityCard,
|
|
10
|
+
import '../../chunk-EAIE4QGD.mjs';
|
|
11
|
+
import { HeroSection, PageLoadingState, PageEmptyState, SearchBar, EntityCard, CreateActionButton, GlassModal, FormGrid, FormSelect, FormInput, FormTextarea, SectionHeader, Text, Form, FormActionsRow, Table, TableHead, TableRow, TableHeader, TableBody, TableCell, InlineForm, CopyableId, ListCard, ListCardItem, Avatar, SectionCard, Tabs, TabsList, TabsTrigger, TabsContent, StepTimeline } from '../../chunk-ZQRUAXGP.mjs';
|
|
12
12
|
import '../../chunk-7VJ7CMMT.mjs';
|
|
13
13
|
import '../../chunk-RHRJXK5R.mjs';
|
|
14
14
|
import '../../chunk-3AY5HIQ6.mjs';
|
|
@@ -17,8 +17,8 @@ import { Badge, Button } from '../../chunk-WR55H7DH.mjs';
|
|
|
17
17
|
import '../../chunk-D2JF6C3E.mjs';
|
|
18
18
|
import { useLink } from '../../chunk-QWG2FMUN.mjs';
|
|
19
19
|
import '../../chunk-G7JQ4OCE.mjs';
|
|
20
|
-
import { useState, useMemo, useEffect } from 'react';
|
|
21
|
-
import { CubeTransparentIcon, CpuChipIcon, ChatBubbleLeftEllipsisIcon, WrenchScrewdriverIcon, AdjustmentsHorizontalIcon, CircleStackIcon, RectangleStackIcon, ClockIcon, LinkIcon, KeyIcon, ArrowPathIcon, TrashIcon, PlusIcon } from '@heroicons/react/24/outline';
|
|
20
|
+
import { useState, useMemo, useEffect, useCallback } from 'react';
|
|
21
|
+
import { CubeTransparentIcon, CpuChipIcon, ChatBubbleLeftEllipsisIcon, WrenchScrewdriverIcon, AdjustmentsHorizontalIcon, CircleStackIcon, RectangleStackIcon, ClockIcon, LinkIcon, KeyIcon, ArrowPathIcon, TrashIcon, PlusIcon, PencilSquareIcon } from '@heroicons/react/24/outline';
|
|
22
22
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
23
23
|
|
|
24
24
|
function AgentsModelsPageView({ labels, models, loading }) {
|
|
@@ -57,7 +57,10 @@ function AgentsModelsPageView({ labels, models, loading }) {
|
|
|
57
57
|
model.id
|
|
58
58
|
)) })
|
|
59
59
|
] });
|
|
60
|
-
return /* @__PURE__ */
|
|
60
|
+
return /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
61
|
+
hero,
|
|
62
|
+
content
|
|
63
|
+
] });
|
|
61
64
|
}
|
|
62
65
|
function AgentsConfigPageView({ labels, agents, models, loading, onCreate, onUpdate, onDelete }) {
|
|
63
66
|
const [editing, setEditing] = useState(null);
|
|
@@ -178,7 +181,11 @@ function AgentsConfigPageView({ labels, agents, models, loading, onCreate, onUpd
|
|
|
178
181
|
}
|
|
179
182
|
);
|
|
180
183
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
181
|
-
/* @__PURE__ */
|
|
184
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
185
|
+
hero,
|
|
186
|
+
content,
|
|
187
|
+
mobileAction
|
|
188
|
+
] }),
|
|
182
189
|
createOpen && renderForm({ title: labels.createTitle }, (input) => {
|
|
183
190
|
onCreate(input);
|
|
184
191
|
setCreateOpen(false);
|
|
@@ -305,7 +312,11 @@ function AgentsPromptsPageView({ labels, agents, prompts, loading, onCreate, onA
|
|
|
305
312
|
}) })
|
|
306
313
|
] });
|
|
307
314
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
308
|
-
/* @__PURE__ */
|
|
315
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
316
|
+
hero,
|
|
317
|
+
content,
|
|
318
|
+
mobileAction
|
|
319
|
+
] }),
|
|
309
320
|
/* @__PURE__ */ jsx(
|
|
310
321
|
GlassModal,
|
|
311
322
|
{
|
|
@@ -446,7 +457,11 @@ function AgentsToolDefinitionsPageView({ labels, tools, loading, onCreate, onUpd
|
|
|
446
457
|
)) })
|
|
447
458
|
] });
|
|
448
459
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
449
|
-
/* @__PURE__ */
|
|
460
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
461
|
+
hero,
|
|
462
|
+
content,
|
|
463
|
+
mobileAction
|
|
464
|
+
] }),
|
|
450
465
|
createOpen && /* @__PURE__ */ jsx(
|
|
451
466
|
ToolEditor,
|
|
452
467
|
{
|
|
@@ -1002,7 +1017,11 @@ function RulesPageView({ labels, rules, loading, onCreate, onUpdate, onDelete })
|
|
|
1002
1017
|
)) })
|
|
1003
1018
|
] });
|
|
1004
1019
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1005
|
-
/* @__PURE__ */
|
|
1020
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
1021
|
+
hero,
|
|
1022
|
+
content,
|
|
1023
|
+
mobileAction
|
|
1024
|
+
] }),
|
|
1006
1025
|
createOpen && /* @__PURE__ */ jsx(
|
|
1007
1026
|
RuleEditor,
|
|
1008
1027
|
{
|
|
@@ -1370,7 +1389,7 @@ function DashboardPageView({ labels, appLogo }) {
|
|
|
1370
1389
|
/* @__PURE__ */ jsx("div", { className: "flex justify-center mb-6", children: appLogo }),
|
|
1371
1390
|
/* @__PURE__ */ jsx("p", { className: "mt-3 text-base text-slate-600 dark:text-slate-300", children: labels.subtitle })
|
|
1372
1391
|
] });
|
|
1373
|
-
return /* @__PURE__ */ jsx(
|
|
1392
|
+
return /* @__PURE__ */ jsx("div", { className: "space-y-4", children: hero });
|
|
1374
1393
|
}
|
|
1375
1394
|
function AgentsIndexPageView({ labels }) {
|
|
1376
1395
|
const Link = useLink();
|
|
@@ -1415,7 +1434,10 @@ function AgentsIndexPageView({ labels }) {
|
|
|
1415
1434
|
) }, tile.id);
|
|
1416
1435
|
}) })
|
|
1417
1436
|
] });
|
|
1418
|
-
return /* @__PURE__ */
|
|
1437
|
+
return /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
1438
|
+
hero,
|
|
1439
|
+
content
|
|
1440
|
+
] });
|
|
1419
1441
|
}
|
|
1420
1442
|
function WorkflowsPageView({ labels, workflows, onCreate, onUpdateMeta, onPublish }) {
|
|
1421
1443
|
const selectedWorkflow = workflows[0] ?? null;
|
|
@@ -1592,7 +1614,10 @@ function WorkflowRunsPageView({ labels, runs, loading, onCancel, onReplay, onVie
|
|
|
1592
1614
|
run.id
|
|
1593
1615
|
)) })
|
|
1594
1616
|
] });
|
|
1595
|
-
return /* @__PURE__ */
|
|
1617
|
+
return /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
1618
|
+
hero,
|
|
1619
|
+
content
|
|
1620
|
+
] });
|
|
1596
1621
|
}
|
|
1597
1622
|
function RunTimelinePageView({ labels, entries, loading, runId }) {
|
|
1598
1623
|
const hero = /* @__PURE__ */ jsx(
|
|
@@ -1606,30 +1631,27 @@ function RunTimelinePageView({ labels, entries, loading, runId }) {
|
|
|
1606
1631
|
}
|
|
1607
1632
|
);
|
|
1608
1633
|
if (loading) {
|
|
1609
|
-
return /* @__PURE__ */
|
|
1634
|
+
return /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
1635
|
+
hero,
|
|
1636
|
+
/* @__PURE__ */ jsx(PageLoadingState, {})
|
|
1637
|
+
] });
|
|
1610
1638
|
}
|
|
1611
1639
|
if (entries.length === 0) {
|
|
1612
|
-
return /* @__PURE__ */
|
|
1613
|
-
|
|
1640
|
+
return /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
1641
|
+
hero,
|
|
1642
|
+
/* @__PURE__ */ jsx(PageEmptyState, { title: labels.empty ?? "", message: "", iconName: "folder-open" })
|
|
1643
|
+
] });
|
|
1644
|
+
}
|
|
1645
|
+
return /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
1646
|
+
hero,
|
|
1647
|
+
/* @__PURE__ */ jsx(
|
|
1648
|
+
ExecutionTimelinePanel,
|
|
1614
1649
|
{
|
|
1615
|
-
|
|
1616
|
-
|
|
1650
|
+
entries,
|
|
1651
|
+
labels
|
|
1617
1652
|
}
|
|
1618
|
-
)
|
|
1619
|
-
}
|
|
1620
|
-
return /* @__PURE__ */ jsx(
|
|
1621
|
-
ManagementPageLayout,
|
|
1622
|
-
{
|
|
1623
|
-
hero,
|
|
1624
|
-
content: /* @__PURE__ */ jsx(
|
|
1625
|
-
ExecutionTimelinePanel,
|
|
1626
|
-
{
|
|
1627
|
-
entries,
|
|
1628
|
-
labels
|
|
1629
|
-
}
|
|
1630
|
-
)
|
|
1631
|
-
}
|
|
1632
|
-
);
|
|
1653
|
+
)
|
|
1654
|
+
] });
|
|
1633
1655
|
}
|
|
1634
1656
|
var PROVIDER_PRESETS = {
|
|
1635
1657
|
anthropic_api: {
|
|
@@ -1780,7 +1802,11 @@ function ConnectionsPageView({
|
|
|
1780
1802
|
)) })
|
|
1781
1803
|
] });
|
|
1782
1804
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1783
|
-
/* @__PURE__ */
|
|
1805
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
1806
|
+
hero,
|
|
1807
|
+
content,
|
|
1808
|
+
mobileAction
|
|
1809
|
+
] }),
|
|
1784
1810
|
createOpen && /* @__PURE__ */ jsx(
|
|
1785
1811
|
ConnectionEditor,
|
|
1786
1812
|
{
|
|
@@ -2124,7 +2150,11 @@ function CredentialsPageView({ labels, credentials, loading, onCreate, onRotate,
|
|
|
2124
2150
|
)) })
|
|
2125
2151
|
] });
|
|
2126
2152
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2127
|
-
/* @__PURE__ */
|
|
2153
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
2154
|
+
hero,
|
|
2155
|
+
content,
|
|
2156
|
+
mobileAction
|
|
2157
|
+
] }),
|
|
2128
2158
|
/* @__PURE__ */ jsx(
|
|
2129
2159
|
GlassModal,
|
|
2130
2160
|
{
|
|
@@ -2190,7 +2220,7 @@ function AgentsWorkspacePageView({
|
|
|
2190
2220
|
loading,
|
|
2191
2221
|
promptsByAgent = {},
|
|
2192
2222
|
onSelectAgent,
|
|
2193
|
-
|
|
2223
|
+
onNewAgent,
|
|
2194
2224
|
onUpdateAgent,
|
|
2195
2225
|
onDeleteAgent,
|
|
2196
2226
|
onCreatePrompt,
|
|
@@ -2200,7 +2230,6 @@ function AgentsWorkspacePageView({
|
|
|
2200
2230
|
onUpdateModel
|
|
2201
2231
|
}) {
|
|
2202
2232
|
const [searchTerm, setSearchTerm] = useState("");
|
|
2203
|
-
const [createOpen, setCreateOpen] = useState(false);
|
|
2204
2233
|
const [selectedId, setSelectedId] = useState(null);
|
|
2205
2234
|
useEffect(() => {
|
|
2206
2235
|
if (!selectedId && agents.length > 0) {
|
|
@@ -2234,7 +2263,7 @@ function AgentsWorkspacePageView({
|
|
|
2234
2263
|
{
|
|
2235
2264
|
mode: "desktop",
|
|
2236
2265
|
label: labels.addAgent,
|
|
2237
|
-
onClick:
|
|
2266
|
+
onClick: onNewAgent,
|
|
2238
2267
|
accent: "violet"
|
|
2239
2268
|
}
|
|
2240
2269
|
)
|
|
@@ -2245,7 +2274,7 @@ function AgentsWorkspacePageView({
|
|
|
2245
2274
|
{
|
|
2246
2275
|
mode: "mobile",
|
|
2247
2276
|
label: labels.addAgent,
|
|
2248
|
-
onClick:
|
|
2277
|
+
onClick: onNewAgent,
|
|
2249
2278
|
accent: "violet"
|
|
2250
2279
|
}
|
|
2251
2280
|
);
|
|
@@ -2335,21 +2364,10 @@ function AgentsWorkspacePageView({
|
|
|
2335
2364
|
) })
|
|
2336
2365
|
] })
|
|
2337
2366
|
] });
|
|
2338
|
-
return /* @__PURE__ */ jsxs(
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
{
|
|
2343
|
-
labels,
|
|
2344
|
-
models,
|
|
2345
|
-
connections,
|
|
2346
|
-
onClose: () => setCreateOpen(false),
|
|
2347
|
-
onSubmit: async (input) => {
|
|
2348
|
-
await onCreateAgent(input);
|
|
2349
|
-
setCreateOpen(false);
|
|
2350
|
-
}
|
|
2351
|
-
}
|
|
2352
|
-
)
|
|
2367
|
+
return /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
2368
|
+
hero,
|
|
2369
|
+
content,
|
|
2370
|
+
mobileAction
|
|
2353
2371
|
] });
|
|
2354
2372
|
}
|
|
2355
2373
|
function AgentDetail({
|
|
@@ -2770,6 +2788,13 @@ function ModelTab({
|
|
|
2770
2788
|
}
|
|
2771
2789
|
);
|
|
2772
2790
|
}
|
|
2791
|
+
function deriveInitials(name) {
|
|
2792
|
+
const trimmed = name.trim();
|
|
2793
|
+
if (!trimmed) return "?";
|
|
2794
|
+
const parts = trimmed.split(/\s+/);
|
|
2795
|
+
if (parts.length === 1) return parts[0].slice(0, 2).toUpperCase();
|
|
2796
|
+
return (parts[0][0] + parts[parts.length - 1][0]).toUpperCase();
|
|
2797
|
+
}
|
|
2773
2798
|
var AGENT_PRESETS = [
|
|
2774
2799
|
{ id: "sales", emoji: "\u{1F4BC}", name: "Sales Specialist", role: "Lead qualification & CRM", systemPrompt: "You are a sales assistant. Help qualify leads, manage CRM entries, and schedule follow-ups. Always be professional and proactive.", temperature: 0.7, maxTokens: 2048, accent: "from-emerald-500 to-teal-600", framework: "anthropic" },
|
|
2775
2800
|
{ id: "support", emoji: "\u{1F3A7}", name: "Customer Support", role: "Ticket resolution & escalation", systemPrompt: "You are a customer support agent. Resolve tickets, answer questions, and escalate complex issues. Prioritize customer satisfaction.", temperature: 0.3, maxTokens: 2048, accent: "from-sky-500 to-indigo-600", framework: "crewai" },
|
|
@@ -2785,13 +2810,96 @@ var DIFFICULTY_OPTIONS = [
|
|
|
2785
2810
|
{ id: "expert", emoji: "\u{1F9E0}", accent: "from-rose-500 to-purple-600" }
|
|
2786
2811
|
];
|
|
2787
2812
|
var EMOJI_PALETTE = ["\u{1F4BC}", "\u{1F3A7}", "\u{1F4CA}", "\u{1F6E1}\uFE0F", "\u{1F52C}", "\u2728", "\u{1F916}", "\u26A1", "\u{1F3AF}", "\u{1F680}", "\u{1F9E0}", "\u{1F9BE}", "\u{1F4E1}", "\u{1F52E}", "\u{1F310}", "\u{1F5C2}\uFE0F"];
|
|
2788
|
-
function
|
|
2813
|
+
function RangeSliderField({
|
|
2814
|
+
sliderId,
|
|
2815
|
+
label,
|
|
2816
|
+
value,
|
|
2817
|
+
onChange,
|
|
2818
|
+
min,
|
|
2819
|
+
max,
|
|
2820
|
+
step,
|
|
2821
|
+
zones,
|
|
2822
|
+
trackGradient,
|
|
2823
|
+
formatValue,
|
|
2824
|
+
ariaLabel
|
|
2825
|
+
}) {
|
|
2826
|
+
const percent = (value - min) / (max - min) * 100;
|
|
2827
|
+
const activeZone = zones?.find((z) => value <= z.max) ?? zones?.[zones.length - 1];
|
|
2828
|
+
const thumbColor = activeZone?.thumbColor ?? "#6366f1";
|
|
2829
|
+
const glow = hexToGlow(thumbColor);
|
|
2830
|
+
const displayValue = formatValue ? formatValue(value) : value.toString();
|
|
2831
|
+
const ariaText = activeZone ? `${displayValue} \u2014 ${activeZone.label}` : displayValue;
|
|
2832
|
+
return /* @__PURE__ */ jsxs("div", { children: [
|
|
2833
|
+
/* @__PURE__ */ jsxs("div", { className: "mb-2 flex items-center justify-between", children: [
|
|
2834
|
+
/* @__PURE__ */ jsx("label", { htmlFor: sliderId, className: "text-xs font-medium text-gray-500 dark:text-gray-400", children: label }),
|
|
2835
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm font-bold tabular-nums text-gray-900 dark:text-white", children: displayValue })
|
|
2836
|
+
] }),
|
|
2837
|
+
/* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
2838
|
+
/* @__PURE__ */ jsx("div", { className: "absolute inset-x-0 top-1/2 h-2 -translate-y-1/2 overflow-hidden rounded-full bg-gray-200 dark:bg-gray-700", children: /* @__PURE__ */ jsx(
|
|
2839
|
+
"div",
|
|
2840
|
+
{
|
|
2841
|
+
className: "h-full rounded-full transition-all duration-300 ease-out motion-reduce:transition-none",
|
|
2842
|
+
style: {
|
|
2843
|
+
width: `${Math.max(0, Math.min(100, percent))}%`,
|
|
2844
|
+
background: trackGradient ?? `linear-gradient(90deg, ${thumbColor}, ${thumbColor})`
|
|
2845
|
+
}
|
|
2846
|
+
}
|
|
2847
|
+
) }),
|
|
2848
|
+
/* @__PURE__ */ jsx(
|
|
2849
|
+
"input",
|
|
2850
|
+
{
|
|
2851
|
+
id: sliderId,
|
|
2852
|
+
"data-slider-id": sliderId,
|
|
2853
|
+
type: "range",
|
|
2854
|
+
min,
|
|
2855
|
+
max,
|
|
2856
|
+
step,
|
|
2857
|
+
value,
|
|
2858
|
+
onChange: (e) => onChange(parseFloat(e.target.value)),
|
|
2859
|
+
"aria-label": ariaLabel ?? label,
|
|
2860
|
+
"aria-valuemin": min,
|
|
2861
|
+
"aria-valuemax": max,
|
|
2862
|
+
"aria-valuenow": value,
|
|
2863
|
+
"aria-valuetext": ariaText,
|
|
2864
|
+
className: "relative z-10 h-5 w-full cursor-pointer appearance-none bg-transparent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 [&::-webkit-slider-thumb]:h-5 [&::-webkit-slider-thumb]:w-5 [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:border-2 [&::-webkit-slider-thumb]:border-white [&::-webkit-slider-thumb]:shadow-lg dark:[&::-webkit-slider-thumb]:border-gray-900"
|
|
2865
|
+
}
|
|
2866
|
+
),
|
|
2867
|
+
/* @__PURE__ */ jsx("style", { children: `[data-slider-id="${sliderId}"]::-webkit-slider-thumb { background: ${thumbColor}; box-shadow: 0 0 8px ${glow}; } [data-slider-id="${sliderId}"]::-moz-range-thumb { background: ${thumbColor}; border: 2px solid white; box-shadow: 0 0 8px ${glow}; }` })
|
|
2868
|
+
] }),
|
|
2869
|
+
zones && zones.length > 0 && /* @__PURE__ */ jsx("div", { className: "mt-1 flex items-center justify-between", children: zones.map((z) => {
|
|
2870
|
+
const isActive = z.label === activeZone?.label;
|
|
2871
|
+
return /* @__PURE__ */ jsx(
|
|
2872
|
+
"span",
|
|
2873
|
+
{
|
|
2874
|
+
className: `text-[10px] font-medium transition-colors motion-reduce:transition-none ${isActive ? z.color : "text-gray-400 dark:text-gray-500"}`,
|
|
2875
|
+
children: z.label
|
|
2876
|
+
},
|
|
2877
|
+
z.label
|
|
2878
|
+
);
|
|
2879
|
+
}) })
|
|
2880
|
+
] });
|
|
2881
|
+
}
|
|
2882
|
+
function hexToGlow(hex) {
|
|
2883
|
+
const m = /^#?([0-9a-f]{6})$/i.exec(hex);
|
|
2884
|
+
if (!m) return "rgba(99,102,241,0.5)";
|
|
2885
|
+
const int = parseInt(m[1], 16);
|
|
2886
|
+
const r = int >> 16 & 255;
|
|
2887
|
+
const g = int >> 8 & 255;
|
|
2888
|
+
const b = int & 255;
|
|
2889
|
+
return `rgba(${r},${g},${b},0.5)`;
|
|
2890
|
+
}
|
|
2891
|
+
var TOTAL_STEPS = 5;
|
|
2892
|
+
function AgentNewWizardPageView({
|
|
2789
2893
|
labels,
|
|
2790
2894
|
models,
|
|
2791
2895
|
connections,
|
|
2792
|
-
|
|
2793
|
-
|
|
2896
|
+
initialStep,
|
|
2897
|
+
onStepChange,
|
|
2898
|
+
onSubmit,
|
|
2899
|
+
onCancel
|
|
2794
2900
|
}) {
|
|
2901
|
+
const clampedInitial = Math.min(TOTAL_STEPS, Math.max(1, initialStep ?? 1));
|
|
2902
|
+
const [step, setStep] = useState(clampedInitial);
|
|
2795
2903
|
const [presetId, setPresetId] = useState("custom");
|
|
2796
2904
|
const [emoji, setEmoji] = useState("\u2728");
|
|
2797
2905
|
const [name, setName] = useState("");
|
|
@@ -2809,7 +2917,16 @@ function CreateAgentDialog({
|
|
|
2809
2917
|
const [tagsInput, setTagsInput] = useState("");
|
|
2810
2918
|
const [outputSchema, setOutputSchema] = useState("");
|
|
2811
2919
|
const [modelId, setModelId] = useState(models[0]?.id ?? "");
|
|
2920
|
+
const [submitting, setSubmitting] = useState(false);
|
|
2921
|
+
const [touched, setTouched] = useState(false);
|
|
2812
2922
|
const activePreset = AGENT_PRESETS.find((p) => p.id === presetId) ?? AGENT_PRESETS[AGENT_PRESETS.length - 1];
|
|
2923
|
+
useEffect(() => {
|
|
2924
|
+
const next = Math.min(TOTAL_STEPS, Math.max(1, initialStep ?? 1));
|
|
2925
|
+
if (next !== step) setStep(next);
|
|
2926
|
+
}, [initialStep]);
|
|
2927
|
+
useEffect(() => {
|
|
2928
|
+
if (!modelId && models.length > 0) setModelId(models[0].id);
|
|
2929
|
+
}, [models, modelId]);
|
|
2813
2930
|
const matchingModels = useMemo(() => {
|
|
2814
2931
|
if (!connectionId) return models;
|
|
2815
2932
|
const conn = connections.find((c) => c.id === connectionId);
|
|
@@ -2822,7 +2939,7 @@ function CreateAgentDialog({
|
|
|
2822
2939
|
}, [models, connections, connectionId]);
|
|
2823
2940
|
const modelOptions = matchingModels.map((m) => ({ value: m.id, label: `${m.name} (${m.provider})` }));
|
|
2824
2941
|
const connectionOptions = useMemo(() => {
|
|
2825
|
-
const inline = { value: "", label: labels.connectionInline
|
|
2942
|
+
const inline = { value: "", label: labels.connectionInline };
|
|
2826
2943
|
return [
|
|
2827
2944
|
inline,
|
|
2828
2945
|
...connections.map((c) => ({
|
|
@@ -2832,13 +2949,36 @@ function CreateAgentDialog({
|
|
|
2832
2949
|
];
|
|
2833
2950
|
}, [connections, labels.connectionInline]);
|
|
2834
2951
|
const frameworkOptions = useMemo(() => [
|
|
2835
|
-
{ value: "", label: labels.connectionInline
|
|
2836
|
-
{ value: "anthropic", label: labels.frameworkAnthropic
|
|
2837
|
-
{ value: "langchain", label: labels.frameworkLangChain
|
|
2838
|
-
{ value: "crewai", label: labels.frameworkCrewAI
|
|
2839
|
-
{ value: "google-adk", label: labels.frameworkGoogleADK
|
|
2840
|
-
{ value: "openai", label: labels.frameworkOpenAI
|
|
2952
|
+
{ value: "", label: labels.connectionInline },
|
|
2953
|
+
{ value: "anthropic", label: labels.frameworkAnthropic },
|
|
2954
|
+
{ value: "langchain", label: labels.frameworkLangChain },
|
|
2955
|
+
{ value: "crewai", label: labels.frameworkCrewAI },
|
|
2956
|
+
{ value: "google-adk", label: labels.frameworkGoogleADK },
|
|
2957
|
+
{ value: "openai", label: labels.frameworkOpenAI }
|
|
2841
2958
|
], [labels]);
|
|
2959
|
+
const stepTitles = [
|
|
2960
|
+
labels.wizardStep1Title,
|
|
2961
|
+
labels.wizardStep2Title,
|
|
2962
|
+
labels.wizardStep3Title,
|
|
2963
|
+
labels.wizardStep4Title,
|
|
2964
|
+
labels.wizardStep5Title
|
|
2965
|
+
];
|
|
2966
|
+
const stepSubtitles = [
|
|
2967
|
+
labels.wizardStep1Subtitle,
|
|
2968
|
+
labels.wizardStep2Subtitle,
|
|
2969
|
+
labels.wizardStep3Subtitle,
|
|
2970
|
+
labels.wizardStep4Subtitle,
|
|
2971
|
+
labels.wizardStep5Subtitle
|
|
2972
|
+
];
|
|
2973
|
+
const timelineSteps = stepTitles.map((title, idx) => ({
|
|
2974
|
+
id: String(idx + 1),
|
|
2975
|
+
name: title,
|
|
2976
|
+
description: stepSubtitles[idx],
|
|
2977
|
+
status: idx + 1 < step ? "complete" : idx + 1 === step ? "current" : "upcoming"
|
|
2978
|
+
}));
|
|
2979
|
+
function markTouched() {
|
|
2980
|
+
if (!touched) setTouched(true);
|
|
2981
|
+
}
|
|
2842
2982
|
function applyPreset(preset) {
|
|
2843
2983
|
setPresetId(preset.id);
|
|
2844
2984
|
setEmoji(preset.emoji);
|
|
@@ -2850,14 +2990,78 @@ function CreateAgentDialog({
|
|
|
2850
2990
|
setMaxTokens(preset.maxTokens);
|
|
2851
2991
|
if (preset.framework) setFramework(preset.framework);
|
|
2852
2992
|
}
|
|
2993
|
+
markTouched();
|
|
2853
2994
|
}
|
|
2854
|
-
|
|
2855
|
-
|
|
2995
|
+
const goToStep = useCallback((next) => {
|
|
2996
|
+
const clamped = Math.min(TOTAL_STEPS, Math.max(1, next));
|
|
2997
|
+
setStep(clamped);
|
|
2998
|
+
onStepChange?.(clamped);
|
|
2999
|
+
}, [onStepChange]);
|
|
3000
|
+
function canAdvance(from) {
|
|
3001
|
+
if (from <= 1) return true;
|
|
3002
|
+
if (from === 2) return name.trim().length > 0;
|
|
3003
|
+
return true;
|
|
3004
|
+
}
|
|
3005
|
+
const goNext = useCallback(() => {
|
|
3006
|
+
if (!canAdvance(step)) return;
|
|
3007
|
+
if (step < TOTAL_STEPS) goToStep(step + 1);
|
|
3008
|
+
}, [step, name]);
|
|
3009
|
+
const goBack = useCallback(() => {
|
|
3010
|
+
if (step > 1) goToStep(step - 1);
|
|
3011
|
+
}, [step, goToStep]);
|
|
3012
|
+
const cancelWithConfirm = useCallback(() => {
|
|
3013
|
+
if (touched && !window.confirm(labels.wizardCancelConfirm)) return;
|
|
3014
|
+
onCancel();
|
|
3015
|
+
}, [touched, labels.wizardCancelConfirm, onCancel]);
|
|
3016
|
+
useEffect(() => {
|
|
3017
|
+
function onKey(e) {
|
|
3018
|
+
if (e.key === "Escape") {
|
|
3019
|
+
e.preventDefault();
|
|
3020
|
+
cancelWithConfirm();
|
|
3021
|
+
return;
|
|
3022
|
+
}
|
|
3023
|
+
if (e.key === "Enter") {
|
|
3024
|
+
const target = e.target;
|
|
3025
|
+
const tag = target?.tagName?.toLowerCase();
|
|
3026
|
+
if (tag === "textarea" || tag === "select" || tag === "input" || tag === "button") return;
|
|
3027
|
+
e.preventDefault();
|
|
3028
|
+
if (step < TOTAL_STEPS) goNext();
|
|
3029
|
+
else void submit();
|
|
3030
|
+
}
|
|
3031
|
+
}
|
|
3032
|
+
window.addEventListener("keydown", onKey);
|
|
3033
|
+
return () => window.removeEventListener("keydown", onKey);
|
|
3034
|
+
}, [step, name, touched]);
|
|
3035
|
+
async function submit() {
|
|
3036
|
+
setSubmitting(true);
|
|
3037
|
+
try {
|
|
3038
|
+
const parsedTags = tagsInput.split(",").map((t) => t.trim()).filter((t) => t.length > 0);
|
|
3039
|
+
await onSubmit({
|
|
3040
|
+
name: name.trim() || activePreset.name || "Untitled Agent",
|
|
3041
|
+
role: role.trim() || void 0,
|
|
3042
|
+
description: description.trim() || void 0,
|
|
3043
|
+
avatar: emoji,
|
|
3044
|
+
modelId,
|
|
3045
|
+
connectionId: connectionId || void 0,
|
|
3046
|
+
framework: framework || void 0,
|
|
3047
|
+
systemPrompt,
|
|
3048
|
+
userPrompt: userPrompt.trim() || void 0,
|
|
3049
|
+
maxTokens,
|
|
3050
|
+
temperature,
|
|
3051
|
+
topP,
|
|
3052
|
+
topK,
|
|
3053
|
+
difficulty: difficulty || void 0,
|
|
3054
|
+
tags: parsedTags.length > 0 ? parsedTags : void 0,
|
|
3055
|
+
outputSchema: outputSchema.trim() || void 0
|
|
3056
|
+
});
|
|
3057
|
+
} finally {
|
|
3058
|
+
setSubmitting(false);
|
|
3059
|
+
}
|
|
3060
|
+
}
|
|
3061
|
+
const counter = labels.wizardStepCounter.replace("{current}", String(step)).replace("{total}", String(TOTAL_STEPS));
|
|
3062
|
+
const hero = /* @__PURE__ */ jsx(
|
|
3063
|
+
HeroSection,
|
|
2856
3064
|
{
|
|
2857
|
-
open: true,
|
|
2858
|
-
onClose,
|
|
2859
|
-
title: labels.createAgentTitle,
|
|
2860
|
-
label: labels.createAgentEyebrow ?? "NEW AGENT",
|
|
2861
3065
|
icon: /* @__PURE__ */ jsx(
|
|
2862
3066
|
"div",
|
|
2863
3067
|
{
|
|
@@ -2866,330 +3070,559 @@ function CreateAgentDialog({
|
|
|
2866
3070
|
children: emoji
|
|
2867
3071
|
}
|
|
2868
3072
|
),
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
/* @__PURE__ */ jsx(
|
|
2897
|
-
SectionCard,
|
|
2898
|
-
{
|
|
2899
|
-
variant: "glass",
|
|
2900
|
-
padded: false,
|
|
2901
|
-
header: {
|
|
2902
|
-
title: labels.presetTitle ?? "Start from a template",
|
|
2903
|
-
subtitle: labels.presetSubtitle ?? "Pick a role or build a custom agent"
|
|
2904
|
-
},
|
|
2905
|
-
children: /* @__PURE__ */ jsx("div", { className: "grid grid-cols-2 gap-2 px-4 pb-4 sm:grid-cols-3", children: AGENT_PRESETS.map((preset) => {
|
|
2906
|
-
const selected = preset.id === presetId;
|
|
2907
|
-
return /* @__PURE__ */ jsxs(
|
|
2908
|
-
"button",
|
|
2909
|
-
{
|
|
2910
|
-
type: "button",
|
|
2911
|
-
onClick: () => applyPreset(preset),
|
|
2912
|
-
className: [
|
|
2913
|
-
"liquid-surface group flex items-center gap-3 rounded-xl px-3 py-2.5 text-left transition-all",
|
|
2914
|
-
selected ? "ring-2 ring-indigo-500/70 ring-offset-1 ring-offset-transparent" : "hover:border-indigo-400/40 focus-visible:ring-2 focus-visible:ring-indigo-500/70 focus-visible:ring-offset-1"
|
|
2915
|
-
].join(" "),
|
|
2916
|
-
children: [
|
|
2917
|
-
/* @__PURE__ */ jsx(
|
|
2918
|
-
"span",
|
|
2919
|
-
{
|
|
2920
|
-
"aria-hidden": "true",
|
|
2921
|
-
className: `flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-gradient-to-br ${preset.accent} text-base shadow-sm`,
|
|
2922
|
-
children: preset.emoji
|
|
2923
|
-
}
|
|
2924
|
-
),
|
|
2925
|
-
/* @__PURE__ */ jsxs("span", { className: "min-w-0 flex-1", children: [
|
|
2926
|
-
/* @__PURE__ */ jsx("span", { className: "block truncate text-sm font-semibold text-slate-900 dark:text-white", children: preset.id === "custom" ? labels.presetCustom ?? "Custom" : preset.name }),
|
|
2927
|
-
/* @__PURE__ */ jsx("span", { className: "block truncate text-xs text-slate-500 dark:text-slate-400", children: preset.role || (labels.presetCustomHint ?? "Start from scratch") })
|
|
2928
|
-
] })
|
|
2929
|
-
]
|
|
2930
|
-
},
|
|
2931
|
-
preset.id
|
|
2932
|
-
);
|
|
2933
|
-
}) })
|
|
2934
|
-
}
|
|
2935
|
-
),
|
|
2936
|
-
/* @__PURE__ */ jsx(
|
|
2937
|
-
SectionCard,
|
|
2938
|
-
{
|
|
2939
|
-
variant: "glass",
|
|
2940
|
-
header: {
|
|
2941
|
-
title: labels.identitySection ?? "Identity",
|
|
2942
|
-
subtitle: labels.identitySubtitle ?? "How your agent shows up across workflows"
|
|
2943
|
-
},
|
|
2944
|
-
children: /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
2945
|
-
/* @__PURE__ */ jsxs("div", { children: [
|
|
2946
|
-
/* @__PURE__ */ jsx("span", { className: "mb-2 block text-xs font-semibold uppercase tracking-wider text-slate-600 dark:text-slate-400", children: labels.avatarLabel ?? "Avatar" }),
|
|
2947
|
-
/* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1.5", children: EMOJI_PALETTE.map((e) => /* @__PURE__ */ jsx(
|
|
2948
|
-
"button",
|
|
2949
|
-
{
|
|
2950
|
-
type: "button",
|
|
2951
|
-
onClick: () => setEmoji(e),
|
|
2952
|
-
"aria-pressed": emoji === e,
|
|
2953
|
-
className: [
|
|
2954
|
-
"flex h-9 w-9 items-center justify-center rounded-lg text-base transition-all",
|
|
2955
|
-
emoji === e ? `bg-gradient-to-br ${activePreset.accent} shadow-sm ring-2 ring-indigo-500/70 ring-offset-1 ring-offset-transparent` : "liquid-surface hover:border-indigo-400/40 focus-visible:ring-2 focus-visible:ring-indigo-500/70 focus-visible:ring-offset-1"
|
|
2956
|
-
].join(" "),
|
|
2957
|
-
children: e
|
|
2958
|
-
},
|
|
2959
|
-
e
|
|
2960
|
-
)) })
|
|
2961
|
-
] }),
|
|
2962
|
-
/* @__PURE__ */ jsxs(FormGrid, { children: [
|
|
3073
|
+
label: counter,
|
|
3074
|
+
title: labels.pageTitle,
|
|
3075
|
+
subtitle: stepSubtitles[step - 1],
|
|
3076
|
+
gradient: activePreset.accent
|
|
3077
|
+
}
|
|
3078
|
+
);
|
|
3079
|
+
function renderStep1() {
|
|
3080
|
+
return /* @__PURE__ */ jsx(
|
|
3081
|
+
SectionCard,
|
|
3082
|
+
{
|
|
3083
|
+
variant: "glass",
|
|
3084
|
+
header: {
|
|
3085
|
+
title: labels.presetTitle,
|
|
3086
|
+
subtitle: labels.presetSubtitle
|
|
3087
|
+
},
|
|
3088
|
+
children: /* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 gap-2 sm:grid-cols-2 lg:grid-cols-3", children: AGENT_PRESETS.map((preset) => {
|
|
3089
|
+
const selected = preset.id === presetId;
|
|
3090
|
+
return /* @__PURE__ */ jsxs(
|
|
3091
|
+
"button",
|
|
3092
|
+
{
|
|
3093
|
+
type: "button",
|
|
3094
|
+
onClick: () => applyPreset(preset),
|
|
3095
|
+
className: [
|
|
3096
|
+
"liquid-surface group flex items-center gap-3 rounded-xl px-3 py-2.5 text-left transition-all",
|
|
3097
|
+
selected ? "ring-2 ring-indigo-500/70 ring-offset-1 ring-offset-transparent" : "hover:border-indigo-400/40 focus-visible:ring-2 focus-visible:ring-indigo-500/70 focus-visible:ring-offset-1"
|
|
3098
|
+
].join(" "),
|
|
3099
|
+
children: [
|
|
2963
3100
|
/* @__PURE__ */ jsx(
|
|
2964
|
-
|
|
3101
|
+
"span",
|
|
2965
3102
|
{
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
required: true,
|
|
2970
|
-
placeholder: labels.namePlaceholder ?? "Sales Specialist"
|
|
3103
|
+
"aria-hidden": "true",
|
|
3104
|
+
className: `flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-gradient-to-br ${preset.accent} text-base shadow-sm`,
|
|
3105
|
+
children: preset.emoji
|
|
2971
3106
|
}
|
|
2972
3107
|
),
|
|
2973
|
-
/* @__PURE__ */
|
|
2974
|
-
|
|
2975
|
-
{
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
onValueChange: setRole,
|
|
2979
|
-
placeholder: labels.rolePlaceholder
|
|
2980
|
-
}
|
|
2981
|
-
)
|
|
2982
|
-
] }),
|
|
2983
|
-
/* @__PURE__ */ jsx(
|
|
2984
|
-
FormTextarea,
|
|
2985
|
-
{
|
|
2986
|
-
label: labels.descriptionLabel ?? labels.description,
|
|
2987
|
-
value: description,
|
|
2988
|
-
onValueChange: setDescription,
|
|
2989
|
-
rows: 2,
|
|
2990
|
-
placeholder: labels.descriptionPlaceholder ?? "A short summary of what this agent does."
|
|
2991
|
-
}
|
|
2992
|
-
)
|
|
2993
|
-
] })
|
|
2994
|
-
}
|
|
2995
|
-
),
|
|
2996
|
-
/* @__PURE__ */ jsx(
|
|
2997
|
-
SectionCard,
|
|
2998
|
-
{
|
|
2999
|
-
variant: "glass",
|
|
3000
|
-
header: {
|
|
3001
|
-
title: labels.modelSection ?? "Model and connection",
|
|
3002
|
-
subtitle: labels.connectionPickPrompt ?? "Pick the provider connection or use an inline model"
|
|
3108
|
+
/* @__PURE__ */ jsxs("span", { className: "min-w-0 flex-1", children: [
|
|
3109
|
+
/* @__PURE__ */ jsx("span", { className: "block truncate text-sm font-semibold text-slate-900 dark:text-white", children: preset.id === "custom" ? labels.presetCustom : preset.name }),
|
|
3110
|
+
/* @__PURE__ */ jsx("span", { className: "block truncate text-xs text-slate-500 dark:text-slate-400", children: preset.role || labels.presetCustomHint })
|
|
3111
|
+
] })
|
|
3112
|
+
]
|
|
3003
3113
|
},
|
|
3004
|
-
|
|
3005
|
-
|
|
3006
|
-
|
|
3007
|
-
|
|
3008
|
-
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
|
|
3028
|
-
|
|
3029
|
-
|
|
3030
|
-
|
|
3031
|
-
|
|
3032
|
-
|
|
3033
|
-
|
|
3114
|
+
preset.id
|
|
3115
|
+
);
|
|
3116
|
+
}) })
|
|
3117
|
+
}
|
|
3118
|
+
);
|
|
3119
|
+
}
|
|
3120
|
+
function renderStep2() {
|
|
3121
|
+
return /* @__PURE__ */ jsx(
|
|
3122
|
+
SectionCard,
|
|
3123
|
+
{
|
|
3124
|
+
variant: "glass",
|
|
3125
|
+
header: {
|
|
3126
|
+
title: labels.identitySection,
|
|
3127
|
+
subtitle: labels.identitySubtitle
|
|
3128
|
+
},
|
|
3129
|
+
children: /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
3130
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
3131
|
+
/* @__PURE__ */ jsx("span", { className: "mb-2 block text-xs font-semibold uppercase tracking-wider text-slate-600 dark:text-slate-400", children: labels.avatarLabel }),
|
|
3132
|
+
/* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1.5", children: EMOJI_PALETTE.map((e) => /* @__PURE__ */ jsx(
|
|
3133
|
+
"button",
|
|
3134
|
+
{
|
|
3135
|
+
type: "button",
|
|
3136
|
+
onClick: () => {
|
|
3137
|
+
setEmoji(e);
|
|
3138
|
+
markTouched();
|
|
3139
|
+
},
|
|
3140
|
+
"aria-pressed": emoji === e,
|
|
3141
|
+
className: [
|
|
3142
|
+
"flex h-9 w-9 items-center justify-center rounded-lg text-base transition-all",
|
|
3143
|
+
emoji === e ? `bg-gradient-to-br ${activePreset.accent} shadow-sm ring-2 ring-indigo-500/70 ring-offset-1 ring-offset-transparent` : "liquid-surface hover:border-indigo-400/40 focus-visible:ring-2 focus-visible:ring-indigo-500/70 focus-visible:ring-offset-1"
|
|
3144
|
+
].join(" "),
|
|
3145
|
+
children: e
|
|
3146
|
+
},
|
|
3147
|
+
e
|
|
3148
|
+
)) })
|
|
3149
|
+
] }),
|
|
3150
|
+
/* @__PURE__ */ jsxs(FormGrid, { children: [
|
|
3151
|
+
/* @__PURE__ */ jsx(
|
|
3152
|
+
FormInput,
|
|
3153
|
+
{
|
|
3154
|
+
label: labels.name,
|
|
3155
|
+
value: name,
|
|
3156
|
+
onValueChange: (v) => {
|
|
3157
|
+
setName(v);
|
|
3158
|
+
markTouched();
|
|
3159
|
+
},
|
|
3160
|
+
required: true,
|
|
3161
|
+
placeholder: labels.namePlaceholder
|
|
3162
|
+
}
|
|
3163
|
+
),
|
|
3164
|
+
/* @__PURE__ */ jsx(
|
|
3165
|
+
FormInput,
|
|
3166
|
+
{
|
|
3167
|
+
label: labels.role,
|
|
3168
|
+
value: role,
|
|
3169
|
+
onValueChange: (v) => {
|
|
3170
|
+
setRole(v);
|
|
3171
|
+
markTouched();
|
|
3172
|
+
},
|
|
3173
|
+
placeholder: labels.rolePlaceholder
|
|
3174
|
+
}
|
|
3175
|
+
)
|
|
3176
|
+
] }),
|
|
3177
|
+
/* @__PURE__ */ jsx(
|
|
3178
|
+
FormTextarea,
|
|
3179
|
+
{
|
|
3180
|
+
label: labels.descriptionLabel,
|
|
3181
|
+
value: description,
|
|
3182
|
+
onValueChange: (v) => {
|
|
3183
|
+
setDescription(v);
|
|
3184
|
+
markTouched();
|
|
3185
|
+
},
|
|
3186
|
+
rows: 3,
|
|
3187
|
+
placeholder: labels.descriptionPlaceholder
|
|
3188
|
+
}
|
|
3189
|
+
)
|
|
3190
|
+
] })
|
|
3191
|
+
}
|
|
3192
|
+
);
|
|
3193
|
+
}
|
|
3194
|
+
function renderStep3() {
|
|
3195
|
+
return /* @__PURE__ */ jsx(
|
|
3196
|
+
SectionCard,
|
|
3197
|
+
{
|
|
3198
|
+
variant: "glass",
|
|
3199
|
+
header: {
|
|
3200
|
+
title: labels.modelSection,
|
|
3201
|
+
subtitle: labels.connectionPickPrompt
|
|
3202
|
+
},
|
|
3203
|
+
children: /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
3204
|
+
/* @__PURE__ */ jsxs(FormGrid, { children: [
|
|
3205
|
+
/* @__PURE__ */ jsx(
|
|
3206
|
+
FormSelect,
|
|
3207
|
+
{
|
|
3208
|
+
label: labels.connectionLabel,
|
|
3209
|
+
value: connectionId,
|
|
3210
|
+
onValueChange: (v) => {
|
|
3211
|
+
setConnectionId(v);
|
|
3212
|
+
markTouched();
|
|
3213
|
+
},
|
|
3214
|
+
options: connectionOptions,
|
|
3215
|
+
icon: /* @__PURE__ */ jsx(LinkIcon, { className: "h-4 w-4" })
|
|
3216
|
+
}
|
|
3217
|
+
),
|
|
3218
|
+
/* @__PURE__ */ jsx(
|
|
3219
|
+
FormSelect,
|
|
3220
|
+
{
|
|
3221
|
+
label: labels.frameworkLabel,
|
|
3222
|
+
value: framework,
|
|
3223
|
+
onValueChange: (v) => {
|
|
3224
|
+
setFramework(v);
|
|
3225
|
+
markTouched();
|
|
3226
|
+
},
|
|
3227
|
+
options: frameworkOptions
|
|
3228
|
+
}
|
|
3229
|
+
),
|
|
3230
|
+
/* @__PURE__ */ jsx(
|
|
3231
|
+
FormSelect,
|
|
3232
|
+
{
|
|
3233
|
+
label: labels.model,
|
|
3234
|
+
value: modelId,
|
|
3235
|
+
onValueChange: (v) => {
|
|
3236
|
+
setModelId(v);
|
|
3237
|
+
markTouched();
|
|
3238
|
+
},
|
|
3239
|
+
options: modelOptions.length > 0 ? modelOptions : [{ value: "", label: labels.modelEmpty }]
|
|
3240
|
+
}
|
|
3241
|
+
)
|
|
3242
|
+
] }),
|
|
3243
|
+
/* @__PURE__ */ jsx(
|
|
3244
|
+
FormTextarea,
|
|
3245
|
+
{
|
|
3246
|
+
label: labels.outputSchemaLabel,
|
|
3247
|
+
value: outputSchema,
|
|
3248
|
+
onValueChange: (v) => {
|
|
3249
|
+
setOutputSchema(v);
|
|
3250
|
+
markTouched();
|
|
3251
|
+
},
|
|
3252
|
+
rows: 5,
|
|
3253
|
+
placeholder: labels.outputSchemaPlaceholder
|
|
3254
|
+
}
|
|
3255
|
+
)
|
|
3256
|
+
] })
|
|
3257
|
+
}
|
|
3258
|
+
);
|
|
3259
|
+
}
|
|
3260
|
+
function renderStep4() {
|
|
3261
|
+
return /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
3262
|
+
/* @__PURE__ */ jsx(
|
|
3263
|
+
SectionCard,
|
|
3264
|
+
{
|
|
3265
|
+
variant: "glass",
|
|
3266
|
+
header: {
|
|
3267
|
+
title: labels.behaviorSection,
|
|
3268
|
+
subtitle: labels.behaviorSubtitle
|
|
3269
|
+
},
|
|
3270
|
+
children: /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
3271
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
3272
|
+
/* @__PURE__ */ jsxs("div", { className: "mb-1 flex items-center justify-between", children: [
|
|
3273
|
+
/* @__PURE__ */ jsx("label", { htmlFor: "wizard-system-prompt", className: "text-xs font-medium text-gray-500 dark:text-gray-400", children: labels.promptSystemPrompt }),
|
|
3274
|
+
/* @__PURE__ */ jsxs("span", { className: "text-[10px] text-gray-400 dark:text-gray-500", children: [
|
|
3275
|
+
systemPrompt.length,
|
|
3276
|
+
" chars"
|
|
3277
|
+
] })
|
|
3034
3278
|
] }),
|
|
3035
3279
|
/* @__PURE__ */ jsx(
|
|
3036
|
-
|
|
3280
|
+
"textarea",
|
|
3037
3281
|
{
|
|
3038
|
-
|
|
3039
|
-
value:
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
|
|
3282
|
+
id: "wizard-system-prompt",
|
|
3283
|
+
value: systemPrompt,
|
|
3284
|
+
onChange: (e) => {
|
|
3285
|
+
setSystemPrompt(e.target.value);
|
|
3286
|
+
markTouched();
|
|
3287
|
+
},
|
|
3288
|
+
rows: 8,
|
|
3289
|
+
className: "w-full resize-y rounded-lg border border-gray-200/50 bg-gray-50/50 px-3 py-2.5 font-mono text-xs leading-relaxed text-gray-700 outline-none transition-colors placeholder:text-gray-400 focus:border-indigo-300/50 focus:ring-1 focus:ring-indigo-300/30 motion-reduce:transition-none dark:border-white/10 dark:bg-white/5 dark:text-gray-300 dark:placeholder:text-gray-500 dark:focus:border-indigo-500/30 dark:focus:ring-indigo-500/20",
|
|
3290
|
+
placeholder: labels.promptPlaceholder
|
|
3043
3291
|
}
|
|
3044
3292
|
)
|
|
3045
|
-
] })
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
|
|
3052
|
-
|
|
3053
|
-
|
|
3054
|
-
subtitle: labels.behaviorSubtitle ?? "System prompt shapes how the agent thinks"
|
|
3055
|
-
},
|
|
3056
|
-
children: /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
3293
|
+
] }),
|
|
3294
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
3295
|
+
/* @__PURE__ */ jsxs("div", { className: "mb-1 flex items-center justify-between", children: [
|
|
3296
|
+
/* @__PURE__ */ jsx("label", { htmlFor: "wizard-user-prompt", className: "text-xs font-medium text-gray-500 dark:text-gray-400", children: labels.userPromptLabel }),
|
|
3297
|
+
/* @__PURE__ */ jsxs("span", { className: "text-[10px] text-gray-400 dark:text-gray-500", children: [
|
|
3298
|
+
userPrompt.length,
|
|
3299
|
+
" chars"
|
|
3300
|
+
] })
|
|
3301
|
+
] }),
|
|
3057
3302
|
/* @__PURE__ */ jsx(
|
|
3058
|
-
|
|
3303
|
+
"textarea",
|
|
3059
3304
|
{
|
|
3060
|
-
|
|
3061
|
-
value:
|
|
3062
|
-
|
|
3305
|
+
id: "wizard-user-prompt",
|
|
3306
|
+
value: userPrompt,
|
|
3307
|
+
onChange: (e) => {
|
|
3308
|
+
setUserPrompt(e.target.value);
|
|
3309
|
+
markTouched();
|
|
3310
|
+
},
|
|
3063
3311
|
rows: 5,
|
|
3064
|
-
|
|
3312
|
+
className: "w-full resize-y rounded-lg border border-gray-200/50 bg-gray-50/50 px-3 py-2.5 font-mono text-xs leading-relaxed text-gray-700 outline-none transition-colors placeholder:text-gray-400 focus:border-indigo-300/50 focus:ring-1 focus:ring-indigo-300/30 motion-reduce:transition-none dark:border-white/10 dark:bg-white/5 dark:text-gray-300 dark:placeholder:text-gray-500 dark:focus:border-indigo-500/30 dark:focus:ring-indigo-500/20",
|
|
3313
|
+
placeholder: labels.userPromptPlaceholder
|
|
3065
3314
|
}
|
|
3066
|
-
)
|
|
3315
|
+
)
|
|
3316
|
+
] }),
|
|
3317
|
+
/* @__PURE__ */ jsx(
|
|
3318
|
+
RangeSliderField,
|
|
3319
|
+
{
|
|
3320
|
+
sliderId: "wizard-temperature",
|
|
3321
|
+
label: labels.temperature,
|
|
3322
|
+
value: temperature,
|
|
3323
|
+
onChange: (v) => {
|
|
3324
|
+
setTemperature(v);
|
|
3325
|
+
markTouched();
|
|
3326
|
+
},
|
|
3327
|
+
min: 0,
|
|
3328
|
+
max: 1,
|
|
3329
|
+
step: 0.05,
|
|
3330
|
+
trackGradient: "linear-gradient(90deg, #3b82f6, #8b5cf6 50%, #ec4899)",
|
|
3331
|
+
formatValue: (v) => v.toFixed(2),
|
|
3332
|
+
zones: [
|
|
3333
|
+
{ label: "Precise", max: 0.3, color: "text-blue-500", thumbColor: "#3b82f6" },
|
|
3334
|
+
{ label: "Balanced", max: 0.7, color: "text-purple-500", thumbColor: "#8b5cf6" },
|
|
3335
|
+
{ label: "Creative", max: 1, color: "text-pink-500", thumbColor: "#ec4899" }
|
|
3336
|
+
]
|
|
3337
|
+
}
|
|
3338
|
+
),
|
|
3339
|
+
/* @__PURE__ */ jsx(
|
|
3340
|
+
RangeSliderField,
|
|
3341
|
+
{
|
|
3342
|
+
sliderId: "wizard-top-p",
|
|
3343
|
+
label: labels.topPLabel,
|
|
3344
|
+
value: topP,
|
|
3345
|
+
onChange: (v) => {
|
|
3346
|
+
setTopP(v);
|
|
3347
|
+
markTouched();
|
|
3348
|
+
},
|
|
3349
|
+
min: 0,
|
|
3350
|
+
max: 1,
|
|
3351
|
+
step: 0.05,
|
|
3352
|
+
trackGradient: "linear-gradient(90deg, #6366f1, #8b5cf6)",
|
|
3353
|
+
formatValue: (v) => v.toFixed(2),
|
|
3354
|
+
zones: [
|
|
3355
|
+
{ label: "Top-P", max: 1, color: "text-violet-500", thumbColor: "#8b5cf6" }
|
|
3356
|
+
]
|
|
3357
|
+
}
|
|
3358
|
+
),
|
|
3359
|
+
/* @__PURE__ */ jsx(
|
|
3360
|
+
RangeSliderField,
|
|
3361
|
+
{
|
|
3362
|
+
sliderId: "wizard-top-k",
|
|
3363
|
+
label: labels.topKLabel,
|
|
3364
|
+
value: topK,
|
|
3365
|
+
onChange: (v) => {
|
|
3366
|
+
setTopK(Math.max(0, Math.floor(v)));
|
|
3367
|
+
markTouched();
|
|
3368
|
+
},
|
|
3369
|
+
min: 0,
|
|
3370
|
+
max: 500,
|
|
3371
|
+
step: 1,
|
|
3372
|
+
trackGradient: "linear-gradient(90deg, #10b981, #14b8a6)",
|
|
3373
|
+
formatValue: (v) => v.toString(),
|
|
3374
|
+
zones: [
|
|
3375
|
+
{ label: "Top-K", max: 500, color: "text-emerald-500", thumbColor: "#10b981" }
|
|
3376
|
+
]
|
|
3377
|
+
}
|
|
3378
|
+
),
|
|
3379
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
3380
|
+
/* @__PURE__ */ jsxs("div", { className: "mb-2 flex items-center justify-between", children: [
|
|
3381
|
+
/* @__PURE__ */ jsx("label", { htmlFor: "wizard-max-tokens", className: "text-xs font-medium text-gray-500 dark:text-gray-400", children: labels.maxTokens }),
|
|
3382
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm font-bold tabular-nums text-gray-900 dark:text-white", children: maxTokens.toLocaleString() })
|
|
3383
|
+
] }),
|
|
3067
3384
|
/* @__PURE__ */ jsx(
|
|
3068
|
-
|
|
3385
|
+
"input",
|
|
3069
3386
|
{
|
|
3070
|
-
|
|
3071
|
-
|
|
3072
|
-
|
|
3073
|
-
|
|
3074
|
-
|
|
3387
|
+
id: "wizard-max-tokens",
|
|
3388
|
+
type: "number",
|
|
3389
|
+
value: maxTokens,
|
|
3390
|
+
onChange: (e) => {
|
|
3391
|
+
setMaxTokens(Math.max(1, Math.floor(Number(e.target.value) || 0)));
|
|
3392
|
+
markTouched();
|
|
3393
|
+
},
|
|
3394
|
+
min: 1,
|
|
3395
|
+
max: 32e3,
|
|
3396
|
+
step: 1,
|
|
3397
|
+
className: "w-full rounded-lg border border-gray-200/50 bg-gray-50/50 px-3 py-2.5 text-sm tabular-nums text-gray-700 outline-none transition-colors focus:border-indigo-300/50 focus:ring-1 focus:ring-indigo-300/30 motion-reduce:transition-none dark:border-white/10 dark:bg-white/5 dark:text-gray-300 dark:focus:border-indigo-500/30 dark:focus:ring-indigo-500/20"
|
|
3075
3398
|
}
|
|
3076
|
-
)
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
type: "number",
|
|
3095
|
-
value: String(maxTokens),
|
|
3096
|
-
onValueChange: (v) => setMaxTokens(Number(v) || 0),
|
|
3097
|
-
min: 1,
|
|
3098
|
-
max: 32e3
|
|
3099
|
-
}
|
|
3100
|
-
),
|
|
3101
|
-
/* @__PURE__ */ jsx(
|
|
3102
|
-
FormInput,
|
|
3103
|
-
{
|
|
3104
|
-
label: `${labels.topPLabel ?? "Top-P"} (${topP.toFixed(2)})`,
|
|
3105
|
-
type: "number",
|
|
3106
|
-
value: String(topP),
|
|
3107
|
-
onValueChange: (v) => setTopP(Number(v) || 0),
|
|
3108
|
-
step: 0.05,
|
|
3109
|
-
min: 0,
|
|
3110
|
-
max: 1
|
|
3111
|
-
}
|
|
3112
|
-
),
|
|
3113
|
-
/* @__PURE__ */ jsx(
|
|
3114
|
-
FormInput,
|
|
3115
|
-
{
|
|
3116
|
-
label: labels.topKLabel ?? "Top-K",
|
|
3117
|
-
type: "number",
|
|
3118
|
-
value: String(topK),
|
|
3119
|
-
onValueChange: (v) => setTopK(Math.max(0, Math.floor(Number(v) || 0))),
|
|
3120
|
-
step: 1,
|
|
3121
|
-
min: 0,
|
|
3122
|
-
max: 500
|
|
3123
|
-
}
|
|
3124
|
-
)
|
|
3399
|
+
)
|
|
3400
|
+
] }),
|
|
3401
|
+
/* @__PURE__ */ jsx("div", { className: "overflow-hidden rounded-lg border border-gray-200/30 dark:border-white/10", children: /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-3 gap-px bg-gray-200/30 dark:bg-white/10", children: [
|
|
3402
|
+
/* @__PURE__ */ jsxs("div", { className: "bg-white/60 px-3 py-2 dark:bg-gray-900/60", children: [
|
|
3403
|
+
/* @__PURE__ */ jsx("p", { className: "text-[9px] uppercase tracking-wider text-gray-400 dark:text-gray-500", children: labels.model }),
|
|
3404
|
+
/* @__PURE__ */ jsx("p", { className: "truncate text-xs font-semibold text-gray-900 dark:text-white", children: matchingModels.find((m) => m.id === modelId)?.name ?? labels.modelEmpty })
|
|
3405
|
+
] }),
|
|
3406
|
+
/* @__PURE__ */ jsxs("div", { className: "bg-white/60 px-3 py-2 dark:bg-gray-900/60", children: [
|
|
3407
|
+
/* @__PURE__ */ jsx("p", { className: "text-[9px] uppercase tracking-wider text-gray-400 dark:text-gray-500", children: labels.maxTokens }),
|
|
3408
|
+
/* @__PURE__ */ jsx("p", { className: "text-xs font-semibold text-gray-900 dark:text-white", children: maxTokens.toLocaleString() })
|
|
3409
|
+
] }),
|
|
3410
|
+
/* @__PURE__ */ jsxs("div", { className: "bg-white/60 px-3 py-2 dark:bg-gray-900/60", children: [
|
|
3411
|
+
/* @__PURE__ */ jsx("p", { className: "text-[9px] uppercase tracking-wider text-gray-400 dark:text-gray-500", children: labels.temperature }),
|
|
3412
|
+
/* @__PURE__ */ jsxs("p", { className: `text-xs font-semibold ${temperature <= 0.3 ? "text-blue-500" : temperature <= 0.7 ? "text-purple-500" : "text-pink-500"}`, children: [
|
|
3413
|
+
temperature.toFixed(2),
|
|
3414
|
+
" \xB7 ",
|
|
3415
|
+
temperature <= 0.3 ? "Precise" : temperature <= 0.7 ? "Balanced" : "Creative"
|
|
3416
|
+
] })
|
|
3125
3417
|
] })
|
|
3418
|
+
] }) })
|
|
3419
|
+
] })
|
|
3420
|
+
}
|
|
3421
|
+
),
|
|
3422
|
+
/* @__PURE__ */ jsx(
|
|
3423
|
+
SectionCard,
|
|
3424
|
+
{
|
|
3425
|
+
variant: "glass",
|
|
3426
|
+
header: {
|
|
3427
|
+
title: labels.metadataSection,
|
|
3428
|
+
subtitle: labels.metadataSubtitle
|
|
3429
|
+
},
|
|
3430
|
+
children: /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
3431
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
3432
|
+
/* @__PURE__ */ jsx("span", { className: "mb-2 block text-xs font-semibold uppercase tracking-wider text-slate-600 dark:text-slate-400", children: labels.difficultyLabel }),
|
|
3433
|
+
/* @__PURE__ */ jsx("div", { className: "grid grid-cols-2 gap-2 sm:grid-cols-4", children: DIFFICULTY_OPTIONS.map((opt) => {
|
|
3434
|
+
const selected = difficulty === opt.id;
|
|
3435
|
+
const label = opt.id === "beginner" ? labels.difficultyBeginner : opt.id === "intermediate" ? labels.difficultyIntermediate : opt.id === "advanced" ? labels.difficultyAdvanced : labels.difficultyExpert;
|
|
3436
|
+
return /* @__PURE__ */ jsxs(
|
|
3437
|
+
"button",
|
|
3438
|
+
{
|
|
3439
|
+
type: "button",
|
|
3440
|
+
onClick: () => {
|
|
3441
|
+
setDifficulty(opt.id);
|
|
3442
|
+
markTouched();
|
|
3443
|
+
},
|
|
3444
|
+
"aria-pressed": selected,
|
|
3445
|
+
className: [
|
|
3446
|
+
"liquid-surface flex items-center gap-2 rounded-xl px-3 py-2 text-left transition-all",
|
|
3447
|
+
selected ? "ring-2 ring-indigo-500/70 ring-offset-1 ring-offset-transparent" : "hover:border-indigo-400/40 focus-visible:ring-2 focus-visible:ring-indigo-500/70 focus-visible:ring-offset-1"
|
|
3448
|
+
].join(" "),
|
|
3449
|
+
children: [
|
|
3450
|
+
/* @__PURE__ */ jsx(
|
|
3451
|
+
"span",
|
|
3452
|
+
{
|
|
3453
|
+
"aria-hidden": "true",
|
|
3454
|
+
className: `flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-gradient-to-br ${opt.accent} text-base shadow-sm`,
|
|
3455
|
+
children: opt.emoji
|
|
3456
|
+
}
|
|
3457
|
+
),
|
|
3458
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm font-semibold text-slate-900 dark:text-white", children: label })
|
|
3459
|
+
]
|
|
3460
|
+
},
|
|
3461
|
+
opt.id
|
|
3462
|
+
);
|
|
3463
|
+
}) })
|
|
3464
|
+
] }),
|
|
3465
|
+
/* @__PURE__ */ jsx(
|
|
3466
|
+
FormInput,
|
|
3467
|
+
{
|
|
3468
|
+
label: labels.tagsLabel,
|
|
3469
|
+
value: tagsInput,
|
|
3470
|
+
onValueChange: (v) => {
|
|
3471
|
+
setTagsInput(v);
|
|
3472
|
+
markTouched();
|
|
3473
|
+
},
|
|
3474
|
+
placeholder: labels.tagsPlaceholder
|
|
3475
|
+
}
|
|
3476
|
+
)
|
|
3477
|
+
] })
|
|
3478
|
+
}
|
|
3479
|
+
)
|
|
3480
|
+
] });
|
|
3481
|
+
}
|
|
3482
|
+
function renderStep5() {
|
|
3483
|
+
const modelLabel = models.find((m) => m.id === modelId)?.name ?? labels.modelEmpty;
|
|
3484
|
+
const connectionLabel = connectionId ? connections.find((c) => c.id === connectionId)?.name ?? labels.connectionInline : labels.connectionInline;
|
|
3485
|
+
return /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
3486
|
+
/* @__PURE__ */ jsx(
|
|
3487
|
+
SectionCard,
|
|
3488
|
+
{
|
|
3489
|
+
variant: "glass",
|
|
3490
|
+
header: {
|
|
3491
|
+
title: labels.wizardStep1Title,
|
|
3492
|
+
subtitle: labels.wizardStep1Subtitle
|
|
3493
|
+
},
|
|
3494
|
+
actions: /* @__PURE__ */ jsxs(Button, { type: "button", size: "sm", outline: true, onClick: () => goToStep(1), children: [
|
|
3495
|
+
/* @__PURE__ */ jsx(PencilSquareIcon, { className: "h-4 w-4" }),
|
|
3496
|
+
/* @__PURE__ */ jsx("span", { className: "ml-1.5", children: labels.wizardReviewEdit })
|
|
3497
|
+
] }),
|
|
3498
|
+
children: /* @__PURE__ */ jsx("p", { className: "text-sm text-slate-700 dark:text-slate-200", children: presetId === "custom" ? labels.presetCustom : AGENT_PRESETS.find((p) => p.id === presetId)?.name ?? labels.presetCustom })
|
|
3499
|
+
}
|
|
3500
|
+
),
|
|
3501
|
+
/* @__PURE__ */ jsx(
|
|
3502
|
+
SectionCard,
|
|
3503
|
+
{
|
|
3504
|
+
variant: "glass",
|
|
3505
|
+
header: {
|
|
3506
|
+
title: labels.wizardStep2Title,
|
|
3507
|
+
subtitle: labels.wizardStep2Subtitle
|
|
3508
|
+
},
|
|
3509
|
+
actions: /* @__PURE__ */ jsxs(Button, { type: "button", size: "sm", outline: true, onClick: () => goToStep(2), children: [
|
|
3510
|
+
/* @__PURE__ */ jsx(PencilSquareIcon, { className: "h-4 w-4" }),
|
|
3511
|
+
/* @__PURE__ */ jsx("span", { className: "ml-1.5", children: labels.wizardReviewEdit })
|
|
3512
|
+
] }),
|
|
3513
|
+
children: /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-3", children: [
|
|
3514
|
+
/* @__PURE__ */ jsx(
|
|
3515
|
+
"span",
|
|
3516
|
+
{
|
|
3517
|
+
"aria-hidden": "true",
|
|
3518
|
+
className: `flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-gradient-to-br ${activePreset.accent} text-lg shadow-sm`,
|
|
3519
|
+
children: emoji
|
|
3520
|
+
}
|
|
3521
|
+
),
|
|
3522
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
|
|
3523
|
+
/* @__PURE__ */ jsx("p", { className: "truncate text-sm font-semibold text-slate-900 dark:text-white", children: name || labels.namePlaceholder }),
|
|
3524
|
+
role && /* @__PURE__ */ jsx("p", { className: "truncate text-xs text-slate-500 dark:text-slate-400", children: role }),
|
|
3525
|
+
description && /* @__PURE__ */ jsx("p", { className: "mt-1 text-xs text-slate-600 dark:text-slate-300", children: description })
|
|
3126
3526
|
] })
|
|
3127
|
-
}
|
|
3128
|
-
|
|
3527
|
+
] })
|
|
3528
|
+
}
|
|
3529
|
+
),
|
|
3530
|
+
/* @__PURE__ */ jsx(
|
|
3531
|
+
SectionCard,
|
|
3532
|
+
{
|
|
3533
|
+
variant: "glass",
|
|
3534
|
+
header: {
|
|
3535
|
+
title: labels.wizardStep3Title,
|
|
3536
|
+
subtitle: labels.wizardStep3Subtitle
|
|
3537
|
+
},
|
|
3538
|
+
actions: /* @__PURE__ */ jsxs(Button, { type: "button", size: "sm", outline: true, onClick: () => goToStep(3), children: [
|
|
3539
|
+
/* @__PURE__ */ jsx(PencilSquareIcon, { className: "h-4 w-4" }),
|
|
3540
|
+
/* @__PURE__ */ jsx("span", { className: "ml-1.5", children: labels.wizardReviewEdit })
|
|
3541
|
+
] }),
|
|
3542
|
+
children: /* @__PURE__ */ jsxs("dl", { className: "grid grid-cols-1 gap-2 sm:grid-cols-2", children: [
|
|
3543
|
+
/* @__PURE__ */ jsx(ReviewRow, { label: labels.connectionLabel, value: connectionLabel }),
|
|
3544
|
+
/* @__PURE__ */ jsx(ReviewRow, { label: labels.frameworkLabel, value: framework || "\u2014" }),
|
|
3545
|
+
/* @__PURE__ */ jsx(ReviewRow, { label: labels.model, value: modelLabel }),
|
|
3546
|
+
outputSchema.trim() && /* @__PURE__ */ jsx(ReviewRow, { label: labels.outputSchemaLabel, value: outputSchema.trim().slice(0, 60) + (outputSchema.length > 60 ? "\u2026" : "") })
|
|
3547
|
+
] })
|
|
3548
|
+
}
|
|
3549
|
+
),
|
|
3550
|
+
/* @__PURE__ */ jsxs(
|
|
3551
|
+
SectionCard,
|
|
3552
|
+
{
|
|
3553
|
+
variant: "glass",
|
|
3554
|
+
header: {
|
|
3555
|
+
title: labels.wizardStep4Title,
|
|
3556
|
+
subtitle: labels.wizardStep4Subtitle
|
|
3557
|
+
},
|
|
3558
|
+
actions: /* @__PURE__ */ jsxs(Button, { type: "button", size: "sm", outline: true, onClick: () => goToStep(4), children: [
|
|
3559
|
+
/* @__PURE__ */ jsx(PencilSquareIcon, { className: "h-4 w-4" }),
|
|
3560
|
+
/* @__PURE__ */ jsx("span", { className: "ml-1.5", children: labels.wizardReviewEdit })
|
|
3561
|
+
] }),
|
|
3562
|
+
children: [
|
|
3563
|
+
/* @__PURE__ */ jsxs("dl", { className: "grid grid-cols-2 gap-2 sm:grid-cols-4", children: [
|
|
3564
|
+
/* @__PURE__ */ jsx(ReviewRow, { label: labels.temperature, value: temperature.toFixed(2) }),
|
|
3565
|
+
/* @__PURE__ */ jsx(ReviewRow, { label: labels.topPLabel, value: topP.toFixed(2) }),
|
|
3566
|
+
/* @__PURE__ */ jsx(ReviewRow, { label: labels.topKLabel, value: String(topK) }),
|
|
3567
|
+
/* @__PURE__ */ jsx(ReviewRow, { label: labels.maxTokens, value: maxTokens.toLocaleString() })
|
|
3568
|
+
] }),
|
|
3569
|
+
systemPrompt && /* @__PURE__ */ jsxs("div", { className: "mt-3", children: [
|
|
3570
|
+
/* @__PURE__ */ jsx("p", { className: "text-[10px] uppercase tracking-wider text-gray-400 dark:text-gray-500", children: labels.promptSystemPrompt }),
|
|
3571
|
+
/* @__PURE__ */ jsx("pre", { className: "mt-1 line-clamp-4 whitespace-pre-wrap rounded-lg border border-slate-200/70 bg-slate-50/60 p-2 text-xs text-slate-700 dark:border-slate-700 dark:bg-slate-900/40 dark:text-slate-200", children: systemPrompt })
|
|
3572
|
+
] })
|
|
3573
|
+
]
|
|
3574
|
+
}
|
|
3575
|
+
)
|
|
3576
|
+
] });
|
|
3577
|
+
}
|
|
3578
|
+
const stepBody = step === 1 ? renderStep1() : step === 2 ? renderStep2() : step === 3 ? renderStep3() : step === 4 ? renderStep4() : renderStep5();
|
|
3579
|
+
const advanceDisabled = !canAdvance(step);
|
|
3580
|
+
const footer = /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center justify-between gap-2 border-t border-slate-200/60 pt-4 dark:border-white/10", children: [
|
|
3581
|
+
/* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ jsx(Button, { type: "button", outline: true, onClick: goBack, disabled: step === 1 || submitting, children: labels.wizardBack }) }),
|
|
3582
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
3583
|
+
/* @__PURE__ */ jsx(Button, { type: "button", outline: true, onClick: cancelWithConfirm, disabled: submitting, children: labels.wizardCancel }),
|
|
3584
|
+
step < TOTAL_STEPS ? /* @__PURE__ */ jsx(Button, { type: "button", color: "indigo", onClick: goNext, disabled: advanceDisabled || submitting, children: labels.wizardNext }) : /* @__PURE__ */ jsx(Button, { type: "button", color: "indigo", onClick: () => void submit(), disabled: submitting, children: submitting ? labels.wizardCreate + "\u2026" : labels.wizardCreate })
|
|
3585
|
+
] })
|
|
3586
|
+
] });
|
|
3587
|
+
const content = /* @__PURE__ */ jsxs(
|
|
3588
|
+
"form",
|
|
3589
|
+
{
|
|
3590
|
+
onSubmit: (e) => {
|
|
3591
|
+
e.preventDefault();
|
|
3592
|
+
if (step < TOTAL_STEPS) goNext();
|
|
3593
|
+
else void submit();
|
|
3594
|
+
},
|
|
3595
|
+
className: "space-y-5",
|
|
3596
|
+
children: [
|
|
3129
3597
|
/* @__PURE__ */ jsx(
|
|
3130
|
-
|
|
3598
|
+
StepTimeline,
|
|
3131
3599
|
{
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
}
|
|
3137
|
-
children: /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
3138
|
-
/* @__PURE__ */ jsxs("div", { children: [
|
|
3139
|
-
/* @__PURE__ */ jsx("span", { className: "mb-2 block text-xs font-semibold uppercase tracking-wider text-slate-600 dark:text-slate-400", children: labels.difficultyLabel ?? "Difficulty" }),
|
|
3140
|
-
/* @__PURE__ */ jsx("div", { className: "grid grid-cols-2 gap-2 sm:grid-cols-4", children: DIFFICULTY_OPTIONS.map((opt) => {
|
|
3141
|
-
const selected = difficulty === opt.id;
|
|
3142
|
-
const label = opt.id === "beginner" ? labels.difficultyBeginner ?? "Beginner" : opt.id === "intermediate" ? labels.difficultyIntermediate ?? "Intermediate" : opt.id === "advanced" ? labels.difficultyAdvanced ?? "Advanced" : labels.difficultyExpert ?? "Expert";
|
|
3143
|
-
return /* @__PURE__ */ jsxs(
|
|
3144
|
-
"button",
|
|
3145
|
-
{
|
|
3146
|
-
type: "button",
|
|
3147
|
-
onClick: () => setDifficulty(opt.id),
|
|
3148
|
-
"aria-pressed": selected,
|
|
3149
|
-
className: [
|
|
3150
|
-
"liquid-surface flex items-center gap-2 rounded-xl px-3 py-2 text-left transition-all",
|
|
3151
|
-
selected ? "ring-2 ring-indigo-500/70 ring-offset-1 ring-offset-transparent" : "hover:border-indigo-400/40 focus-visible:ring-2 focus-visible:ring-indigo-500/70 focus-visible:ring-offset-1"
|
|
3152
|
-
].join(" "),
|
|
3153
|
-
children: [
|
|
3154
|
-
/* @__PURE__ */ jsx(
|
|
3155
|
-
"span",
|
|
3156
|
-
{
|
|
3157
|
-
"aria-hidden": "true",
|
|
3158
|
-
className: `flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-gradient-to-br ${opt.accent} text-base shadow-sm`,
|
|
3159
|
-
children: opt.emoji
|
|
3160
|
-
}
|
|
3161
|
-
),
|
|
3162
|
-
/* @__PURE__ */ jsx("span", { className: "text-sm font-semibold text-slate-900 dark:text-white", children: label })
|
|
3163
|
-
]
|
|
3164
|
-
},
|
|
3165
|
-
opt.id
|
|
3166
|
-
);
|
|
3167
|
-
}) })
|
|
3168
|
-
] }),
|
|
3169
|
-
/* @__PURE__ */ jsx(
|
|
3170
|
-
FormInput,
|
|
3171
|
-
{
|
|
3172
|
-
label: labels.tagsLabel ?? "Tags",
|
|
3173
|
-
value: tagsInput,
|
|
3174
|
-
onValueChange: setTagsInput,
|
|
3175
|
-
placeholder: labels.tagsPlaceholder ?? "comma, separated, tags"
|
|
3176
|
-
}
|
|
3177
|
-
)
|
|
3178
|
-
] })
|
|
3600
|
+
steps: timelineSteps,
|
|
3601
|
+
progressLabel: labels.pageTitle,
|
|
3602
|
+
onStepClick: (idx) => {
|
|
3603
|
+
goToStep(idx + 1);
|
|
3604
|
+
}
|
|
3179
3605
|
}
|
|
3180
|
-
)
|
|
3181
|
-
|
|
3606
|
+
),
|
|
3607
|
+
/* @__PURE__ */ jsxs("div", { className: "mx-auto max-w-3xl space-y-5", children: [
|
|
3608
|
+
stepBody,
|
|
3609
|
+
footer
|
|
3610
|
+
] })
|
|
3611
|
+
]
|
|
3182
3612
|
}
|
|
3183
3613
|
);
|
|
3614
|
+
return /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
3615
|
+
hero,
|
|
3616
|
+
content
|
|
3617
|
+
] });
|
|
3184
3618
|
}
|
|
3185
|
-
function
|
|
3186
|
-
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
return (parts[0][0] + parts[parts.length - 1][0]).toUpperCase();
|
|
3619
|
+
function ReviewRow({ label, value }) {
|
|
3620
|
+
return /* @__PURE__ */ jsxs("div", { className: "rounded-lg border border-slate-200/60 bg-white/40 px-3 py-2 dark:border-white/10 dark:bg-white/[0.04]", children: [
|
|
3621
|
+
/* @__PURE__ */ jsx("dt", { className: "text-[10px] uppercase tracking-wider text-gray-400 dark:text-gray-500", children: label }),
|
|
3622
|
+
/* @__PURE__ */ jsx("dd", { className: "mt-0.5 truncate text-xs font-semibold text-gray-900 dark:text-white", children: value })
|
|
3623
|
+
] });
|
|
3191
3624
|
}
|
|
3192
3625
|
|
|
3193
|
-
export { AgentsConfigPageView, AgentsIndexPageView, AgentsModelsPageView, AgentsPromptsPageView, AgentsToolDefinitionsPageView, AgentsWorkspacePageView, ConnectionsPageView, CredentialsPageView, DashboardPageView, DatasourcesPageView, RulesPageView, RunTimelinePageView, TOOL_TYPES, WorkflowRunsPageView, WorkflowsPageView, jsonSchemaToParameters, parametersToJsonSchema };
|
|
3626
|
+
export { AgentNewWizardPageView, AgentsConfigPageView, AgentsIndexPageView, AgentsModelsPageView, AgentsPromptsPageView, AgentsToolDefinitionsPageView, AgentsWorkspacePageView, ConnectionsPageView, CredentialsPageView, DashboardPageView, DatasourcesPageView, RulesPageView, RunTimelinePageView, TOOL_TYPES, WorkflowRunsPageView, WorkflowsPageView, jsonSchemaToParameters, parametersToJsonSchema };
|
|
3194
3627
|
//# sourceMappingURL=index.mjs.map
|
|
3195
3628
|
//# sourceMappingURL=index.mjs.map
|