@datatechsolutions/ui 3.13.0 → 3.14.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/graph-node.js +6 -6
- package/dist/astrlabe/graph-node.mjs +2 -2
- package/dist/astrlabe/index.js +114 -114
- package/dist/astrlabe/index.mjs +6 -6
- package/dist/astrlabe/workflow-canvas.js +6 -6
- package/dist/astrlabe/workflow-canvas.mjs +5 -5
- package/dist/{chunk-AMCFAGK3.js → chunk-2II2NLAZ.js} +42 -41
- package/dist/chunk-2II2NLAZ.js.map +1 -0
- package/dist/{chunk-WR55H7DH.mjs → chunk-2SBVFLPZ.mjs} +19 -2
- package/dist/chunk-2SBVFLPZ.mjs.map +1 -0
- package/dist/{chunk-UXHJS2SH.mjs → chunk-33ZWFDVG.mjs} +282 -331
- package/dist/chunk-33ZWFDVG.mjs.map +1 -0
- package/dist/{chunk-2ECLDHAT.js → chunk-4HZ55YKZ.js} +9 -9
- package/dist/{chunk-2ECLDHAT.js.map → chunk-4HZ55YKZ.js.map} +1 -1
- package/dist/{chunk-VI4IUTMX.js → chunk-4P72IJOM.js} +6 -6
- package/dist/{chunk-VI4IUTMX.js.map → chunk-4P72IJOM.js.map} +1 -1
- package/dist/{chunk-D5OTZGA2.js → chunk-5SCZB5UI.js} +382 -431
- package/dist/chunk-5SCZB5UI.js.map +1 -0
- package/dist/{chunk-4VHFGW7I.mjs → chunk-5YCH7FHT.mjs} +3 -3
- package/dist/{chunk-4VHFGW7I.mjs.map → chunk-5YCH7FHT.mjs.map} +1 -1
- package/dist/{chunk-P4RVGMZL.js → chunk-6NBQTIXX.js} +9 -37
- package/dist/chunk-6NBQTIXX.js.map +1 -0
- package/dist/{chunk-EZQ2D47U.js → chunk-6NEESZVO.js} +4 -4
- package/dist/{chunk-EZQ2D47U.js.map → chunk-6NEESZVO.js.map} +1 -1
- package/dist/{chunk-N4YT3QA5.js → chunk-72XZ7DSF.js} +13 -13
- package/dist/{chunk-N4YT3QA5.js.map → chunk-72XZ7DSF.js.map} +1 -1
- package/dist/{chunk-QGRTV35L.mjs → chunk-7NHJSD4A.mjs} +6 -6
- package/dist/{chunk-QGRTV35L.mjs.map → chunk-7NHJSD4A.mjs.map} +1 -1
- package/dist/{chunk-PPIUMCUZ.js → chunk-7SDB2VC2.js} +4 -4
- package/dist/{chunk-PPIUMCUZ.js.map → chunk-7SDB2VC2.js.map} +1 -1
- package/dist/{chunk-QGLGQXJE.js → chunk-A5OMGPMR.js} +10 -10
- package/dist/chunk-A5OMGPMR.js.map +1 -0
- package/dist/{chunk-K5567JM5.js → chunk-AUCS2KF4.js} +26 -26
- package/dist/{chunk-K5567JM5.js.map → chunk-AUCS2KF4.js.map} +1 -1
- package/dist/{chunk-MSKKNPRE.mjs → chunk-F4KHAKTP.mjs} +172 -116
- package/dist/chunk-F4KHAKTP.mjs.map +1 -0
- package/dist/{chunk-SDYKXLCU.js → chunk-FHGWXWVZ.js} +67 -67
- package/dist/{chunk-SDYKXLCU.js.map → chunk-FHGWXWVZ.js.map} +1 -1
- package/dist/{chunk-5ETT54QS.js → chunk-FZUV7GNB.js} +241 -184
- package/dist/chunk-FZUV7GNB.js.map +1 -0
- package/dist/{chunk-6KDTVSZT.mjs → chunk-HQNIETHV.mjs} +11 -10
- package/dist/chunk-HQNIETHV.mjs.map +1 -0
- package/dist/{chunk-PLTLRL2V.mjs → chunk-KDDXDQR2.mjs} +3 -3
- package/dist/{chunk-PLTLRL2V.mjs.map → chunk-KDDXDQR2.mjs.map} +1 -1
- package/dist/{chunk-6YTYD4P5.js → chunk-LJGPMMKB.js} +156 -193
- package/dist/chunk-LJGPMMKB.js.map +1 -0
- package/dist/{chunk-BHOT22QL.js → chunk-MXQ2EYG2.js} +19 -2
- package/dist/chunk-MXQ2EYG2.js.map +1 -0
- package/dist/{chunk-ANFSQJNI.mjs → chunk-N6SGVUTR.mjs} +17 -20
- package/dist/chunk-N6SGVUTR.mjs.map +1 -0
- package/dist/{chunk-IIRS5XZY.js → chunk-NIZSQJRW.js} +33 -33
- package/dist/{chunk-IIRS5XZY.js.map → chunk-NIZSQJRW.js.map} +1 -1
- package/dist/{chunk-AKWCT53S.mjs → chunk-NXWIT4YQ.mjs} +47 -50
- package/dist/chunk-NXWIT4YQ.mjs.map +1 -0
- package/dist/{chunk-OC4AOYU5.mjs → chunk-OTQXU4WG.mjs} +83 -120
- package/dist/chunk-OTQXU4WG.mjs.map +1 -0
- package/dist/{chunk-CSOMZ5UM.mjs → chunk-PO66V2PN.mjs} +9 -9
- package/dist/{chunk-CSOMZ5UM.mjs.map → chunk-PO66V2PN.mjs.map} +1 -1
- package/dist/{chunk-OY5HUZSD.js → chunk-PXGESUKI.js} +94 -97
- package/dist/chunk-PXGESUKI.js.map +1 -0
- package/dist/{chunk-7TYNV6SY.mjs → chunk-Q2FUNDCP.mjs} +14 -14
- package/dist/{chunk-7TYNV6SY.mjs.map → chunk-Q2FUNDCP.mjs.map} +1 -1
- package/dist/{chunk-KWH7JIRP.mjs → chunk-Q5TZTA6H.mjs} +9 -8
- package/dist/chunk-Q5TZTA6H.mjs.map +1 -0
- package/dist/{chunk-ZRCXDKBE.mjs → chunk-T7DROKWJ.mjs} +4 -4
- package/dist/{chunk-ZRCXDKBE.mjs.map → chunk-T7DROKWJ.mjs.map} +1 -1
- package/dist/{chunk-3VYD7QL2.mjs → chunk-TQADF23S.mjs} +9 -9
- package/dist/chunk-TQADF23S.mjs.map +1 -0
- package/dist/{chunk-VIB42VMZ.mjs → chunk-U7VMFQFN.mjs} +5 -5
- package/dist/{chunk-VIB42VMZ.mjs.map → chunk-U7VMFQFN.mjs.map} +1 -1
- package/dist/{chunk-AHNH2PMI.mjs → chunk-WE35EV7J.mjs} +3 -3
- package/dist/{chunk-AHNH2PMI.mjs.map → chunk-WE35EV7J.mjs.map} +1 -1
- package/dist/{chunk-UPYACFZJ.mjs → chunk-WTSMTLSP.mjs} +303 -347
- package/dist/chunk-WTSMTLSP.mjs.map +1 -0
- package/dist/{chunk-WOTKBKS6.js → chunk-YFMMZHL5.js} +47 -50
- package/dist/chunk-YFMMZHL5.js.map +1 -0
- package/dist/{chunk-DJ33CSGJ.mjs → chunk-ZBX7UCAP.mjs} +9 -37
- package/dist/chunk-ZBX7UCAP.mjs.map +1 -0
- package/dist/{chunk-NF5DDM5V.js → chunk-ZE6U4N4Q.js} +44 -43
- package/dist/chunk-ZE6U4N4Q.js.map +1 -0
- package/dist/{chunk-MQDCUBVW.js → chunk-ZIRD3X6G.js} +459 -503
- package/dist/chunk-ZIRD3X6G.js.map +1 -0
- package/dist/index.d.mts +77 -7
- package/dist/index.d.ts +77 -7
- package/dist/index.js +708 -704
- package/dist/index.mjs +3 -3
- package/dist/platform/admin/index.js +12 -12
- package/dist/platform/admin/index.mjs +6 -6
- package/dist/platform/agents-workspace.js +9 -9
- package/dist/platform/agents-workspace.mjs +8 -8
- package/dist/platform/app-shell.js +5 -5
- package/dist/platform/app-shell.mjs +4 -4
- package/dist/platform/auth/index.js +29 -29
- package/dist/platform/auth/index.mjs +6 -6
- package/dist/platform/billing/index.js +7 -7
- package/dist/platform/billing/index.mjs +5 -5
- package/dist/platform/impersonation/index.js +5 -5
- package/dist/platform/impersonation/index.mjs +4 -4
- package/dist/platform/index.js +99 -99
- package/dist/platform/index.js.map +1 -1
- package/dist/platform/index.mjs +30 -30
- package/dist/platform/index.mjs.map +1 -1
- package/dist/platform/pages/index.d.mts +115 -3
- package/dist/platform/pages/index.d.ts +115 -3
- package/dist/platform/pages/index.js +966 -519
- package/dist/platform/pages/index.js.map +1 -1
- package/dist/platform/pages/index.mjs +562 -121
- package/dist/platform/pages/index.mjs.map +1 -1
- package/dist/platform/settings/index.js +9 -9
- package/dist/platform/settings/index.mjs +8 -8
- package/dist/platform/workflow-canvas-shell.js +7 -7
- package/dist/platform/workflow-canvas-shell.mjs +6 -6
- package/package.json +1 -1
- package/dist/chunk-3VYD7QL2.mjs.map +0 -1
- package/dist/chunk-5ETT54QS.js.map +0 -1
- package/dist/chunk-6KDTVSZT.mjs.map +0 -1
- package/dist/chunk-6YTYD4P5.js.map +0 -1
- package/dist/chunk-AKWCT53S.mjs.map +0 -1
- package/dist/chunk-AMCFAGK3.js.map +0 -1
- package/dist/chunk-ANFSQJNI.mjs.map +0 -1
- package/dist/chunk-BHOT22QL.js.map +0 -1
- package/dist/chunk-D5OTZGA2.js.map +0 -1
- package/dist/chunk-DJ33CSGJ.mjs.map +0 -1
- package/dist/chunk-KWH7JIRP.mjs.map +0 -1
- package/dist/chunk-MQDCUBVW.js.map +0 -1
- package/dist/chunk-MSKKNPRE.mjs.map +0 -1
- package/dist/chunk-NF5DDM5V.js.map +0 -1
- package/dist/chunk-OC4AOYU5.mjs.map +0 -1
- package/dist/chunk-OY5HUZSD.js.map +0 -1
- package/dist/chunk-P4RVGMZL.js.map +0 -1
- package/dist/chunk-QGLGQXJE.js.map +0 -1
- package/dist/chunk-UPYACFZJ.mjs.map +0 -1
- package/dist/chunk-UXHJS2SH.mjs.map +0 -1
- package/dist/chunk-WOTKBKS6.js.map +0 -1
- package/dist/chunk-WR55H7DH.mjs.map +0 -1
|
@@ -1,24 +1,24 @@
|
|
|
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 { DIALECT_CATEGORIES, DatasourceModal, findDialect, findCategory } from '../../chunk-
|
|
6
|
-
export { DIALECT_CATEGORIES, DatasourceFormModal, DatasourceModal, findCategory, findDialect } from '../../chunk-
|
|
7
|
-
import { defaultRuleForm, RuleForm, ExecutionTimelinePanel, defaultRuleCondition, defaultRuleAction, RuleConditionBuilder, RuleActionBuilder } from '../../chunk-
|
|
3
|
+
import { WorkflowWorkspace } from '../../chunk-U7VMFQFN.mjs';
|
|
4
|
+
export { RolesPageView, UsersPageView } from '../../chunk-U7VMFQFN.mjs';
|
|
5
|
+
import { DIALECT_CATEGORIES, DatasourceModal, findDialect, findCategory } from '../../chunk-Q5TZTA6H.mjs';
|
|
6
|
+
export { DIALECT_CATEGORIES, DatasourceFormModal, DatasourceModal, findCategory, findDialect } from '../../chunk-Q5TZTA6H.mjs';
|
|
7
|
+
import { defaultRuleForm, RuleForm, ExecutionTimelinePanel, defaultRuleCondition, defaultRuleAction, RuleConditionBuilder, RuleActionBuilder } from '../../chunk-WTSMTLSP.mjs';
|
|
8
8
|
import '../../chunk-JB6RNAD2.mjs';
|
|
9
9
|
import '../../chunk-LEXBTVGM.mjs';
|
|
10
|
-
import '../../chunk-
|
|
11
|
-
import { HeroSection, SearchBar, FormSection, ChipPicker, PageLoadingState, PageEmptyState, 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, StepIndicator, FilterTileButton, FormToggle, Spinner, StatusBadge, FormCheckbox, SegmentedControl, DatePicker, TimePicker } from '../../chunk-
|
|
12
|
-
import '../../chunk-ZEFNBGYI.mjs';
|
|
10
|
+
import '../../chunk-33ZWFDVG.mjs';
|
|
11
|
+
import { HeroSection, SearchBar, FormSection, ChipPicker, PageLoadingState, PageEmptyState, 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, StepIndicator, FilterTileButton, PickerTile, FormToggle, Spinner, StatusBadge, FormCheckbox, SegmentedControl, DatePicker, TimePicker } from '../../chunk-F4KHAKTP.mjs';
|
|
13
12
|
import '../../chunk-NBW6WJQT.mjs';
|
|
14
13
|
import '../../chunk-3AY5HIQ6.mjs';
|
|
15
|
-
import '../../chunk-
|
|
16
|
-
import
|
|
14
|
+
import '../../chunk-ZEFNBGYI.mjs';
|
|
15
|
+
import '../../chunk-KDDXDQR2.mjs';
|
|
16
|
+
import { Button, Badge } from '../../chunk-2SBVFLPZ.mjs';
|
|
17
17
|
import '../../chunk-D2JF6C3E.mjs';
|
|
18
18
|
import { useLink } from '../../chunk-QWG2FMUN.mjs';
|
|
19
19
|
import '../../chunk-G7JQ4OCE.mjs';
|
|
20
20
|
import { useState, useMemo, useEffect, useCallback } from 'react';
|
|
21
|
-
import { CubeTransparentIcon, CpuChipIcon, ChatBubbleLeftEllipsisIcon, WrenchScrewdriverIcon, AdjustmentsHorizontalIcon, CircleStackIcon, RectangleStackIcon, ClockIcon, LinkIcon, KeyIcon, ArrowPathIcon, TrashIcon, PlusIcon, PencilSquareIcon,
|
|
21
|
+
import { CubeTransparentIcon, CpuChipIcon, ChatBubbleLeftEllipsisIcon, WrenchScrewdriverIcon, AdjustmentsHorizontalIcon, CircleStackIcon, RectangleStackIcon, ClockIcon, LinkIcon, KeyIcon, ArrowPathIcon, TrashIcon, PlusIcon, PencilSquareIcon, CodeBracketIcon, ServerStackIcon, SparklesIcon, BoltIcon, CloudIcon, BeakerIcon, GlobeAltIcon, BellAlertIcon, PencilIcon, ArrowUpCircleIcon } from '@heroicons/react/24/outline';
|
|
22
22
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
23
23
|
|
|
24
24
|
function AgentsModelsPageView({ labels, models, loading }) {
|
|
@@ -1232,7 +1232,7 @@ function setFromJson(set, key, raw) {
|
|
|
1232
1232
|
set(key, raw);
|
|
1233
1233
|
}
|
|
1234
1234
|
}
|
|
1235
|
-
function RulesPageView({ labels, rules, loading, onCreate, onUpdate, onDelete }) {
|
|
1235
|
+
function RulesPageView({ labels, rules, loading, onCreate, onUpdate, onDelete, onAddClick }) {
|
|
1236
1236
|
const [createOpen, setCreateOpen] = useState(false);
|
|
1237
1237
|
const [editing, setEditing] = useState(null);
|
|
1238
1238
|
const [searchTerm, setSearchTerm] = useState("");
|
|
@@ -1318,7 +1318,7 @@ function RulesPageView({ labels, rules, loading, onCreate, onUpdate, onDelete })
|
|
|
1318
1318
|
{
|
|
1319
1319
|
mode: "desktop",
|
|
1320
1320
|
label: labels.addRule,
|
|
1321
|
-
onClick: () => setCreateOpen(true),
|
|
1321
|
+
onClick: onAddClick ?? (() => setCreateOpen(true)),
|
|
1322
1322
|
accent: "fuchsia"
|
|
1323
1323
|
}
|
|
1324
1324
|
)
|
|
@@ -1329,7 +1329,7 @@ function RulesPageView({ labels, rules, loading, onCreate, onUpdate, onDelete })
|
|
|
1329
1329
|
{
|
|
1330
1330
|
mode: "mobile",
|
|
1331
1331
|
label: labels.addRule,
|
|
1332
|
-
onClick: () => setCreateOpen(true),
|
|
1332
|
+
onClick: onAddClick ?? (() => setCreateOpen(true)),
|
|
1333
1333
|
accent: "fuchsia"
|
|
1334
1334
|
}
|
|
1335
1335
|
);
|
|
@@ -1605,7 +1605,8 @@ function DatasourcesPageView({
|
|
|
1605
1605
|
labels,
|
|
1606
1606
|
datasources: externalDatasources,
|
|
1607
1607
|
useSampleData = false,
|
|
1608
|
-
onCreate
|
|
1608
|
+
onCreate,
|
|
1609
|
+
onAddClick
|
|
1609
1610
|
}) {
|
|
1610
1611
|
const [modalOpen, setModalOpen] = useState(false);
|
|
1611
1612
|
const [localDatasources, setLocalDatasources] = useState(
|
|
@@ -1748,7 +1749,7 @@ function DatasourcesPageView({
|
|
|
1748
1749
|
{
|
|
1749
1750
|
mode: "desktop",
|
|
1750
1751
|
label: labels.addDatasource,
|
|
1751
|
-
onClick: () => setModalOpen(true),
|
|
1752
|
+
onClick: onAddClick ?? (() => setModalOpen(true)),
|
|
1752
1753
|
accent: "amber"
|
|
1753
1754
|
}
|
|
1754
1755
|
)
|
|
@@ -1759,7 +1760,7 @@ function DatasourcesPageView({
|
|
|
1759
1760
|
{
|
|
1760
1761
|
mode: "mobile",
|
|
1761
1762
|
label: labels.addDatasource,
|
|
1762
|
-
onClick: () => setModalOpen(true),
|
|
1763
|
+
onClick: onAddClick ?? (() => setModalOpen(true)),
|
|
1763
1764
|
accent: "amber"
|
|
1764
1765
|
}
|
|
1765
1766
|
),
|
|
@@ -2296,7 +2297,7 @@ function ConnectionsPageView({
|
|
|
2296
2297
|
{
|
|
2297
2298
|
mode: "mobile",
|
|
2298
2299
|
label: labels.add,
|
|
2299
|
-
onClick:
|
|
2300
|
+
onClick: openCreate,
|
|
2300
2301
|
accent: "sky"
|
|
2301
2302
|
}
|
|
2302
2303
|
);
|
|
@@ -3438,11 +3439,11 @@ function RangeSliderField({
|
|
|
3438
3439
|
const ariaText = activeZone ? `${displayValue} \u2014 ${activeZone.label}` : displayValue;
|
|
3439
3440
|
return /* @__PURE__ */ jsxs("div", { children: [
|
|
3440
3441
|
/* @__PURE__ */ jsxs("div", { className: "mb-2 flex items-center justify-between", children: [
|
|
3441
|
-
/* @__PURE__ */ jsx("label", { htmlFor: sliderId, className: "text-xs font-medium text-
|
|
3442
|
-
/* @__PURE__ */ jsx("span", { className: "text-sm font-bold tabular-nums text-
|
|
3442
|
+
/* @__PURE__ */ jsx("label", { htmlFor: sliderId, className: "text-xs font-medium text-slate-500 dark:text-slate-400", children: label }),
|
|
3443
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm font-bold tabular-nums text-slate-900 dark:text-white", children: displayValue })
|
|
3443
3444
|
] }),
|
|
3444
3445
|
/* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
3445
|
-
/* @__PURE__ */ jsx("div", { className: "absolute inset-x-0 top-1/2 h-2 -translate-y-1/2 overflow-hidden rounded-full bg-
|
|
3446
|
+
/* @__PURE__ */ jsx("div", { className: "absolute inset-x-0 top-1/2 h-2 -translate-y-1/2 overflow-hidden rounded-full bg-slate-200 dark:bg-slate-700", children: /* @__PURE__ */ jsx(
|
|
3446
3447
|
"div",
|
|
3447
3448
|
{
|
|
3448
3449
|
className: "h-full rounded-full transition-all duration-300 ease-out motion-reduce:transition-none",
|
|
@@ -3468,7 +3469,7 @@ function RangeSliderField({
|
|
|
3468
3469
|
"aria-valuemax": max,
|
|
3469
3470
|
"aria-valuenow": value,
|
|
3470
3471
|
"aria-valuetext": ariaText,
|
|
3471
|
-
className: "relative z-10 h-5 w-full cursor-pointer appearance-none bg-transparent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 [&::-webkit-slider-thumb]:h-5 [&::-webkit-slider-thumb]:w-5 [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:border-2 [&::-webkit-slider-thumb]:border-white [&::-webkit-slider-thumb]:shadow-lg dark:[&::-webkit-slider-thumb]:border-
|
|
3472
|
+
className: "relative z-10 h-5 w-full cursor-pointer appearance-none bg-transparent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 [&::-webkit-slider-thumb]:h-5 [&::-webkit-slider-thumb]:w-5 [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:border-2 [&::-webkit-slider-thumb]:border-white [&::-webkit-slider-thumb]:shadow-lg dark:[&::-webkit-slider-thumb]:border-slate-900"
|
|
3472
3473
|
}
|
|
3473
3474
|
),
|
|
3474
3475
|
/* @__PURE__ */ jsx("style", { children: `[data-slider-id="${sliderId}"]::-webkit-slider-thumb { background: ${thumbColor}; box-shadow: 0 0 8px ${glow}; } [data-slider-id="${sliderId}"]::-moz-range-thumb { background: ${thumbColor}; border: 2px solid white; box-shadow: 0 0 8px ${glow}; }` })
|
|
@@ -3478,7 +3479,7 @@ function RangeSliderField({
|
|
|
3478
3479
|
return /* @__PURE__ */ jsx(
|
|
3479
3480
|
"span",
|
|
3480
3481
|
{
|
|
3481
|
-
className: `text-[10px] font-medium transition-colors motion-reduce:transition-none ${isActive ? z.color : "text-
|
|
3482
|
+
className: `text-[10px] font-medium transition-colors motion-reduce:transition-none ${isActive ? z.color : "text-slate-400 dark:text-slate-500"}`,
|
|
3482
3483
|
children: z.label
|
|
3483
3484
|
},
|
|
3484
3485
|
z.label
|
|
@@ -3739,14 +3740,13 @@ function AgentNewWizardPageView({
|
|
|
3739
3740
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
3740
3741
|
/* @__PURE__ */ jsx("span", { className: "mb-2 block text-xs font-semibold uppercase tracking-wider text-slate-600 dark:text-slate-400", children: labels.avatarLabel }),
|
|
3741
3742
|
/* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1.5", children: EMOJI_PALETTE.map((e) => /* @__PURE__ */ jsx(
|
|
3742
|
-
|
|
3743
|
+
PickerTile,
|
|
3743
3744
|
{
|
|
3744
|
-
type: "button",
|
|
3745
3745
|
onClick: () => {
|
|
3746
3746
|
setEmoji(e);
|
|
3747
3747
|
markTouched();
|
|
3748
3748
|
},
|
|
3749
|
-
|
|
3749
|
+
selected: emoji === e,
|
|
3750
3750
|
className: [
|
|
3751
3751
|
"flex h-9 w-9 items-center justify-center rounded-lg text-base transition-all",
|
|
3752
3752
|
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"
|
|
@@ -3877,52 +3877,34 @@ function AgentNewWizardPageView({
|
|
|
3877
3877
|
subtitle: labels.behaviorSubtitle
|
|
3878
3878
|
},
|
|
3879
3879
|
children: /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
3880
|
-
/* @__PURE__ */
|
|
3881
|
-
|
|
3882
|
-
|
|
3883
|
-
|
|
3884
|
-
|
|
3885
|
-
|
|
3886
|
-
|
|
3887
|
-
|
|
3888
|
-
|
|
3889
|
-
|
|
3890
|
-
|
|
3891
|
-
|
|
3892
|
-
|
|
3893
|
-
|
|
3894
|
-
|
|
3895
|
-
|
|
3896
|
-
|
|
3897
|
-
|
|
3898
|
-
|
|
3899
|
-
|
|
3900
|
-
|
|
3901
|
-
|
|
3902
|
-
|
|
3903
|
-
|
|
3904
|
-
|
|
3905
|
-
|
|
3906
|
-
|
|
3907
|
-
|
|
3908
|
-
" chars"
|
|
3909
|
-
] })
|
|
3910
|
-
] }),
|
|
3911
|
-
/* @__PURE__ */ jsx(
|
|
3912
|
-
"textarea",
|
|
3913
|
-
{
|
|
3914
|
-
id: "wizard-user-prompt",
|
|
3915
|
-
value: userPrompt,
|
|
3916
|
-
onChange: (e) => {
|
|
3917
|
-
setUserPrompt(e.target.value);
|
|
3918
|
-
markTouched();
|
|
3919
|
-
},
|
|
3920
|
-
rows: 5,
|
|
3921
|
-
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",
|
|
3922
|
-
placeholder: labels.userPromptPlaceholder
|
|
3923
|
-
}
|
|
3924
|
-
)
|
|
3925
|
-
] }),
|
|
3880
|
+
/* @__PURE__ */ jsx(
|
|
3881
|
+
FormTextarea,
|
|
3882
|
+
{
|
|
3883
|
+
label: labels.promptSystemPrompt,
|
|
3884
|
+
value: systemPrompt,
|
|
3885
|
+
onValueChange: (v) => {
|
|
3886
|
+
setSystemPrompt(v);
|
|
3887
|
+
markTouched();
|
|
3888
|
+
},
|
|
3889
|
+
rows: 8,
|
|
3890
|
+
placeholder: labels.promptPlaceholder,
|
|
3891
|
+
hint: `${systemPrompt.length} chars`
|
|
3892
|
+
}
|
|
3893
|
+
),
|
|
3894
|
+
/* @__PURE__ */ jsx(
|
|
3895
|
+
FormTextarea,
|
|
3896
|
+
{
|
|
3897
|
+
label: labels.userPromptLabel,
|
|
3898
|
+
value: userPrompt,
|
|
3899
|
+
onValueChange: (v) => {
|
|
3900
|
+
setUserPrompt(v);
|
|
3901
|
+
markTouched();
|
|
3902
|
+
},
|
|
3903
|
+
rows: 5,
|
|
3904
|
+
placeholder: labels.userPromptPlaceholder,
|
|
3905
|
+
hint: `${userPrompt.length} chars`
|
|
3906
|
+
}
|
|
3907
|
+
),
|
|
3926
3908
|
/* @__PURE__ */ jsx(
|
|
3927
3909
|
RangeSliderField,
|
|
3928
3910
|
{
|
|
@@ -3985,39 +3967,33 @@ function AgentNewWizardPageView({
|
|
|
3985
3967
|
]
|
|
3986
3968
|
}
|
|
3987
3969
|
),
|
|
3988
|
-
/* @__PURE__ */
|
|
3989
|
-
|
|
3990
|
-
|
|
3991
|
-
|
|
3992
|
-
|
|
3993
|
-
|
|
3994
|
-
|
|
3995
|
-
|
|
3996
|
-
|
|
3997
|
-
|
|
3998
|
-
|
|
3999
|
-
|
|
4000
|
-
|
|
4001
|
-
|
|
4002
|
-
|
|
4003
|
-
|
|
4004
|
-
|
|
4005
|
-
|
|
4006
|
-
|
|
4007
|
-
}
|
|
4008
|
-
)
|
|
4009
|
-
] }),
|
|
4010
|
-
/* @__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: [
|
|
4011
|
-
/* @__PURE__ */ jsxs("div", { className: "bg-white/60 px-3 py-2 dark:bg-gray-900/60", children: [
|
|
4012
|
-
/* @__PURE__ */ jsx("p", { className: "text-[9px] uppercase tracking-wider text-gray-400 dark:text-gray-500", children: labels.model }),
|
|
4013
|
-
/* @__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 })
|
|
3970
|
+
/* @__PURE__ */ jsx(
|
|
3971
|
+
FormInput,
|
|
3972
|
+
{
|
|
3973
|
+
label: labels.maxTokens,
|
|
3974
|
+
type: "number",
|
|
3975
|
+
value: String(maxTokens),
|
|
3976
|
+
onValueChange: (v) => {
|
|
3977
|
+
setMaxTokens(Math.max(1, Math.floor(Number(v) || 0)));
|
|
3978
|
+
markTouched();
|
|
3979
|
+
},
|
|
3980
|
+
min: 1,
|
|
3981
|
+
max: 32e3,
|
|
3982
|
+
step: 1,
|
|
3983
|
+
hint: maxTokens.toLocaleString()
|
|
3984
|
+
}
|
|
3985
|
+
),
|
|
3986
|
+
/* @__PURE__ */ jsx("div", { className: "overflow-hidden rounded-lg border border-slate-200/30 dark:border-white/10", children: /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-3 gap-px bg-slate-200/30 dark:bg-white/10", children: [
|
|
3987
|
+
/* @__PURE__ */ jsxs("div", { className: "bg-white/60 px-3 py-2 dark:bg-slate-900/60", children: [
|
|
3988
|
+
/* @__PURE__ */ jsx("p", { className: "text-[9px] uppercase tracking-wider text-slate-400 dark:text-slate-500", children: labels.model }),
|
|
3989
|
+
/* @__PURE__ */ jsx("p", { className: "truncate text-xs font-semibold text-slate-900 dark:text-white", children: matchingModels.find((m) => m.id === modelId)?.name ?? labels.modelEmpty })
|
|
4014
3990
|
] }),
|
|
4015
|
-
/* @__PURE__ */ jsxs("div", { className: "bg-white/60 px-3 py-2 dark:bg-
|
|
4016
|
-
/* @__PURE__ */ jsx("p", { className: "text-[9px] uppercase tracking-wider text-
|
|
4017
|
-
/* @__PURE__ */ jsx("p", { className: "text-xs font-semibold text-
|
|
3991
|
+
/* @__PURE__ */ jsxs("div", { className: "bg-white/60 px-3 py-2 dark:bg-slate-900/60", children: [
|
|
3992
|
+
/* @__PURE__ */ jsx("p", { className: "text-[9px] uppercase tracking-wider text-slate-400 dark:text-slate-500", children: labels.maxTokens }),
|
|
3993
|
+
/* @__PURE__ */ jsx("p", { className: "text-xs font-semibold text-slate-900 dark:text-white", children: maxTokens.toLocaleString() })
|
|
4018
3994
|
] }),
|
|
4019
|
-
/* @__PURE__ */ jsxs("div", { className: "bg-white/60 px-3 py-2 dark:bg-
|
|
4020
|
-
/* @__PURE__ */ jsx("p", { className: "text-[9px] uppercase tracking-wider text-
|
|
3995
|
+
/* @__PURE__ */ jsxs("div", { className: "bg-white/60 px-3 py-2 dark:bg-slate-900/60", children: [
|
|
3996
|
+
/* @__PURE__ */ jsx("p", { className: "text-[9px] uppercase tracking-wider text-slate-400 dark:text-slate-500", children: labels.temperature }),
|
|
4021
3997
|
/* @__PURE__ */ jsxs("p", { className: `text-xs font-semibold ${temperature <= 0.3 ? "text-blue-500" : temperature <= 0.7 ? "text-purple-500" : "text-pink-500"}`, children: [
|
|
4022
3998
|
temperature.toFixed(2),
|
|
4023
3999
|
" \xB7 ",
|
|
@@ -4043,14 +4019,13 @@ function AgentNewWizardPageView({
|
|
|
4043
4019
|
const selected = difficulty === opt.id;
|
|
4044
4020
|
const label = opt.id === "beginner" ? labels.difficultyBeginner : opt.id === "intermediate" ? labels.difficultyIntermediate : opt.id === "advanced" ? labels.difficultyAdvanced : labels.difficultyExpert;
|
|
4045
4021
|
return /* @__PURE__ */ jsxs(
|
|
4046
|
-
|
|
4022
|
+
PickerTile,
|
|
4047
4023
|
{
|
|
4048
|
-
type: "button",
|
|
4049
4024
|
onClick: () => {
|
|
4050
4025
|
setDifficulty(opt.id);
|
|
4051
4026
|
markTouched();
|
|
4052
4027
|
},
|
|
4053
|
-
|
|
4028
|
+
selected,
|
|
4054
4029
|
className: [
|
|
4055
4030
|
"liquid-surface flex items-center gap-2 rounded-xl px-3 py-2 text-left transition-all",
|
|
4056
4031
|
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"
|
|
@@ -4176,7 +4151,7 @@ function AgentNewWizardPageView({
|
|
|
4176
4151
|
/* @__PURE__ */ jsx(ReviewRow, { label: labels.maxTokens, value: maxTokens.toLocaleString() })
|
|
4177
4152
|
] }),
|
|
4178
4153
|
systemPrompt && /* @__PURE__ */ jsxs("div", { className: "mt-3", children: [
|
|
4179
|
-
/* @__PURE__ */ jsx("p", { className: "text-[10px] uppercase tracking-wider text-
|
|
4154
|
+
/* @__PURE__ */ jsx("p", { className: "text-[10px] uppercase tracking-wider text-slate-400 dark:text-slate-500", children: labels.promptSystemPrompt }),
|
|
4180
4155
|
/* @__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 })
|
|
4181
4156
|
] })
|
|
4182
4157
|
]
|
|
@@ -4215,8 +4190,8 @@ function AgentNewWizardPageView({
|
|
|
4215
4190
|
}
|
|
4216
4191
|
function ReviewRow({ label, value }) {
|
|
4217
4192
|
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: [
|
|
4218
|
-
/* @__PURE__ */ jsx("dt", { className: "text-[10px] uppercase tracking-wider text-
|
|
4219
|
-
/* @__PURE__ */ jsx("dd", { className: "mt-0.5 truncate text-xs font-semibold text-
|
|
4193
|
+
/* @__PURE__ */ jsx("dt", { className: "text-[10px] uppercase tracking-wider text-slate-400 dark:text-slate-500", children: label }),
|
|
4194
|
+
/* @__PURE__ */ jsx("dd", { className: "mt-0.5 truncate text-xs font-semibold text-slate-900 dark:text-white", children: value })
|
|
4220
4195
|
] });
|
|
4221
4196
|
}
|
|
4222
4197
|
var DIALECT_LOGO_SRC = {
|
|
@@ -4920,7 +4895,7 @@ function DatasourceNewWizardPageView({
|
|
|
4920
4895
|
)
|
|
4921
4896
|
] }),
|
|
4922
4897
|
/* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
|
|
4923
|
-
/* @__PURE__ */ jsx("label", { className: "block text-xs font-medium text-
|
|
4898
|
+
/* @__PURE__ */ jsx("label", { className: "block text-xs font-medium text-slate-500 dark:text-slate-400", children: labels.fieldAllowedTables }),
|
|
4924
4899
|
/* @__PURE__ */ jsx(
|
|
4925
4900
|
ChipPicker,
|
|
4926
4901
|
{
|
|
@@ -4944,7 +4919,7 @@ function DatasourceNewWizardPageView({
|
|
|
4944
4919
|
/* @__PURE__ */ jsx("p", { className: "text-[11px] text-slate-500 dark:text-slate-400", children: labels.fieldAllowedTablesHint })
|
|
4945
4920
|
] }),
|
|
4946
4921
|
/* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
|
|
4947
|
-
/* @__PURE__ */ jsx("label", { className: "block text-xs font-medium text-
|
|
4922
|
+
/* @__PURE__ */ jsx("label", { className: "block text-xs font-medium text-slate-500 dark:text-slate-400", children: labels.fieldBlockedColumns }),
|
|
4948
4923
|
/* @__PURE__ */ jsx(
|
|
4949
4924
|
ChipPicker,
|
|
4950
4925
|
{
|
|
@@ -5093,8 +5068,8 @@ function DatasourceNewWizardPageView({
|
|
|
5093
5068
|
}
|
|
5094
5069
|
function ReviewRow2({ label, value }) {
|
|
5095
5070
|
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: [
|
|
5096
|
-
/* @__PURE__ */ jsx("dt", { className: "text-[10px] uppercase tracking-wider text-
|
|
5097
|
-
/* @__PURE__ */ jsx("dd", { className: "mt-0.5 truncate text-xs font-semibold text-
|
|
5071
|
+
/* @__PURE__ */ jsx("dt", { className: "text-[10px] uppercase tracking-wider text-slate-400 dark:text-slate-500", children: label }),
|
|
5072
|
+
/* @__PURE__ */ jsx("dd", { className: "mt-0.5 truncate text-xs font-semibold text-slate-900 dark:text-white", children: value })
|
|
5098
5073
|
] });
|
|
5099
5074
|
}
|
|
5100
5075
|
async function simulateTest() {
|
|
@@ -5122,11 +5097,11 @@ function RangeSliderField2({
|
|
|
5122
5097
|
const ariaText = activeZone ? `${displayValue} \u2014 ${activeZone.label}` : displayValue;
|
|
5123
5098
|
return /* @__PURE__ */ jsxs("div", { children: [
|
|
5124
5099
|
/* @__PURE__ */ jsxs("div", { className: "mb-2 flex items-center justify-between", children: [
|
|
5125
|
-
/* @__PURE__ */ jsx("label", { htmlFor: sliderId, className: "text-xs font-medium text-
|
|
5126
|
-
/* @__PURE__ */ jsx("span", { className: "text-sm font-bold tabular-nums text-
|
|
5100
|
+
/* @__PURE__ */ jsx("label", { htmlFor: sliderId, className: "text-xs font-medium text-slate-500 dark:text-slate-400", children: label }),
|
|
5101
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm font-bold tabular-nums text-slate-900 dark:text-white", children: displayValue })
|
|
5127
5102
|
] }),
|
|
5128
5103
|
/* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
5129
|
-
/* @__PURE__ */ jsx("div", { className: "absolute inset-x-0 top-1/2 h-2 -translate-y-1/2 overflow-hidden rounded-full bg-
|
|
5104
|
+
/* @__PURE__ */ jsx("div", { className: "absolute inset-x-0 top-1/2 h-2 -translate-y-1/2 overflow-hidden rounded-full bg-slate-200 dark:bg-slate-700", children: /* @__PURE__ */ jsx(
|
|
5130
5105
|
"div",
|
|
5131
5106
|
{
|
|
5132
5107
|
className: "h-full rounded-full transition-all duration-300 ease-out motion-reduce:transition-none",
|
|
@@ -5152,7 +5127,7 @@ function RangeSliderField2({
|
|
|
5152
5127
|
"aria-valuemax": max,
|
|
5153
5128
|
"aria-valuenow": value,
|
|
5154
5129
|
"aria-valuetext": ariaText,
|
|
5155
|
-
className: "relative z-10 h-5 w-full cursor-pointer appearance-none bg-transparent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-500 focus-visible:ring-offset-2 [&::-webkit-slider-thumb]:h-5 [&::-webkit-slider-thumb]:w-5 [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:border-2 [&::-webkit-slider-thumb]:border-white [&::-webkit-slider-thumb]:shadow-lg dark:[&::-webkit-slider-thumb]:border-
|
|
5130
|
+
className: "relative z-10 h-5 w-full cursor-pointer appearance-none bg-transparent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-500/70 focus-visible:ring-offset-2 [&::-webkit-slider-thumb]:h-5 [&::-webkit-slider-thumb]:w-5 [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:border-2 [&::-webkit-slider-thumb]:border-white [&::-webkit-slider-thumb]:shadow-lg dark:[&::-webkit-slider-thumb]:border-slate-900"
|
|
5156
5131
|
}
|
|
5157
5132
|
),
|
|
5158
5133
|
/* @__PURE__ */ jsx("style", { children: `[data-slider-id="${sliderId}"]::-webkit-slider-thumb { background: ${thumbColor}; box-shadow: 0 0 8px ${glow}; } [data-slider-id="${sliderId}"]::-moz-range-thumb { background: ${thumbColor}; border: 2px solid white; box-shadow: 0 0 8px ${glow}; }` })
|
|
@@ -5162,7 +5137,7 @@ function RangeSliderField2({
|
|
|
5162
5137
|
return /* @__PURE__ */ jsx(
|
|
5163
5138
|
"span",
|
|
5164
5139
|
{
|
|
5165
|
-
className: `text-[10px] font-medium transition-colors motion-reduce:transition-none ${isActive ? z.color : "text-
|
|
5140
|
+
className: `text-[10px] font-medium transition-colors motion-reduce:transition-none ${isActive ? z.color : "text-slate-400 dark:text-slate-500"}`,
|
|
5166
5141
|
children: z.label
|
|
5167
5142
|
},
|
|
5168
5143
|
z.label
|
|
@@ -5893,8 +5868,8 @@ function RuleNewWizardPageView({
|
|
|
5893
5868
|
}
|
|
5894
5869
|
function ReviewRow3({ label, value }) {
|
|
5895
5870
|
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: [
|
|
5896
|
-
/* @__PURE__ */ jsx("dt", { className: "text-[10px] uppercase tracking-wider text-
|
|
5897
|
-
/* @__PURE__ */ jsx("dd", { className: "mt-0.5 whitespace-pre-wrap break-words text-xs font-semibold text-
|
|
5871
|
+
/* @__PURE__ */ jsx("dt", { className: "text-[10px] uppercase tracking-wider text-slate-400 dark:text-slate-500", children: label }),
|
|
5872
|
+
/* @__PURE__ */ jsx("dd", { className: "mt-0.5 whitespace-pre-wrap break-words text-xs font-semibold text-slate-900 dark:text-white", children: value })
|
|
5898
5873
|
] });
|
|
5899
5874
|
}
|
|
5900
5875
|
function pad(n) {
|
|
@@ -5944,7 +5919,473 @@ function humanReadableAction(action, labels, tiles, actionTileId) {
|
|
|
5944
5919
|
const paramSummary = action.params ? Object.entries(action.params).slice(0, 3).map(([k, v]) => `${k}=${String(v)}`).join(", ") : "";
|
|
5945
5920
|
return paramSummary ? `${tileLabel} \u2014 ${paramSummary}` : tileLabel;
|
|
5946
5921
|
}
|
|
5922
|
+
function AgentNewModal({ open, onClose, ...wizardProps }) {
|
|
5923
|
+
return /* @__PURE__ */ jsx(
|
|
5924
|
+
GlassModal,
|
|
5925
|
+
{
|
|
5926
|
+
open,
|
|
5927
|
+
onClose,
|
|
5928
|
+
maxWidth: "2xl",
|
|
5929
|
+
closeOnBackdrop: false,
|
|
5930
|
+
closeLabel: wizardProps.labels.wizardCancel,
|
|
5931
|
+
children: /* @__PURE__ */ jsx(AgentNewWizardPageView, { ...wizardProps })
|
|
5932
|
+
}
|
|
5933
|
+
);
|
|
5934
|
+
}
|
|
5935
|
+
function DatasourceNewModal({ open, onClose, ...wizardProps }) {
|
|
5936
|
+
return /* @__PURE__ */ jsx(
|
|
5937
|
+
GlassModal,
|
|
5938
|
+
{
|
|
5939
|
+
open,
|
|
5940
|
+
onClose,
|
|
5941
|
+
maxWidth: "2xl",
|
|
5942
|
+
closeOnBackdrop: false,
|
|
5943
|
+
closeLabel: wizardProps.labels.wizardCancel,
|
|
5944
|
+
children: /* @__PURE__ */ jsx(DatasourceNewWizardPageView, { ...wizardProps })
|
|
5945
|
+
}
|
|
5946
|
+
);
|
|
5947
|
+
}
|
|
5948
|
+
function RuleNewModal({ open, onClose, ...wizardProps }) {
|
|
5949
|
+
return /* @__PURE__ */ jsx(
|
|
5950
|
+
GlassModal,
|
|
5951
|
+
{
|
|
5952
|
+
open,
|
|
5953
|
+
onClose,
|
|
5954
|
+
maxWidth: "2xl",
|
|
5955
|
+
closeOnBackdrop: false,
|
|
5956
|
+
closeLabel: wizardProps.labels.wizardCancel,
|
|
5957
|
+
children: /* @__PURE__ */ jsx(RuleNewWizardPageView, { ...wizardProps })
|
|
5958
|
+
}
|
|
5959
|
+
);
|
|
5960
|
+
}
|
|
5961
|
+
var AWS_REGIONS = [
|
|
5962
|
+
{ value: "us-east-1", label: "us-east-1 (N. Virginia)" },
|
|
5963
|
+
{ value: "us-east-2", label: "us-east-2 (Ohio)" },
|
|
5964
|
+
{ value: "us-west-2", label: "us-west-2 (Oregon)" },
|
|
5965
|
+
{ value: "eu-west-1", label: "eu-west-1 (Ireland)" },
|
|
5966
|
+
{ value: "eu-central-1", label: "eu-central-1 (Frankfurt)" },
|
|
5967
|
+
{ value: "ap-southeast-1", label: "ap-southeast-1 (Singapore)" },
|
|
5968
|
+
{ value: "sa-east-1", label: "sa-east-1 (S\xE3o Paulo)" }
|
|
5969
|
+
];
|
|
5970
|
+
var GCP_REGIONS = [
|
|
5971
|
+
{ value: "us-central1", label: "us-central1 (Iowa)" },
|
|
5972
|
+
{ value: "us-east1", label: "us-east1 (S. Carolina)" },
|
|
5973
|
+
{ value: "us-west1", label: "us-west1 (Oregon)" },
|
|
5974
|
+
{ value: "europe-west1", label: "europe-west1 (Belgium)" },
|
|
5975
|
+
{ value: "europe-west4", label: "europe-west4 (Netherlands)" },
|
|
5976
|
+
{ value: "asia-southeast1", label: "asia-southeast1 (Singapore)" },
|
|
5977
|
+
{ value: "southamerica-east1", label: "southamerica-east1 (S\xE3o Paulo)" }
|
|
5978
|
+
];
|
|
5979
|
+
var AZURE_REGIONS = [
|
|
5980
|
+
{ value: "eastus", label: "eastus" },
|
|
5981
|
+
{ value: "westus2", label: "westus2" },
|
|
5982
|
+
{ value: "northeurope", label: "northeurope" },
|
|
5983
|
+
{ value: "westeurope", label: "westeurope" },
|
|
5984
|
+
{ value: "brazilsouth", label: "brazilsouth" }
|
|
5985
|
+
];
|
|
5986
|
+
var MODEL_PROVIDERS = [
|
|
5987
|
+
{ value: "anthropic_api", label: "Anthropic API", category: "managed" },
|
|
5988
|
+
{ value: "openai_api", label: "OpenAI API", category: "managed" },
|
|
5989
|
+
{ value: "aws_bedrock", label: "AWS Bedrock", category: "cloud", needsRegion: true, defaultRegion: "us-east-1", regions: AWS_REGIONS },
|
|
5990
|
+
{ value: "google_vertex", label: "Google Vertex AI", category: "cloud", needsRegion: true, defaultRegion: "us-central1", regions: GCP_REGIONS },
|
|
5991
|
+
{ value: "azure_openai", label: "Azure OpenAI", category: "cloud", needsRegion: true, needsEndpoint: true, defaultRegion: "eastus", regions: AZURE_REGIONS },
|
|
5992
|
+
{ value: "groq", label: "Groq", category: "managed" },
|
|
5993
|
+
{ value: "mistral", label: "Mistral API", category: "managed" },
|
|
5994
|
+
{ value: "huggingface", label: "Hugging Face", category: "hosted", needsEndpoint: true },
|
|
5995
|
+
{ value: "ollama", label: "Ollama", category: "local", needsEndpoint: true },
|
|
5996
|
+
{ value: "custom", label: "Custom / OpenAI-compatible", category: "custom", needsEndpoint: true }
|
|
5997
|
+
];
|
|
5998
|
+
var PROVIDER_ICON = {
|
|
5999
|
+
anthropic_api: SparklesIcon,
|
|
6000
|
+
openai_api: BeakerIcon,
|
|
6001
|
+
aws_bedrock: CloudIcon,
|
|
6002
|
+
google_vertex: CloudIcon,
|
|
6003
|
+
azure_openai: CloudIcon,
|
|
6004
|
+
groq: BoltIcon,
|
|
6005
|
+
mistral: SparklesIcon,
|
|
6006
|
+
huggingface: ServerStackIcon,
|
|
6007
|
+
ollama: CpuChipIcon,
|
|
6008
|
+
custom: CodeBracketIcon
|
|
6009
|
+
};
|
|
6010
|
+
var PROVIDER_COLOR = {
|
|
6011
|
+
anthropic_api: "amber",
|
|
6012
|
+
openai_api: "emerald",
|
|
6013
|
+
aws_bedrock: "amber",
|
|
6014
|
+
google_vertex: "blue",
|
|
6015
|
+
azure_openai: "sky",
|
|
6016
|
+
groq: "purple",
|
|
6017
|
+
mistral: "pink",
|
|
6018
|
+
huggingface: "amber",
|
|
6019
|
+
ollama: "slate",
|
|
6020
|
+
custom: "slate"
|
|
6021
|
+
};
|
|
6022
|
+
var TOTAL_STEPS4 = 4;
|
|
6023
|
+
function ModelNewWizardPageView({
|
|
6024
|
+
labels,
|
|
6025
|
+
initialStep,
|
|
6026
|
+
onStepChange,
|
|
6027
|
+
onSubmit,
|
|
6028
|
+
onCancel,
|
|
6029
|
+
onTestConnection
|
|
6030
|
+
}) {
|
|
6031
|
+
const clampedInitial = Math.min(TOTAL_STEPS4, Math.max(1, initialStep ?? 1));
|
|
6032
|
+
const [step, setStep] = useState(clampedInitial);
|
|
6033
|
+
const [providerSlug, setProviderSlug] = useState("anthropic_api");
|
|
6034
|
+
const [name, setName] = useState("");
|
|
6035
|
+
const [region, setRegion] = useState("");
|
|
6036
|
+
const [endpoint, setEndpoint] = useState("");
|
|
6037
|
+
const [apiKey, setApiKey] = useState("");
|
|
6038
|
+
const [modelFilterItems, setModelFilterItems] = useState([]);
|
|
6039
|
+
const [modelFilterSelected, setModelFilterSelected] = useState([]);
|
|
6040
|
+
const [submitting, setSubmitting] = useState(false);
|
|
6041
|
+
const [touched, setTouched] = useState(false);
|
|
6042
|
+
const [testStatus, setTestStatus] = useState("idle");
|
|
6043
|
+
const preset = useMemo(
|
|
6044
|
+
() => MODEL_PROVIDERS.find((p) => p.value === providerSlug) ?? MODEL_PROVIDERS[0],
|
|
6045
|
+
[providerSlug]
|
|
6046
|
+
);
|
|
6047
|
+
useEffect(() => {
|
|
6048
|
+
if (preset.defaultRegion && !region) setRegion(preset.defaultRegion);
|
|
6049
|
+
}, [providerSlug]);
|
|
6050
|
+
useEffect(() => {
|
|
6051
|
+
const next = Math.min(TOTAL_STEPS4, Math.max(1, initialStep ?? 1));
|
|
6052
|
+
if (next !== step) setStep(next);
|
|
6053
|
+
}, [initialStep]);
|
|
6054
|
+
function markTouched() {
|
|
6055
|
+
if (!touched) setTouched(true);
|
|
6056
|
+
}
|
|
6057
|
+
const goToStep = useCallback((next) => {
|
|
6058
|
+
const clamped = Math.min(TOTAL_STEPS4, Math.max(1, next));
|
|
6059
|
+
setStep(clamped);
|
|
6060
|
+
onStepChange?.(clamped);
|
|
6061
|
+
}, [onStepChange]);
|
|
6062
|
+
function canAdvance(from) {
|
|
6063
|
+
if (from === 1) return Boolean(providerSlug);
|
|
6064
|
+
if (from === 2) return name.trim().length > 0;
|
|
6065
|
+
return true;
|
|
6066
|
+
}
|
|
6067
|
+
const goNext = useCallback(() => {
|
|
6068
|
+
if (!canAdvance(step)) return;
|
|
6069
|
+
if (step < TOTAL_STEPS4) goToStep(step + 1);
|
|
6070
|
+
}, [step, providerSlug, name]);
|
|
6071
|
+
const goBack = useCallback(() => {
|
|
6072
|
+
if (step > 1) goToStep(step - 1);
|
|
6073
|
+
}, [step, goToStep]);
|
|
6074
|
+
const cancelWithConfirm = useCallback(() => {
|
|
6075
|
+
if (touched && !window.confirm(labels.wizardCancelConfirm)) return;
|
|
6076
|
+
onCancel();
|
|
6077
|
+
}, [touched, labels.wizardCancelConfirm, onCancel]);
|
|
6078
|
+
function buildPayload() {
|
|
6079
|
+
return {
|
|
6080
|
+
providerSlug,
|
|
6081
|
+
name: name.trim(),
|
|
6082
|
+
region: region.trim() || void 0,
|
|
6083
|
+
endpoint: endpoint.trim() || void 0,
|
|
6084
|
+
apiKey: apiKey || void 0,
|
|
6085
|
+
modelFilters: modelFilterSelected.length > 0 ? [...modelFilterSelected] : void 0
|
|
6086
|
+
};
|
|
6087
|
+
}
|
|
6088
|
+
async function handleTestConnection() {
|
|
6089
|
+
if (!onTestConnection) return;
|
|
6090
|
+
setTestStatus("testing");
|
|
6091
|
+
try {
|
|
6092
|
+
const ok = await onTestConnection(buildPayload());
|
|
6093
|
+
setTestStatus(ok ? "success" : "failed");
|
|
6094
|
+
setTimeout(() => setTestStatus("idle"), 3500);
|
|
6095
|
+
} catch {
|
|
6096
|
+
setTestStatus("failed");
|
|
6097
|
+
setTimeout(() => setTestStatus("idle"), 3500);
|
|
6098
|
+
}
|
|
6099
|
+
}
|
|
6100
|
+
async function submit() {
|
|
6101
|
+
setSubmitting(true);
|
|
6102
|
+
try {
|
|
6103
|
+
await onSubmit(buildPayload());
|
|
6104
|
+
} finally {
|
|
6105
|
+
setSubmitting(false);
|
|
6106
|
+
}
|
|
6107
|
+
}
|
|
6108
|
+
const stepTitles = [labels.step1Title, labels.step2Title, labels.step3Title, labels.step4Title];
|
|
6109
|
+
const stepSubtitles = [labels.step1Subtitle, labels.step2Subtitle, labels.step3Subtitle, labels.step4Subtitle];
|
|
6110
|
+
const indicatorSteps = stepTitles.map((title, idx) => ({ id: String(idx + 1), title }));
|
|
6111
|
+
const counter = labels.wizardStepCounter.replace("{current}", String(step)).replace("{total}", String(TOTAL_STEPS4));
|
|
6112
|
+
const hero = /* @__PURE__ */ jsx(
|
|
6113
|
+
HeroSection,
|
|
6114
|
+
{
|
|
6115
|
+
icon: /* @__PURE__ */ jsx(CubeTransparentIcon, { className: "h-5 w-5" }),
|
|
6116
|
+
label: counter,
|
|
6117
|
+
title: labels.pageTitle,
|
|
6118
|
+
subtitle: stepSubtitles[step - 1] ?? labels.pageSubtitle,
|
|
6119
|
+
gradient: "from-emerald-500 to-teal-700",
|
|
6120
|
+
children: /* @__PURE__ */ jsx(
|
|
6121
|
+
StepIndicator,
|
|
6122
|
+
{
|
|
6123
|
+
accent: "indigo",
|
|
6124
|
+
currentStep: step - 1,
|
|
6125
|
+
onStepChange: (idx) => goToStep(idx + 1),
|
|
6126
|
+
progressLabel: labels.pageTitle,
|
|
6127
|
+
steps: indicatorSteps
|
|
6128
|
+
}
|
|
6129
|
+
)
|
|
6130
|
+
}
|
|
6131
|
+
);
|
|
6132
|
+
function renderStep1() {
|
|
6133
|
+
return /* @__PURE__ */ jsx(
|
|
6134
|
+
SectionCard,
|
|
6135
|
+
{
|
|
6136
|
+
variant: "glass",
|
|
6137
|
+
header: { title: labels.providerLabel, subtitle: labels.step1Subtitle },
|
|
6138
|
+
children: /* @__PURE__ */ jsx(
|
|
6139
|
+
"div",
|
|
6140
|
+
{
|
|
6141
|
+
role: "radiogroup",
|
|
6142
|
+
"aria-label": labels.providerLabel,
|
|
6143
|
+
className: "grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3",
|
|
6144
|
+
children: MODEL_PROVIDERS.map((p) => {
|
|
6145
|
+
const Icon = PROVIDER_ICON[p.value] ?? GlobeAltIcon;
|
|
6146
|
+
const color = PROVIDER_COLOR[p.value] ?? "slate";
|
|
6147
|
+
const selected = providerSlug === p.value;
|
|
6148
|
+
return /* @__PURE__ */ jsx(
|
|
6149
|
+
FilterTileButton,
|
|
6150
|
+
{
|
|
6151
|
+
isActive: selected,
|
|
6152
|
+
color,
|
|
6153
|
+
icon: /* @__PURE__ */ jsx(Icon, { className: "h-5 w-5" }),
|
|
6154
|
+
label: p.label,
|
|
6155
|
+
count: p.category,
|
|
6156
|
+
onClick: () => {
|
|
6157
|
+
setProviderSlug(p.value);
|
|
6158
|
+
markTouched();
|
|
6159
|
+
}
|
|
6160
|
+
},
|
|
6161
|
+
p.value
|
|
6162
|
+
);
|
|
6163
|
+
})
|
|
6164
|
+
}
|
|
6165
|
+
)
|
|
6166
|
+
}
|
|
6167
|
+
);
|
|
6168
|
+
}
|
|
6169
|
+
function renderStep2() {
|
|
6170
|
+
return /* @__PURE__ */ jsx(
|
|
6171
|
+
SectionCard,
|
|
6172
|
+
{
|
|
6173
|
+
variant: "glass",
|
|
6174
|
+
header: { title: preset.label, subtitle: labels.step2Subtitle },
|
|
6175
|
+
children: /* @__PURE__ */ jsx("div", { className: "space-y-4", children: /* @__PURE__ */ jsxs(FormGrid, { children: [
|
|
6176
|
+
/* @__PURE__ */ jsx(
|
|
6177
|
+
FormInput,
|
|
6178
|
+
{
|
|
6179
|
+
label: labels.nameLabel,
|
|
6180
|
+
value: name,
|
|
6181
|
+
onValueChange: (v) => {
|
|
6182
|
+
setName(v);
|
|
6183
|
+
markTouched();
|
|
6184
|
+
},
|
|
6185
|
+
placeholder: labels.namePlaceholder || `${preset.label} \u2014 produ\xE7\xE3o`,
|
|
6186
|
+
required: true
|
|
6187
|
+
}
|
|
6188
|
+
),
|
|
6189
|
+
/* @__PURE__ */ jsx(
|
|
6190
|
+
FormInput,
|
|
6191
|
+
{
|
|
6192
|
+
label: labels.apiKeyLabel,
|
|
6193
|
+
type: "password",
|
|
6194
|
+
value: apiKey,
|
|
6195
|
+
onValueChange: (v) => {
|
|
6196
|
+
setApiKey(v);
|
|
6197
|
+
markTouched();
|
|
6198
|
+
},
|
|
6199
|
+
placeholder: labels.apiKeyPlaceholder
|
|
6200
|
+
}
|
|
6201
|
+
)
|
|
6202
|
+
] }) })
|
|
6203
|
+
}
|
|
6204
|
+
);
|
|
6205
|
+
}
|
|
6206
|
+
function renderStep3() {
|
|
6207
|
+
const showRegion = preset.needsRegion === true;
|
|
6208
|
+
const showEndpoint = preset.needsEndpoint === true;
|
|
6209
|
+
return /* @__PURE__ */ jsx(
|
|
6210
|
+
SectionCard,
|
|
6211
|
+
{
|
|
6212
|
+
variant: "glass",
|
|
6213
|
+
header: { title: labels.step3Title, subtitle: labels.step3Subtitle },
|
|
6214
|
+
children: /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
6215
|
+
/* @__PURE__ */ jsxs(FormGrid, { children: [
|
|
6216
|
+
showRegion && (preset.regions ? /* @__PURE__ */ jsx(
|
|
6217
|
+
FormSelect,
|
|
6218
|
+
{
|
|
6219
|
+
label: labels.regionLabel,
|
|
6220
|
+
value: region,
|
|
6221
|
+
onValueChange: (v) => {
|
|
6222
|
+
setRegion(v);
|
|
6223
|
+
markTouched();
|
|
6224
|
+
},
|
|
6225
|
+
options: [...preset.regions]
|
|
6226
|
+
}
|
|
6227
|
+
) : /* @__PURE__ */ jsx(
|
|
6228
|
+
FormInput,
|
|
6229
|
+
{
|
|
6230
|
+
label: labels.regionLabel,
|
|
6231
|
+
value: region,
|
|
6232
|
+
onValueChange: (v) => {
|
|
6233
|
+
setRegion(v);
|
|
6234
|
+
markTouched();
|
|
6235
|
+
},
|
|
6236
|
+
placeholder: labels.regionPlaceholder ?? preset.defaultRegion
|
|
6237
|
+
}
|
|
6238
|
+
)),
|
|
6239
|
+
showEndpoint && /* @__PURE__ */ jsx(
|
|
6240
|
+
FormInput,
|
|
6241
|
+
{
|
|
6242
|
+
label: labels.endpointLabel,
|
|
6243
|
+
type: "url",
|
|
6244
|
+
value: endpoint,
|
|
6245
|
+
onValueChange: (v) => {
|
|
6246
|
+
setEndpoint(v);
|
|
6247
|
+
markTouched();
|
|
6248
|
+
},
|
|
6249
|
+
placeholder: labels.endpointPlaceholder ?? "https://\u2026"
|
|
6250
|
+
}
|
|
6251
|
+
)
|
|
6252
|
+
] }),
|
|
6253
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
|
|
6254
|
+
/* @__PURE__ */ jsx("label", { className: "block text-xs font-medium text-slate-500 dark:text-slate-400", children: labels.modelFilterLabel }),
|
|
6255
|
+
/* @__PURE__ */ jsx(
|
|
6256
|
+
ChipPicker,
|
|
6257
|
+
{
|
|
6258
|
+
items: modelFilterItems,
|
|
6259
|
+
selectedIds: modelFilterSelected,
|
|
6260
|
+
onChange: (ids) => {
|
|
6261
|
+
setModelFilterSelected(ids);
|
|
6262
|
+
markTouched();
|
|
6263
|
+
},
|
|
6264
|
+
onItemsChange: (items) => {
|
|
6265
|
+
setModelFilterItems(items);
|
|
6266
|
+
markTouched();
|
|
6267
|
+
},
|
|
6268
|
+
allowCustom: true,
|
|
6269
|
+
showActions: false,
|
|
6270
|
+
addPlaceholder: labels.modelFilterPlaceholder,
|
|
6271
|
+
addAriaLabel: labels.modelFilterLabel
|
|
6272
|
+
}
|
|
6273
|
+
)
|
|
6274
|
+
] }),
|
|
6275
|
+
onTestConnection && /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-3 border-t border-slate-200/60 pt-4 dark:border-white/10", children: [
|
|
6276
|
+
/* @__PURE__ */ jsx(
|
|
6277
|
+
Button,
|
|
6278
|
+
{
|
|
6279
|
+
type: "button",
|
|
6280
|
+
outline: true,
|
|
6281
|
+
onClick: () => void handleTestConnection(),
|
|
6282
|
+
disabled: testStatus === "testing",
|
|
6283
|
+
children: testStatus === "testing" ? /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-2", children: [
|
|
6284
|
+
/* @__PURE__ */ jsx(Spinner, { size: "xs" }),
|
|
6285
|
+
labels.testing
|
|
6286
|
+
] }) : labels.testConnection
|
|
6287
|
+
}
|
|
6288
|
+
),
|
|
6289
|
+
testStatus === "success" && /* @__PURE__ */ jsx(StatusBadge, { status: "success", label: labels.connectionSuccess }),
|
|
6290
|
+
testStatus === "failed" && /* @__PURE__ */ jsx(StatusBadge, { status: "error", label: labels.connectionFailed })
|
|
6291
|
+
] })
|
|
6292
|
+
] })
|
|
6293
|
+
}
|
|
6294
|
+
);
|
|
6295
|
+
}
|
|
6296
|
+
function renderStep4() {
|
|
6297
|
+
return /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
6298
|
+
/* @__PURE__ */ jsx(
|
|
6299
|
+
SectionCard,
|
|
6300
|
+
{
|
|
6301
|
+
variant: "glass",
|
|
6302
|
+
header: { title: labels.step1Title, subtitle: labels.step1Subtitle },
|
|
6303
|
+
actions: /* @__PURE__ */ jsx(Button, { type: "button", size: "sm", outline: true, onClick: () => goToStep(1), children: labels.wizardReviewEdit }),
|
|
6304
|
+
children: /* @__PURE__ */ jsx("dl", { className: "grid grid-cols-1 gap-2 sm:grid-cols-2", children: /* @__PURE__ */ jsx(ReviewRow4, { label: labels.reviewProviderLabel, value: preset.label }) })
|
|
6305
|
+
}
|
|
6306
|
+
),
|
|
6307
|
+
/* @__PURE__ */ jsx(
|
|
6308
|
+
SectionCard,
|
|
6309
|
+
{
|
|
6310
|
+
variant: "glass",
|
|
6311
|
+
header: { title: labels.step2Title, subtitle: labels.step2Subtitle },
|
|
6312
|
+
actions: /* @__PURE__ */ jsx(Button, { type: "button", size: "sm", outline: true, onClick: () => goToStep(2), children: labels.wizardReviewEdit }),
|
|
6313
|
+
children: /* @__PURE__ */ jsxs("dl", { className: "grid grid-cols-1 gap-2 sm:grid-cols-2", children: [
|
|
6314
|
+
/* @__PURE__ */ jsx(ReviewRow4, { label: labels.reviewNameLabel, value: name || labels.reviewNoneValue }),
|
|
6315
|
+
/* @__PURE__ */ jsx(ReviewRow4, { label: labels.reviewApiKeyLabel, value: apiKey ? labels.reviewApiKeyRedacted : labels.reviewNoneValue })
|
|
6316
|
+
] })
|
|
6317
|
+
}
|
|
6318
|
+
),
|
|
6319
|
+
/* @__PURE__ */ jsx(
|
|
6320
|
+
SectionCard,
|
|
6321
|
+
{
|
|
6322
|
+
variant: "glass",
|
|
6323
|
+
header: { title: labels.step3Title, subtitle: labels.step3Subtitle },
|
|
6324
|
+
actions: /* @__PURE__ */ jsx(Button, { type: "button", size: "sm", outline: true, onClick: () => goToStep(3), children: labels.wizardReviewEdit }),
|
|
6325
|
+
children: /* @__PURE__ */ jsxs("dl", { className: "grid grid-cols-1 gap-2 sm:grid-cols-2", children: [
|
|
6326
|
+
/* @__PURE__ */ jsx(ReviewRow4, { label: labels.reviewRegionLabel, value: region || labels.reviewNoneValue }),
|
|
6327
|
+
/* @__PURE__ */ jsx(ReviewRow4, { label: labels.reviewEndpointLabel, value: endpoint || labels.reviewNoneValue }),
|
|
6328
|
+
/* @__PURE__ */ jsx(
|
|
6329
|
+
ReviewRow4,
|
|
6330
|
+
{
|
|
6331
|
+
label: labels.reviewModelsLabel,
|
|
6332
|
+
value: modelFilterSelected.length > 0 ? modelFilterSelected.join(", ") : labels.reviewNoneValue
|
|
6333
|
+
}
|
|
6334
|
+
)
|
|
6335
|
+
] })
|
|
6336
|
+
}
|
|
6337
|
+
)
|
|
6338
|
+
] });
|
|
6339
|
+
}
|
|
6340
|
+
const stepBody = step === 1 ? renderStep1() : step === 2 ? renderStep2() : step === 3 ? renderStep3() : renderStep4();
|
|
6341
|
+
const advanceDisabled = !canAdvance(step);
|
|
6342
|
+
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: [
|
|
6343
|
+
/* @__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 }) }),
|
|
6344
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
6345
|
+
/* @__PURE__ */ jsx(Button, { type: "button", outline: true, onClick: cancelWithConfirm, disabled: submitting, children: labels.wizardCancel }),
|
|
6346
|
+
step < TOTAL_STEPS4 ? /* @__PURE__ */ jsx(Button, { type: "button", color: "emerald", onClick: goNext, disabled: advanceDisabled || submitting, children: labels.wizardNext }) : /* @__PURE__ */ jsx(Button, { type: "button", color: "emerald", onClick: () => void submit(), disabled: submitting || !name.trim(), children: submitting ? labels.wizardCreate + "\u2026" : labels.wizardCreate })
|
|
6347
|
+
] })
|
|
6348
|
+
] });
|
|
6349
|
+
const content = /* @__PURE__ */ jsxs(
|
|
6350
|
+
"form",
|
|
6351
|
+
{
|
|
6352
|
+
onSubmit: (e) => {
|
|
6353
|
+
e.preventDefault();
|
|
6354
|
+
if (step < TOTAL_STEPS4) goNext();
|
|
6355
|
+
else void submit();
|
|
6356
|
+
},
|
|
6357
|
+
className: "space-y-4",
|
|
6358
|
+
children: [
|
|
6359
|
+
/* @__PURE__ */ jsx("div", { className: "liquid-surface rounded-2xl p-5 sm:p-8", children: stepBody }),
|
|
6360
|
+
footer
|
|
6361
|
+
]
|
|
6362
|
+
}
|
|
6363
|
+
);
|
|
6364
|
+
return /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
6365
|
+
hero,
|
|
6366
|
+
content
|
|
6367
|
+
] });
|
|
6368
|
+
}
|
|
6369
|
+
function ReviewRow4({ label, value }) {
|
|
6370
|
+
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: [
|
|
6371
|
+
/* @__PURE__ */ jsx("dt", { className: "text-[10px] uppercase tracking-wider text-slate-400 dark:text-slate-500", children: label }),
|
|
6372
|
+
/* @__PURE__ */ jsx("dd", { className: "mt-0.5 truncate text-xs font-semibold text-slate-900 dark:text-white", children: value })
|
|
6373
|
+
] });
|
|
6374
|
+
}
|
|
6375
|
+
function ModelNewModal({ open, onClose, ...wizardProps }) {
|
|
6376
|
+
return /* @__PURE__ */ jsx(
|
|
6377
|
+
GlassModal,
|
|
6378
|
+
{
|
|
6379
|
+
open,
|
|
6380
|
+
onClose,
|
|
6381
|
+
maxWidth: "2xl",
|
|
6382
|
+
closeOnBackdrop: false,
|
|
6383
|
+
closeLabel: wizardProps.labels.wizardCancel,
|
|
6384
|
+
children: /* @__PURE__ */ jsx(ModelNewWizardPageView, { ...wizardProps })
|
|
6385
|
+
}
|
|
6386
|
+
);
|
|
6387
|
+
}
|
|
5947
6388
|
|
|
5948
|
-
export { AgentNewWizardPageView, AgentsConfigPageView, AgentsIndexPageView, AgentsModelsPageView, AgentsPromptsPageView, AgentsToolDefinitionsPageView, AgentsWorkspacePageView, ConnectionsPageView, CredentialsPageView, DashboardPageView, DatasourceNewWizardPageView, DatasourcesPageView, RuleNewWizardPageView, RulesPageView, RunTimelinePageView, TOOL_TYPES, WorkflowRunsPageView, WorkflowsPageView, jsonSchemaToParameters, parametersToJsonSchema };
|
|
6389
|
+
export { AgentNewModal, AgentNewWizardPageView, AgentsConfigPageView, AgentsIndexPageView, AgentsModelsPageView, AgentsPromptsPageView, AgentsToolDefinitionsPageView, AgentsWorkspacePageView, ConnectionsPageView, CredentialsPageView, DashboardPageView, DatasourceNewModal, DatasourceNewWizardPageView, DatasourcesPageView, MODEL_PROVIDERS, ModelNewModal, ModelNewWizardPageView, RuleNewModal, RuleNewWizardPageView, RulesPageView, RunTimelinePageView, TOOL_TYPES, WorkflowRunsPageView, WorkflowsPageView, jsonSchemaToParameters, parametersToJsonSchema };
|
|
5949
6390
|
//# sourceMappingURL=index.mjs.map
|
|
5950
6391
|
//# sourceMappingURL=index.mjs.map
|