@datatechsolutions/ui 3.8.1 → 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 +928 -633
- package/dist/platform/pages/index.js.map +1 -1
- package/dist/platform/pages/index.mjs +724 -430
- 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" },
|
|
@@ -2863,13 +2888,18 @@ function hexToGlow(hex) {
|
|
|
2863
2888
|
const b = int & 255;
|
|
2864
2889
|
return `rgba(${r},${g},${b},0.5)`;
|
|
2865
2890
|
}
|
|
2866
|
-
|
|
2891
|
+
var TOTAL_STEPS = 5;
|
|
2892
|
+
function AgentNewWizardPageView({
|
|
2867
2893
|
labels,
|
|
2868
2894
|
models,
|
|
2869
2895
|
connections,
|
|
2870
|
-
|
|
2871
|
-
|
|
2896
|
+
initialStep,
|
|
2897
|
+
onStepChange,
|
|
2898
|
+
onSubmit,
|
|
2899
|
+
onCancel
|
|
2872
2900
|
}) {
|
|
2901
|
+
const clampedInitial = Math.min(TOTAL_STEPS, Math.max(1, initialStep ?? 1));
|
|
2902
|
+
const [step, setStep] = useState(clampedInitial);
|
|
2873
2903
|
const [presetId, setPresetId] = useState("custom");
|
|
2874
2904
|
const [emoji, setEmoji] = useState("\u2728");
|
|
2875
2905
|
const [name, setName] = useState("");
|
|
@@ -2887,7 +2917,16 @@ function CreateAgentDialog({
|
|
|
2887
2917
|
const [tagsInput, setTagsInput] = useState("");
|
|
2888
2918
|
const [outputSchema, setOutputSchema] = useState("");
|
|
2889
2919
|
const [modelId, setModelId] = useState(models[0]?.id ?? "");
|
|
2920
|
+
const [submitting, setSubmitting] = useState(false);
|
|
2921
|
+
const [touched, setTouched] = useState(false);
|
|
2890
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]);
|
|
2891
2930
|
const matchingModels = useMemo(() => {
|
|
2892
2931
|
if (!connectionId) return models;
|
|
2893
2932
|
const conn = connections.find((c) => c.id === connectionId);
|
|
@@ -2900,7 +2939,7 @@ function CreateAgentDialog({
|
|
|
2900
2939
|
}, [models, connections, connectionId]);
|
|
2901
2940
|
const modelOptions = matchingModels.map((m) => ({ value: m.id, label: `${m.name} (${m.provider})` }));
|
|
2902
2941
|
const connectionOptions = useMemo(() => {
|
|
2903
|
-
const inline = { value: "", label: labels.connectionInline
|
|
2942
|
+
const inline = { value: "", label: labels.connectionInline };
|
|
2904
2943
|
return [
|
|
2905
2944
|
inline,
|
|
2906
2945
|
...connections.map((c) => ({
|
|
@@ -2910,13 +2949,36 @@ function CreateAgentDialog({
|
|
|
2910
2949
|
];
|
|
2911
2950
|
}, [connections, labels.connectionInline]);
|
|
2912
2951
|
const frameworkOptions = useMemo(() => [
|
|
2913
|
-
{ value: "", label: labels.connectionInline
|
|
2914
|
-
{ value: "anthropic", label: labels.frameworkAnthropic
|
|
2915
|
-
{ value: "langchain", label: labels.frameworkLangChain
|
|
2916
|
-
{ value: "crewai", label: labels.frameworkCrewAI
|
|
2917
|
-
{ value: "google-adk", label: labels.frameworkGoogleADK
|
|
2918
|
-
{ 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 }
|
|
2919
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
|
+
}
|
|
2920
2982
|
function applyPreset(preset) {
|
|
2921
2983
|
setPresetId(preset.id);
|
|
2922
2984
|
setEmoji(preset.emoji);
|
|
@@ -2928,14 +2990,78 @@ function CreateAgentDialog({
|
|
|
2928
2990
|
setMaxTokens(preset.maxTokens);
|
|
2929
2991
|
if (preset.framework) setFramework(preset.framework);
|
|
2930
2992
|
}
|
|
2993
|
+
markTouched();
|
|
2931
2994
|
}
|
|
2932
|
-
|
|
2933
|
-
|
|
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,
|
|
2934
3064
|
{
|
|
2935
|
-
open: true,
|
|
2936
|
-
onClose,
|
|
2937
|
-
title: labels.createAgentTitle,
|
|
2938
|
-
label: labels.createAgentEyebrow ?? "NEW AGENT",
|
|
2939
3065
|
icon: /* @__PURE__ */ jsx(
|
|
2940
3066
|
"div",
|
|
2941
3067
|
{
|
|
@@ -2944,391 +3070,559 @@ function CreateAgentDialog({
|
|
|
2944
3070
|
children: emoji
|
|
2945
3071
|
}
|
|
2946
3072
|
),
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
/* @__PURE__ */ jsx(
|
|
2975
|
-
SectionCard,
|
|
2976
|
-
{
|
|
2977
|
-
variant: "glass",
|
|
2978
|
-
padded: false,
|
|
2979
|
-
header: {
|
|
2980
|
-
title: labels.presetTitle ?? "Start from a template",
|
|
2981
|
-
subtitle: labels.presetSubtitle ?? "Pick a role or build a custom agent"
|
|
2982
|
-
},
|
|
2983
|
-
children: /* @__PURE__ */ jsx("div", { className: "grid grid-cols-2 gap-2 px-4 pb-4 sm:grid-cols-3", children: AGENT_PRESETS.map((preset) => {
|
|
2984
|
-
const selected = preset.id === presetId;
|
|
2985
|
-
return /* @__PURE__ */ jsxs(
|
|
2986
|
-
"button",
|
|
2987
|
-
{
|
|
2988
|
-
type: "button",
|
|
2989
|
-
onClick: () => applyPreset(preset),
|
|
2990
|
-
className: [
|
|
2991
|
-
"liquid-surface group flex items-center gap-3 rounded-xl px-3 py-2.5 text-left transition-all",
|
|
2992
|
-
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"
|
|
2993
|
-
].join(" "),
|
|
2994
|
-
children: [
|
|
2995
|
-
/* @__PURE__ */ jsx(
|
|
2996
|
-
"span",
|
|
2997
|
-
{
|
|
2998
|
-
"aria-hidden": "true",
|
|
2999
|
-
className: `flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-gradient-to-br ${preset.accent} text-base shadow-sm`,
|
|
3000
|
-
children: preset.emoji
|
|
3001
|
-
}
|
|
3002
|
-
),
|
|
3003
|
-
/* @__PURE__ */ jsxs("span", { className: "min-w-0 flex-1", children: [
|
|
3004
|
-
/* @__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 }),
|
|
3005
|
-
/* @__PURE__ */ jsx("span", { className: "block truncate text-xs text-slate-500 dark:text-slate-400", children: preset.role || (labels.presetCustomHint ?? "Start from scratch") })
|
|
3006
|
-
] })
|
|
3007
|
-
]
|
|
3008
|
-
},
|
|
3009
|
-
preset.id
|
|
3010
|
-
);
|
|
3011
|
-
}) })
|
|
3012
|
-
}
|
|
3013
|
-
),
|
|
3014
|
-
/* @__PURE__ */ jsx(
|
|
3015
|
-
SectionCard,
|
|
3016
|
-
{
|
|
3017
|
-
variant: "glass",
|
|
3018
|
-
header: {
|
|
3019
|
-
title: labels.identitySection ?? "Identity",
|
|
3020
|
-
subtitle: labels.identitySubtitle ?? "How your agent shows up across workflows"
|
|
3021
|
-
},
|
|
3022
|
-
children: /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
3023
|
-
/* @__PURE__ */ jsxs("div", { children: [
|
|
3024
|
-
/* @__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" }),
|
|
3025
|
-
/* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1.5", children: EMOJI_PALETTE.map((e) => /* @__PURE__ */ jsx(
|
|
3026
|
-
"button",
|
|
3027
|
-
{
|
|
3028
|
-
type: "button",
|
|
3029
|
-
onClick: () => setEmoji(e),
|
|
3030
|
-
"aria-pressed": emoji === e,
|
|
3031
|
-
className: [
|
|
3032
|
-
"flex h-9 w-9 items-center justify-center rounded-lg text-base transition-all",
|
|
3033
|
-
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"
|
|
3034
|
-
].join(" "),
|
|
3035
|
-
children: e
|
|
3036
|
-
},
|
|
3037
|
-
e
|
|
3038
|
-
)) })
|
|
3039
|
-
] }),
|
|
3040
|
-
/* @__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: [
|
|
3041
3100
|
/* @__PURE__ */ jsx(
|
|
3042
|
-
|
|
3101
|
+
"span",
|
|
3043
3102
|
{
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
required: true,
|
|
3048
|
-
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
|
|
3049
3106
|
}
|
|
3050
3107
|
),
|
|
3051
|
-
/* @__PURE__ */
|
|
3052
|
-
|
|
3053
|
-
{
|
|
3054
|
-
|
|
3055
|
-
|
|
3056
|
-
|
|
3057
|
-
|
|
3058
|
-
|
|
3059
|
-
|
|
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
|
+
]
|
|
3113
|
+
},
|
|
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
|
+
] })
|
|
3060
3278
|
] }),
|
|
3061
3279
|
/* @__PURE__ */ jsx(
|
|
3062
|
-
|
|
3280
|
+
"textarea",
|
|
3063
3281
|
{
|
|
3064
|
-
|
|
3065
|
-
value:
|
|
3066
|
-
|
|
3067
|
-
|
|
3068
|
-
|
|
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
|
|
3069
3291
|
}
|
|
3070
3292
|
)
|
|
3071
|
-
] })
|
|
3072
|
-
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
title: labels.modelSection ?? "Model and connection",
|
|
3080
|
-
subtitle: labels.connectionPickPrompt ?? "Pick the provider connection or use an inline model"
|
|
3081
|
-
},
|
|
3082
|
-
children: /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
3083
|
-
/* @__PURE__ */ jsxs(FormGrid, { children: [
|
|
3084
|
-
/* @__PURE__ */ jsx(
|
|
3085
|
-
FormSelect,
|
|
3086
|
-
{
|
|
3087
|
-
label: labels.connectionLabel ?? labels.connection,
|
|
3088
|
-
value: connectionId,
|
|
3089
|
-
onValueChange: setConnectionId,
|
|
3090
|
-
options: connectionOptions,
|
|
3091
|
-
icon: /* @__PURE__ */ jsx(LinkIcon, { className: "h-4 w-4" })
|
|
3092
|
-
}
|
|
3093
|
-
),
|
|
3094
|
-
/* @__PURE__ */ jsx(
|
|
3095
|
-
FormSelect,
|
|
3096
|
-
{
|
|
3097
|
-
label: labels.frameworkLabel ?? "Framework",
|
|
3098
|
-
value: framework,
|
|
3099
|
-
onValueChange: setFramework,
|
|
3100
|
-
options: frameworkOptions
|
|
3101
|
-
}
|
|
3102
|
-
),
|
|
3103
|
-
/* @__PURE__ */ jsx(
|
|
3104
|
-
FormSelect,
|
|
3105
|
-
{
|
|
3106
|
-
label: labels.model,
|
|
3107
|
-
value: modelId,
|
|
3108
|
-
onValueChange: setModelId,
|
|
3109
|
-
options: modelOptions.length > 0 ? modelOptions : [{ value: "", label: labels.modelEmpty }]
|
|
3110
|
-
}
|
|
3111
|
-
)
|
|
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
|
+
] })
|
|
3112
3301
|
] }),
|
|
3113
3302
|
/* @__PURE__ */ jsx(
|
|
3114
|
-
|
|
3303
|
+
"textarea",
|
|
3115
3304
|
{
|
|
3116
|
-
|
|
3117
|
-
value:
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
|
|
3305
|
+
id: "wizard-user-prompt",
|
|
3306
|
+
value: userPrompt,
|
|
3307
|
+
onChange: (e) => {
|
|
3308
|
+
setUserPrompt(e.target.value);
|
|
3309
|
+
markTouched();
|
|
3310
|
+
},
|
|
3311
|
+
rows: 5,
|
|
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
|
|
3121
3314
|
}
|
|
3122
3315
|
)
|
|
3123
|
-
] })
|
|
3124
|
-
|
|
3125
|
-
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
|
|
3137
|
-
|
|
3138
|
-
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
|
|
3153
|
-
|
|
3154
|
-
|
|
3155
|
-
|
|
3156
|
-
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
|
-
|
|
3160
|
-
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
-
|
|
3164
|
-
|
|
3165
|
-
|
|
3166
|
-
|
|
3167
|
-
|
|
3168
|
-
|
|
3169
|
-
|
|
3170
|
-
|
|
3171
|
-
|
|
3172
|
-
|
|
3173
|
-
|
|
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() })
|
|
3174
3383
|
] }),
|
|
3175
3384
|
/* @__PURE__ */ jsx(
|
|
3176
|
-
|
|
3177
|
-
{
|
|
3178
|
-
sliderId: "create-agent-temperature",
|
|
3179
|
-
label: labels.temperature,
|
|
3180
|
-
value: temperature,
|
|
3181
|
-
onChange: setTemperature,
|
|
3182
|
-
min: 0,
|
|
3183
|
-
max: 1,
|
|
3184
|
-
step: 0.05,
|
|
3185
|
-
trackGradient: "linear-gradient(90deg, #3b82f6, #8b5cf6 50%, #ec4899)",
|
|
3186
|
-
formatValue: (v) => v.toFixed(2),
|
|
3187
|
-
zones: [
|
|
3188
|
-
{ label: "Precise", max: 0.3, color: "text-blue-500", thumbColor: "#3b82f6" },
|
|
3189
|
-
{ label: "Balanced", max: 0.7, color: "text-purple-500", thumbColor: "#8b5cf6" },
|
|
3190
|
-
{ label: "Creative", max: 1, color: "text-pink-500", thumbColor: "#ec4899" }
|
|
3191
|
-
]
|
|
3192
|
-
}
|
|
3193
|
-
),
|
|
3194
|
-
/* @__PURE__ */ jsx(
|
|
3195
|
-
RangeSliderField,
|
|
3196
|
-
{
|
|
3197
|
-
sliderId: "create-agent-top-p",
|
|
3198
|
-
label: labels.topPLabel ?? "Top-P",
|
|
3199
|
-
value: topP,
|
|
3200
|
-
onChange: setTopP,
|
|
3201
|
-
min: 0,
|
|
3202
|
-
max: 1,
|
|
3203
|
-
step: 0.05,
|
|
3204
|
-
trackGradient: "linear-gradient(90deg, #6366f1, #8b5cf6)",
|
|
3205
|
-
formatValue: (v) => v.toFixed(2),
|
|
3206
|
-
zones: [
|
|
3207
|
-
{ label: "Top-P", max: 1, color: "text-violet-500", thumbColor: "#8b5cf6" }
|
|
3208
|
-
]
|
|
3209
|
-
}
|
|
3210
|
-
),
|
|
3211
|
-
/* @__PURE__ */ jsx(
|
|
3212
|
-
RangeSliderField,
|
|
3385
|
+
"input",
|
|
3213
3386
|
{
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
value:
|
|
3217
|
-
onChange: (
|
|
3218
|
-
|
|
3219
|
-
|
|
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,
|
|
3220
3396
|
step: 1,
|
|
3221
|
-
|
|
3222
|
-
formatValue: (v) => v.toString(),
|
|
3223
|
-
zones: [
|
|
3224
|
-
{ label: "Top-K", max: 500, color: "text-emerald-500", thumbColor: "#10b981" }
|
|
3225
|
-
]
|
|
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"
|
|
3226
3398
|
}
|
|
3227
|
-
)
|
|
3228
|
-
|
|
3229
|
-
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
|
|
3233
|
-
|
|
3234
|
-
|
|
3235
|
-
|
|
3236
|
-
|
|
3237
|
-
type: "number",
|
|
3238
|
-
value: maxTokens,
|
|
3239
|
-
onChange: (e) => setMaxTokens(Math.max(1, Math.floor(Number(e.target.value) || 0))),
|
|
3240
|
-
min: 1,
|
|
3241
|
-
max: 32e3,
|
|
3242
|
-
step: 1,
|
|
3243
|
-
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"
|
|
3244
|
-
}
|
|
3245
|
-
)
|
|
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() })
|
|
3246
3409
|
] }),
|
|
3247
|
-
/* @__PURE__ */
|
|
3248
|
-
/* @__PURE__ */
|
|
3249
|
-
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
|
|
3253
|
-
/* @__PURE__ */ jsx("p", { className: "text-[9px] uppercase tracking-wider text-gray-400 dark:text-gray-500", children: labels.maxTokens }),
|
|
3254
|
-
/* @__PURE__ */ jsx("p", { className: "text-xs font-semibold text-gray-900 dark:text-white", children: maxTokens.toLocaleString() })
|
|
3255
|
-
] }),
|
|
3256
|
-
/* @__PURE__ */ jsxs("div", { className: "bg-white/60 px-3 py-2 dark:bg-gray-900/60", children: [
|
|
3257
|
-
/* @__PURE__ */ jsx("p", { className: "text-[9px] uppercase tracking-wider text-gray-400 dark:text-gray-500", children: labels.temperature }),
|
|
3258
|
-
/* @__PURE__ */ jsxs("p", { className: `text-xs font-semibold ${temperature <= 0.3 ? "text-blue-500" : temperature <= 0.7 ? "text-purple-500" : "text-pink-500"}`, children: [
|
|
3259
|
-
temperature.toFixed(2),
|
|
3260
|
-
" \xB7 ",
|
|
3261
|
-
temperature <= 0.3 ? "Precise" : temperature <= 0.7 ? "Balanced" : "Creative"
|
|
3262
|
-
] })
|
|
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"
|
|
3263
3416
|
] })
|
|
3264
|
-
] })
|
|
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 })
|
|
3265
3526
|
] })
|
|
3266
|
-
}
|
|
3267
|
-
|
|
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: [
|
|
3268
3597
|
/* @__PURE__ */ jsx(
|
|
3269
|
-
|
|
3598
|
+
StepTimeline,
|
|
3270
3599
|
{
|
|
3271
|
-
|
|
3272
|
-
|
|
3273
|
-
|
|
3274
|
-
|
|
3275
|
-
}
|
|
3276
|
-
children: /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
3277
|
-
/* @__PURE__ */ jsxs("div", { children: [
|
|
3278
|
-
/* @__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" }),
|
|
3279
|
-
/* @__PURE__ */ jsx("div", { className: "grid grid-cols-2 gap-2 sm:grid-cols-4", children: DIFFICULTY_OPTIONS.map((opt) => {
|
|
3280
|
-
const selected = difficulty === opt.id;
|
|
3281
|
-
const label = opt.id === "beginner" ? labels.difficultyBeginner ?? "Beginner" : opt.id === "intermediate" ? labels.difficultyIntermediate ?? "Intermediate" : opt.id === "advanced" ? labels.difficultyAdvanced ?? "Advanced" : labels.difficultyExpert ?? "Expert";
|
|
3282
|
-
return /* @__PURE__ */ jsxs(
|
|
3283
|
-
"button",
|
|
3284
|
-
{
|
|
3285
|
-
type: "button",
|
|
3286
|
-
onClick: () => setDifficulty(opt.id),
|
|
3287
|
-
"aria-pressed": selected,
|
|
3288
|
-
className: [
|
|
3289
|
-
"liquid-surface flex items-center gap-2 rounded-xl px-3 py-2 text-left transition-all",
|
|
3290
|
-
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"
|
|
3291
|
-
].join(" "),
|
|
3292
|
-
children: [
|
|
3293
|
-
/* @__PURE__ */ jsx(
|
|
3294
|
-
"span",
|
|
3295
|
-
{
|
|
3296
|
-
"aria-hidden": "true",
|
|
3297
|
-
className: `flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-gradient-to-br ${opt.accent} text-base shadow-sm`,
|
|
3298
|
-
children: opt.emoji
|
|
3299
|
-
}
|
|
3300
|
-
),
|
|
3301
|
-
/* @__PURE__ */ jsx("span", { className: "text-sm font-semibold text-slate-900 dark:text-white", children: label })
|
|
3302
|
-
]
|
|
3303
|
-
},
|
|
3304
|
-
opt.id
|
|
3305
|
-
);
|
|
3306
|
-
}) })
|
|
3307
|
-
] }),
|
|
3308
|
-
/* @__PURE__ */ jsx(
|
|
3309
|
-
FormInput,
|
|
3310
|
-
{
|
|
3311
|
-
label: labels.tagsLabel ?? "Tags",
|
|
3312
|
-
value: tagsInput,
|
|
3313
|
-
onValueChange: setTagsInput,
|
|
3314
|
-
placeholder: labels.tagsPlaceholder ?? "comma, separated, tags"
|
|
3315
|
-
}
|
|
3316
|
-
)
|
|
3317
|
-
] })
|
|
3600
|
+
steps: timelineSteps,
|
|
3601
|
+
progressLabel: labels.pageTitle,
|
|
3602
|
+
onStepClick: (idx) => {
|
|
3603
|
+
goToStep(idx + 1);
|
|
3604
|
+
}
|
|
3318
3605
|
}
|
|
3319
|
-
)
|
|
3320
|
-
|
|
3606
|
+
),
|
|
3607
|
+
/* @__PURE__ */ jsxs("div", { className: "mx-auto max-w-3xl space-y-5", children: [
|
|
3608
|
+
stepBody,
|
|
3609
|
+
footer
|
|
3610
|
+
] })
|
|
3611
|
+
]
|
|
3321
3612
|
}
|
|
3322
3613
|
);
|
|
3614
|
+
return /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
3615
|
+
hero,
|
|
3616
|
+
content
|
|
3617
|
+
] });
|
|
3323
3618
|
}
|
|
3324
|
-
function
|
|
3325
|
-
|
|
3326
|
-
|
|
3327
|
-
|
|
3328
|
-
|
|
3329
|
-
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
|
+
] });
|
|
3330
3624
|
}
|
|
3331
3625
|
|
|
3332
|
-
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 };
|
|
3333
3627
|
//# sourceMappingURL=index.mjs.map
|
|
3334
3628
|
//# sourceMappingURL=index.mjs.map
|