@datatechsolutions/ui 3.8.1 → 3.9.1
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.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 +925 -636
- package/dist/platform/pages/index.js.map +1 -1
- package/dist/platform/pages/index.mjs +721 -433
- 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, FilterTileButton } 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,13 +2788,20 @@ 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
|
-
{ 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
|
-
{ 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" },
|
|
2776
|
-
{ id: "finance", emoji: "\u{1F4CA}", name: "Financial Analyst", role: "Revenue, margins, reports", systemPrompt: "You are a financial analyst. Analyze revenue, calculate margins, generate performance reports, and identify trends. Use data-driven insights for recommendations.", temperature: 0.4, maxTokens: 4096, accent: "from-amber-500 to-orange-600", framework: "langchain" },
|
|
2777
|
-
{ id: "security", emoji: "\u{1F6E1}\uFE0F", name: "Security Analyst", role: "Threat monitoring & compliance", systemPrompt: "You are a security analyst. Monitor for threats, audit data access, ensure compliance with privacy regulations, and manage incident response.", temperature: 0.3, maxTokens: 2048, accent: "from-rose-500 to-red-600", framework: "anthropic" },
|
|
2778
|
-
{ id: "data", emoji: "\u{1F52C}", name: "Data Analyst", role: "Pattern detection & cleaning", systemPrompt: "You are a data analyst. Process raw data inputs, identify patterns, clean datasets, and prepare structured analysis for downstream agents.", temperature: 0.5, maxTokens: 4096, accent: "from-violet-500 to-purple-600", framework: "google-adk" },
|
|
2779
|
-
{ id: "custom", emoji: "\u2728", name: "", role: "", systemPrompt: "", temperature: 0.2, maxTokens: 2048, accent: "from-slate-500 to-slate-700" }
|
|
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", tileColor: "emerald" },
|
|
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", tileColor: "sky" },
|
|
2801
|
+
{ id: "finance", emoji: "\u{1F4CA}", name: "Financial Analyst", role: "Revenue, margins, reports", systemPrompt: "You are a financial analyst. Analyze revenue, calculate margins, generate performance reports, and identify trends. Use data-driven insights for recommendations.", temperature: 0.4, maxTokens: 4096, accent: "from-amber-500 to-orange-600", framework: "langchain", tileColor: "amber" },
|
|
2802
|
+
{ id: "security", emoji: "\u{1F6E1}\uFE0F", name: "Security Analyst", role: "Threat monitoring & compliance", systemPrompt: "You are a security analyst. Monitor for threats, audit data access, ensure compliance with privacy regulations, and manage incident response.", temperature: 0.3, maxTokens: 2048, accent: "from-rose-500 to-red-600", framework: "anthropic", tileColor: "rose" },
|
|
2803
|
+
{ id: "data", emoji: "\u{1F52C}", name: "Data Analyst", role: "Pattern detection & cleaning", systemPrompt: "You are a data analyst. Process raw data inputs, identify patterns, clean datasets, and prepare structured analysis for downstream agents.", temperature: 0.5, maxTokens: 4096, accent: "from-violet-500 to-purple-600", framework: "google-adk", tileColor: "violet" },
|
|
2804
|
+
{ id: "custom", emoji: "\u2728", name: "", role: "", systemPrompt: "", temperature: 0.2, maxTokens: 2048, accent: "from-slate-500 to-slate-700", tileColor: "slate" }
|
|
2780
2805
|
];
|
|
2781
2806
|
var DIFFICULTY_OPTIONS = [
|
|
2782
2807
|
{ id: "beginner", emoji: "\u{1F331}", accent: "from-emerald-500 to-teal-600" },
|
|
@@ -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,553 @@ 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
|
-
maxTokens,
|
|
2965
|
-
temperature,
|
|
2966
|
-
topP,
|
|
2967
|
-
topK,
|
|
2968
|
-
difficulty: difficulty || void 0,
|
|
2969
|
-
tags: parsedTags.length > 0 ? parsedTags : void 0,
|
|
2970
|
-
outputSchema: outputSchema.trim() || void 0
|
|
2971
|
-
});
|
|
2972
|
-
},
|
|
2973
|
-
children: /* @__PURE__ */ jsxs("div", { className: "space-y-5", children: [
|
|
2974
|
-
/* @__PURE__ */ jsx(
|
|
2975
|
-
SectionCard,
|
|
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(
|
|
3089
|
+
"div",
|
|
2976
3090
|
{
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
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) => {
|
|
3091
|
+
role: "radiogroup",
|
|
3092
|
+
"aria-label": labels.presetTitle,
|
|
3093
|
+
className: "grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3",
|
|
3094
|
+
children: AGENT_PRESETS.map((preset) => {
|
|
2984
3095
|
const selected = preset.id === presetId;
|
|
2985
|
-
return /* @__PURE__ */
|
|
2986
|
-
|
|
3096
|
+
return /* @__PURE__ */ jsx(
|
|
3097
|
+
FilterTileButton,
|
|
2987
3098
|
{
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
className:
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
|
|
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
|
-
]
|
|
3099
|
+
isActive: selected,
|
|
3100
|
+
color: preset.tileColor,
|
|
3101
|
+
icon: /* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: "text-base leading-none", children: preset.emoji }),
|
|
3102
|
+
label: preset.id === "custom" ? labels.presetCustom : preset.name,
|
|
3103
|
+
count: preset.role || labels.presetCustomHint,
|
|
3104
|
+
onClick: () => applyPreset(preset)
|
|
3008
3105
|
},
|
|
3009
3106
|
preset.id
|
|
3010
3107
|
);
|
|
3011
|
-
})
|
|
3108
|
+
})
|
|
3012
3109
|
}
|
|
3013
|
-
)
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
|
|
3028
|
-
|
|
3029
|
-
|
|
3030
|
-
|
|
3031
|
-
|
|
3032
|
-
|
|
3033
|
-
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
|
|
3039
|
-
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
|
|
3052
|
-
|
|
3053
|
-
|
|
3054
|
-
|
|
3055
|
-
|
|
3056
|
-
|
|
3057
|
-
|
|
3058
|
-
|
|
3059
|
-
|
|
3110
|
+
)
|
|
3111
|
+
}
|
|
3112
|
+
);
|
|
3113
|
+
}
|
|
3114
|
+
function renderStep2() {
|
|
3115
|
+
return /* @__PURE__ */ jsx(
|
|
3116
|
+
SectionCard,
|
|
3117
|
+
{
|
|
3118
|
+
variant: "glass",
|
|
3119
|
+
header: {
|
|
3120
|
+
title: labels.identitySection,
|
|
3121
|
+
subtitle: labels.identitySubtitle
|
|
3122
|
+
},
|
|
3123
|
+
children: /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
3124
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
3125
|
+
/* @__PURE__ */ jsx("span", { className: "mb-2 block text-xs font-semibold uppercase tracking-wider text-slate-600 dark:text-slate-400", children: labels.avatarLabel }),
|
|
3126
|
+
/* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1.5", children: EMOJI_PALETTE.map((e) => /* @__PURE__ */ jsx(
|
|
3127
|
+
"button",
|
|
3128
|
+
{
|
|
3129
|
+
type: "button",
|
|
3130
|
+
onClick: () => {
|
|
3131
|
+
setEmoji(e);
|
|
3132
|
+
markTouched();
|
|
3133
|
+
},
|
|
3134
|
+
"aria-pressed": emoji === e,
|
|
3135
|
+
className: [
|
|
3136
|
+
"flex h-9 w-9 items-center justify-center rounded-lg text-base transition-all",
|
|
3137
|
+
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"
|
|
3138
|
+
].join(" "),
|
|
3139
|
+
children: e
|
|
3140
|
+
},
|
|
3141
|
+
e
|
|
3142
|
+
)) })
|
|
3143
|
+
] }),
|
|
3144
|
+
/* @__PURE__ */ jsxs(FormGrid, { children: [
|
|
3145
|
+
/* @__PURE__ */ jsx(
|
|
3146
|
+
FormInput,
|
|
3147
|
+
{
|
|
3148
|
+
label: labels.name,
|
|
3149
|
+
value: name,
|
|
3150
|
+
onValueChange: (v) => {
|
|
3151
|
+
setName(v);
|
|
3152
|
+
markTouched();
|
|
3153
|
+
},
|
|
3154
|
+
required: true,
|
|
3155
|
+
placeholder: labels.namePlaceholder
|
|
3156
|
+
}
|
|
3157
|
+
),
|
|
3158
|
+
/* @__PURE__ */ jsx(
|
|
3159
|
+
FormInput,
|
|
3160
|
+
{
|
|
3161
|
+
label: labels.role,
|
|
3162
|
+
value: role,
|
|
3163
|
+
onValueChange: (v) => {
|
|
3164
|
+
setRole(v);
|
|
3165
|
+
markTouched();
|
|
3166
|
+
},
|
|
3167
|
+
placeholder: labels.rolePlaceholder
|
|
3168
|
+
}
|
|
3169
|
+
)
|
|
3170
|
+
] }),
|
|
3171
|
+
/* @__PURE__ */ jsx(
|
|
3172
|
+
FormTextarea,
|
|
3173
|
+
{
|
|
3174
|
+
label: labels.descriptionLabel,
|
|
3175
|
+
value: description,
|
|
3176
|
+
onValueChange: (v) => {
|
|
3177
|
+
setDescription(v);
|
|
3178
|
+
markTouched();
|
|
3179
|
+
},
|
|
3180
|
+
rows: 3,
|
|
3181
|
+
placeholder: labels.descriptionPlaceholder
|
|
3182
|
+
}
|
|
3183
|
+
)
|
|
3184
|
+
] })
|
|
3185
|
+
}
|
|
3186
|
+
);
|
|
3187
|
+
}
|
|
3188
|
+
function renderStep3() {
|
|
3189
|
+
return /* @__PURE__ */ jsx(
|
|
3190
|
+
SectionCard,
|
|
3191
|
+
{
|
|
3192
|
+
variant: "glass",
|
|
3193
|
+
header: {
|
|
3194
|
+
title: labels.modelSection,
|
|
3195
|
+
subtitle: labels.connectionPickPrompt
|
|
3196
|
+
},
|
|
3197
|
+
children: /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
3198
|
+
/* @__PURE__ */ jsxs(FormGrid, { children: [
|
|
3199
|
+
/* @__PURE__ */ jsx(
|
|
3200
|
+
FormSelect,
|
|
3201
|
+
{
|
|
3202
|
+
label: labels.connectionLabel,
|
|
3203
|
+
value: connectionId,
|
|
3204
|
+
onValueChange: (v) => {
|
|
3205
|
+
setConnectionId(v);
|
|
3206
|
+
markTouched();
|
|
3207
|
+
},
|
|
3208
|
+
options: connectionOptions,
|
|
3209
|
+
icon: /* @__PURE__ */ jsx(LinkIcon, { className: "h-4 w-4" })
|
|
3210
|
+
}
|
|
3211
|
+
),
|
|
3212
|
+
/* @__PURE__ */ jsx(
|
|
3213
|
+
FormSelect,
|
|
3214
|
+
{
|
|
3215
|
+
label: labels.frameworkLabel,
|
|
3216
|
+
value: framework,
|
|
3217
|
+
onValueChange: (v) => {
|
|
3218
|
+
setFramework(v);
|
|
3219
|
+
markTouched();
|
|
3220
|
+
},
|
|
3221
|
+
options: frameworkOptions
|
|
3222
|
+
}
|
|
3223
|
+
),
|
|
3224
|
+
/* @__PURE__ */ jsx(
|
|
3225
|
+
FormSelect,
|
|
3226
|
+
{
|
|
3227
|
+
label: labels.model,
|
|
3228
|
+
value: modelId,
|
|
3229
|
+
onValueChange: (v) => {
|
|
3230
|
+
setModelId(v);
|
|
3231
|
+
markTouched();
|
|
3232
|
+
},
|
|
3233
|
+
options: modelOptions.length > 0 ? modelOptions : [{ value: "", label: labels.modelEmpty }]
|
|
3234
|
+
}
|
|
3235
|
+
)
|
|
3236
|
+
] }),
|
|
3237
|
+
/* @__PURE__ */ jsx(
|
|
3238
|
+
FormTextarea,
|
|
3239
|
+
{
|
|
3240
|
+
label: labels.outputSchemaLabel,
|
|
3241
|
+
value: outputSchema,
|
|
3242
|
+
onValueChange: (v) => {
|
|
3243
|
+
setOutputSchema(v);
|
|
3244
|
+
markTouched();
|
|
3245
|
+
},
|
|
3246
|
+
rows: 5,
|
|
3247
|
+
placeholder: labels.outputSchemaPlaceholder
|
|
3248
|
+
}
|
|
3249
|
+
)
|
|
3250
|
+
] })
|
|
3251
|
+
}
|
|
3252
|
+
);
|
|
3253
|
+
}
|
|
3254
|
+
function renderStep4() {
|
|
3255
|
+
return /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
3256
|
+
/* @__PURE__ */ jsx(
|
|
3257
|
+
SectionCard,
|
|
3258
|
+
{
|
|
3259
|
+
variant: "glass",
|
|
3260
|
+
header: {
|
|
3261
|
+
title: labels.behaviorSection,
|
|
3262
|
+
subtitle: labels.behaviorSubtitle
|
|
3263
|
+
},
|
|
3264
|
+
children: /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
3265
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
3266
|
+
/* @__PURE__ */ jsxs("div", { className: "mb-1 flex items-center justify-between", children: [
|
|
3267
|
+
/* @__PURE__ */ jsx("label", { htmlFor: "wizard-system-prompt", className: "text-xs font-medium text-gray-500 dark:text-gray-400", children: labels.promptSystemPrompt }),
|
|
3268
|
+
/* @__PURE__ */ jsxs("span", { className: "text-[10px] text-gray-400 dark:text-gray-500", children: [
|
|
3269
|
+
systemPrompt.length,
|
|
3270
|
+
" chars"
|
|
3271
|
+
] })
|
|
3060
3272
|
] }),
|
|
3061
3273
|
/* @__PURE__ */ jsx(
|
|
3062
|
-
|
|
3274
|
+
"textarea",
|
|
3063
3275
|
{
|
|
3064
|
-
|
|
3065
|
-
value:
|
|
3066
|
-
|
|
3067
|
-
|
|
3068
|
-
|
|
3276
|
+
id: "wizard-system-prompt",
|
|
3277
|
+
value: systemPrompt,
|
|
3278
|
+
onChange: (e) => {
|
|
3279
|
+
setSystemPrompt(e.target.value);
|
|
3280
|
+
markTouched();
|
|
3281
|
+
},
|
|
3282
|
+
rows: 8,
|
|
3283
|
+
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",
|
|
3284
|
+
placeholder: labels.promptPlaceholder
|
|
3069
3285
|
}
|
|
3070
3286
|
)
|
|
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
|
-
)
|
|
3287
|
+
] }),
|
|
3288
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
3289
|
+
/* @__PURE__ */ jsxs("div", { className: "mb-1 flex items-center justify-between", children: [
|
|
3290
|
+
/* @__PURE__ */ jsx("label", { htmlFor: "wizard-user-prompt", className: "text-xs font-medium text-gray-500 dark:text-gray-400", children: labels.userPromptLabel }),
|
|
3291
|
+
/* @__PURE__ */ jsxs("span", { className: "text-[10px] text-gray-400 dark:text-gray-500", children: [
|
|
3292
|
+
userPrompt.length,
|
|
3293
|
+
" chars"
|
|
3294
|
+
] })
|
|
3112
3295
|
] }),
|
|
3113
3296
|
/* @__PURE__ */ jsx(
|
|
3114
|
-
|
|
3297
|
+
"textarea",
|
|
3115
3298
|
{
|
|
3116
|
-
|
|
3117
|
-
value:
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
|
|
3299
|
+
id: "wizard-user-prompt",
|
|
3300
|
+
value: userPrompt,
|
|
3301
|
+
onChange: (e) => {
|
|
3302
|
+
setUserPrompt(e.target.value);
|
|
3303
|
+
markTouched();
|
|
3304
|
+
},
|
|
3305
|
+
rows: 5,
|
|
3306
|
+
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",
|
|
3307
|
+
placeholder: labels.userPromptPlaceholder
|
|
3121
3308
|
}
|
|
3122
3309
|
)
|
|
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
|
-
|
|
3310
|
+
] }),
|
|
3311
|
+
/* @__PURE__ */ jsx(
|
|
3312
|
+
RangeSliderField,
|
|
3313
|
+
{
|
|
3314
|
+
sliderId: "wizard-temperature",
|
|
3315
|
+
label: labels.temperature,
|
|
3316
|
+
value: temperature,
|
|
3317
|
+
onChange: (v) => {
|
|
3318
|
+
setTemperature(v);
|
|
3319
|
+
markTouched();
|
|
3320
|
+
},
|
|
3321
|
+
min: 0,
|
|
3322
|
+
max: 1,
|
|
3323
|
+
step: 0.05,
|
|
3324
|
+
trackGradient: "linear-gradient(90deg, #3b82f6, #8b5cf6 50%, #ec4899)",
|
|
3325
|
+
formatValue: (v) => v.toFixed(2),
|
|
3326
|
+
zones: [
|
|
3327
|
+
{ label: "Precise", max: 0.3, color: "text-blue-500", thumbColor: "#3b82f6" },
|
|
3328
|
+
{ label: "Balanced", max: 0.7, color: "text-purple-500", thumbColor: "#8b5cf6" },
|
|
3329
|
+
{ label: "Creative", max: 1, color: "text-pink-500", thumbColor: "#ec4899" }
|
|
3330
|
+
]
|
|
3331
|
+
}
|
|
3332
|
+
),
|
|
3333
|
+
/* @__PURE__ */ jsx(
|
|
3334
|
+
RangeSliderField,
|
|
3335
|
+
{
|
|
3336
|
+
sliderId: "wizard-top-p",
|
|
3337
|
+
label: labels.topPLabel,
|
|
3338
|
+
value: topP,
|
|
3339
|
+
onChange: (v) => {
|
|
3340
|
+
setTopP(v);
|
|
3341
|
+
markTouched();
|
|
3342
|
+
},
|
|
3343
|
+
min: 0,
|
|
3344
|
+
max: 1,
|
|
3345
|
+
step: 0.05,
|
|
3346
|
+
trackGradient: "linear-gradient(90deg, #6366f1, #8b5cf6)",
|
|
3347
|
+
formatValue: (v) => v.toFixed(2),
|
|
3348
|
+
zones: [
|
|
3349
|
+
{ label: "Top-P", max: 1, color: "text-violet-500", thumbColor: "#8b5cf6" }
|
|
3350
|
+
]
|
|
3351
|
+
}
|
|
3352
|
+
),
|
|
3353
|
+
/* @__PURE__ */ jsx(
|
|
3354
|
+
RangeSliderField,
|
|
3355
|
+
{
|
|
3356
|
+
sliderId: "wizard-top-k",
|
|
3357
|
+
label: labels.topKLabel,
|
|
3358
|
+
value: topK,
|
|
3359
|
+
onChange: (v) => {
|
|
3360
|
+
setTopK(Math.max(0, Math.floor(v)));
|
|
3361
|
+
markTouched();
|
|
3362
|
+
},
|
|
3363
|
+
min: 0,
|
|
3364
|
+
max: 500,
|
|
3365
|
+
step: 1,
|
|
3366
|
+
trackGradient: "linear-gradient(90deg, #10b981, #14b8a6)",
|
|
3367
|
+
formatValue: (v) => v.toString(),
|
|
3368
|
+
zones: [
|
|
3369
|
+
{ label: "Top-K", max: 500, color: "text-emerald-500", thumbColor: "#10b981" }
|
|
3370
|
+
]
|
|
3371
|
+
}
|
|
3372
|
+
),
|
|
3373
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
3374
|
+
/* @__PURE__ */ jsxs("div", { className: "mb-2 flex items-center justify-between", children: [
|
|
3375
|
+
/* @__PURE__ */ jsx("label", { htmlFor: "wizard-max-tokens", className: "text-xs font-medium text-gray-500 dark:text-gray-400", children: labels.maxTokens }),
|
|
3376
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm font-bold tabular-nums text-gray-900 dark:text-white", children: maxTokens.toLocaleString() })
|
|
3174
3377
|
] }),
|
|
3175
3378
|
/* @__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,
|
|
3379
|
+
"input",
|
|
3213
3380
|
{
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
value:
|
|
3217
|
-
onChange: (
|
|
3218
|
-
|
|
3219
|
-
|
|
3381
|
+
id: "wizard-max-tokens",
|
|
3382
|
+
type: "number",
|
|
3383
|
+
value: maxTokens,
|
|
3384
|
+
onChange: (e) => {
|
|
3385
|
+
setMaxTokens(Math.max(1, Math.floor(Number(e.target.value) || 0)));
|
|
3386
|
+
markTouched();
|
|
3387
|
+
},
|
|
3388
|
+
min: 1,
|
|
3389
|
+
max: 32e3,
|
|
3220
3390
|
step: 1,
|
|
3221
|
-
|
|
3222
|
-
formatValue: (v) => v.toString(),
|
|
3223
|
-
zones: [
|
|
3224
|
-
{ label: "Top-K", max: 500, color: "text-emerald-500", thumbColor: "#10b981" }
|
|
3225
|
-
]
|
|
3391
|
+
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
3392
|
}
|
|
3227
|
-
)
|
|
3228
|
-
|
|
3229
|
-
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
|
|
3233
|
-
/* @__PURE__ */ jsx(
|
|
3234
|
-
"input",
|
|
3235
|
-
{
|
|
3236
|
-
id: "create-agent-max-tokens",
|
|
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
|
-
)
|
|
3393
|
+
)
|
|
3394
|
+
] }),
|
|
3395
|
+
/* @__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: [
|
|
3396
|
+
/* @__PURE__ */ jsxs("div", { className: "bg-white/60 px-3 py-2 dark:bg-gray-900/60", children: [
|
|
3397
|
+
/* @__PURE__ */ jsx("p", { className: "text-[9px] uppercase tracking-wider text-gray-400 dark:text-gray-500", children: labels.model }),
|
|
3398
|
+
/* @__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 })
|
|
3246
3399
|
] }),
|
|
3247
|
-
/* @__PURE__ */
|
|
3248
|
-
/* @__PURE__ */
|
|
3249
|
-
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
/* @__PURE__ */
|
|
3253
|
-
|
|
3254
|
-
|
|
3255
|
-
|
|
3256
|
-
|
|
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
|
-
] })
|
|
3400
|
+
/* @__PURE__ */ jsxs("div", { className: "bg-white/60 px-3 py-2 dark:bg-gray-900/60", children: [
|
|
3401
|
+
/* @__PURE__ */ jsx("p", { className: "text-[9px] uppercase tracking-wider text-gray-400 dark:text-gray-500", children: labels.maxTokens }),
|
|
3402
|
+
/* @__PURE__ */ jsx("p", { className: "text-xs font-semibold text-gray-900 dark:text-white", children: maxTokens.toLocaleString() })
|
|
3403
|
+
] }),
|
|
3404
|
+
/* @__PURE__ */ jsxs("div", { className: "bg-white/60 px-3 py-2 dark:bg-gray-900/60", children: [
|
|
3405
|
+
/* @__PURE__ */ jsx("p", { className: "text-[9px] uppercase tracking-wider text-gray-400 dark:text-gray-500", children: labels.temperature }),
|
|
3406
|
+
/* @__PURE__ */ jsxs("p", { className: `text-xs font-semibold ${temperature <= 0.3 ? "text-blue-500" : temperature <= 0.7 ? "text-purple-500" : "text-pink-500"}`, children: [
|
|
3407
|
+
temperature.toFixed(2),
|
|
3408
|
+
" \xB7 ",
|
|
3409
|
+
temperature <= 0.3 ? "Precise" : temperature <= 0.7 ? "Balanced" : "Creative"
|
|
3263
3410
|
] })
|
|
3264
|
-
] })
|
|
3411
|
+
] })
|
|
3412
|
+
] }) })
|
|
3413
|
+
] })
|
|
3414
|
+
}
|
|
3415
|
+
),
|
|
3416
|
+
/* @__PURE__ */ jsx(
|
|
3417
|
+
SectionCard,
|
|
3418
|
+
{
|
|
3419
|
+
variant: "glass",
|
|
3420
|
+
header: {
|
|
3421
|
+
title: labels.metadataSection,
|
|
3422
|
+
subtitle: labels.metadataSubtitle
|
|
3423
|
+
},
|
|
3424
|
+
children: /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
3425
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
3426
|
+
/* @__PURE__ */ jsx("span", { className: "mb-2 block text-xs font-semibold uppercase tracking-wider text-slate-600 dark:text-slate-400", children: labels.difficultyLabel }),
|
|
3427
|
+
/* @__PURE__ */ jsx("div", { className: "grid grid-cols-2 gap-2 sm:grid-cols-4", children: DIFFICULTY_OPTIONS.map((opt) => {
|
|
3428
|
+
const selected = difficulty === opt.id;
|
|
3429
|
+
const label = opt.id === "beginner" ? labels.difficultyBeginner : opt.id === "intermediate" ? labels.difficultyIntermediate : opt.id === "advanced" ? labels.difficultyAdvanced : labels.difficultyExpert;
|
|
3430
|
+
return /* @__PURE__ */ jsxs(
|
|
3431
|
+
"button",
|
|
3432
|
+
{
|
|
3433
|
+
type: "button",
|
|
3434
|
+
onClick: () => {
|
|
3435
|
+
setDifficulty(opt.id);
|
|
3436
|
+
markTouched();
|
|
3437
|
+
},
|
|
3438
|
+
"aria-pressed": selected,
|
|
3439
|
+
className: [
|
|
3440
|
+
"liquid-surface flex items-center gap-2 rounded-xl px-3 py-2 text-left transition-all",
|
|
3441
|
+
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"
|
|
3442
|
+
].join(" "),
|
|
3443
|
+
children: [
|
|
3444
|
+
/* @__PURE__ */ jsx(
|
|
3445
|
+
"span",
|
|
3446
|
+
{
|
|
3447
|
+
"aria-hidden": "true",
|
|
3448
|
+
className: `flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-gradient-to-br ${opt.accent} text-base shadow-sm`,
|
|
3449
|
+
children: opt.emoji
|
|
3450
|
+
}
|
|
3451
|
+
),
|
|
3452
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm font-semibold text-slate-900 dark:text-white", children: label })
|
|
3453
|
+
]
|
|
3454
|
+
},
|
|
3455
|
+
opt.id
|
|
3456
|
+
);
|
|
3457
|
+
}) })
|
|
3458
|
+
] }),
|
|
3459
|
+
/* @__PURE__ */ jsx(
|
|
3460
|
+
FormInput,
|
|
3461
|
+
{
|
|
3462
|
+
label: labels.tagsLabel,
|
|
3463
|
+
value: tagsInput,
|
|
3464
|
+
onValueChange: (v) => {
|
|
3465
|
+
setTagsInput(v);
|
|
3466
|
+
markTouched();
|
|
3467
|
+
},
|
|
3468
|
+
placeholder: labels.tagsPlaceholder
|
|
3469
|
+
}
|
|
3470
|
+
)
|
|
3471
|
+
] })
|
|
3472
|
+
}
|
|
3473
|
+
)
|
|
3474
|
+
] });
|
|
3475
|
+
}
|
|
3476
|
+
function renderStep5() {
|
|
3477
|
+
const modelLabel = models.find((m) => m.id === modelId)?.name ?? labels.modelEmpty;
|
|
3478
|
+
const connectionLabel = connectionId ? connections.find((c) => c.id === connectionId)?.name ?? labels.connectionInline : labels.connectionInline;
|
|
3479
|
+
return /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
3480
|
+
/* @__PURE__ */ jsx(
|
|
3481
|
+
SectionCard,
|
|
3482
|
+
{
|
|
3483
|
+
variant: "glass",
|
|
3484
|
+
header: {
|
|
3485
|
+
title: labels.wizardStep1Title,
|
|
3486
|
+
subtitle: labels.wizardStep1Subtitle
|
|
3487
|
+
},
|
|
3488
|
+
actions: /* @__PURE__ */ jsxs(Button, { type: "button", size: "sm", outline: true, onClick: () => goToStep(1), children: [
|
|
3489
|
+
/* @__PURE__ */ jsx(PencilSquareIcon, { className: "h-4 w-4" }),
|
|
3490
|
+
/* @__PURE__ */ jsx("span", { className: "ml-1.5", children: labels.wizardReviewEdit })
|
|
3491
|
+
] }),
|
|
3492
|
+
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 })
|
|
3493
|
+
}
|
|
3494
|
+
),
|
|
3495
|
+
/* @__PURE__ */ jsx(
|
|
3496
|
+
SectionCard,
|
|
3497
|
+
{
|
|
3498
|
+
variant: "glass",
|
|
3499
|
+
header: {
|
|
3500
|
+
title: labels.wizardStep2Title,
|
|
3501
|
+
subtitle: labels.wizardStep2Subtitle
|
|
3502
|
+
},
|
|
3503
|
+
actions: /* @__PURE__ */ jsxs(Button, { type: "button", size: "sm", outline: true, onClick: () => goToStep(2), children: [
|
|
3504
|
+
/* @__PURE__ */ jsx(PencilSquareIcon, { className: "h-4 w-4" }),
|
|
3505
|
+
/* @__PURE__ */ jsx("span", { className: "ml-1.5", children: labels.wizardReviewEdit })
|
|
3506
|
+
] }),
|
|
3507
|
+
children: /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-3", children: [
|
|
3508
|
+
/* @__PURE__ */ jsx(
|
|
3509
|
+
"span",
|
|
3510
|
+
{
|
|
3511
|
+
"aria-hidden": "true",
|
|
3512
|
+
className: `flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-gradient-to-br ${activePreset.accent} text-lg shadow-sm`,
|
|
3513
|
+
children: emoji
|
|
3514
|
+
}
|
|
3515
|
+
),
|
|
3516
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
|
|
3517
|
+
/* @__PURE__ */ jsx("p", { className: "truncate text-sm font-semibold text-slate-900 dark:text-white", children: name || labels.namePlaceholder }),
|
|
3518
|
+
role && /* @__PURE__ */ jsx("p", { className: "truncate text-xs text-slate-500 dark:text-slate-400", children: role }),
|
|
3519
|
+
description && /* @__PURE__ */ jsx("p", { className: "mt-1 text-xs text-slate-600 dark:text-slate-300", children: description })
|
|
3265
3520
|
] })
|
|
3266
|
-
}
|
|
3267
|
-
|
|
3521
|
+
] })
|
|
3522
|
+
}
|
|
3523
|
+
),
|
|
3524
|
+
/* @__PURE__ */ jsx(
|
|
3525
|
+
SectionCard,
|
|
3526
|
+
{
|
|
3527
|
+
variant: "glass",
|
|
3528
|
+
header: {
|
|
3529
|
+
title: labels.wizardStep3Title,
|
|
3530
|
+
subtitle: labels.wizardStep3Subtitle
|
|
3531
|
+
},
|
|
3532
|
+
actions: /* @__PURE__ */ jsxs(Button, { type: "button", size: "sm", outline: true, onClick: () => goToStep(3), children: [
|
|
3533
|
+
/* @__PURE__ */ jsx(PencilSquareIcon, { className: "h-4 w-4" }),
|
|
3534
|
+
/* @__PURE__ */ jsx("span", { className: "ml-1.5", children: labels.wizardReviewEdit })
|
|
3535
|
+
] }),
|
|
3536
|
+
children: /* @__PURE__ */ jsxs("dl", { className: "grid grid-cols-1 gap-2 sm:grid-cols-2", children: [
|
|
3537
|
+
/* @__PURE__ */ jsx(ReviewRow, { label: labels.connectionLabel, value: connectionLabel }),
|
|
3538
|
+
/* @__PURE__ */ jsx(ReviewRow, { label: labels.frameworkLabel, value: framework || "\u2014" }),
|
|
3539
|
+
/* @__PURE__ */ jsx(ReviewRow, { label: labels.model, value: modelLabel }),
|
|
3540
|
+
outputSchema.trim() && /* @__PURE__ */ jsx(ReviewRow, { label: labels.outputSchemaLabel, value: outputSchema.trim().slice(0, 60) + (outputSchema.length > 60 ? "\u2026" : "") })
|
|
3541
|
+
] })
|
|
3542
|
+
}
|
|
3543
|
+
),
|
|
3544
|
+
/* @__PURE__ */ jsxs(
|
|
3545
|
+
SectionCard,
|
|
3546
|
+
{
|
|
3547
|
+
variant: "glass",
|
|
3548
|
+
header: {
|
|
3549
|
+
title: labels.wizardStep4Title,
|
|
3550
|
+
subtitle: labels.wizardStep4Subtitle
|
|
3551
|
+
},
|
|
3552
|
+
actions: /* @__PURE__ */ jsxs(Button, { type: "button", size: "sm", outline: true, onClick: () => goToStep(4), children: [
|
|
3553
|
+
/* @__PURE__ */ jsx(PencilSquareIcon, { className: "h-4 w-4" }),
|
|
3554
|
+
/* @__PURE__ */ jsx("span", { className: "ml-1.5", children: labels.wizardReviewEdit })
|
|
3555
|
+
] }),
|
|
3556
|
+
children: [
|
|
3557
|
+
/* @__PURE__ */ jsxs("dl", { className: "grid grid-cols-2 gap-2 sm:grid-cols-4", children: [
|
|
3558
|
+
/* @__PURE__ */ jsx(ReviewRow, { label: labels.temperature, value: temperature.toFixed(2) }),
|
|
3559
|
+
/* @__PURE__ */ jsx(ReviewRow, { label: labels.topPLabel, value: topP.toFixed(2) }),
|
|
3560
|
+
/* @__PURE__ */ jsx(ReviewRow, { label: labels.topKLabel, value: String(topK) }),
|
|
3561
|
+
/* @__PURE__ */ jsx(ReviewRow, { label: labels.maxTokens, value: maxTokens.toLocaleString() })
|
|
3562
|
+
] }),
|
|
3563
|
+
systemPrompt && /* @__PURE__ */ jsxs("div", { className: "mt-3", children: [
|
|
3564
|
+
/* @__PURE__ */ jsx("p", { className: "text-[10px] uppercase tracking-wider text-gray-400 dark:text-gray-500", children: labels.promptSystemPrompt }),
|
|
3565
|
+
/* @__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 })
|
|
3566
|
+
] })
|
|
3567
|
+
]
|
|
3568
|
+
}
|
|
3569
|
+
)
|
|
3570
|
+
] });
|
|
3571
|
+
}
|
|
3572
|
+
const stepBody = step === 1 ? renderStep1() : step === 2 ? renderStep2() : step === 3 ? renderStep3() : step === 4 ? renderStep4() : renderStep5();
|
|
3573
|
+
const advanceDisabled = !canAdvance(step);
|
|
3574
|
+
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: [
|
|
3575
|
+
/* @__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 }) }),
|
|
3576
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
3577
|
+
/* @__PURE__ */ jsx(Button, { type: "button", outline: true, onClick: cancelWithConfirm, disabled: submitting, children: labels.wizardCancel }),
|
|
3578
|
+
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 })
|
|
3579
|
+
] })
|
|
3580
|
+
] });
|
|
3581
|
+
const content = /* @__PURE__ */ jsxs(
|
|
3582
|
+
"form",
|
|
3583
|
+
{
|
|
3584
|
+
onSubmit: (e) => {
|
|
3585
|
+
e.preventDefault();
|
|
3586
|
+
if (step < TOTAL_STEPS) goNext();
|
|
3587
|
+
else void submit();
|
|
3588
|
+
},
|
|
3589
|
+
className: "space-y-5",
|
|
3590
|
+
children: [
|
|
3268
3591
|
/* @__PURE__ */ jsx(
|
|
3269
|
-
|
|
3592
|
+
StepTimeline,
|
|
3270
3593
|
{
|
|
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
|
-
] })
|
|
3594
|
+
steps: timelineSteps,
|
|
3595
|
+
progressLabel: labels.pageTitle,
|
|
3596
|
+
onStepClick: (idx) => {
|
|
3597
|
+
goToStep(idx + 1);
|
|
3598
|
+
}
|
|
3318
3599
|
}
|
|
3319
|
-
)
|
|
3320
|
-
|
|
3600
|
+
),
|
|
3601
|
+
/* @__PURE__ */ jsxs("div", { className: "w-full space-y-5", children: [
|
|
3602
|
+
stepBody,
|
|
3603
|
+
footer
|
|
3604
|
+
] })
|
|
3605
|
+
]
|
|
3321
3606
|
}
|
|
3322
3607
|
);
|
|
3608
|
+
return /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
3609
|
+
hero,
|
|
3610
|
+
content
|
|
3611
|
+
] });
|
|
3323
3612
|
}
|
|
3324
|
-
function
|
|
3325
|
-
|
|
3326
|
-
|
|
3327
|
-
|
|
3328
|
-
|
|
3329
|
-
return (parts[0][0] + parts[parts.length - 1][0]).toUpperCase();
|
|
3613
|
+
function ReviewRow({ label, value }) {
|
|
3614
|
+
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: [
|
|
3615
|
+
/* @__PURE__ */ jsx("dt", { className: "text-[10px] uppercase tracking-wider text-gray-400 dark:text-gray-500", children: label }),
|
|
3616
|
+
/* @__PURE__ */ jsx("dd", { className: "mt-0.5 truncate text-xs font-semibold text-gray-900 dark:text-white", children: value })
|
|
3617
|
+
] });
|
|
3330
3618
|
}
|
|
3331
3619
|
|
|
3332
|
-
export { AgentsConfigPageView, AgentsIndexPageView, AgentsModelsPageView, AgentsPromptsPageView, AgentsToolDefinitionsPageView, AgentsWorkspacePageView, ConnectionsPageView, CredentialsPageView, DashboardPageView, DatasourcesPageView, RulesPageView, RunTimelinePageView, TOOL_TYPES, WorkflowRunsPageView, WorkflowsPageView, jsonSchemaToParameters, parametersToJsonSchema };
|
|
3620
|
+
export { AgentNewWizardPageView, AgentsConfigPageView, AgentsIndexPageView, AgentsModelsPageView, AgentsPromptsPageView, AgentsToolDefinitionsPageView, AgentsWorkspacePageView, ConnectionsPageView, CredentialsPageView, DashboardPageView, DatasourcesPageView, RulesPageView, RunTimelinePageView, TOOL_TYPES, WorkflowRunsPageView, WorkflowsPageView, jsonSchemaToParameters, parametersToJsonSchema };
|
|
3333
3621
|
//# sourceMappingURL=index.mjs.map
|
|
3334
3622
|
//# sourceMappingURL=index.mjs.map
|