@datatechsolutions/ui 3.13.1 → 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-VCL5LDS5.js → chunk-2II2NLAZ.js} +38 -38
- package/dist/{chunk-VCL5LDS5.js.map → chunk-2II2NLAZ.js.map} +1 -1
- package/dist/{chunk-O4RZCDP2.mjs → chunk-2SBVFLPZ.mjs} +19 -2
- package/dist/chunk-2SBVFLPZ.mjs.map +1 -0
- package/dist/{chunk-TRNDFSM6.mjs → chunk-33ZWFDVG.mjs} +14 -14
- package/dist/chunk-33ZWFDVG.mjs.map +1 -0
- package/dist/{chunk-VWZ53TE2.js → chunk-4HZ55YKZ.js} +9 -9
- package/dist/{chunk-VWZ53TE2.js.map → chunk-4HZ55YKZ.js.map} +1 -1
- package/dist/{chunk-ULSG4JLR.js → chunk-4P72IJOM.js} +6 -6
- package/dist/{chunk-ULSG4JLR.js.map → chunk-4P72IJOM.js.map} +1 -1
- package/dist/{chunk-4Z5NZINA.js → chunk-5SCZB5UI.js} +122 -122
- package/dist/chunk-5SCZB5UI.js.map +1 -0
- package/dist/{chunk-Y65X2NHF.mjs → chunk-5YCH7FHT.mjs} +3 -3
- package/dist/{chunk-Y65X2NHF.mjs.map → chunk-5YCH7FHT.mjs.map} +1 -1
- package/dist/{chunk-DTFU3ZTD.js → chunk-6NBQTIXX.js} +9 -9
- package/dist/{chunk-DTFU3ZTD.js.map → chunk-6NBQTIXX.js.map} +1 -1
- package/dist/{chunk-CVEI4RQP.js → chunk-6NEESZVO.js} +4 -4
- package/dist/{chunk-CVEI4RQP.js.map → chunk-6NEESZVO.js.map} +1 -1
- package/dist/{chunk-AC54BNSK.js → chunk-72XZ7DSF.js} +13 -13
- package/dist/{chunk-AC54BNSK.js.map → chunk-72XZ7DSF.js.map} +1 -1
- package/dist/{chunk-ZPV7X4ZE.mjs → chunk-7NHJSD4A.mjs} +6 -6
- package/dist/{chunk-ZPV7X4ZE.mjs.map → chunk-7NHJSD4A.mjs.map} +1 -1
- package/dist/{chunk-CKY2QIRR.js → chunk-7SDB2VC2.js} +4 -4
- package/dist/{chunk-CKY2QIRR.js.map → chunk-7SDB2VC2.js.map} +1 -1
- package/dist/{chunk-FV42SSLP.js → chunk-A5OMGPMR.js} +4 -4
- package/dist/{chunk-FV42SSLP.js.map → chunk-A5OMGPMR.js.map} +1 -1
- package/dist/{chunk-54T5F65C.js → chunk-AUCS2KF4.js} +17 -17
- package/dist/{chunk-54T5F65C.js.map → chunk-AUCS2KF4.js.map} +1 -1
- package/dist/{chunk-QEACOJXX.mjs → chunk-F4KHAKTP.mjs} +102 -46
- package/dist/chunk-F4KHAKTP.mjs.map +1 -0
- package/dist/{chunk-Q7QPHZOV.js → chunk-FHGWXWVZ.js} +67 -67
- package/dist/{chunk-Q7QPHZOV.js.map → chunk-FHGWXWVZ.js.map} +1 -1
- package/dist/{chunk-RWZ2PLMQ.js → chunk-FZUV7GNB.js} +175 -118
- package/dist/chunk-FZUV7GNB.js.map +1 -0
- package/dist/{chunk-RMPXGEFL.mjs → chunk-HQNIETHV.mjs} +8 -8
- package/dist/{chunk-RMPXGEFL.mjs.map → chunk-HQNIETHV.mjs.map} +1 -1
- package/dist/{chunk-VPRAESA7.mjs → chunk-KDDXDQR2.mjs} +3 -3
- package/dist/{chunk-VPRAESA7.mjs.map → chunk-KDDXDQR2.mjs.map} +1 -1
- package/dist/{chunk-PM7A5I3X.js → chunk-LJGPMMKB.js} +113 -113
- package/dist/{chunk-PM7A5I3X.js.map → chunk-LJGPMMKB.js.map} +1 -1
- package/dist/{chunk-EBARYRSA.js → chunk-MXQ2EYG2.js} +19 -2
- package/dist/chunk-MXQ2EYG2.js.map +1 -0
- package/dist/{chunk-SCGICCQM.mjs → chunk-N6SGVUTR.mjs} +7 -10
- package/dist/chunk-N6SGVUTR.mjs.map +1 -0
- package/dist/{chunk-7IAWXG43.js → chunk-NIZSQJRW.js} +33 -33
- package/dist/{chunk-7IAWXG43.js.map → chunk-NIZSQJRW.js.map} +1 -1
- package/dist/{chunk-UUTTS3VV.mjs → chunk-NXWIT4YQ.mjs} +8 -11
- package/dist/chunk-NXWIT4YQ.mjs.map +1 -0
- package/dist/{chunk-DJHNSBIR.mjs → chunk-OTQXU4WG.mjs} +26 -26
- package/dist/{chunk-DJHNSBIR.mjs.map → chunk-OTQXU4WG.mjs.map} +1 -1
- package/dist/{chunk-3VCSMSJB.mjs → chunk-PO66V2PN.mjs} +9 -9
- package/dist/{chunk-3VCSMSJB.mjs.map → chunk-PO66V2PN.mjs.map} +1 -1
- package/dist/{chunk-B3TA74C4.js → chunk-PXGESUKI.js} +57 -60
- package/dist/chunk-PXGESUKI.js.map +1 -0
- package/dist/{chunk-YHD6SJIN.mjs → chunk-Q2FUNDCP.mjs} +4 -4
- package/dist/{chunk-YHD6SJIN.mjs.map → chunk-Q2FUNDCP.mjs.map} +1 -1
- package/dist/{chunk-4MNKVDTJ.mjs → chunk-Q5TZTA6H.mjs} +4 -4
- package/dist/{chunk-4MNKVDTJ.mjs.map → chunk-Q5TZTA6H.mjs.map} +1 -1
- package/dist/{chunk-4QCO4CBC.mjs → chunk-T7DROKWJ.mjs} +4 -4
- package/dist/{chunk-4QCO4CBC.mjs.map → chunk-T7DROKWJ.mjs.map} +1 -1
- package/dist/{chunk-WX44DAQD.mjs → chunk-TQADF23S.mjs} +3 -3
- package/dist/{chunk-WX44DAQD.mjs.map → chunk-TQADF23S.mjs.map} +1 -1
- package/dist/{chunk-4VEQJAXJ.mjs → chunk-U7VMFQFN.mjs} +5 -5
- package/dist/{chunk-4VEQJAXJ.mjs.map → chunk-U7VMFQFN.mjs.map} +1 -1
- package/dist/{chunk-M4KRQXOT.mjs → chunk-WE35EV7J.mjs} +3 -3
- package/dist/{chunk-M4KRQXOT.mjs.map → chunk-WE35EV7J.mjs.map} +1 -1
- package/dist/{chunk-RSCRIDMW.mjs → chunk-WTSMTLSP.mjs} +39 -45
- package/dist/chunk-WTSMTLSP.mjs.map +1 -0
- package/dist/{chunk-RPNMDGRA.js → chunk-YFMMZHL5.js} +37 -40
- package/dist/chunk-YFMMZHL5.js.map +1 -0
- package/dist/{chunk-XYMHIZ3K.mjs → chunk-ZBX7UCAP.mjs} +7 -7
- package/dist/{chunk-XYMHIZ3K.mjs.map → chunk-ZBX7UCAP.mjs.map} +1 -1
- package/dist/{chunk-RUZPOHJW.js → chunk-ZE6U4N4Q.js} +42 -42
- package/dist/{chunk-RUZPOHJW.js.map → chunk-ZE6U4N4Q.js.map} +1 -1
- package/dist/{chunk-UPWJRCAD.js → chunk-ZIRD3X6G.js} +220 -226
- 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 +97 -97
- package/dist/platform/index.mjs +22 -22
- package/dist/platform/pages/index.d.mts +103 -1
- package/dist/platform/pages/index.d.ts +103 -1
- package/dist/platform/pages/index.js +934 -488
- package/dist/platform/pages/index.js.map +1 -1
- package/dist/platform/pages/index.mjs +530 -90
- 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-4Z5NZINA.js.map +0 -1
- package/dist/chunk-B3TA74C4.js.map +0 -1
- package/dist/chunk-EBARYRSA.js.map +0 -1
- package/dist/chunk-O4RZCDP2.mjs.map +0 -1
- package/dist/chunk-QEACOJXX.mjs.map +0 -1
- package/dist/chunk-RPNMDGRA.js.map +0 -1
- package/dist/chunk-RSCRIDMW.mjs.map +0 -1
- package/dist/chunk-RWZ2PLMQ.js.map +0 -1
- package/dist/chunk-SCGICCQM.mjs.map +0 -1
- package/dist/chunk-TRNDFSM6.mjs.map +0 -1
- package/dist/chunk-UPWJRCAD.js.map +0 -1
- package/dist/chunk-UUTTS3VV.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 }) {
|
|
@@ -3740,14 +3740,13 @@ function AgentNewWizardPageView({
|
|
|
3740
3740
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
3741
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 }),
|
|
3742
3742
|
/* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1.5", children: EMOJI_PALETTE.map((e) => /* @__PURE__ */ jsx(
|
|
3743
|
-
|
|
3743
|
+
PickerTile,
|
|
3744
3744
|
{
|
|
3745
|
-
type: "button",
|
|
3746
3745
|
onClick: () => {
|
|
3747
3746
|
setEmoji(e);
|
|
3748
3747
|
markTouched();
|
|
3749
3748
|
},
|
|
3750
|
-
|
|
3749
|
+
selected: emoji === e,
|
|
3751
3750
|
className: [
|
|
3752
3751
|
"flex h-9 w-9 items-center justify-center rounded-lg text-base transition-all",
|
|
3753
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"
|
|
@@ -3878,52 +3877,34 @@ function AgentNewWizardPageView({
|
|
|
3878
3877
|
subtitle: labels.behaviorSubtitle
|
|
3879
3878
|
},
|
|
3880
3879
|
children: /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
3881
|
-
/* @__PURE__ */
|
|
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
|
-
|
|
3909
|
-
" chars"
|
|
3910
|
-
] })
|
|
3911
|
-
] }),
|
|
3912
|
-
/* @__PURE__ */ jsx(
|
|
3913
|
-
"textarea",
|
|
3914
|
-
{
|
|
3915
|
-
id: "wizard-user-prompt",
|
|
3916
|
-
value: userPrompt,
|
|
3917
|
-
onChange: (e) => {
|
|
3918
|
-
setUserPrompt(e.target.value);
|
|
3919
|
-
markTouched();
|
|
3920
|
-
},
|
|
3921
|
-
rows: 5,
|
|
3922
|
-
className: "w-full resize-y rounded-lg bg-white/40 dark:bg-white/[0.04] backdrop-blur-sm border border-slate-200/50 dark:border-white/10 px-3 py-2.5 font-mono text-xs leading-relaxed text-slate-700 outline-none transition-colors placeholder:text-slate-400 focus:ring-indigo-500/70 focus:ring-offset-1 motion-reduce:transition-none dark:text-slate-300 dark:placeholder:text-slate-500",
|
|
3923
|
-
placeholder: labels.userPromptPlaceholder
|
|
3924
|
-
}
|
|
3925
|
-
)
|
|
3926
|
-
] }),
|
|
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
|
+
),
|
|
3927
3908
|
/* @__PURE__ */ jsx(
|
|
3928
3909
|
RangeSliderField,
|
|
3929
3910
|
{
|
|
@@ -3986,28 +3967,22 @@ function AgentNewWizardPageView({
|
|
|
3986
3967
|
]
|
|
3987
3968
|
}
|
|
3988
3969
|
),
|
|
3989
|
-
/* @__PURE__ */
|
|
3990
|
-
|
|
3991
|
-
|
|
3992
|
-
|
|
3993
|
-
|
|
3994
|
-
|
|
3995
|
-
|
|
3996
|
-
|
|
3997
|
-
|
|
3998
|
-
|
|
3999
|
-
|
|
4000
|
-
|
|
4001
|
-
|
|
4002
|
-
|
|
4003
|
-
|
|
4004
|
-
|
|
4005
|
-
max: 32e3,
|
|
4006
|
-
step: 1,
|
|
4007
|
-
className: "w-full rounded-lg bg-white/40 dark:bg-white/[0.04] backdrop-blur-sm border border-slate-200/50 dark:border-white/10 px-3 py-2.5 text-sm tabular-nums text-slate-700 outline-none transition-colors focus:ring-indigo-500/70 focus:ring-offset-1 motion-reduce:transition-none dark:text-slate-300"
|
|
4008
|
-
}
|
|
4009
|
-
)
|
|
4010
|
-
] }),
|
|
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
|
+
),
|
|
4011
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: [
|
|
4012
3987
|
/* @__PURE__ */ jsxs("div", { className: "bg-white/60 px-3 py-2 dark:bg-slate-900/60", children: [
|
|
4013
3988
|
/* @__PURE__ */ jsx("p", { className: "text-[9px] uppercase tracking-wider text-slate-400 dark:text-slate-500", children: labels.model }),
|
|
@@ -4044,14 +4019,13 @@ function AgentNewWizardPageView({
|
|
|
4044
4019
|
const selected = difficulty === opt.id;
|
|
4045
4020
|
const label = opt.id === "beginner" ? labels.difficultyBeginner : opt.id === "intermediate" ? labels.difficultyIntermediate : opt.id === "advanced" ? labels.difficultyAdvanced : labels.difficultyExpert;
|
|
4046
4021
|
return /* @__PURE__ */ jsxs(
|
|
4047
|
-
|
|
4022
|
+
PickerTile,
|
|
4048
4023
|
{
|
|
4049
|
-
type: "button",
|
|
4050
4024
|
onClick: () => {
|
|
4051
4025
|
setDifficulty(opt.id);
|
|
4052
4026
|
markTouched();
|
|
4053
4027
|
},
|
|
4054
|
-
|
|
4028
|
+
selected,
|
|
4055
4029
|
className: [
|
|
4056
4030
|
"liquid-surface flex items-center gap-2 rounded-xl px-3 py-2 text-left transition-all",
|
|
4057
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"
|
|
@@ -4921,7 +4895,7 @@ function DatasourceNewWizardPageView({
|
|
|
4921
4895
|
)
|
|
4922
4896
|
] }),
|
|
4923
4897
|
/* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
|
|
4924
|
-
/* @__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 }),
|
|
4925
4899
|
/* @__PURE__ */ jsx(
|
|
4926
4900
|
ChipPicker,
|
|
4927
4901
|
{
|
|
@@ -4945,7 +4919,7 @@ function DatasourceNewWizardPageView({
|
|
|
4945
4919
|
/* @__PURE__ */ jsx("p", { className: "text-[11px] text-slate-500 dark:text-slate-400", children: labels.fieldAllowedTablesHint })
|
|
4946
4920
|
] }),
|
|
4947
4921
|
/* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
|
|
4948
|
-
/* @__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 }),
|
|
4949
4923
|
/* @__PURE__ */ jsx(
|
|
4950
4924
|
ChipPicker,
|
|
4951
4925
|
{
|
|
@@ -5094,8 +5068,8 @@ function DatasourceNewWizardPageView({
|
|
|
5094
5068
|
}
|
|
5095
5069
|
function ReviewRow2({ label, value }) {
|
|
5096
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: [
|
|
5097
|
-
/* @__PURE__ */ jsx("dt", { className: "text-[10px] uppercase tracking-wider text-
|
|
5098
|
-
/* @__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 })
|
|
5099
5073
|
] });
|
|
5100
5074
|
}
|
|
5101
5075
|
async function simulateTest() {
|
|
@@ -5945,7 +5919,473 @@ function humanReadableAction(action, labels, tiles, actionTileId) {
|
|
|
5945
5919
|
const paramSummary = action.params ? Object.entries(action.params).slice(0, 3).map(([k, v]) => `${k}=${String(v)}`).join(", ") : "";
|
|
5946
5920
|
return paramSummary ? `${tileLabel} \u2014 ${paramSummary}` : tileLabel;
|
|
5947
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
|
+
}
|
|
5948
6388
|
|
|
5949
|
-
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 };
|
|
5950
6390
|
//# sourceMappingURL=index.mjs.map
|
|
5951
6391
|
//# sourceMappingURL=index.mjs.map
|