@datatechsolutions/ui 3.14.0 → 3.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/astrlabe/index.js +108 -108
- package/dist/astrlabe/index.mjs +4 -4
- package/dist/astrlabe/workflow-canvas.js +4 -4
- package/dist/astrlabe/workflow-canvas.mjs +3 -3
- package/dist/{chunk-FHGWXWVZ.js → chunk-2JPS5OND.js} +45 -45
- package/dist/{chunk-FHGWXWVZ.js.map → chunk-2JPS5OND.js.map} +1 -1
- package/dist/{chunk-YFMMZHL5.js → chunk-2QZFKQP6.js} +26 -26
- package/dist/{chunk-YFMMZHL5.js.map → chunk-2QZFKQP6.js.map} +1 -1
- package/dist/{chunk-U7VMFQFN.mjs → chunk-3FOLXKVP.mjs} +4 -4
- package/dist/{chunk-U7VMFQFN.mjs.map → chunk-3FOLXKVP.mjs.map} +1 -1
- package/dist/{chunk-LJGPMMKB.js → chunk-435TRHC2.js} +72 -72
- package/dist/{chunk-LJGPMMKB.js.map → chunk-435TRHC2.js.map} +1 -1
- package/dist/{chunk-WE35EV7J.mjs → chunk-5QRU3KKV.mjs} +3 -3
- package/dist/{chunk-WE35EV7J.mjs.map → chunk-5QRU3KKV.mjs.map} +1 -1
- package/dist/{chunk-7SDB2VC2.js → chunk-6UUFPSAR.js} +4 -4
- package/dist/{chunk-7SDB2VC2.js.map → chunk-6UUFPSAR.js.map} +1 -1
- package/dist/{chunk-OTQXU4WG.mjs → chunk-7LIJTAIF.mjs} +8 -8
- package/dist/{chunk-OTQXU4WG.mjs.map → chunk-7LIJTAIF.mjs.map} +1 -1
- package/dist/{chunk-Q5TZTA6H.mjs → chunk-A5M7SPPG.mjs} +3 -3
- package/dist/{chunk-Q5TZTA6H.mjs.map → chunk-A5M7SPPG.mjs.map} +1 -1
- package/dist/{chunk-4HZ55YKZ.js → chunk-BN4BKFE2.js} +9 -9
- package/dist/{chunk-4HZ55YKZ.js.map → chunk-BN4BKFE2.js.map} +1 -1
- package/dist/{chunk-5SCZB5UI.js → chunk-C4UYEHPY.js} +84 -84
- package/dist/chunk-C4UYEHPY.js.map +1 -0
- package/dist/{chunk-AUCS2KF4.js → chunk-CPTHSYM2.js} +10 -10
- package/dist/{chunk-AUCS2KF4.js.map → chunk-CPTHSYM2.js.map} +1 -1
- package/dist/{chunk-PO66V2PN.mjs → chunk-EZVBRLQH.mjs} +3 -3
- package/dist/{chunk-PO66V2PN.mjs.map → chunk-EZVBRLQH.mjs.map} +1 -1
- package/dist/{chunk-T7DROKWJ.mjs → chunk-F3PQ5EFQ.mjs} +3 -3
- package/dist/{chunk-T7DROKWJ.mjs.map → chunk-F3PQ5EFQ.mjs.map} +1 -1
- package/dist/{chunk-ZE6U4N4Q.js → chunk-GD3YV46U.js} +36 -36
- package/dist/{chunk-ZE6U4N4Q.js.map → chunk-GD3YV46U.js.map} +1 -1
- package/dist/{chunk-5YCH7FHT.mjs → chunk-I6ULYJR4.mjs} +3 -3
- package/dist/{chunk-5YCH7FHT.mjs.map → chunk-I6ULYJR4.mjs.map} +1 -1
- package/dist/{chunk-Q2FUNDCP.mjs → chunk-JJUWZNJY.mjs} +3 -3
- package/dist/{chunk-Q2FUNDCP.mjs.map → chunk-JJUWZNJY.mjs.map} +1 -1
- package/dist/{chunk-ZIRD3X6G.js → chunk-KRS2CLPR.js} +139 -139
- package/dist/chunk-KRS2CLPR.js.map +1 -0
- package/dist/{chunk-FZUV7GNB.js → chunk-KZDABEML.js} +41 -41
- package/dist/{chunk-FZUV7GNB.js.map → chunk-KZDABEML.js.map} +1 -1
- package/dist/{chunk-33ZWFDVG.mjs → chunk-MSXJFWKD.mjs} +17 -17
- package/dist/chunk-MSXJFWKD.mjs.map +1 -0
- package/dist/{chunk-HQNIETHV.mjs → chunk-NNR44MM5.mjs} +7 -7
- package/dist/{chunk-HQNIETHV.mjs.map → chunk-NNR44MM5.mjs.map} +1 -1
- package/dist/{chunk-72XZ7DSF.js → chunk-NQCFGIWC.js} +13 -13
- package/dist/{chunk-72XZ7DSF.js.map → chunk-NQCFGIWC.js.map} +1 -1
- package/dist/{chunk-NIZSQJRW.js → chunk-OQM252SM.js} +30 -30
- package/dist/{chunk-NIZSQJRW.js.map → chunk-OQM252SM.js.map} +1 -1
- package/dist/{chunk-2II2NLAZ.js → chunk-PADXORD2.js} +34 -34
- package/dist/{chunk-2II2NLAZ.js.map → chunk-PADXORD2.js.map} +1 -1
- package/dist/{chunk-N6SGVUTR.mjs → chunk-PSS3E463.mjs} +3 -3
- package/dist/{chunk-N6SGVUTR.mjs.map → chunk-PSS3E463.mjs.map} +1 -1
- package/dist/{chunk-F4KHAKTP.mjs → chunk-QCGSE24W.mjs} +41 -41
- package/dist/{chunk-F4KHAKTP.mjs.map → chunk-QCGSE24W.mjs.map} +1 -1
- package/dist/{chunk-7NHJSD4A.mjs → chunk-RH6Z425K.mjs} +6 -6
- package/dist/{chunk-7NHJSD4A.mjs.map → chunk-RH6Z425K.mjs.map} +1 -1
- package/dist/{chunk-WTSMTLSP.mjs → chunk-SMUBE3RO.mjs} +11 -11
- package/dist/chunk-SMUBE3RO.mjs.map +1 -0
- package/dist/{chunk-PXGESUKI.js → chunk-WG26KW6D.js} +36 -36
- package/dist/{chunk-PXGESUKI.js.map → chunk-WG26KW6D.js.map} +1 -1
- package/dist/{chunk-NXWIT4YQ.mjs → chunk-WGS65S7S.mjs} +3 -3
- package/dist/{chunk-NXWIT4YQ.mjs.map → chunk-WGS65S7S.mjs.map} +1 -1
- package/dist/{chunk-4P72IJOM.js → chunk-XJJZ6DHE.js} +4 -4
- package/dist/{chunk-4P72IJOM.js.map → chunk-XJJZ6DHE.js.map} +1 -1
- package/dist/index.js +664 -664
- package/dist/index.mjs +2 -2
- package/dist/platform/admin/index.js +10 -10
- package/dist/platform/admin/index.mjs +4 -4
- package/dist/platform/agents-workspace.js +7 -7
- package/dist/platform/agents-workspace.mjs +6 -6
- package/dist/platform/app-shell.js +4 -4
- package/dist/platform/app-shell.mjs +3 -3
- package/dist/platform/auth/index.js +22 -22
- package/dist/platform/auth/index.mjs +4 -4
- package/dist/platform/billing/index.js +4 -4
- package/dist/platform/billing/index.mjs +3 -3
- package/dist/platform/impersonation/index.js +4 -4
- package/dist/platform/impersonation/index.mjs +3 -3
- package/dist/platform/index.js +78 -78
- package/dist/platform/index.mjs +18 -18
- package/dist/platform/pages/index.js +1503 -1622
- package/dist/platform/pages/index.js.map +1 -1
- package/dist/platform/pages/index.mjs +1219 -1338
- package/dist/platform/pages/index.mjs.map +1 -1
- package/dist/platform/settings/index.js +7 -7
- package/dist/platform/settings/index.mjs +6 -6
- package/dist/platform/workflow-canvas-shell.js +5 -5
- package/dist/platform/workflow-canvas-shell.mjs +4 -4
- package/package.json +1 -1
- package/dist/chunk-33ZWFDVG.mjs.map +0 -1
- package/dist/chunk-5SCZB5UI.js.map +0 -1
- package/dist/chunk-WTSMTLSP.mjs.map +0 -1
- package/dist/chunk-ZIRD3X6G.js.map +0 -1
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
var chunk3T2WGL47_js = require('../../chunk-3T2WGL47.js');
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
5
|
+
var chunkOQM252SM_js = require('../../chunk-OQM252SM.js');
|
|
6
|
+
var chunkPADXORD2_js = require('../../chunk-PADXORD2.js');
|
|
7
|
+
var chunkKRS2CLPR_js = require('../../chunk-KRS2CLPR.js');
|
|
8
8
|
require('../../chunk-55H6WZQP.js');
|
|
9
9
|
require('../../chunk-DJDZIRM6.js');
|
|
10
|
-
require('../../chunk-
|
|
11
|
-
var
|
|
10
|
+
require('../../chunk-C4UYEHPY.js');
|
|
11
|
+
var chunkKZDABEML_js = require('../../chunk-KZDABEML.js');
|
|
12
|
+
require('../../chunk-Y5VN4SPH.js');
|
|
12
13
|
require('../../chunk-22XPYFHJ.js');
|
|
13
14
|
require('../../chunk-2OZZH2IO.js');
|
|
14
|
-
require('../../chunk-Y5VN4SPH.js');
|
|
15
15
|
require('../../chunk-6NEESZVO.js');
|
|
16
16
|
var chunkMXQ2EYG2_js = require('../../chunk-MXQ2EYG2.js');
|
|
17
17
|
require('../../chunk-UZ3CMNUJ.js');
|
|
@@ -70,7 +70,7 @@ function AgentsModelsPageView({ labels, models, loading }) {
|
|
|
70
70
|
setEnabledFilter("all");
|
|
71
71
|
};
|
|
72
72
|
const hero = /* @__PURE__ */ jsxRuntime.jsx(
|
|
73
|
-
|
|
73
|
+
chunkKZDABEML_js.HeroSection,
|
|
74
74
|
{
|
|
75
75
|
icon: /* @__PURE__ */ jsxRuntime.jsx(outline.CubeTransparentIcon, { className: "h-5 w-5" }),
|
|
76
76
|
label: labels.title,
|
|
@@ -78,7 +78,7 @@ function AgentsModelsPageView({ labels, models, loading }) {
|
|
|
78
78
|
subtitle: labels.subtitle,
|
|
79
79
|
gradient: "from-emerald-500 to-teal-700",
|
|
80
80
|
toolbar: !isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
81
|
-
|
|
81
|
+
chunkKZDABEML_js.SearchBar,
|
|
82
82
|
{
|
|
83
83
|
searchTerm,
|
|
84
84
|
onSearchChange: setSearchTerm,
|
|
@@ -95,8 +95,8 @@ function AgentsModelsPageView({ labels, models, loading }) {
|
|
|
95
95
|
count: filterCount,
|
|
96
96
|
onClear: filterCount > 0 ? clearAllFilters : void 0,
|
|
97
97
|
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-5", children: [
|
|
98
|
-
providerChipItems.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
99
|
-
|
|
98
|
+
providerChipItems.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.FormSection, { title: labels.filterByProvider ?? "Provedor", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
99
|
+
chunkKZDABEML_js.ChipPicker,
|
|
100
100
|
{
|
|
101
101
|
items: providerChipItems,
|
|
102
102
|
selectedIds: selectedProviders,
|
|
@@ -106,15 +106,15 @@ function AgentsModelsPageView({ labels, models, loading }) {
|
|
|
106
106
|
clearLabel: labels.clear ?? "Limpar"
|
|
107
107
|
}
|
|
108
108
|
) }),
|
|
109
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
109
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.FormSection, { title: labels.filterByStatus ?? "Status", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-2", children: ["all", "enabled", "disabled"].map((value) => enabledFilter === value ? /* @__PURE__ */ jsxRuntime.jsx(chunkMXQ2EYG2_js.Button, { type: "button", size: "sm", color: "ios-glass-blue", onClick: () => setEnabledFilter(value), children: statusLabelFor(value) }, value) : /* @__PURE__ */ jsxRuntime.jsx(chunkMXQ2EYG2_js.Button, { type: "button", size: "sm", outline: true, onClick: () => setEnabledFilter(value), children: statusLabelFor(value) }, value)) }) })
|
|
110
110
|
] })
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
113
|
) : void 0
|
|
114
114
|
}
|
|
115
115
|
);
|
|
116
|
-
const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
117
|
-
|
|
116
|
+
const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.PageLoadingState, {}) : isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.PageEmptyState, { title: labels.empty, message: labels.subtitle, iconName: "folder-open" }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3", children: filteredModels.map((model) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
117
|
+
chunkKZDABEML_js.EntityCard,
|
|
118
118
|
{
|
|
119
119
|
accentGradient: "from-emerald-500 to-teal-700",
|
|
120
120
|
icon: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-11 w-11 items-center justify-center rounded-lg bg-emerald-500/10 text-emerald-600 dark:bg-emerald-500/20 dark:text-emerald-400", children: /* @__PURE__ */ jsxRuntime.jsx(outline.CubeTransparentIcon, { className: "h-6 w-6" }) }),
|
|
@@ -183,7 +183,7 @@ function AgentsConfigPageView({ labels, agents, models, loading, onCreate, onUpd
|
|
|
183
183
|
setHasActiveVersion("all");
|
|
184
184
|
};
|
|
185
185
|
const hero = /* @__PURE__ */ jsxRuntime.jsx(
|
|
186
|
-
|
|
186
|
+
chunkKZDABEML_js.HeroSection,
|
|
187
187
|
{
|
|
188
188
|
icon: /* @__PURE__ */ jsxRuntime.jsx(outline.CpuChipIcon, { className: "h-5 w-5" }),
|
|
189
189
|
label: labels.title,
|
|
@@ -191,7 +191,7 @@ function AgentsConfigPageView({ labels, agents, models, loading, onCreate, onUpd
|
|
|
191
191
|
subtitle: labels.subtitle,
|
|
192
192
|
gradient: "from-violet-500 to-indigo-700",
|
|
193
193
|
toolbar: !isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
194
|
-
|
|
194
|
+
chunkKZDABEML_js.SearchBar,
|
|
195
195
|
{
|
|
196
196
|
searchTerm,
|
|
197
197
|
onSearchChange: setSearchTerm,
|
|
@@ -208,8 +208,8 @@ function AgentsConfigPageView({ labels, agents, models, loading, onCreate, onUpd
|
|
|
208
208
|
count: filterCount,
|
|
209
209
|
onClear: filterCount > 0 ? clearAllFilters : void 0,
|
|
210
210
|
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-5", children: [
|
|
211
|
-
modelChipItems.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
212
|
-
|
|
211
|
+
modelChipItems.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.FormSection, { title: labels.filterByModel ?? "Modelo", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
212
|
+
chunkKZDABEML_js.ChipPicker,
|
|
213
213
|
{
|
|
214
214
|
items: modelChipItems,
|
|
215
215
|
selectedIds: selectedModelIds,
|
|
@@ -219,13 +219,13 @@ function AgentsConfigPageView({ labels, agents, models, loading, onCreate, onUpd
|
|
|
219
219
|
clearLabel: labels.clear ?? "Limpar"
|
|
220
220
|
}
|
|
221
221
|
) }),
|
|
222
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
222
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.FormSection, { title: labels.filterByActiveVersion ?? "Vers\xE3o ativa", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-2", children: ["all", "with", "without"].map((value) => hasActiveVersion === value ? /* @__PURE__ */ jsxRuntime.jsx(chunkMXQ2EYG2_js.Button, { type: "button", size: "sm", color: "ios-glass-blue", onClick: () => setHasActiveVersion(value), children: versionLabelFor(value) }, value) : /* @__PURE__ */ jsxRuntime.jsx(chunkMXQ2EYG2_js.Button, { type: "button", size: "sm", outline: true, onClick: () => setHasActiveVersion(value), children: versionLabelFor(value) }, value)) }) })
|
|
223
223
|
] })
|
|
224
224
|
}
|
|
225
225
|
}
|
|
226
226
|
) : void 0,
|
|
227
227
|
actions: /* @__PURE__ */ jsxRuntime.jsx(
|
|
228
|
-
|
|
228
|
+
chunkKZDABEML_js.CreateActionButton,
|
|
229
229
|
{
|
|
230
230
|
mode: "desktop",
|
|
231
231
|
label: labels.addAgent,
|
|
@@ -236,7 +236,7 @@ function AgentsConfigPageView({ labels, agents, models, loading, onCreate, onUpd
|
|
|
236
236
|
}
|
|
237
237
|
);
|
|
238
238
|
const mobileAction = /* @__PURE__ */ jsxRuntime.jsx(
|
|
239
|
-
|
|
239
|
+
chunkKZDABEML_js.CreateActionButton,
|
|
240
240
|
{
|
|
241
241
|
mode: "mobile",
|
|
242
242
|
label: labels.addAgent,
|
|
@@ -244,10 +244,10 @@ function AgentsConfigPageView({ labels, agents, models, loading, onCreate, onUpd
|
|
|
244
244
|
accent: "violet"
|
|
245
245
|
}
|
|
246
246
|
);
|
|
247
|
-
const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
247
|
+
const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.PageLoadingState, {}) : isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.PageEmptyState, { title: labels.empty, message: labels.subtitle, iconName: "folder-open" }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3", children: filteredAgents.map((agent) => {
|
|
248
248
|
const modelRecord = models.find((model) => model.id === String(agent.modelId ?? ""));
|
|
249
249
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
250
|
-
|
|
250
|
+
chunkKZDABEML_js.EntityCard,
|
|
251
251
|
{
|
|
252
252
|
accentGradient: "from-violet-500 to-indigo-700",
|
|
253
253
|
icon: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-11 w-11 items-center justify-center rounded-lg bg-violet-500/10 text-violet-600 dark:bg-violet-500/20 dark:text-violet-400", children: /* @__PURE__ */ jsxRuntime.jsx(outline.CpuChipIcon, { className: "h-6 w-6" }) }),
|
|
@@ -284,7 +284,7 @@ function AgentsConfigPageView({ labels, agents, models, loading, onCreate, onUpd
|
|
|
284
284
|
);
|
|
285
285
|
}) });
|
|
286
286
|
const renderForm = (initial, onSubmit) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
287
|
-
|
|
287
|
+
chunkKZDABEML_js.GlassModal,
|
|
288
288
|
{
|
|
289
289
|
open: true,
|
|
290
290
|
onClose: () => {
|
|
@@ -307,13 +307,13 @@ function AgentsConfigPageView({ labels, agents, models, loading, onCreate, onUpd
|
|
|
307
307
|
outputSchema: String(form.get("outputSchema") ?? "").trim() || void 0
|
|
308
308
|
});
|
|
309
309
|
},
|
|
310
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
311
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
312
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
313
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
314
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
315
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
316
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
310
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(chunkKZDABEML_js.FormGrid, { children: [
|
|
311
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.FormInput, { name: "name", label: labels.name, defaultValue: initial.name ?? "", required: true }),
|
|
312
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.FormSelect, { name: "modelId", label: labels.model, options: modelOptions, defaultValue: initial.modelId ?? modelOptions[0]?.value ?? "", required: true }),
|
|
313
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.FormInput, { name: "maxTokens", label: String(labels.maxTokens), type: "number", defaultValue: String(initial.maxTokens ?? 2048) }),
|
|
314
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.FormInput, { name: "temperature", label: labels.temperature, type: "number", step: 0.1, min: 0, max: 2, defaultValue: String(initial.temperature ?? 0.2) }),
|
|
315
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.FormTextarea, { name: "systemPrompt", label: labels.systemPrompt, defaultValue: initial.systemPrompt ?? "", rows: 4 }),
|
|
316
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.FormTextarea, { name: "outputSchema", label: labels.outputSchema, placeholder: labels.outputSchemaPlaceholder, defaultValue: initial.outputSchema ?? "", rows: 4 })
|
|
317
317
|
] })
|
|
318
318
|
}
|
|
319
319
|
);
|
|
@@ -437,7 +437,7 @@ function AgentsPromptsPageView({ labels, agents, prompts, loading, onCreate, onA
|
|
|
437
437
|
setActiveFilter("all");
|
|
438
438
|
};
|
|
439
439
|
const hero = /* @__PURE__ */ jsxRuntime.jsx(
|
|
440
|
-
|
|
440
|
+
chunkKZDABEML_js.HeroSection,
|
|
441
441
|
{
|
|
442
442
|
icon: /* @__PURE__ */ jsxRuntime.jsx(outline.ChatBubbleLeftEllipsisIcon, { className: "h-5 w-5" }),
|
|
443
443
|
label: labels.title,
|
|
@@ -445,7 +445,7 @@ function AgentsPromptsPageView({ labels, agents, prompts, loading, onCreate, onA
|
|
|
445
445
|
subtitle: labels.subtitle,
|
|
446
446
|
gradient: "from-sky-500 to-blue-700",
|
|
447
447
|
toolbar: !isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
448
|
-
|
|
448
|
+
chunkKZDABEML_js.SearchBar,
|
|
449
449
|
{
|
|
450
450
|
searchTerm,
|
|
451
451
|
onSearchChange: setSearchTerm,
|
|
@@ -462,8 +462,8 @@ function AgentsPromptsPageView({ labels, agents, prompts, loading, onCreate, onA
|
|
|
462
462
|
count: filterCount,
|
|
463
463
|
onClear: filterCount > 0 ? clearAllFilters : void 0,
|
|
464
464
|
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-5", children: [
|
|
465
|
-
agentChipItems.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
466
|
-
|
|
465
|
+
agentChipItems.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.FormSection, { title: labels.filterByAgent ?? "Agente", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
466
|
+
chunkKZDABEML_js.ChipPicker,
|
|
467
467
|
{
|
|
468
468
|
items: agentChipItems,
|
|
469
469
|
selectedIds: selectedAgentIds,
|
|
@@ -473,8 +473,8 @@ function AgentsPromptsPageView({ labels, agents, prompts, loading, onCreate, onA
|
|
|
473
473
|
clearLabel: labels.clear ?? "Limpar"
|
|
474
474
|
}
|
|
475
475
|
) }),
|
|
476
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
477
|
-
|
|
476
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.FormSection, { title: labels.filterByLocale ?? "Idioma", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
477
|
+
chunkKZDABEML_js.ChipPicker,
|
|
478
478
|
{
|
|
479
479
|
items: localeChipItems,
|
|
480
480
|
selectedIds: selectedLocales,
|
|
@@ -484,13 +484,13 @@ function AgentsPromptsPageView({ labels, agents, prompts, loading, onCreate, onA
|
|
|
484
484
|
clearLabel: labels.clear ?? "Limpar"
|
|
485
485
|
}
|
|
486
486
|
) }),
|
|
487
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
487
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.FormSection, { title: labels.filterByActive ?? "Status", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-2", children: ["all", "active", "inactive"].map((value) => activeFilter === value ? /* @__PURE__ */ jsxRuntime.jsx(chunkMXQ2EYG2_js.Button, { type: "button", size: "sm", color: "ios-glass-blue", onClick: () => setActiveFilter(value), children: activeLabelFor(value) }, value) : /* @__PURE__ */ jsxRuntime.jsx(chunkMXQ2EYG2_js.Button, { type: "button", size: "sm", outline: true, onClick: () => setActiveFilter(value), children: activeLabelFor(value) }, value)) }) })
|
|
488
488
|
] })
|
|
489
489
|
}
|
|
490
490
|
}
|
|
491
491
|
) : void 0,
|
|
492
492
|
actions: /* @__PURE__ */ jsxRuntime.jsx(
|
|
493
|
-
|
|
493
|
+
chunkKZDABEML_js.CreateActionButton,
|
|
494
494
|
{
|
|
495
495
|
mode: "desktop",
|
|
496
496
|
label: labels.addPrompt,
|
|
@@ -501,7 +501,7 @@ function AgentsPromptsPageView({ labels, agents, prompts, loading, onCreate, onA
|
|
|
501
501
|
}
|
|
502
502
|
);
|
|
503
503
|
const mobileAction = /* @__PURE__ */ jsxRuntime.jsx(
|
|
504
|
-
|
|
504
|
+
chunkKZDABEML_js.CreateActionButton,
|
|
505
505
|
{
|
|
506
506
|
mode: "mobile",
|
|
507
507
|
label: labels.addPrompt,
|
|
@@ -509,11 +509,11 @@ function AgentsPromptsPageView({ labels, agents, prompts, loading, onCreate, onA
|
|
|
509
509
|
accent: "sky"
|
|
510
510
|
}
|
|
511
511
|
);
|
|
512
|
-
const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
512
|
+
const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.PageLoadingState, {}) : isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.PageEmptyState, { title: labels.empty, message: labels.subtitle, iconName: "folder-open" }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3", children: filteredPrompts.map((prompt) => {
|
|
513
513
|
const agentName = agentNameById.get(prompt.agentId) ?? prompt.agentId;
|
|
514
514
|
const key = `${prompt.agentId}:${prompt.locale}:${prompt.version}`;
|
|
515
515
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
516
|
-
|
|
516
|
+
chunkKZDABEML_js.EntityCard,
|
|
517
517
|
{
|
|
518
518
|
accentGradient: "from-sky-500 to-blue-700",
|
|
519
519
|
icon: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-11 w-11 items-center justify-center rounded-lg bg-sky-500/10 text-sky-600 dark:bg-sky-500/20 dark:text-sky-400", children: /* @__PURE__ */ jsxRuntime.jsx(outline.ChatBubbleLeftEllipsisIcon, { className: "h-6 w-6" }) }),
|
|
@@ -547,7 +547,7 @@ function AgentsPromptsPageView({ labels, agents, prompts, loading, onCreate, onA
|
|
|
547
547
|
mobileAction
|
|
548
548
|
] }),
|
|
549
549
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
550
|
-
|
|
550
|
+
chunkKZDABEML_js.GlassModal,
|
|
551
551
|
{
|
|
552
552
|
open: createOpen,
|
|
553
553
|
onClose: () => setCreateOpen(false),
|
|
@@ -571,11 +571,11 @@ function AgentsPromptsPageView({ labels, agents, prompts, loading, onCreate, onA
|
|
|
571
571
|
});
|
|
572
572
|
setCreateOpen(false);
|
|
573
573
|
},
|
|
574
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
575
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
576
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
574
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(chunkKZDABEML_js.FormGrid, { children: [
|
|
575
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.FormSelect, { name: "agentId", label: labels.agent, options: agentOptions, required: true }),
|
|
576
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.FormSelect, { name: "locale", label: labels.locale, options: LOCALE_OPTIONS, defaultValue: "en" }),
|
|
577
577
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
578
|
-
|
|
578
|
+
chunkKZDABEML_js.FormSelect,
|
|
579
579
|
{
|
|
580
580
|
name: "isActive",
|
|
581
581
|
label: labels.isActive,
|
|
@@ -583,10 +583,10 @@ function AgentsPromptsPageView({ labels, agents, prompts, loading, onCreate, onA
|
|
|
583
583
|
defaultValue: "true"
|
|
584
584
|
}
|
|
585
585
|
),
|
|
586
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
587
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
588
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
589
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
586
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.FormInput, { name: "reason", label: labels.reason }),
|
|
587
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.FormTextarea, { name: "systemPrompt", label: labels.systemPrompt, rows: 3 }),
|
|
588
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.FormTextarea, { name: "userTemplate", label: labels.userTemplate, rows: 3 }),
|
|
589
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.FormTextarea, { name: "prompt", label: labels.prompt, rows: 6, required: true })
|
|
590
590
|
] })
|
|
591
591
|
}
|
|
592
592
|
)
|
|
@@ -659,7 +659,7 @@ function AgentsToolDefinitionsPageView({ labels, tools, loading, onCreate, onUpd
|
|
|
659
659
|
setSelectedToolTypes([]);
|
|
660
660
|
};
|
|
661
661
|
const hero = /* @__PURE__ */ jsxRuntime.jsx(
|
|
662
|
-
|
|
662
|
+
chunkKZDABEML_js.HeroSection,
|
|
663
663
|
{
|
|
664
664
|
icon: /* @__PURE__ */ jsxRuntime.jsx(outline.WrenchScrewdriverIcon, { className: "h-5 w-5" }),
|
|
665
665
|
label: labels.title,
|
|
@@ -667,7 +667,7 @@ function AgentsToolDefinitionsPageView({ labels, tools, loading, onCreate, onUpd
|
|
|
667
667
|
subtitle: labels.subtitle,
|
|
668
668
|
gradient: "from-amber-500 to-orange-700",
|
|
669
669
|
toolbar: !isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
670
|
-
|
|
670
|
+
chunkKZDABEML_js.SearchBar,
|
|
671
671
|
{
|
|
672
672
|
searchTerm,
|
|
673
673
|
onSearchChange: setSearchTerm,
|
|
@@ -683,8 +683,8 @@ function AgentsToolDefinitionsPageView({ labels, tools, loading, onCreate, onUpd
|
|
|
683
683
|
title: labels.filtersTitle ?? "Filtros",
|
|
684
684
|
count: filterCount,
|
|
685
685
|
onClear: filterCount > 0 ? clearAllFilters : void 0,
|
|
686
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-5", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
687
|
-
|
|
686
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-5", children: /* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.FormSection, { title: labels.filterByToolType ?? "Tipo de ferramenta", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
687
|
+
chunkKZDABEML_js.ChipPicker,
|
|
688
688
|
{
|
|
689
689
|
items: toolTypeChipItems,
|
|
690
690
|
selectedIds: selectedToolTypes,
|
|
@@ -698,7 +698,7 @@ function AgentsToolDefinitionsPageView({ labels, tools, loading, onCreate, onUpd
|
|
|
698
698
|
}
|
|
699
699
|
) : void 0,
|
|
700
700
|
actions: /* @__PURE__ */ jsxRuntime.jsx(
|
|
701
|
-
|
|
701
|
+
chunkKZDABEML_js.CreateActionButton,
|
|
702
702
|
{
|
|
703
703
|
mode: "desktop",
|
|
704
704
|
label: labels.addTool,
|
|
@@ -709,7 +709,7 @@ function AgentsToolDefinitionsPageView({ labels, tools, loading, onCreate, onUpd
|
|
|
709
709
|
}
|
|
710
710
|
);
|
|
711
711
|
const mobileAction = /* @__PURE__ */ jsxRuntime.jsx(
|
|
712
|
-
|
|
712
|
+
chunkKZDABEML_js.CreateActionButton,
|
|
713
713
|
{
|
|
714
714
|
mode: "mobile",
|
|
715
715
|
label: labels.addTool,
|
|
@@ -717,8 +717,8 @@ function AgentsToolDefinitionsPageView({ labels, tools, loading, onCreate, onUpd
|
|
|
717
717
|
accent: "amber"
|
|
718
718
|
}
|
|
719
719
|
);
|
|
720
|
-
const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
721
|
-
|
|
720
|
+
const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.PageLoadingState, {}) : isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.PageEmptyState, { title: labels.empty, message: labels.subtitle, iconName: "folder-open" }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3", children: filteredTools.map((tool) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
721
|
+
chunkKZDABEML_js.EntityCard,
|
|
722
722
|
{
|
|
723
723
|
accentGradient: "from-amber-500 to-orange-700",
|
|
724
724
|
icon: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-11 w-11 items-center justify-center rounded-lg bg-amber-500/10 text-amber-600 dark:bg-amber-500/20 dark:text-amber-400", children: /* @__PURE__ */ jsxRuntime.jsx(outline.WrenchScrewdriverIcon, { className: "h-6 w-6" }) }),
|
|
@@ -807,7 +807,7 @@ function ToolEditor({
|
|
|
807
807
|
setValue((v) => ({ ...v, [key]: next }));
|
|
808
808
|
};
|
|
809
809
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
810
|
-
|
|
810
|
+
chunkKZDABEML_js.GlassModal,
|
|
811
811
|
{
|
|
812
812
|
open: true,
|
|
813
813
|
onClose,
|
|
@@ -820,9 +820,9 @@ function ToolEditor({
|
|
|
820
820
|
handleSubmit();
|
|
821
821
|
},
|
|
822
822
|
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-5", children: [
|
|
823
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
823
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkKZDABEML_js.FormGrid, { children: [
|
|
824
824
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
825
|
-
|
|
825
|
+
chunkKZDABEML_js.FormInput,
|
|
826
826
|
{
|
|
827
827
|
label: "Name",
|
|
828
828
|
required: true,
|
|
@@ -832,7 +832,7 @@ function ToolEditor({
|
|
|
832
832
|
}
|
|
833
833
|
),
|
|
834
834
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
835
|
-
|
|
835
|
+
chunkKZDABEML_js.FormSelect,
|
|
836
836
|
{
|
|
837
837
|
label: "Tool type",
|
|
838
838
|
value: value.toolType,
|
|
@@ -842,7 +842,7 @@ function ToolEditor({
|
|
|
842
842
|
}
|
|
843
843
|
),
|
|
844
844
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
845
|
-
|
|
845
|
+
chunkKZDABEML_js.FormSelect,
|
|
846
846
|
{
|
|
847
847
|
label: "Enabled",
|
|
848
848
|
value: value.enabled ? "true" : "false",
|
|
@@ -851,7 +851,7 @@ function ToolEditor({
|
|
|
851
851
|
}
|
|
852
852
|
),
|
|
853
853
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
854
|
-
|
|
854
|
+
chunkKZDABEML_js.FormInput,
|
|
855
855
|
{
|
|
856
856
|
label: "Icon (optional)",
|
|
857
857
|
value: value.icon ?? "",
|
|
@@ -861,7 +861,7 @@ function ToolEditor({
|
|
|
861
861
|
)
|
|
862
862
|
] }),
|
|
863
863
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
864
|
-
|
|
864
|
+
chunkKZDABEML_js.FormTextarea,
|
|
865
865
|
{
|
|
866
866
|
label: "Description",
|
|
867
867
|
rows: 2,
|
|
@@ -909,7 +909,7 @@ function ParametersEditor({
|
|
|
909
909
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
910
910
|
parameters.map((param, index) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-[1fr_160px_1fr_110px_auto] items-end gap-2", children: [
|
|
911
911
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
912
|
-
|
|
912
|
+
chunkKZDABEML_js.FormInput,
|
|
913
913
|
{
|
|
914
914
|
label: "Name",
|
|
915
915
|
value: param.name,
|
|
@@ -918,7 +918,7 @@ function ParametersEditor({
|
|
|
918
918
|
}
|
|
919
919
|
),
|
|
920
920
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
921
|
-
|
|
921
|
+
chunkKZDABEML_js.FormSelect,
|
|
922
922
|
{
|
|
923
923
|
label: "Type",
|
|
924
924
|
value: param.type,
|
|
@@ -927,7 +927,7 @@ function ParametersEditor({
|
|
|
927
927
|
}
|
|
928
928
|
),
|
|
929
929
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
930
|
-
|
|
930
|
+
chunkKZDABEML_js.FormInput,
|
|
931
931
|
{
|
|
932
932
|
label: "Description",
|
|
933
933
|
value: param.description,
|
|
@@ -961,9 +961,9 @@ function HandlerConfigEditor({
|
|
|
961
961
|
if (toolType === "http") {
|
|
962
962
|
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "rounded-xl border border-slate-200 bg-slate-50/60 p-3 dark:border-slate-700 dark:bg-slate-900/40", children: [
|
|
963
963
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "mb-2 text-sm font-semibold text-slate-700 dark:text-slate-200", children: "HTTP handler" }),
|
|
964
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
964
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkKZDABEML_js.FormGrid, { children: [
|
|
965
965
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
966
|
-
|
|
966
|
+
chunkKZDABEML_js.FormSelect,
|
|
967
967
|
{
|
|
968
968
|
label: "Method",
|
|
969
969
|
value: stringProp(config, "method", "GET"),
|
|
@@ -972,7 +972,7 @@ function HandlerConfigEditor({
|
|
|
972
972
|
}
|
|
973
973
|
),
|
|
974
974
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
975
|
-
|
|
975
|
+
chunkKZDABEML_js.FormInput,
|
|
976
976
|
{
|
|
977
977
|
label: "URL template",
|
|
978
978
|
value: stringProp(config, "url"),
|
|
@@ -982,7 +982,7 @@ function HandlerConfigEditor({
|
|
|
982
982
|
)
|
|
983
983
|
] }),
|
|
984
984
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
985
|
-
|
|
985
|
+
chunkKZDABEML_js.FormTextarea,
|
|
986
986
|
{
|
|
987
987
|
label: "Headers (JSON)",
|
|
988
988
|
rows: 3,
|
|
@@ -992,7 +992,7 @@ function HandlerConfigEditor({
|
|
|
992
992
|
}
|
|
993
993
|
),
|
|
994
994
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
995
|
-
|
|
995
|
+
chunkKZDABEML_js.FormTextarea,
|
|
996
996
|
{
|
|
997
997
|
label: "Body template",
|
|
998
998
|
rows: 3,
|
|
@@ -1007,7 +1007,7 @@ function HandlerConfigEditor({
|
|
|
1007
1007
|
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "rounded-xl border border-slate-200 bg-slate-50/60 p-3 dark:border-slate-700 dark:bg-slate-900/40", children: [
|
|
1008
1008
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "mb-2 text-sm font-semibold text-slate-700 dark:text-slate-200", children: "Function handler" }),
|
|
1009
1009
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1010
|
-
|
|
1010
|
+
chunkKZDABEML_js.FormInput,
|
|
1011
1011
|
{
|
|
1012
1012
|
label: "Implementation key",
|
|
1013
1013
|
value: stringProp(config, "implementationKey"),
|
|
@@ -1021,9 +1021,9 @@ function HandlerConfigEditor({
|
|
|
1021
1021
|
if (toolType === "database_query") {
|
|
1022
1022
|
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "rounded-xl border border-slate-200 bg-slate-50/60 p-3 dark:border-slate-700 dark:bg-slate-900/40", children: [
|
|
1023
1023
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "mb-2 text-sm font-semibold text-slate-700 dark:text-slate-200", children: "Database query handler" }),
|
|
1024
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1024
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkKZDABEML_js.FormGrid, { children: [
|
|
1025
1025
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1026
|
-
|
|
1026
|
+
chunkKZDABEML_js.FormInput,
|
|
1027
1027
|
{
|
|
1028
1028
|
label: "Datasource ID",
|
|
1029
1029
|
value: stringProp(config, "datasourceId"),
|
|
@@ -1032,7 +1032,7 @@ function HandlerConfigEditor({
|
|
|
1032
1032
|
}
|
|
1033
1033
|
),
|
|
1034
1034
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1035
|
-
|
|
1035
|
+
chunkKZDABEML_js.FormInput,
|
|
1036
1036
|
{
|
|
1037
1037
|
label: "Max rows",
|
|
1038
1038
|
type: "number",
|
|
@@ -1042,7 +1042,7 @@ function HandlerConfigEditor({
|
|
|
1042
1042
|
)
|
|
1043
1043
|
] }),
|
|
1044
1044
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1045
|
-
|
|
1045
|
+
chunkKZDABEML_js.FormTextarea,
|
|
1046
1046
|
{
|
|
1047
1047
|
label: "Query template",
|
|
1048
1048
|
rows: 4,
|
|
@@ -1058,7 +1058,7 @@ function HandlerConfigEditor({
|
|
|
1058
1058
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "mb-2 text-sm font-semibold text-slate-700 dark:text-slate-200", children: "Code execution handler" }),
|
|
1059
1059
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-2 text-xs text-amber-600 dark:text-amber-400", children: "Experimental \u2014 sandbox is not yet enforced. Only enable for trusted tools." }),
|
|
1060
1060
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1061
|
-
|
|
1061
|
+
chunkKZDABEML_js.FormSelect,
|
|
1062
1062
|
{
|
|
1063
1063
|
label: "Language",
|
|
1064
1064
|
value: stringProp(config, "language", "javascript"),
|
|
@@ -1070,7 +1070,7 @@ function HandlerConfigEditor({
|
|
|
1070
1070
|
}
|
|
1071
1071
|
),
|
|
1072
1072
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1073
|
-
|
|
1073
|
+
chunkKZDABEML_js.FormTextarea,
|
|
1074
1074
|
{
|
|
1075
1075
|
label: "Code",
|
|
1076
1076
|
rows: 6,
|
|
@@ -1083,9 +1083,9 @@ function HandlerConfigEditor({
|
|
|
1083
1083
|
}
|
|
1084
1084
|
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "rounded-xl border border-slate-200 bg-slate-50/60 p-3 dark:border-slate-700 dark:bg-slate-900/40", children: [
|
|
1085
1085
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "mb-2 text-sm font-semibold text-slate-700 dark:text-slate-200", children: "API call handler" }),
|
|
1086
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1086
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkKZDABEML_js.FormGrid, { children: [
|
|
1087
1087
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1088
|
-
|
|
1088
|
+
chunkKZDABEML_js.FormInput,
|
|
1089
1089
|
{
|
|
1090
1090
|
label: "URL",
|
|
1091
1091
|
value: stringProp(config, "url"),
|
|
@@ -1093,7 +1093,7 @@ function HandlerConfigEditor({
|
|
|
1093
1093
|
}
|
|
1094
1094
|
),
|
|
1095
1095
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1096
|
-
|
|
1096
|
+
chunkKZDABEML_js.FormSelect,
|
|
1097
1097
|
{
|
|
1098
1098
|
label: "Auth",
|
|
1099
1099
|
value: stringProp(config, "authType", "bearer"),
|
|
@@ -1107,7 +1107,7 @@ function HandlerConfigEditor({
|
|
|
1107
1107
|
}
|
|
1108
1108
|
),
|
|
1109
1109
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1110
|
-
|
|
1110
|
+
chunkKZDABEML_js.FormInput,
|
|
1111
1111
|
{
|
|
1112
1112
|
label: "Credential secret id",
|
|
1113
1113
|
value: stringProp(config, "credentialRef"),
|
|
@@ -1282,7 +1282,7 @@ function RulesPageView({ labels, rules, loading, onCreate, onUpdate, onDelete, o
|
|
|
1282
1282
|
setExpiryFilter("all");
|
|
1283
1283
|
};
|
|
1284
1284
|
const hero = /* @__PURE__ */ jsxRuntime.jsx(
|
|
1285
|
-
|
|
1285
|
+
chunkKZDABEML_js.HeroSection,
|
|
1286
1286
|
{
|
|
1287
1287
|
icon: /* @__PURE__ */ jsxRuntime.jsx(outline.AdjustmentsHorizontalIcon, { className: "h-5 w-5" }),
|
|
1288
1288
|
label: labels.title,
|
|
@@ -1290,7 +1290,7 @@ function RulesPageView({ labels, rules, loading, onCreate, onUpdate, onDelete, o
|
|
|
1290
1290
|
subtitle: labels.subtitle,
|
|
1291
1291
|
gradient: "from-fuchsia-500 to-purple-700",
|
|
1292
1292
|
toolbar: !isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1293
|
-
|
|
1293
|
+
chunkKZDABEML_js.SearchBar,
|
|
1294
1294
|
{
|
|
1295
1295
|
searchTerm,
|
|
1296
1296
|
onSearchChange: setSearchTerm,
|
|
@@ -1307,14 +1307,14 @@ function RulesPageView({ labels, rules, loading, onCreate, onUpdate, onDelete, o
|
|
|
1307
1307
|
count: filterCount,
|
|
1308
1308
|
onClear: filterCount > 0 ? clearAllFilters : void 0,
|
|
1309
1309
|
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-5", children: [
|
|
1310
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1311
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1310
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.FormSection, { title: labels.filterByStatus ?? "Status", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-2", children: ["all", "enabled", "disabled"].map((value) => enabledFilter === value ? /* @__PURE__ */ jsxRuntime.jsx(chunkMXQ2EYG2_js.Button, { type: "button", size: "sm", color: "ios-glass-blue", onClick: () => setEnabledFilter(value), children: statusLabelFor(value) }, value) : /* @__PURE__ */ jsxRuntime.jsx(chunkMXQ2EYG2_js.Button, { type: "button", size: "sm", outline: true, onClick: () => setEnabledFilter(value), children: statusLabelFor(value) }, value)) }) }),
|
|
1311
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.FormSection, { title: labels.filterByExpiry ?? "Validade", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-2", children: ["all", "expiring", "noExpiry"].map((value) => expiryFilter === value ? /* @__PURE__ */ jsxRuntime.jsx(chunkMXQ2EYG2_js.Button, { type: "button", size: "sm", color: "ios-glass-blue", onClick: () => setExpiryFilter(value), children: expiryLabelFor(value) }, value) : /* @__PURE__ */ jsxRuntime.jsx(chunkMXQ2EYG2_js.Button, { type: "button", size: "sm", outline: true, onClick: () => setExpiryFilter(value), children: expiryLabelFor(value) }, value)) }) })
|
|
1312
1312
|
] })
|
|
1313
1313
|
}
|
|
1314
1314
|
}
|
|
1315
1315
|
) : void 0,
|
|
1316
1316
|
actions: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1317
|
-
|
|
1317
|
+
chunkKZDABEML_js.CreateActionButton,
|
|
1318
1318
|
{
|
|
1319
1319
|
mode: "desktop",
|
|
1320
1320
|
label: labels.addRule,
|
|
@@ -1325,7 +1325,7 @@ function RulesPageView({ labels, rules, loading, onCreate, onUpdate, onDelete, o
|
|
|
1325
1325
|
}
|
|
1326
1326
|
);
|
|
1327
1327
|
const mobileAction = /* @__PURE__ */ jsxRuntime.jsx(
|
|
1328
|
-
|
|
1328
|
+
chunkKZDABEML_js.CreateActionButton,
|
|
1329
1329
|
{
|
|
1330
1330
|
mode: "mobile",
|
|
1331
1331
|
label: labels.addRule,
|
|
@@ -1333,8 +1333,8 @@ function RulesPageView({ labels, rules, loading, onCreate, onUpdate, onDelete, o
|
|
|
1333
1333
|
accent: "fuchsia"
|
|
1334
1334
|
}
|
|
1335
1335
|
);
|
|
1336
|
-
const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1337
|
-
|
|
1336
|
+
const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.PageLoadingState, {}) : isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.PageEmptyState, { title: labels.empty, message: labels.subtitle, iconName: "folder-open" }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3", children: filteredRules.map((rule) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1337
|
+
chunkKZDABEML_js.EntityCard,
|
|
1338
1338
|
{
|
|
1339
1339
|
accentGradient: "from-fuchsia-500 to-purple-700",
|
|
1340
1340
|
icon: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-11 w-11 items-center justify-center rounded-lg bg-fuchsia-500/10 text-fuchsia-600 dark:bg-fuchsia-500/20 dark:text-fuchsia-400", children: /* @__PURE__ */ jsxRuntime.jsx(outline.AdjustmentsHorizontalIcon, { className: "h-6 w-6" }) }),
|
|
@@ -1371,7 +1371,7 @@ function RulesPageView({ labels, rules, loading, onCreate, onUpdate, onDelete, o
|
|
|
1371
1371
|
{
|
|
1372
1372
|
title: labels.createTitle,
|
|
1373
1373
|
saveLabel: labels.save,
|
|
1374
|
-
initial:
|
|
1374
|
+
initial: chunkKRS2CLPR_js.defaultRuleForm(),
|
|
1375
1375
|
onClose: () => setCreateOpen(false),
|
|
1376
1376
|
onSubmit: (value) => {
|
|
1377
1377
|
onCreate(value);
|
|
@@ -1403,7 +1403,7 @@ function RuleEditor({
|
|
|
1403
1403
|
}) {
|
|
1404
1404
|
const [value, setValue] = react.useState(initial);
|
|
1405
1405
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1406
|
-
|
|
1406
|
+
chunkKZDABEML_js.GlassModal,
|
|
1407
1407
|
{
|
|
1408
1408
|
open: true,
|
|
1409
1409
|
onClose,
|
|
@@ -1415,12 +1415,12 @@ function RuleEditor({
|
|
|
1415
1415
|
event.preventDefault();
|
|
1416
1416
|
onSubmit(value);
|
|
1417
1417
|
},
|
|
1418
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1418
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(chunkKRS2CLPR_js.RuleForm, { value, onChange: setValue })
|
|
1419
1419
|
}
|
|
1420
1420
|
);
|
|
1421
1421
|
}
|
|
1422
1422
|
function ruleToFormValue(rule) {
|
|
1423
|
-
const base =
|
|
1423
|
+
const base = chunkKRS2CLPR_js.defaultRuleForm();
|
|
1424
1424
|
const rawCondition = rule.condition ?? rule.conditions;
|
|
1425
1425
|
const rawAction = pickAction(rule);
|
|
1426
1426
|
return {
|
|
@@ -1557,7 +1557,7 @@ var SAMPLE_DATASOURCES = [
|
|
|
1557
1557
|
];
|
|
1558
1558
|
function getDialectLabel(dialect) {
|
|
1559
1559
|
if (!dialect) return "Unknown";
|
|
1560
|
-
for (const category of
|
|
1560
|
+
for (const category of chunkPADXORD2_js.DIALECT_CATEGORIES) {
|
|
1561
1561
|
const found = category.dialects.find((d) => d.value === dialect);
|
|
1562
1562
|
if (found) return found.label;
|
|
1563
1563
|
}
|
|
@@ -1565,12 +1565,12 @@ function getDialectLabel(dialect) {
|
|
|
1565
1565
|
}
|
|
1566
1566
|
function getDialectGradient(dialect) {
|
|
1567
1567
|
if (!dialect) return "from-gray-400 to-gray-500";
|
|
1568
|
-
const category =
|
|
1568
|
+
const category = chunkPADXORD2_js.findCategory(dialect);
|
|
1569
1569
|
return category?.gradient ?? "from-gray-400 to-gray-500";
|
|
1570
1570
|
}
|
|
1571
1571
|
function getDialectIcon(dialect) {
|
|
1572
1572
|
if (!dialect) return outline.CircleStackIcon;
|
|
1573
|
-
const category =
|
|
1573
|
+
const category = chunkPADXORD2_js.findCategory(dialect);
|
|
1574
1574
|
return category?.icon ?? outline.CircleStackIcon;
|
|
1575
1575
|
}
|
|
1576
1576
|
var DIALECT_LOGO = {
|
|
@@ -1633,7 +1633,7 @@ function DatasourcesPageView({
|
|
|
1633
1633
|
});
|
|
1634
1634
|
}, [datasources, searchTerm, selectedDialects, enabledFilter, readOnlyFilter]);
|
|
1635
1635
|
const dialectChipItems = react.useMemo(
|
|
1636
|
-
() =>
|
|
1636
|
+
() => chunkPADXORD2_js.DIALECT_CATEGORIES.flatMap(
|
|
1637
1637
|
(cat) => cat.dialects.map((d) => ({
|
|
1638
1638
|
id: d.value,
|
|
1639
1639
|
name: d.label,
|
|
@@ -1702,7 +1702,7 @@ function DatasourcesPageView({
|
|
|
1702
1702
|
}
|
|
1703
1703
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
1704
1704
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1705
|
-
|
|
1705
|
+
chunkKZDABEML_js.HeroSection,
|
|
1706
1706
|
{
|
|
1707
1707
|
icon: /* @__PURE__ */ jsxRuntime.jsx(outline.CircleStackIcon, { className: "h-5 w-5" }),
|
|
1708
1708
|
label: labels.title,
|
|
@@ -1710,7 +1710,7 @@ function DatasourcesPageView({
|
|
|
1710
1710
|
subtitle: labels.subtitle,
|
|
1711
1711
|
gradient: "from-amber-500 to-orange-600",
|
|
1712
1712
|
toolbar: !isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1713
|
-
|
|
1713
|
+
chunkKZDABEML_js.SearchBar,
|
|
1714
1714
|
{
|
|
1715
1715
|
searchTerm,
|
|
1716
1716
|
onSearchChange: setSearchTerm,
|
|
@@ -1727,8 +1727,8 @@ function DatasourcesPageView({
|
|
|
1727
1727
|
count: filterCount,
|
|
1728
1728
|
onClear: filterCount > 0 ? clearAllFilters : void 0,
|
|
1729
1729
|
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-5", children: [
|
|
1730
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1731
|
-
|
|
1730
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.FormSection, { title: labels.filterByDialect ?? labels.dialect ?? "Dialeto", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1731
|
+
chunkKZDABEML_js.ChipPicker,
|
|
1732
1732
|
{
|
|
1733
1733
|
items: dialectChipItems,
|
|
1734
1734
|
selectedIds: selectedDialects,
|
|
@@ -1738,14 +1738,14 @@ function DatasourcesPageView({
|
|
|
1738
1738
|
clearLabel: labels.clear ?? "Limpar"
|
|
1739
1739
|
}
|
|
1740
1740
|
) }),
|
|
1741
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1742
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1741
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.FormSection, { title: labels.filterByStatus ?? "Status", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-2", children: ["all", "enabled", "disabled"].map((value) => enabledFilter === value ? /* @__PURE__ */ jsxRuntime.jsx(chunkMXQ2EYG2_js.Button, { type: "button", size: "sm", color: "ios-glass-blue", onClick: () => setEnabledFilter(value), children: enabledLabelFor(value) }, value) : /* @__PURE__ */ jsxRuntime.jsx(chunkMXQ2EYG2_js.Button, { type: "button", size: "sm", outline: true, onClick: () => setEnabledFilter(value), children: enabledLabelFor(value) }, value)) }) }),
|
|
1742
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.FormSection, { title: labels.filterByReadOnly ?? "Modo de acesso", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-2", children: ["all", "readOnly", "writable"].map((value) => readOnlyFilter === value ? /* @__PURE__ */ jsxRuntime.jsx(chunkMXQ2EYG2_js.Button, { type: "button", size: "sm", color: "ios-glass-blue", onClick: () => setReadOnlyFilter(value), children: readOnlyLabelFor(value) }, value) : /* @__PURE__ */ jsxRuntime.jsx(chunkMXQ2EYG2_js.Button, { type: "button", size: "sm", outline: true, onClick: () => setReadOnlyFilter(value), children: readOnlyLabelFor(value) }, value)) }) })
|
|
1743
1743
|
] })
|
|
1744
1744
|
}
|
|
1745
1745
|
}
|
|
1746
1746
|
) : void 0,
|
|
1747
1747
|
actions: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1748
|
-
|
|
1748
|
+
chunkKZDABEML_js.CreateActionButton,
|
|
1749
1749
|
{
|
|
1750
1750
|
mode: "desktop",
|
|
1751
1751
|
label: labels.addDatasource,
|
|
@@ -1756,7 +1756,7 @@ function DatasourcesPageView({
|
|
|
1756
1756
|
}
|
|
1757
1757
|
),
|
|
1758
1758
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1759
|
-
|
|
1759
|
+
chunkKZDABEML_js.CreateActionButton,
|
|
1760
1760
|
{
|
|
1761
1761
|
mode: "mobile",
|
|
1762
1762
|
label: labels.addDatasource,
|
|
@@ -1765,7 +1765,7 @@ function DatasourcesPageView({
|
|
|
1765
1765
|
}
|
|
1766
1766
|
),
|
|
1767
1767
|
isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1768
|
-
|
|
1768
|
+
chunkKZDABEML_js.PageEmptyState,
|
|
1769
1769
|
{
|
|
1770
1770
|
title: labels.emptyTitle,
|
|
1771
1771
|
message: labels.emptyDescription,
|
|
@@ -1779,27 +1779,27 @@ function DatasourcesPageView({
|
|
|
1779
1779
|
const logoSrc = getDialectLogoSrc(ds.dialect);
|
|
1780
1780
|
const iconElement = logoSrc ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-11 w-11 items-center justify-center rounded-lg bg-white shadow-sm ring-1 ring-black/5 dark:bg-white/10 dark:ring-white/10", children: /* @__PURE__ */ jsxRuntime.jsx("img", { src: logoSrc, alt: dialectLabel, className: "h-7 w-7 object-contain" }) }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: `flex h-11 w-11 items-center justify-center rounded-lg bg-gradient-to-br ${gradient} shadow-lg`, children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { className: "h-6 w-6 text-white" }) });
|
|
1781
1781
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1782
|
-
|
|
1782
|
+
chunkKZDABEML_js.EntityCard,
|
|
1783
1783
|
{
|
|
1784
1784
|
accentGradient: gradient,
|
|
1785
1785
|
icon: iconElement,
|
|
1786
1786
|
title: ds.name ?? ds.id,
|
|
1787
1787
|
subtitle: dialectLabel,
|
|
1788
1788
|
status: /* @__PURE__ */ jsxRuntime.jsx(chunkMXQ2EYG2_js.Badge, { color: ds.enabled ? "emerald" : "zinc", children: ds.enabled ? labels.enabled : labels.disabled }),
|
|
1789
|
-
footer: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 text-xs text-
|
|
1789
|
+
footer: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 text-xs text-slate-400 dark:text-slate-500", children: [
|
|
1790
1790
|
ds.readOnly && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "rounded-full bg-blue-100 px-2 py-0.5 text-[10px] font-semibold text-blue-700 dark:bg-blue-900/30 dark:text-blue-300", children: "Read-only" }),
|
|
1791
1791
|
ds.timeoutMs && /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
|
|
1792
1792
|
ds.timeoutMs / 1e3,
|
|
1793
1793
|
"s timeout"
|
|
1794
1794
|
] })
|
|
1795
1795
|
] }),
|
|
1796
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-2 text-xs text-
|
|
1796
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-2 text-xs text-slate-500 dark:text-slate-400", children: [
|
|
1797
1797
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
1798
1798
|
labels.dialect,
|
|
1799
1799
|
": ",
|
|
1800
1800
|
dialectLabel
|
|
1801
1801
|
] }),
|
|
1802
|
-
ds.slug && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "truncate text-
|
|
1802
|
+
ds.slug && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "truncate text-slate-400", children: [
|
|
1803
1803
|
"/",
|
|
1804
1804
|
ds.slug
|
|
1805
1805
|
] })
|
|
@@ -1809,7 +1809,7 @@ function DatasourcesPageView({
|
|
|
1809
1809
|
);
|
|
1810
1810
|
}) }),
|
|
1811
1811
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1812
|
-
|
|
1812
|
+
chunkPADXORD2_js.DatasourceModal,
|
|
1813
1813
|
{
|
|
1814
1814
|
open: modalOpen,
|
|
1815
1815
|
onClose: () => setModalOpen(false),
|
|
@@ -1838,7 +1838,7 @@ function AgentsIndexPageView({ labels }) {
|
|
|
1838
1838
|
const filteredTiles = searchTerm.trim() ? allTiles.filter((tile) => tile.title.toLowerCase().includes(searchTerm.trim().toLowerCase())) : allTiles;
|
|
1839
1839
|
const isEmpty = allTiles.length === 0;
|
|
1840
1840
|
const hero = /* @__PURE__ */ jsxRuntime.jsx(
|
|
1841
|
-
|
|
1841
|
+
chunkKZDABEML_js.HeroSection,
|
|
1842
1842
|
{
|
|
1843
1843
|
icon: /* @__PURE__ */ jsxRuntime.jsx(outline.CpuChipIcon, { className: "h-5 w-5" }),
|
|
1844
1844
|
label: labels.title,
|
|
@@ -1846,7 +1846,7 @@ function AgentsIndexPageView({ labels }) {
|
|
|
1846
1846
|
subtitle: labels.subtitle,
|
|
1847
1847
|
gradient: "from-violet-500 to-indigo-700",
|
|
1848
1848
|
toolbar: !isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1849
|
-
|
|
1849
|
+
chunkKZDABEML_js.SearchBar,
|
|
1850
1850
|
{
|
|
1851
1851
|
searchTerm,
|
|
1852
1852
|
onSearchChange: setSearchTerm,
|
|
@@ -1859,7 +1859,7 @@ function AgentsIndexPageView({ labels }) {
|
|
|
1859
1859
|
const content = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4", children: filteredTiles.map((tile) => {
|
|
1860
1860
|
const Icon = tile.icon;
|
|
1861
1861
|
return /* @__PURE__ */ jsxRuntime.jsx(Link, { href: tile.href, className: "block focus:outline-none", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1862
|
-
|
|
1862
|
+
chunkKZDABEML_js.EntityCard,
|
|
1863
1863
|
{
|
|
1864
1864
|
accentGradient: tile.gradient,
|
|
1865
1865
|
icon: /* @__PURE__ */ jsxRuntime.jsx("div", { className: `flex h-11 w-11 items-center justify-center rounded-lg bg-gradient-to-br ${tile.gradient} shadow-lg`, children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { className: "h-6 w-6 text-white" }) }),
|
|
@@ -1877,7 +1877,7 @@ function WorkflowsPageView({ labels, workflows, onCreate, onUpdateMeta, onPublis
|
|
|
1877
1877
|
const selectedWorkflow = workflows[0] ?? null;
|
|
1878
1878
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6", children: [
|
|
1879
1879
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1880
|
-
|
|
1880
|
+
chunkKZDABEML_js.SectionHeader,
|
|
1881
1881
|
{
|
|
1882
1882
|
icon: /* @__PURE__ */ jsxRuntime.jsx(outline.RectangleStackIcon, { className: "h-5 w-5 text-white" }),
|
|
1883
1883
|
title: labels.title,
|
|
@@ -1886,9 +1886,9 @@ function WorkflowsPageView({ labels, workflows, onCreate, onUpdateMeta, onPublis
|
|
|
1886
1886
|
}
|
|
1887
1887
|
),
|
|
1888
1888
|
/* @__PURE__ */ jsxRuntime.jsxs("section", { className: "liquid-surface rounded-2xl p-4 space-y-3", children: [
|
|
1889
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1889
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.Text, { className: "font-semibold text-slate-900 dark:text-slate-100", children: labels.add }),
|
|
1890
1890
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1891
|
-
|
|
1891
|
+
chunkKZDABEML_js.Form,
|
|
1892
1892
|
{
|
|
1893
1893
|
onSubmit: (event) => {
|
|
1894
1894
|
event.preventDefault();
|
|
@@ -1899,32 +1899,32 @@ function WorkflowsPageView({ labels, workflows, onCreate, onUpdateMeta, onPublis
|
|
|
1899
1899
|
onCreate({ name, description });
|
|
1900
1900
|
event.currentTarget.reset();
|
|
1901
1901
|
},
|
|
1902
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1903
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1904
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1905
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1902
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(chunkKZDABEML_js.FormGrid, { children: [
|
|
1903
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.FormInput, { name: "name", label: labels.workflowName, placeholder: labels.workflowNamePlaceholder, required: true }),
|
|
1904
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.FormTextarea, { name: "description", label: labels.description, placeholder: labels.workflowDescriptionPlaceholder, rows: 3 }),
|
|
1905
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.FormActionsRow, { children: /* @__PURE__ */ jsxRuntime.jsx(chunkMXQ2EYG2_js.Button, { type: "submit", children: labels.create }) })
|
|
1906
1906
|
] })
|
|
1907
1907
|
}
|
|
1908
1908
|
)
|
|
1909
1909
|
] }),
|
|
1910
1910
|
/* @__PURE__ */ jsxRuntime.jsxs("section", { className: "liquid-surface rounded-2xl p-4 space-y-3", children: [
|
|
1911
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1912
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1913
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1914
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1915
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1916
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1917
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1918
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1911
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.Text, { className: "font-semibold text-slate-900 dark:text-slate-100", children: labels.registry }),
|
|
1912
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkKZDABEML_js.Table, { children: [
|
|
1913
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.TableHead, { children: /* @__PURE__ */ jsxRuntime.jsxs(chunkKZDABEML_js.TableRow, { children: [
|
|
1914
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.TableHeader, { children: labels.name }),
|
|
1915
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.TableHeader, { children: labels.description }),
|
|
1916
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.TableHeader, { children: labels.version }),
|
|
1917
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.TableHeader, { children: labels.status }),
|
|
1918
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.TableHeader, { children: labels.actions })
|
|
1919
1919
|
] }) }),
|
|
1920
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1921
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1922
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1923
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1924
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1925
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1920
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.TableBody, { children: workflows.map((workflow) => /* @__PURE__ */ jsxRuntime.jsxs(chunkKZDABEML_js.TableRow, { children: [
|
|
1921
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.TableCell, { children: workflow.name }),
|
|
1922
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.TableCell, { children: workflow.description }),
|
|
1923
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.TableCell, { children: String(workflow.version) }),
|
|
1924
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.TableCell, { children: /* @__PURE__ */ jsxRuntime.jsx(chunkMXQ2EYG2_js.Badge, { children: workflow.isDraft ? labels.statusDraft : labels.statusPublished }) }),
|
|
1925
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.TableCell, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
1926
1926
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1927
|
-
|
|
1927
|
+
chunkKZDABEML_js.Form,
|
|
1928
1928
|
{
|
|
1929
1929
|
onSubmit: (event) => {
|
|
1930
1930
|
event.preventDefault();
|
|
@@ -1934,7 +1934,7 @@ function WorkflowsPageView({ labels, workflows, onCreate, onUpdateMeta, onPublis
|
|
|
1934
1934
|
description: workflow.description ?? ""
|
|
1935
1935
|
});
|
|
1936
1936
|
},
|
|
1937
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1937
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.InlineForm, { children: /* @__PURE__ */ jsxRuntime.jsx(chunkMXQ2EYG2_js.Button, { type: "submit", outline: true, children: labels.saveMeta }) })
|
|
1938
1938
|
}
|
|
1939
1939
|
),
|
|
1940
1940
|
/* @__PURE__ */ jsxRuntime.jsx(chunkMXQ2EYG2_js.Button, { type: "button", color: "sky", onClick: () => onPublish(workflow.id), children: labels.publish })
|
|
@@ -1943,8 +1943,8 @@ function WorkflowsPageView({ labels, workflows, onCreate, onUpdateMeta, onPublis
|
|
|
1943
1943
|
] })
|
|
1944
1944
|
] }),
|
|
1945
1945
|
/* @__PURE__ */ jsxRuntime.jsxs("section", { className: "liquid-surface rounded-2xl p-4 space-y-3", children: [
|
|
1946
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1947
|
-
selectedWorkflow ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "min-h-[680px] rounded-2xl border border-white/65 dark:border-white/12 overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1946
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.Text, { className: "font-semibold text-slate-900 dark:text-slate-100", children: labels.workspace }),
|
|
1947
|
+
selectedWorkflow ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "min-h-[680px] rounded-2xl border border-white/65 dark:border-white/12 overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx(chunkOQM252SM_js.WorkflowWorkspace, { graph: chunk3T2WGL47_js.adaptWorkflowGraphToUi(selectedWorkflow.graph) }) }) : /* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.Text, { children: labels.empty })
|
|
1948
1948
|
] })
|
|
1949
1949
|
] });
|
|
1950
1950
|
}
|
|
@@ -1994,7 +1994,7 @@ function WorkflowRunsPageView({ labels, runs, loading, onCancel, onReplay, onVie
|
|
|
1994
1994
|
});
|
|
1995
1995
|
const isEmpty = allRuns.length === 0;
|
|
1996
1996
|
const hero = /* @__PURE__ */ jsxRuntime.jsx(
|
|
1997
|
-
|
|
1997
|
+
chunkKZDABEML_js.HeroSection,
|
|
1998
1998
|
{
|
|
1999
1999
|
icon: /* @__PURE__ */ jsxRuntime.jsx(outline.ClockIcon, { className: "h-5 w-5" }),
|
|
2000
2000
|
label: labels.title,
|
|
@@ -2002,7 +2002,7 @@ function WorkflowRunsPageView({ labels, runs, loading, onCancel, onReplay, onVie
|
|
|
2002
2002
|
subtitle: labels.subtitle,
|
|
2003
2003
|
gradient: "from-indigo-500 to-sky-700",
|
|
2004
2004
|
toolbar: !isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
2005
|
-
|
|
2005
|
+
chunkKZDABEML_js.SearchBar,
|
|
2006
2006
|
{
|
|
2007
2007
|
searchTerm,
|
|
2008
2008
|
onSearchChange: setSearchTerm,
|
|
@@ -2016,7 +2016,7 @@ function WorkflowRunsPageView({ labels, runs, loading, onCancel, onReplay, onVie
|
|
|
2016
2016
|
count: statusFilter !== "all" ? 1 : 0,
|
|
2017
2017
|
onClear: statusFilter !== "all" ? () => setStatusFilter("all") : void 0,
|
|
2018
2018
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2019
|
-
|
|
2019
|
+
chunkKZDABEML_js.FormSelect,
|
|
2020
2020
|
{
|
|
2021
2021
|
name: "statusFilter",
|
|
2022
2022
|
label: labels.filterStatus,
|
|
@@ -2030,8 +2030,8 @@ function WorkflowRunsPageView({ labels, runs, loading, onCancel, onReplay, onVie
|
|
|
2030
2030
|
) : void 0
|
|
2031
2031
|
}
|
|
2032
2032
|
);
|
|
2033
|
-
const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
2034
|
-
|
|
2033
|
+
const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.PageLoadingState, {}) : filteredRuns.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.PageEmptyState, { title: labels.empty, message: labels.subtitle, iconName: "folder-open" }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3", children: filteredRuns.map((run) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2034
|
+
chunkKZDABEML_js.EntityCard,
|
|
2035
2035
|
{
|
|
2036
2036
|
accentGradient: "from-indigo-500 to-sky-700",
|
|
2037
2037
|
icon: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-11 w-11 items-center justify-center rounded-lg bg-indigo-500/10 text-indigo-600 dark:bg-indigo-500/20 dark:text-indigo-400", children: /* @__PURE__ */ jsxRuntime.jsx(outline.ClockIcon, { className: "h-6 w-6" }) }),
|
|
@@ -2063,7 +2063,7 @@ function WorkflowRunsPageView({ labels, runs, loading, onCancel, onReplay, onVie
|
|
|
2063
2063
|
}
|
|
2064
2064
|
function RunTimelinePageView({ labels, entries, loading, runId }) {
|
|
2065
2065
|
const hero = /* @__PURE__ */ jsxRuntime.jsx(
|
|
2066
|
-
|
|
2066
|
+
chunkKZDABEML_js.HeroSection,
|
|
2067
2067
|
{
|
|
2068
2068
|
icon: /* @__PURE__ */ jsxRuntime.jsx(outline.ClockIcon, { className: "h-5 w-5" }),
|
|
2069
2069
|
label: labels.title,
|
|
@@ -2075,19 +2075,19 @@ function RunTimelinePageView({ labels, entries, loading, runId }) {
|
|
|
2075
2075
|
if (loading) {
|
|
2076
2076
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
2077
2077
|
hero,
|
|
2078
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2078
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.PageLoadingState, {})
|
|
2079
2079
|
] });
|
|
2080
2080
|
}
|
|
2081
2081
|
if (entries.length === 0) {
|
|
2082
2082
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
2083
2083
|
hero,
|
|
2084
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2084
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.PageEmptyState, { title: labels.empty ?? "", message: "", iconName: "folder-open" })
|
|
2085
2085
|
] });
|
|
2086
2086
|
}
|
|
2087
2087
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
2088
2088
|
hero,
|
|
2089
2089
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2090
|
-
|
|
2090
|
+
chunkKRS2CLPR_js.ExecutionTimelinePanel,
|
|
2091
2091
|
{
|
|
2092
2092
|
entries,
|
|
2093
2093
|
labels
|
|
@@ -2230,7 +2230,7 @@ function ConnectionsPageView({
|
|
|
2230
2230
|
setSelectedRegions([]);
|
|
2231
2231
|
};
|
|
2232
2232
|
const hero = /* @__PURE__ */ jsxRuntime.jsx(
|
|
2233
|
-
|
|
2233
|
+
chunkKZDABEML_js.HeroSection,
|
|
2234
2234
|
{
|
|
2235
2235
|
icon: /* @__PURE__ */ jsxRuntime.jsx(outline.LinkIcon, { className: "h-5 w-5" }),
|
|
2236
2236
|
label: labels.title,
|
|
@@ -2238,7 +2238,7 @@ function ConnectionsPageView({
|
|
|
2238
2238
|
subtitle: labels.subtitle,
|
|
2239
2239
|
gradient: "from-sky-500 to-indigo-600",
|
|
2240
2240
|
toolbar: !isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
2241
|
-
|
|
2241
|
+
chunkKZDABEML_js.SearchBar,
|
|
2242
2242
|
{
|
|
2243
2243
|
searchTerm,
|
|
2244
2244
|
onSearchChange: setSearchTerm,
|
|
@@ -2255,8 +2255,8 @@ function ConnectionsPageView({
|
|
|
2255
2255
|
count: filterCount,
|
|
2256
2256
|
onClear: filterCount > 0 ? clearAllFilters : void 0,
|
|
2257
2257
|
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-5", children: [
|
|
2258
|
-
providerChipItems.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2259
|
-
|
|
2258
|
+
providerChipItems.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.FormSection, { title: labels.filterByProvider ?? "Provedor", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2259
|
+
chunkKZDABEML_js.ChipPicker,
|
|
2260
2260
|
{
|
|
2261
2261
|
items: providerChipItems,
|
|
2262
2262
|
selectedIds: selectedProviders,
|
|
@@ -2266,8 +2266,8 @@ function ConnectionsPageView({
|
|
|
2266
2266
|
clearLabel: labels.clear ?? "Limpar"
|
|
2267
2267
|
}
|
|
2268
2268
|
) }),
|
|
2269
|
-
regionChipItems.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2270
|
-
|
|
2269
|
+
regionChipItems.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.FormSection, { title: labels.filterByRegion ?? "Regi\xE3o", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2270
|
+
chunkKZDABEML_js.ChipPicker,
|
|
2271
2271
|
{
|
|
2272
2272
|
items: regionChipItems,
|
|
2273
2273
|
selectedIds: selectedRegions,
|
|
@@ -2282,7 +2282,7 @@ function ConnectionsPageView({
|
|
|
2282
2282
|
}
|
|
2283
2283
|
) : void 0,
|
|
2284
2284
|
actions: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2285
|
-
|
|
2285
|
+
chunkKZDABEML_js.CreateActionButton,
|
|
2286
2286
|
{
|
|
2287
2287
|
mode: "desktop",
|
|
2288
2288
|
label: labels.add,
|
|
@@ -2293,7 +2293,7 @@ function ConnectionsPageView({
|
|
|
2293
2293
|
}
|
|
2294
2294
|
);
|
|
2295
2295
|
const mobileAction = /* @__PURE__ */ jsxRuntime.jsx(
|
|
2296
|
-
|
|
2296
|
+
chunkKZDABEML_js.CreateActionButton,
|
|
2297
2297
|
{
|
|
2298
2298
|
mode: "mobile",
|
|
2299
2299
|
label: labels.add,
|
|
@@ -2301,8 +2301,8 @@ function ConnectionsPageView({
|
|
|
2301
2301
|
accent: "sky"
|
|
2302
2302
|
}
|
|
2303
2303
|
);
|
|
2304
|
-
const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
2305
|
-
|
|
2304
|
+
const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.PageLoadingState, {}) : isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.PageEmptyState, { title: labels.empty, message: labels.subtitle, iconName: "folder-open" }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3", children: filteredConnections.map((conn) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2305
|
+
chunkKZDABEML_js.EntityCard,
|
|
2306
2306
|
{
|
|
2307
2307
|
accentGradient: "from-sky-500 to-indigo-600",
|
|
2308
2308
|
icon: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-11 w-11 items-center justify-center rounded-lg bg-sky-500/10 text-sky-600 dark:bg-sky-500/20 dark:text-sky-400", children: /* @__PURE__ */ jsxRuntime.jsx(outline.LinkIcon, { className: "h-6 w-6" }) }),
|
|
@@ -2454,7 +2454,7 @@ function ConnectionEditor({
|
|
|
2454
2454
|
return preset.exampleModels?.join(", ") ?? "";
|
|
2455
2455
|
}, [preset]);
|
|
2456
2456
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2457
|
-
|
|
2457
|
+
chunkKZDABEML_js.GlassModal,
|
|
2458
2458
|
{
|
|
2459
2459
|
open: true,
|
|
2460
2460
|
onClose,
|
|
@@ -2467,9 +2467,9 @@ function ConnectionEditor({
|
|
|
2467
2467
|
void handleSubmit();
|
|
2468
2468
|
},
|
|
2469
2469
|
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
2470
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2470
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkKZDABEML_js.FormGrid, { children: [
|
|
2471
2471
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2472
|
-
|
|
2472
|
+
chunkKZDABEML_js.FormSelect,
|
|
2473
2473
|
{
|
|
2474
2474
|
label: "Provider",
|
|
2475
2475
|
value: value.providerSlug,
|
|
@@ -2480,7 +2480,7 @@ function ConnectionEditor({
|
|
|
2480
2480
|
}
|
|
2481
2481
|
),
|
|
2482
2482
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2483
|
-
|
|
2483
|
+
chunkKZDABEML_js.FormInput,
|
|
2484
2484
|
{
|
|
2485
2485
|
label: "Display name",
|
|
2486
2486
|
required: true,
|
|
@@ -2490,7 +2490,7 @@ function ConnectionEditor({
|
|
|
2490
2490
|
}
|
|
2491
2491
|
),
|
|
2492
2492
|
preset.needsRegion && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2493
|
-
|
|
2493
|
+
chunkKZDABEML_js.FormInput,
|
|
2494
2494
|
{
|
|
2495
2495
|
label: "Region",
|
|
2496
2496
|
value: value.region,
|
|
@@ -2499,7 +2499,7 @@ function ConnectionEditor({
|
|
|
2499
2499
|
}
|
|
2500
2500
|
),
|
|
2501
2501
|
preset.needsEndpoint && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2502
|
-
|
|
2502
|
+
chunkKZDABEML_js.FormInput,
|
|
2503
2503
|
{
|
|
2504
2504
|
label: "Endpoint URL",
|
|
2505
2505
|
value: value.endpoint,
|
|
@@ -2509,7 +2509,7 @@ function ConnectionEditor({
|
|
|
2509
2509
|
)
|
|
2510
2510
|
] }),
|
|
2511
2511
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2512
|
-
|
|
2512
|
+
chunkKZDABEML_js.FormInput,
|
|
2513
2513
|
{
|
|
2514
2514
|
label: value.credentialRef ? "Rotate API key (leave blank to keep current)" : "API key",
|
|
2515
2515
|
type: "password",
|
|
@@ -2520,7 +2520,7 @@ function ConnectionEditor({
|
|
|
2520
2520
|
}
|
|
2521
2521
|
),
|
|
2522
2522
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2523
|
-
|
|
2523
|
+
chunkKZDABEML_js.FormInput,
|
|
2524
2524
|
{
|
|
2525
2525
|
label: "Model filter (comma-separated, optional)",
|
|
2526
2526
|
value: value.modelFilter,
|
|
@@ -2532,7 +2532,7 @@ function ConnectionEditor({
|
|
|
2532
2532
|
/* @__PURE__ */ jsxRuntime.jsxs("details", { className: "rounded-xl border border-slate-200 bg-slate-50/60 p-3 text-sm dark:border-slate-700 dark:bg-slate-900/40", children: [
|
|
2533
2533
|
/* @__PURE__ */ jsxRuntime.jsx("summary", { className: "cursor-pointer font-medium text-slate-700 dark:text-slate-200", children: "Advanced config (JSON)" }),
|
|
2534
2534
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-3", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2535
|
-
|
|
2535
|
+
chunkKZDABEML_js.FormTextarea,
|
|
2536
2536
|
{
|
|
2537
2537
|
rows: 4,
|
|
2538
2538
|
value: value.configJson,
|
|
@@ -2653,7 +2653,7 @@ function CredentialsPageView({ labels, credentials, loading, onCreate, onRotate,
|
|
|
2653
2653
|
setDisabledFilter("all");
|
|
2654
2654
|
};
|
|
2655
2655
|
const hero = /* @__PURE__ */ jsxRuntime.jsx(
|
|
2656
|
-
|
|
2656
|
+
chunkKZDABEML_js.HeroSection,
|
|
2657
2657
|
{
|
|
2658
2658
|
icon: /* @__PURE__ */ jsxRuntime.jsx(outline.KeyIcon, { className: "h-5 w-5" }),
|
|
2659
2659
|
label: labels.title,
|
|
@@ -2661,7 +2661,7 @@ function CredentialsPageView({ labels, credentials, loading, onCreate, onRotate,
|
|
|
2661
2661
|
subtitle: labels.subtitle,
|
|
2662
2662
|
gradient: "from-rose-500 to-orange-600",
|
|
2663
2663
|
toolbar: !isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
2664
|
-
|
|
2664
|
+
chunkKZDABEML_js.SearchBar,
|
|
2665
2665
|
{
|
|
2666
2666
|
searchTerm,
|
|
2667
2667
|
onSearchChange: setSearchTerm,
|
|
@@ -2678,8 +2678,8 @@ function CredentialsPageView({ labels, credentials, loading, onCreate, onRotate,
|
|
|
2678
2678
|
count: filterCount,
|
|
2679
2679
|
onClear: filterCount > 0 ? clearAllFilters : void 0,
|
|
2680
2680
|
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-5", children: [
|
|
2681
|
-
typeChipItems.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2682
|
-
|
|
2681
|
+
typeChipItems.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.FormSection, { title: labels.filterByType ?? "Tipo", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2682
|
+
chunkKZDABEML_js.ChipPicker,
|
|
2683
2683
|
{
|
|
2684
2684
|
items: typeChipItems,
|
|
2685
2685
|
selectedIds: selectedTypes,
|
|
@@ -2689,13 +2689,13 @@ function CredentialsPageView({ labels, credentials, loading, onCreate, onRotate,
|
|
|
2689
2689
|
clearLabel: labels.clear ?? "Limpar"
|
|
2690
2690
|
}
|
|
2691
2691
|
) }),
|
|
2692
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2692
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.FormSection, { title: labels.filterByStatus ?? "Status", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-2", children: ["all", "active", "disabled"].map((value) => disabledFilter === value ? /* @__PURE__ */ jsxRuntime.jsx(chunkMXQ2EYG2_js.Button, { type: "button", size: "sm", color: "ios-glass-blue", onClick: () => setDisabledFilter(value), children: statusLabelFor(value) }, value) : /* @__PURE__ */ jsxRuntime.jsx(chunkMXQ2EYG2_js.Button, { type: "button", size: "sm", outline: true, onClick: () => setDisabledFilter(value), children: statusLabelFor(value) }, value)) }) })
|
|
2693
2693
|
] })
|
|
2694
2694
|
}
|
|
2695
2695
|
}
|
|
2696
2696
|
) : void 0,
|
|
2697
2697
|
actions: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2698
|
-
|
|
2698
|
+
chunkKZDABEML_js.CreateActionButton,
|
|
2699
2699
|
{
|
|
2700
2700
|
mode: "desktop",
|
|
2701
2701
|
label: labels.addCredential,
|
|
@@ -2706,7 +2706,7 @@ function CredentialsPageView({ labels, credentials, loading, onCreate, onRotate,
|
|
|
2706
2706
|
}
|
|
2707
2707
|
);
|
|
2708
2708
|
const mobileAction = /* @__PURE__ */ jsxRuntime.jsx(
|
|
2709
|
-
|
|
2709
|
+
chunkKZDABEML_js.CreateActionButton,
|
|
2710
2710
|
{
|
|
2711
2711
|
mode: "mobile",
|
|
2712
2712
|
label: labels.addCredential,
|
|
@@ -2714,8 +2714,8 @@ function CredentialsPageView({ labels, credentials, loading, onCreate, onRotate,
|
|
|
2714
2714
|
accent: "rose"
|
|
2715
2715
|
}
|
|
2716
2716
|
);
|
|
2717
|
-
const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
2718
|
-
|
|
2717
|
+
const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.PageLoadingState, {}) : isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.PageEmptyState, { title: labels.empty, message: labels.subtitle, iconName: "folder-open" }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3", children: filteredCredentials.map((secret) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2718
|
+
chunkKZDABEML_js.EntityCard,
|
|
2719
2719
|
{
|
|
2720
2720
|
accentGradient: "from-rose-500 to-orange-700",
|
|
2721
2721
|
icon: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-11 w-11 items-center justify-center rounded-lg bg-rose-500/10 text-rose-600 dark:bg-rose-500/20 dark:text-rose-400", children: /* @__PURE__ */ jsxRuntime.jsx(outline.KeyIcon, { className: "h-6 w-6" }) }),
|
|
@@ -2723,7 +2723,7 @@ function CredentialsPageView({ labels, credentials, loading, onCreate, onRotate,
|
|
|
2723
2723
|
subtitle: secret.secretType,
|
|
2724
2724
|
status: /* @__PURE__ */ jsxRuntime.jsx(chunkMXQ2EYG2_js.Badge, { color: secret.disabled ? "zinc" : "emerald", children: secret.disabled ? labels.disable : "Active" }),
|
|
2725
2725
|
footer: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-2", children: [
|
|
2726
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2726
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.CopyableId, { id: secret.secretId }),
|
|
2727
2727
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-2", children: [
|
|
2728
2728
|
/* @__PURE__ */ jsxRuntime.jsxs(chunkMXQ2EYG2_js.Button, { type: "button", size: "sm", outline: true, onClick: () => setRotateFor(secret), children: [
|
|
2729
2729
|
/* @__PURE__ */ jsxRuntime.jsx(outline.ArrowPathIcon, { className: "mr-1 h-3.5 w-3.5" }),
|
|
@@ -2765,7 +2765,7 @@ function CredentialsPageView({ labels, credentials, loading, onCreate, onRotate,
|
|
|
2765
2765
|
mobileAction
|
|
2766
2766
|
] }),
|
|
2767
2767
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2768
|
-
|
|
2768
|
+
chunkKZDABEML_js.GlassModal,
|
|
2769
2769
|
{
|
|
2770
2770
|
open: createOpen,
|
|
2771
2771
|
onClose: () => setCreateOpen(false),
|
|
@@ -2783,16 +2783,16 @@ function CredentialsPageView({ labels, credentials, loading, onCreate, onRotate,
|
|
|
2783
2783
|
onCreate({ name, value, secretType, description });
|
|
2784
2784
|
setCreateOpen(false);
|
|
2785
2785
|
},
|
|
2786
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2787
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2788
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2789
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2790
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2786
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(chunkKZDABEML_js.FormGrid, { children: [
|
|
2787
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.FormInput, { name: "name", label: labels.name, placeholder: labels.namePlaceholder, required: true }),
|
|
2788
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.FormSelect, { name: "secretType", label: labels.type, options: typeOptions, defaultValue: "generic" }),
|
|
2789
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.FormInput, { name: "value", label: labels.value, placeholder: labels.valuePlaceholder, required: true, type: "password" }),
|
|
2790
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.FormTextarea, { name: "description", label: labels.description, placeholder: labels.descriptionPlaceholder, rows: 2 })
|
|
2791
2791
|
] })
|
|
2792
2792
|
}
|
|
2793
2793
|
),
|
|
2794
2794
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2795
|
-
|
|
2795
|
+
chunkKZDABEML_js.GlassModal,
|
|
2796
2796
|
{
|
|
2797
2797
|
open: rotateFor !== null,
|
|
2798
2798
|
onClose: () => setRotateFor(null),
|
|
@@ -2807,7 +2807,7 @@ function CredentialsPageView({ labels, credentials, loading, onCreate, onRotate,
|
|
|
2807
2807
|
onRotate(rotateFor, value);
|
|
2808
2808
|
setRotateFor(null);
|
|
2809
2809
|
},
|
|
2810
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2810
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.FormGrid, { children: /* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.FormInput, { name: "value", label: labels.value, placeholder: labels.valuePlaceholder, required: true, type: "password" }) })
|
|
2811
2811
|
}
|
|
2812
2812
|
)
|
|
2813
2813
|
] });
|
|
@@ -2860,7 +2860,7 @@ function AgentsWorkspacePageView({
|
|
|
2860
2860
|
}, [agents, selectedId]);
|
|
2861
2861
|
const isEmpty = agents.length === 0;
|
|
2862
2862
|
const hero = /* @__PURE__ */ jsxRuntime.jsx(
|
|
2863
|
-
|
|
2863
|
+
chunkKZDABEML_js.HeroSection,
|
|
2864
2864
|
{
|
|
2865
2865
|
icon: /* @__PURE__ */ jsxRuntime.jsx(outline.CpuChipIcon, { className: "h-5 w-5" }),
|
|
2866
2866
|
label: labels.title,
|
|
@@ -2868,7 +2868,7 @@ function AgentsWorkspacePageView({
|
|
|
2868
2868
|
subtitle: labels.subtitle,
|
|
2869
2869
|
gradient: "from-violet-500 to-indigo-700",
|
|
2870
2870
|
toolbar: !isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
2871
|
-
|
|
2871
|
+
chunkKZDABEML_js.SearchBar,
|
|
2872
2872
|
{
|
|
2873
2873
|
searchTerm,
|
|
2874
2874
|
onSearchChange: setSearchTerm,
|
|
@@ -2877,7 +2877,7 @@ function AgentsWorkspacePageView({
|
|
|
2877
2877
|
}
|
|
2878
2878
|
) : void 0,
|
|
2879
2879
|
actions: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2880
|
-
|
|
2880
|
+
chunkKZDABEML_js.CreateActionButton,
|
|
2881
2881
|
{
|
|
2882
2882
|
mode: "desktop",
|
|
2883
2883
|
label: labels.addAgent,
|
|
@@ -2888,7 +2888,7 @@ function AgentsWorkspacePageView({
|
|
|
2888
2888
|
}
|
|
2889
2889
|
);
|
|
2890
2890
|
const mobileAction = /* @__PURE__ */ jsxRuntime.jsx(
|
|
2891
|
-
|
|
2891
|
+
chunkKZDABEML_js.CreateActionButton,
|
|
2892
2892
|
{
|
|
2893
2893
|
mode: "mobile",
|
|
2894
2894
|
label: labels.addAgent,
|
|
@@ -2896,23 +2896,23 @@ function AgentsWorkspacePageView({
|
|
|
2896
2896
|
accent: "violet"
|
|
2897
2897
|
}
|
|
2898
2898
|
);
|
|
2899
|
-
const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
2900
|
-
|
|
2899
|
+
const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.PageLoadingState, {}) : isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
2900
|
+
chunkKZDABEML_js.PageEmptyState,
|
|
2901
2901
|
{
|
|
2902
2902
|
title: labels.empty,
|
|
2903
2903
|
message: labels.emptyMessage,
|
|
2904
2904
|
iconName: "folder-open"
|
|
2905
2905
|
}
|
|
2906
2906
|
) : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 gap-4 lg:grid-cols-[20rem_minmax(0,1fr)]", children: [
|
|
2907
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "lg:sticky lg:top-4", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2907
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "lg:sticky lg:top-4", children: /* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.ListCard, { variant: "glass", children: filteredAgents.map((agent) => {
|
|
2908
2908
|
const id = String(agent.agentId ?? agent.id ?? "");
|
|
2909
2909
|
const active = id === selectedId;
|
|
2910
2910
|
const initials = deriveInitials(String(agent.name ?? id));
|
|
2911
2911
|
const modelName = models.find((m) => m.id === String(agent.modelId ?? ""))?.name ?? String(agent.modelId ?? "");
|
|
2912
2912
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2913
|
-
|
|
2913
|
+
chunkKZDABEML_js.ListCardItem,
|
|
2914
2914
|
{
|
|
2915
|
-
leading: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2915
|
+
leading: /* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.Avatar, { tone: active ? "violet" : "slate", initials }),
|
|
2916
2916
|
trailing: agent.activePromptVersion > 0 ? /* @__PURE__ */ jsxRuntime.jsxs(chunkMXQ2EYG2_js.Badge, { color: "emerald", children: [
|
|
2917
2917
|
"v",
|
|
2918
2918
|
agent.activePromptVersion
|
|
@@ -2954,7 +2954,7 @@ function AgentsWorkspacePageView({
|
|
|
2954
2954
|
},
|
|
2955
2955
|
String(selectedAgent.agentId ?? selectedAgent.id ?? "")
|
|
2956
2956
|
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
2957
|
-
|
|
2957
|
+
chunkKZDABEML_js.SectionCard,
|
|
2958
2958
|
{
|
|
2959
2959
|
header: {
|
|
2960
2960
|
icon: /* @__PURE__ */ jsxRuntime.jsx(outline.CpuChipIcon, { className: "h-4 w-4" }),
|
|
@@ -2962,7 +2962,7 @@ function AgentsWorkspacePageView({
|
|
|
2962
2962
|
subtitle: labels.noSelectionMessage
|
|
2963
2963
|
},
|
|
2964
2964
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2965
|
-
|
|
2965
|
+
chunkKZDABEML_js.PageEmptyState,
|
|
2966
2966
|
{
|
|
2967
2967
|
title: labels.noSelection,
|
|
2968
2968
|
message: labels.noSelectionMessage,
|
|
@@ -2996,7 +2996,7 @@ function AgentDetail({
|
|
|
2996
2996
|
}) {
|
|
2997
2997
|
const agentId = String(agent.agentId ?? agent.id ?? "");
|
|
2998
2998
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2999
|
-
|
|
2999
|
+
chunkKZDABEML_js.SectionCard,
|
|
3000
3000
|
{
|
|
3001
3001
|
header: {
|
|
3002
3002
|
icon: /* @__PURE__ */ jsxRuntime.jsx(outline.CpuChipIcon, { className: "h-4 w-4" }),
|
|
@@ -3021,15 +3021,15 @@ function AgentDetail({
|
|
|
3021
3021
|
]
|
|
3022
3022
|
}
|
|
3023
3023
|
),
|
|
3024
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3025
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
3026
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3027
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3028
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3029
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3024
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(chunkKZDABEML_js.Tabs, { defaultValue: "general", className: "w-full", children: [
|
|
3025
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkKZDABEML_js.TabsList, { className: "bg-white/40 dark:bg-white/[0.06]", children: [
|
|
3026
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.TabsTrigger, { value: "general", children: labels.generalTab }),
|
|
3027
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.TabsTrigger, { value: "prompt", children: labels.promptTab }),
|
|
3028
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.TabsTrigger, { value: "tools", children: labels.toolsTab }),
|
|
3029
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.TabsTrigger, { value: "model", children: labels.modelTab })
|
|
3030
3030
|
] }),
|
|
3031
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3032
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3031
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.TabsContent, { value: "general", className: "space-y-4 pt-4", children: /* @__PURE__ */ jsxRuntime.jsx(GeneralTab, { agent, labels, onSubmit: (input) => onUpdateAgent(agentId, input) }) }),
|
|
3032
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.TabsContent, { value: "prompt", className: "space-y-4 pt-4", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3033
3033
|
PromptTab,
|
|
3034
3034
|
{
|
|
3035
3035
|
agent,
|
|
@@ -3039,7 +3039,7 @@ function AgentDetail({
|
|
|
3039
3039
|
onActivate: (promptId) => onActivatePrompt(agentId, promptId)
|
|
3040
3040
|
}
|
|
3041
3041
|
) }),
|
|
3042
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3042
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.TabsContent, { value: "tools", className: "space-y-4 pt-4", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3043
3043
|
ToolsTab,
|
|
3044
3044
|
{
|
|
3045
3045
|
agent,
|
|
@@ -3049,7 +3049,7 @@ function AgentDetail({
|
|
|
3049
3049
|
onDetach: (toolId) => onDetachTool(agentId, toolId)
|
|
3050
3050
|
}
|
|
3051
3051
|
) }),
|
|
3052
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3052
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.TabsContent, { value: "model", className: "space-y-4 pt-4", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3053
3053
|
ModelTab,
|
|
3054
3054
|
{
|
|
3055
3055
|
agent,
|
|
@@ -3081,7 +3081,7 @@ function GeneralTab({
|
|
|
3081
3081
|
const initialRole = String(agent.role ?? "");
|
|
3082
3082
|
const initialStatus = String(agent.status ?? "draft");
|
|
3083
3083
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3084
|
-
|
|
3084
|
+
chunkKZDABEML_js.SectionCard,
|
|
3085
3085
|
{
|
|
3086
3086
|
variant: "glass",
|
|
3087
3087
|
header: {
|
|
@@ -3110,10 +3110,10 @@ function GeneralTab({
|
|
|
3110
3110
|
},
|
|
3111
3111
|
className: "space-y-4",
|
|
3112
3112
|
children: [
|
|
3113
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
3114
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3113
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkKZDABEML_js.FormGrid, { children: [
|
|
3114
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.FormInput, { name: "name", label: labels.name, defaultValue: initial.name, required: true }),
|
|
3115
3115
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3116
|
-
|
|
3116
|
+
chunkKZDABEML_js.FormSelect,
|
|
3117
3117
|
{
|
|
3118
3118
|
name: "status",
|
|
3119
3119
|
label: labels.status,
|
|
@@ -3125,9 +3125,9 @@ function GeneralTab({
|
|
|
3125
3125
|
]
|
|
3126
3126
|
}
|
|
3127
3127
|
),
|
|
3128
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3128
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.FormInput, { name: "role", label: labels.role, placeholder: labels.rolePlaceholder, defaultValue: initialRole }),
|
|
3129
3129
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3130
|
-
|
|
3130
|
+
chunkKZDABEML_js.FormInput,
|
|
3131
3131
|
{
|
|
3132
3132
|
name: "maxTokens",
|
|
3133
3133
|
label: labels.maxTokens,
|
|
@@ -3136,7 +3136,7 @@ function GeneralTab({
|
|
|
3136
3136
|
}
|
|
3137
3137
|
),
|
|
3138
3138
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3139
|
-
|
|
3139
|
+
chunkKZDABEML_js.FormInput,
|
|
3140
3140
|
{
|
|
3141
3141
|
name: "temperature",
|
|
3142
3142
|
label: labels.temperature,
|
|
@@ -3148,7 +3148,7 @@ function GeneralTab({
|
|
|
3148
3148
|
}
|
|
3149
3149
|
)
|
|
3150
3150
|
] }),
|
|
3151
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3151
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.FormTextarea, { name: "description", label: labels.description, defaultValue: initialDescription, rows: 3 }),
|
|
3152
3152
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-end", children: /* @__PURE__ */ jsxRuntime.jsx(chunkMXQ2EYG2_js.Button, { type: "submit", color: "indigo", disabled: submitting, children: submitting ? labels.saving : labels.save }) })
|
|
3153
3153
|
]
|
|
3154
3154
|
}
|
|
@@ -3168,7 +3168,7 @@ function PromptTab({
|
|
|
3168
3168
|
const currentSystem = String(agent.systemPrompt ?? "");
|
|
3169
3169
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
3170
3170
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3171
|
-
|
|
3171
|
+
chunkKZDABEML_js.SectionCard,
|
|
3172
3172
|
{
|
|
3173
3173
|
variant: "glass",
|
|
3174
3174
|
header: {
|
|
@@ -3180,7 +3180,7 @@ function PromptTab({
|
|
|
3180
3180
|
}
|
|
3181
3181
|
),
|
|
3182
3182
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3183
|
-
|
|
3183
|
+
chunkKZDABEML_js.SectionCard,
|
|
3184
3184
|
{
|
|
3185
3185
|
variant: "glass",
|
|
3186
3186
|
header: {
|
|
@@ -3191,10 +3191,10 @@ function PromptTab({
|
|
|
3191
3191
|
/* @__PURE__ */ jsxRuntime.jsx(outline.PlusIcon, { className: "h-4 w-4" }),
|
|
3192
3192
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-1.5", children: labels.addPrompt })
|
|
3193
3193
|
] }),
|
|
3194
|
-
children: prompts.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-slate-500 dark:text-slate-400", children: labels.promptVersionsEmpty }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
3194
|
+
children: prompts.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-slate-500 dark:text-slate-400", children: labels.promptVersionsEmpty }) : /* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.ListCard, { children: prompts.map((prompt) => {
|
|
3195
3195
|
const id = `${prompt.agentId}:${prompt.locale}:${prompt.version}`;
|
|
3196
3196
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3197
|
-
|
|
3197
|
+
chunkKZDABEML_js.ListCardItem,
|
|
3198
3198
|
{
|
|
3199
3199
|
leading: /* @__PURE__ */ jsxRuntime.jsxs(chunkMXQ2EYG2_js.Badge, { color: prompt.isActive ? "emerald" : "zinc", children: [
|
|
3200
3200
|
"v",
|
|
@@ -3212,7 +3212,7 @@ function PromptTab({
|
|
|
3212
3212
|
}
|
|
3213
3213
|
),
|
|
3214
3214
|
addOpen && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3215
|
-
|
|
3215
|
+
chunkKZDABEML_js.GlassModal,
|
|
3216
3216
|
{
|
|
3217
3217
|
open: true,
|
|
3218
3218
|
onClose: () => setAddOpen(false),
|
|
@@ -3233,10 +3233,10 @@ function PromptTab({
|
|
|
3233
3233
|
});
|
|
3234
3234
|
setAddOpen(false);
|
|
3235
3235
|
},
|
|
3236
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3237
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3236
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(chunkKZDABEML_js.FormGrid, { children: [
|
|
3237
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.FormSelect, { name: "locale", label: labels.promptLocale, options: LOCALE_OPTIONS2, defaultValue: "en" }),
|
|
3238
3238
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3239
|
-
|
|
3239
|
+
chunkKZDABEML_js.FormSelect,
|
|
3240
3240
|
{
|
|
3241
3241
|
name: "isActive",
|
|
3242
3242
|
label: labels.promptIsActive,
|
|
@@ -3247,10 +3247,10 @@ function PromptTab({
|
|
|
3247
3247
|
defaultValue: "true"
|
|
3248
3248
|
}
|
|
3249
3249
|
),
|
|
3250
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3251
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3252
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3253
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3250
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.FormInput, { name: "reason", label: labels.promptReason }),
|
|
3251
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.FormTextarea, { name: "systemPrompt", label: labels.promptSystemPrompt, rows: 3 }),
|
|
3252
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.FormTextarea, { name: "userTemplate", label: labels.promptUserTemplate, rows: 3 }),
|
|
3253
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.FormTextarea, { name: "prompt", label: labels.promptText, rows: 6, required: true })
|
|
3254
3254
|
] })
|
|
3255
3255
|
}
|
|
3256
3256
|
)
|
|
@@ -3273,15 +3273,15 @@ function ToolsTab({
|
|
|
3273
3273
|
const availableTools = tools.filter((tool) => !attachedSet.has(tool.agentToolId));
|
|
3274
3274
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
3275
3275
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3276
|
-
|
|
3276
|
+
chunkKZDABEML_js.SectionCard,
|
|
3277
3277
|
{
|
|
3278
3278
|
variant: "glass",
|
|
3279
3279
|
header: {
|
|
3280
3280
|
icon: /* @__PURE__ */ jsxRuntime.jsx(outline.WrenchScrewdriverIcon, { className: "h-4 w-4" }),
|
|
3281
3281
|
title: labels.toolsAttached
|
|
3282
3282
|
},
|
|
3283
|
-
children: attachedTools.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-slate-500 dark:text-slate-400", children: labels.toolsEmpty }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
3284
|
-
|
|
3283
|
+
children: attachedTools.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-slate-500 dark:text-slate-400", children: labels.toolsEmpty }) : /* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.ListCard, { children: attachedTools.map((tool) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3284
|
+
chunkKZDABEML_js.ListCardItem,
|
|
3285
3285
|
{
|
|
3286
3286
|
leading: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-9 w-9 items-center justify-center rounded-lg bg-amber-500/10 text-amber-600 dark:bg-amber-500/20 dark:text-amber-400", children: /* @__PURE__ */ jsxRuntime.jsx(outline.WrenchScrewdriverIcon, { className: "h-5 w-5" }) }),
|
|
3287
3287
|
trailing: /* @__PURE__ */ jsxRuntime.jsx(chunkMXQ2EYG2_js.Button, { type: "button", size: "sm", outline: true, onClick: () => onDetach(tool.agentToolId), children: labels.detachTool }),
|
|
@@ -3295,15 +3295,15 @@ function ToolsTab({
|
|
|
3295
3295
|
}
|
|
3296
3296
|
),
|
|
3297
3297
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3298
|
-
|
|
3298
|
+
chunkKZDABEML_js.SectionCard,
|
|
3299
3299
|
{
|
|
3300
3300
|
variant: "glass",
|
|
3301
3301
|
header: {
|
|
3302
3302
|
icon: /* @__PURE__ */ jsxRuntime.jsx(outline.WrenchScrewdriverIcon, { className: "h-4 w-4" }),
|
|
3303
3303
|
title: labels.toolsAvailable
|
|
3304
3304
|
},
|
|
3305
|
-
children: availableTools.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-slate-500 dark:text-slate-400", children: labels.toolsEmpty }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
3306
|
-
|
|
3305
|
+
children: availableTools.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-slate-500 dark:text-slate-400", children: labels.toolsEmpty }) : /* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.ListCard, { children: availableTools.map((tool) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3306
|
+
chunkKZDABEML_js.ListCardItem,
|
|
3307
3307
|
{
|
|
3308
3308
|
leading: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-9 w-9 items-center justify-center rounded-lg bg-slate-500/10 text-slate-600 dark:bg-slate-500/20 dark:text-slate-300", children: /* @__PURE__ */ jsxRuntime.jsx(outline.WrenchScrewdriverIcon, { className: "h-5 w-5" }) }),
|
|
3309
3309
|
trailing: /* @__PURE__ */ jsxRuntime.jsxs(chunkMXQ2EYG2_js.Button, { type: "button", size: "sm", color: "indigo", onClick: () => onAttach(tool.agentToolId), children: [
|
|
@@ -3344,7 +3344,7 @@ function ModelTab({
|
|
|
3344
3344
|
return matches.length > 0 ? matches : connections;
|
|
3345
3345
|
}, [selectedModel, connections]);
|
|
3346
3346
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3347
|
-
|
|
3347
|
+
chunkKZDABEML_js.SectionCard,
|
|
3348
3348
|
{
|
|
3349
3349
|
variant: "glass",
|
|
3350
3350
|
header: {
|
|
@@ -3365,9 +3365,9 @@ function ModelTab({
|
|
|
3365
3365
|
},
|
|
3366
3366
|
className: "space-y-4",
|
|
3367
3367
|
children: [
|
|
3368
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
3368
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkKZDABEML_js.FormGrid, { children: [
|
|
3369
3369
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3370
|
-
|
|
3370
|
+
chunkKZDABEML_js.FormSelect,
|
|
3371
3371
|
{
|
|
3372
3372
|
label: labels.model,
|
|
3373
3373
|
value: modelId,
|
|
@@ -3376,7 +3376,7 @@ function ModelTab({
|
|
|
3376
3376
|
}
|
|
3377
3377
|
),
|
|
3378
3378
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3379
|
-
|
|
3379
|
+
chunkKZDABEML_js.FormSelect,
|
|
3380
3380
|
{
|
|
3381
3381
|
label: labels.connection,
|
|
3382
3382
|
value: connectionId,
|
|
@@ -3664,9 +3664,8 @@ function AgentNewWizardPageView({
|
|
|
3664
3664
|
setSubmitting(false);
|
|
3665
3665
|
}
|
|
3666
3666
|
}
|
|
3667
|
-
const counter = labels.wizardStepCounter.replace("{current}", String(step)).replace("{total}", String(TOTAL_STEPS));
|
|
3668
3667
|
const hero = /* @__PURE__ */ jsxRuntime.jsx(
|
|
3669
|
-
|
|
3668
|
+
chunkKZDABEML_js.HeroSection,
|
|
3670
3669
|
{
|
|
3671
3670
|
icon: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3672
3671
|
"div",
|
|
@@ -3676,12 +3675,21 @@ function AgentNewWizardPageView({
|
|
|
3676
3675
|
children: emoji
|
|
3677
3676
|
}
|
|
3678
3677
|
),
|
|
3679
|
-
label:
|
|
3680
|
-
title:
|
|
3678
|
+
label: labels.pageTitle,
|
|
3679
|
+
title: stepTitles[step - 1],
|
|
3681
3680
|
subtitle: stepSubtitles[step - 1],
|
|
3682
3681
|
gradient: activePreset.accent,
|
|
3682
|
+
actions: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3683
|
+
chunkMXQ2EYG2_js.IconButton,
|
|
3684
|
+
{
|
|
3685
|
+
label: labels.wizardCancel,
|
|
3686
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(outline.XMarkIcon, { className: "h-5 w-5" }),
|
|
3687
|
+
variant: "ghost",
|
|
3688
|
+
onClick: cancelWithConfirm
|
|
3689
|
+
}
|
|
3690
|
+
),
|
|
3683
3691
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3684
|
-
|
|
3692
|
+
chunkKZDABEML_js.StepIndicator,
|
|
3685
3693
|
{
|
|
3686
3694
|
accent: "indigo",
|
|
3687
3695
|
currentStep: step - 1,
|
|
@@ -3694,499 +3702,406 @@ function AgentNewWizardPageView({
|
|
|
3694
3702
|
);
|
|
3695
3703
|
function renderStep1() {
|
|
3696
3704
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3697
|
-
|
|
3698
|
-
{
|
|
3699
|
-
variant: "glass",
|
|
3700
|
-
header: {
|
|
3701
|
-
title: labels.presetTitle,
|
|
3702
|
-
subtitle: labels.presetSubtitle
|
|
3703
|
-
},
|
|
3704
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3705
|
-
"div",
|
|
3706
|
-
{
|
|
3707
|
-
role: "radiogroup",
|
|
3708
|
-
"aria-label": labels.presetTitle,
|
|
3709
|
-
className: "grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3",
|
|
3710
|
-
children: AGENT_PRESETS.map((preset) => {
|
|
3711
|
-
const selected = preset.id === presetId;
|
|
3712
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3713
|
-
chunkFZUV7GNB_js.FilterTileButton,
|
|
3714
|
-
{
|
|
3715
|
-
isActive: selected,
|
|
3716
|
-
color: preset.tileColor,
|
|
3717
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": "true", className: "text-base leading-none", children: preset.emoji }),
|
|
3718
|
-
label: preset.id === "custom" ? labels.presetCustom : preset.name,
|
|
3719
|
-
count: preset.role || labels.presetCustomHint,
|
|
3720
|
-
onClick: () => applyPreset(preset)
|
|
3721
|
-
},
|
|
3722
|
-
preset.id
|
|
3723
|
-
);
|
|
3724
|
-
})
|
|
3725
|
-
}
|
|
3726
|
-
)
|
|
3727
|
-
}
|
|
3728
|
-
);
|
|
3729
|
-
}
|
|
3730
|
-
function renderStep2() {
|
|
3731
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3732
|
-
chunkFZUV7GNB_js.SectionCard,
|
|
3733
|
-
{
|
|
3734
|
-
variant: "glass",
|
|
3735
|
-
header: {
|
|
3736
|
-
title: labels.identitySection,
|
|
3737
|
-
subtitle: labels.identitySubtitle
|
|
3738
|
-
},
|
|
3739
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
3740
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
3741
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "mb-2 block text-xs font-semibold uppercase tracking-wider text-slate-600 dark:text-slate-400", children: labels.avatarLabel }),
|
|
3742
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-1.5", children: EMOJI_PALETTE.map((e) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3743
|
-
chunkFZUV7GNB_js.PickerTile,
|
|
3744
|
-
{
|
|
3745
|
-
onClick: () => {
|
|
3746
|
-
setEmoji(e);
|
|
3747
|
-
markTouched();
|
|
3748
|
-
},
|
|
3749
|
-
selected: emoji === e,
|
|
3750
|
-
className: [
|
|
3751
|
-
"flex h-9 w-9 items-center justify-center rounded-lg text-base transition-all",
|
|
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"
|
|
3753
|
-
].join(" "),
|
|
3754
|
-
children: e
|
|
3755
|
-
},
|
|
3756
|
-
e
|
|
3757
|
-
)) })
|
|
3758
|
-
] }),
|
|
3759
|
-
/* @__PURE__ */ jsxRuntime.jsxs(chunkFZUV7GNB_js.FormGrid, { children: [
|
|
3760
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3761
|
-
chunkFZUV7GNB_js.FormInput,
|
|
3762
|
-
{
|
|
3763
|
-
label: labels.name,
|
|
3764
|
-
value: name,
|
|
3765
|
-
onValueChange: (v) => {
|
|
3766
|
-
setName(v);
|
|
3767
|
-
markTouched();
|
|
3768
|
-
},
|
|
3769
|
-
required: true,
|
|
3770
|
-
placeholder: labels.namePlaceholder
|
|
3771
|
-
}
|
|
3772
|
-
),
|
|
3773
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3774
|
-
chunkFZUV7GNB_js.FormInput,
|
|
3775
|
-
{
|
|
3776
|
-
label: labels.role,
|
|
3777
|
-
value: role,
|
|
3778
|
-
onValueChange: (v) => {
|
|
3779
|
-
setRole(v);
|
|
3780
|
-
markTouched();
|
|
3781
|
-
},
|
|
3782
|
-
placeholder: labels.rolePlaceholder
|
|
3783
|
-
}
|
|
3784
|
-
)
|
|
3785
|
-
] }),
|
|
3786
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3787
|
-
chunkFZUV7GNB_js.FormTextarea,
|
|
3788
|
-
{
|
|
3789
|
-
label: labels.descriptionLabel,
|
|
3790
|
-
value: description,
|
|
3791
|
-
onValueChange: (v) => {
|
|
3792
|
-
setDescription(v);
|
|
3793
|
-
markTouched();
|
|
3794
|
-
},
|
|
3795
|
-
rows: 3,
|
|
3796
|
-
placeholder: labels.descriptionPlaceholder
|
|
3797
|
-
}
|
|
3798
|
-
)
|
|
3799
|
-
] })
|
|
3800
|
-
}
|
|
3801
|
-
);
|
|
3802
|
-
}
|
|
3803
|
-
function renderStep3() {
|
|
3804
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3805
|
-
chunkFZUV7GNB_js.SectionCard,
|
|
3705
|
+
"div",
|
|
3806
3706
|
{
|
|
3807
|
-
|
|
3808
|
-
|
|
3809
|
-
|
|
3810
|
-
|
|
3811
|
-
|
|
3812
|
-
|
|
3813
|
-
|
|
3814
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3815
|
-
chunkFZUV7GNB_js.FormSelect,
|
|
3816
|
-
{
|
|
3817
|
-
label: labels.connectionLabel,
|
|
3818
|
-
value: connectionId,
|
|
3819
|
-
onValueChange: (v) => {
|
|
3820
|
-
setConnectionId(v);
|
|
3821
|
-
markTouched();
|
|
3822
|
-
},
|
|
3823
|
-
options: connectionOptions,
|
|
3824
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(outline.LinkIcon, { className: "h-4 w-4" })
|
|
3825
|
-
}
|
|
3826
|
-
),
|
|
3827
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3828
|
-
chunkFZUV7GNB_js.FormSelect,
|
|
3829
|
-
{
|
|
3830
|
-
label: labels.frameworkLabel,
|
|
3831
|
-
value: framework,
|
|
3832
|
-
onValueChange: (v) => {
|
|
3833
|
-
setFramework(v);
|
|
3834
|
-
markTouched();
|
|
3835
|
-
},
|
|
3836
|
-
options: frameworkOptions
|
|
3837
|
-
}
|
|
3838
|
-
),
|
|
3839
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3840
|
-
chunkFZUV7GNB_js.FormSelect,
|
|
3841
|
-
{
|
|
3842
|
-
label: labels.model,
|
|
3843
|
-
value: modelId,
|
|
3844
|
-
onValueChange: (v) => {
|
|
3845
|
-
setModelId(v);
|
|
3846
|
-
markTouched();
|
|
3847
|
-
},
|
|
3848
|
-
options: modelOptions.length > 0 ? modelOptions : [{ value: "", label: labels.modelEmpty }]
|
|
3849
|
-
}
|
|
3850
|
-
)
|
|
3851
|
-
] }),
|
|
3852
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3853
|
-
chunkFZUV7GNB_js.FormTextarea,
|
|
3707
|
+
role: "radiogroup",
|
|
3708
|
+
"aria-label": labels.presetTitle,
|
|
3709
|
+
className: "grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3",
|
|
3710
|
+
children: AGENT_PRESETS.map((preset) => {
|
|
3711
|
+
const selected = preset.id === presetId;
|
|
3712
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3713
|
+
chunkKZDABEML_js.FilterTileButton,
|
|
3854
3714
|
{
|
|
3855
|
-
|
|
3856
|
-
|
|
3857
|
-
|
|
3858
|
-
|
|
3859
|
-
|
|
3860
|
-
|
|
3861
|
-
|
|
3862
|
-
|
|
3863
|
-
|
|
3864
|
-
|
|
3865
|
-
] })
|
|
3715
|
+
isActive: selected,
|
|
3716
|
+
color: preset.tileColor,
|
|
3717
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": "true", className: "text-base leading-none", children: preset.emoji }),
|
|
3718
|
+
label: preset.id === "custom" ? labels.presetCustom : preset.name,
|
|
3719
|
+
count: preset.role || labels.presetCustomHint,
|
|
3720
|
+
onClick: () => applyPreset(preset)
|
|
3721
|
+
},
|
|
3722
|
+
preset.id
|
|
3723
|
+
);
|
|
3724
|
+
})
|
|
3866
3725
|
}
|
|
3867
3726
|
);
|
|
3868
3727
|
}
|
|
3869
|
-
function
|
|
3728
|
+
function renderStep2() {
|
|
3870
3729
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
3730
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
3731
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "mb-2 block text-xs font-semibold uppercase tracking-wider text-slate-600 dark:text-slate-400", children: labels.avatarLabel }),
|
|
3732
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-1.5", children: EMOJI_PALETTE.map((e) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3733
|
+
chunkKZDABEML_js.PickerTile,
|
|
3734
|
+
{
|
|
3735
|
+
onClick: () => {
|
|
3736
|
+
setEmoji(e);
|
|
3737
|
+
markTouched();
|
|
3738
|
+
},
|
|
3739
|
+
selected: emoji === e,
|
|
3740
|
+
className: [
|
|
3741
|
+
"flex h-9 w-9 items-center justify-center rounded-lg text-base transition-all",
|
|
3742
|
+
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"
|
|
3743
|
+
].join(" "),
|
|
3744
|
+
children: e
|
|
3745
|
+
},
|
|
3746
|
+
e
|
|
3747
|
+
)) })
|
|
3748
|
+
] }),
|
|
3749
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkKZDABEML_js.FormGrid, { children: [
|
|
3750
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3751
|
+
chunkKZDABEML_js.FormInput,
|
|
3752
|
+
{
|
|
3753
|
+
label: labels.name,
|
|
3754
|
+
value: name,
|
|
3755
|
+
onValueChange: (v) => {
|
|
3756
|
+
setName(v);
|
|
3757
|
+
markTouched();
|
|
3758
|
+
},
|
|
3759
|
+
required: true,
|
|
3760
|
+
placeholder: labels.namePlaceholder
|
|
3761
|
+
}
|
|
3762
|
+
),
|
|
3763
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3764
|
+
chunkKZDABEML_js.FormInput,
|
|
3765
|
+
{
|
|
3766
|
+
label: labels.role,
|
|
3767
|
+
value: role,
|
|
3768
|
+
onValueChange: (v) => {
|
|
3769
|
+
setRole(v);
|
|
3770
|
+
markTouched();
|
|
3771
|
+
},
|
|
3772
|
+
placeholder: labels.rolePlaceholder
|
|
3773
|
+
}
|
|
3774
|
+
)
|
|
3775
|
+
] }),
|
|
3871
3776
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3872
|
-
|
|
3777
|
+
chunkKZDABEML_js.FormTextarea,
|
|
3873
3778
|
{
|
|
3874
|
-
|
|
3875
|
-
|
|
3876
|
-
|
|
3877
|
-
|
|
3779
|
+
label: labels.descriptionLabel,
|
|
3780
|
+
value: description,
|
|
3781
|
+
onValueChange: (v) => {
|
|
3782
|
+
setDescription(v);
|
|
3783
|
+
markTouched();
|
|
3878
3784
|
},
|
|
3879
|
-
|
|
3880
|
-
|
|
3881
|
-
chunkFZUV7GNB_js.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__ */ jsxRuntime.jsx(
|
|
3895
|
-
chunkFZUV7GNB_js.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
|
-
),
|
|
3908
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3909
|
-
RangeSliderField,
|
|
3910
|
-
{
|
|
3911
|
-
sliderId: "wizard-temperature",
|
|
3912
|
-
label: labels.temperature,
|
|
3913
|
-
value: temperature,
|
|
3914
|
-
onChange: (v) => {
|
|
3915
|
-
setTemperature(v);
|
|
3916
|
-
markTouched();
|
|
3917
|
-
},
|
|
3918
|
-
min: 0,
|
|
3919
|
-
max: 1,
|
|
3920
|
-
step: 0.05,
|
|
3921
|
-
trackGradient: "linear-gradient(90deg, #3b82f6, #8b5cf6 50%, #ec4899)",
|
|
3922
|
-
formatValue: (v) => v.toFixed(2),
|
|
3923
|
-
zones: [
|
|
3924
|
-
{ label: "Precise", max: 0.3, color: "text-blue-500", thumbColor: "#3b82f6" },
|
|
3925
|
-
{ label: "Balanced", max: 0.7, color: "text-purple-500", thumbColor: "#8b5cf6" },
|
|
3926
|
-
{ label: "Creative", max: 1, color: "text-pink-500", thumbColor: "#ec4899" }
|
|
3927
|
-
]
|
|
3928
|
-
}
|
|
3929
|
-
),
|
|
3930
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3931
|
-
RangeSliderField,
|
|
3932
|
-
{
|
|
3933
|
-
sliderId: "wizard-top-p",
|
|
3934
|
-
label: labels.topPLabel,
|
|
3935
|
-
value: topP,
|
|
3936
|
-
onChange: (v) => {
|
|
3937
|
-
setTopP(v);
|
|
3938
|
-
markTouched();
|
|
3939
|
-
},
|
|
3940
|
-
min: 0,
|
|
3941
|
-
max: 1,
|
|
3942
|
-
step: 0.05,
|
|
3943
|
-
trackGradient: "linear-gradient(90deg, #6366f1, #8b5cf6)",
|
|
3944
|
-
formatValue: (v) => v.toFixed(2),
|
|
3945
|
-
zones: [
|
|
3946
|
-
{ label: "Top-P", max: 1, color: "text-violet-500", thumbColor: "#8b5cf6" }
|
|
3947
|
-
]
|
|
3948
|
-
}
|
|
3949
|
-
),
|
|
3950
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3951
|
-
RangeSliderField,
|
|
3952
|
-
{
|
|
3953
|
-
sliderId: "wizard-top-k",
|
|
3954
|
-
label: labels.topKLabel,
|
|
3955
|
-
value: topK,
|
|
3956
|
-
onChange: (v) => {
|
|
3957
|
-
setTopK(Math.max(0, Math.floor(v)));
|
|
3958
|
-
markTouched();
|
|
3959
|
-
},
|
|
3960
|
-
min: 0,
|
|
3961
|
-
max: 500,
|
|
3962
|
-
step: 1,
|
|
3963
|
-
trackGradient: "linear-gradient(90deg, #10b981, #14b8a6)",
|
|
3964
|
-
formatValue: (v) => v.toString(),
|
|
3965
|
-
zones: [
|
|
3966
|
-
{ label: "Top-K", max: 500, color: "text-emerald-500", thumbColor: "#10b981" }
|
|
3967
|
-
]
|
|
3968
|
-
}
|
|
3969
|
-
),
|
|
3970
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3971
|
-
chunkFZUV7GNB_js.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__ */ jsxRuntime.jsx("div", { className: "overflow-hidden rounded-lg border border-slate-200/30 dark:border-white/10", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-3 gap-px bg-slate-200/30 dark:bg-white/10", children: [
|
|
3987
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-white/60 px-3 py-2 dark:bg-slate-900/60", children: [
|
|
3988
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[9px] uppercase tracking-wider text-slate-400 dark:text-slate-500", children: labels.model }),
|
|
3989
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "truncate text-xs font-semibold text-slate-900 dark:text-white", children: matchingModels.find((m) => m.id === modelId)?.name ?? labels.modelEmpty })
|
|
3990
|
-
] }),
|
|
3991
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-white/60 px-3 py-2 dark:bg-slate-900/60", children: [
|
|
3992
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[9px] uppercase tracking-wider text-slate-400 dark:text-slate-500", children: labels.maxTokens }),
|
|
3993
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-semibold text-slate-900 dark:text-white", children: maxTokens.toLocaleString() })
|
|
3994
|
-
] }),
|
|
3995
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-white/60 px-3 py-2 dark:bg-slate-900/60", children: [
|
|
3996
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[9px] uppercase tracking-wider text-slate-400 dark:text-slate-500", children: labels.temperature }),
|
|
3997
|
-
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: `text-xs font-semibold ${temperature <= 0.3 ? "text-blue-500" : temperature <= 0.7 ? "text-purple-500" : "text-pink-500"}`, children: [
|
|
3998
|
-
temperature.toFixed(2),
|
|
3999
|
-
" \xB7 ",
|
|
4000
|
-
temperature <= 0.3 ? "Precise" : temperature <= 0.7 ? "Balanced" : "Creative"
|
|
4001
|
-
] })
|
|
4002
|
-
] })
|
|
4003
|
-
] }) })
|
|
4004
|
-
] })
|
|
3785
|
+
rows: 3,
|
|
3786
|
+
placeholder: labels.descriptionPlaceholder
|
|
4005
3787
|
}
|
|
4006
|
-
)
|
|
3788
|
+
)
|
|
3789
|
+
] });
|
|
3790
|
+
}
|
|
3791
|
+
function renderStep3() {
|
|
3792
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
3793
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkKZDABEML_js.FormGrid, { children: [
|
|
3794
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3795
|
+
chunkKZDABEML_js.FormSelect,
|
|
3796
|
+
{
|
|
3797
|
+
label: labels.connectionLabel,
|
|
3798
|
+
value: connectionId,
|
|
3799
|
+
onValueChange: (v) => {
|
|
3800
|
+
setConnectionId(v);
|
|
3801
|
+
markTouched();
|
|
3802
|
+
},
|
|
3803
|
+
options: connectionOptions,
|
|
3804
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(outline.LinkIcon, { className: "h-4 w-4" })
|
|
3805
|
+
}
|
|
3806
|
+
),
|
|
3807
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3808
|
+
chunkKZDABEML_js.FormSelect,
|
|
3809
|
+
{
|
|
3810
|
+
label: labels.frameworkLabel,
|
|
3811
|
+
value: framework,
|
|
3812
|
+
onValueChange: (v) => {
|
|
3813
|
+
setFramework(v);
|
|
3814
|
+
markTouched();
|
|
3815
|
+
},
|
|
3816
|
+
options: frameworkOptions
|
|
3817
|
+
}
|
|
3818
|
+
),
|
|
3819
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3820
|
+
chunkKZDABEML_js.FormSelect,
|
|
3821
|
+
{
|
|
3822
|
+
label: labels.model,
|
|
3823
|
+
value: modelId,
|
|
3824
|
+
onValueChange: (v) => {
|
|
3825
|
+
setModelId(v);
|
|
3826
|
+
markTouched();
|
|
3827
|
+
},
|
|
3828
|
+
options: modelOptions.length > 0 ? modelOptions : [{ value: "", label: labels.modelEmpty }]
|
|
3829
|
+
}
|
|
3830
|
+
)
|
|
3831
|
+
] }),
|
|
4007
3832
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4008
|
-
|
|
3833
|
+
chunkKZDABEML_js.FormTextarea,
|
|
4009
3834
|
{
|
|
4010
|
-
|
|
4011
|
-
|
|
4012
|
-
|
|
4013
|
-
|
|
3835
|
+
label: labels.outputSchemaLabel,
|
|
3836
|
+
value: outputSchema,
|
|
3837
|
+
onValueChange: (v) => {
|
|
3838
|
+
setOutputSchema(v);
|
|
3839
|
+
markTouched();
|
|
4014
3840
|
},
|
|
4015
|
-
|
|
4016
|
-
|
|
4017
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "mb-2 block text-xs font-semibold uppercase tracking-wider text-slate-600 dark:text-slate-400", children: labels.difficultyLabel }),
|
|
4018
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-2 gap-2 sm:grid-cols-4", children: DIFFICULTY_OPTIONS.map((opt) => {
|
|
4019
|
-
const selected = difficulty === opt.id;
|
|
4020
|
-
const label = opt.id === "beginner" ? labels.difficultyBeginner : opt.id === "intermediate" ? labels.difficultyIntermediate : opt.id === "advanced" ? labels.difficultyAdvanced : labels.difficultyExpert;
|
|
4021
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4022
|
-
chunkFZUV7GNB_js.PickerTile,
|
|
4023
|
-
{
|
|
4024
|
-
onClick: () => {
|
|
4025
|
-
setDifficulty(opt.id);
|
|
4026
|
-
markTouched();
|
|
4027
|
-
},
|
|
4028
|
-
selected,
|
|
4029
|
-
className: [
|
|
4030
|
-
"liquid-surface flex items-center gap-2 rounded-xl px-3 py-2 text-left transition-all",
|
|
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"
|
|
4032
|
-
].join(" "),
|
|
4033
|
-
children: [
|
|
4034
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4035
|
-
"span",
|
|
4036
|
-
{
|
|
4037
|
-
"aria-hidden": "true",
|
|
4038
|
-
className: `flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-gradient-to-br ${opt.accent} text-base shadow-sm`,
|
|
4039
|
-
children: opt.emoji
|
|
4040
|
-
}
|
|
4041
|
-
),
|
|
4042
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-semibold text-slate-900 dark:text-white", children: label })
|
|
4043
|
-
]
|
|
4044
|
-
},
|
|
4045
|
-
opt.id
|
|
4046
|
-
);
|
|
4047
|
-
}) })
|
|
4048
|
-
] }),
|
|
4049
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4050
|
-
chunkFZUV7GNB_js.FormInput,
|
|
4051
|
-
{
|
|
4052
|
-
label: labels.tagsLabel,
|
|
4053
|
-
value: tagsInput,
|
|
4054
|
-
onValueChange: (v) => {
|
|
4055
|
-
setTagsInput(v);
|
|
4056
|
-
markTouched();
|
|
4057
|
-
},
|
|
4058
|
-
placeholder: labels.tagsPlaceholder
|
|
4059
|
-
}
|
|
4060
|
-
)
|
|
4061
|
-
] })
|
|
3841
|
+
rows: 5,
|
|
3842
|
+
placeholder: labels.outputSchemaPlaceholder
|
|
4062
3843
|
}
|
|
4063
3844
|
)
|
|
4064
3845
|
] });
|
|
4065
3846
|
}
|
|
4066
|
-
function
|
|
4067
|
-
const modelLabel = models.find((m) => m.id === modelId)?.name ?? labels.modelEmpty;
|
|
4068
|
-
const connectionLabel = connectionId ? connections.find((c) => c.id === connectionId)?.name ?? labels.connectionInline : labels.connectionInline;
|
|
3847
|
+
function renderStep4() {
|
|
4069
3848
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
4070
3849
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4071
|
-
|
|
3850
|
+
chunkKZDABEML_js.FormTextarea,
|
|
4072
3851
|
{
|
|
4073
|
-
|
|
4074
|
-
|
|
4075
|
-
|
|
4076
|
-
|
|
3852
|
+
label: labels.promptSystemPrompt,
|
|
3853
|
+
value: systemPrompt,
|
|
3854
|
+
onValueChange: (v) => {
|
|
3855
|
+
setSystemPrompt(v);
|
|
3856
|
+
markTouched();
|
|
4077
3857
|
},
|
|
4078
|
-
|
|
4079
|
-
|
|
4080
|
-
|
|
4081
|
-
] }),
|
|
4082
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-slate-700 dark:text-slate-200", children: presetId === "custom" ? labels.presetCustom : AGENT_PRESETS.find((p) => p.id === presetId)?.name ?? labels.presetCustom })
|
|
3858
|
+
rows: 6,
|
|
3859
|
+
placeholder: labels.promptPlaceholder,
|
|
3860
|
+
hint: `${systemPrompt.length} chars`
|
|
4083
3861
|
}
|
|
4084
3862
|
),
|
|
4085
3863
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4086
|
-
|
|
3864
|
+
chunkKZDABEML_js.FormTextarea,
|
|
4087
3865
|
{
|
|
4088
|
-
|
|
4089
|
-
|
|
4090
|
-
|
|
4091
|
-
|
|
3866
|
+
label: labels.userPromptLabel,
|
|
3867
|
+
value: userPrompt,
|
|
3868
|
+
onValueChange: (v) => {
|
|
3869
|
+
setUserPrompt(v);
|
|
3870
|
+
markTouched();
|
|
4092
3871
|
},
|
|
4093
|
-
|
|
4094
|
-
|
|
4095
|
-
|
|
4096
|
-
] }),
|
|
4097
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-3", children: [
|
|
4098
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4099
|
-
"span",
|
|
4100
|
-
{
|
|
4101
|
-
"aria-hidden": "true",
|
|
4102
|
-
className: `flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-gradient-to-br ${activePreset.accent} text-lg shadow-sm`,
|
|
4103
|
-
children: emoji
|
|
4104
|
-
}
|
|
4105
|
-
),
|
|
4106
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0", children: [
|
|
4107
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "truncate text-sm font-semibold text-slate-900 dark:text-white", children: name || labels.namePlaceholder }),
|
|
4108
|
-
role && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "truncate text-xs text-slate-500 dark:text-slate-400", children: role }),
|
|
4109
|
-
description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-xs text-slate-600 dark:text-slate-300", children: description })
|
|
4110
|
-
] })
|
|
4111
|
-
] })
|
|
3872
|
+
rows: 4,
|
|
3873
|
+
placeholder: labels.userPromptPlaceholder,
|
|
3874
|
+
hint: `${userPrompt.length} chars`
|
|
4112
3875
|
}
|
|
4113
3876
|
),
|
|
4114
3877
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4115
|
-
|
|
3878
|
+
RangeSliderField,
|
|
4116
3879
|
{
|
|
4117
|
-
|
|
4118
|
-
|
|
4119
|
-
|
|
4120
|
-
|
|
3880
|
+
sliderId: "wizard-temperature",
|
|
3881
|
+
label: labels.temperature,
|
|
3882
|
+
value: temperature,
|
|
3883
|
+
onChange: (v) => {
|
|
3884
|
+
setTemperature(v);
|
|
3885
|
+
markTouched();
|
|
4121
3886
|
},
|
|
4122
|
-
|
|
4123
|
-
|
|
4124
|
-
|
|
4125
|
-
|
|
4126
|
-
|
|
4127
|
-
|
|
4128
|
-
|
|
4129
|
-
|
|
4130
|
-
|
|
4131
|
-
]
|
|
3887
|
+
min: 0,
|
|
3888
|
+
max: 1,
|
|
3889
|
+
step: 0.05,
|
|
3890
|
+
trackGradient: "linear-gradient(90deg, #3b82f6, #8b5cf6 50%, #ec4899)",
|
|
3891
|
+
formatValue: (v) => v.toFixed(2),
|
|
3892
|
+
zones: [
|
|
3893
|
+
{ label: "Precise", max: 0.3, color: "text-blue-500", thumbColor: "#3b82f6" },
|
|
3894
|
+
{ label: "Balanced", max: 0.7, color: "text-purple-500", thumbColor: "#8b5cf6" },
|
|
3895
|
+
{ label: "Creative", max: 1, color: "text-pink-500", thumbColor: "#ec4899" }
|
|
3896
|
+
]
|
|
4132
3897
|
}
|
|
4133
3898
|
),
|
|
4134
|
-
/* @__PURE__ */ jsxRuntime.
|
|
4135
|
-
|
|
3899
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3900
|
+
RangeSliderField,
|
|
4136
3901
|
{
|
|
4137
|
-
|
|
4138
|
-
|
|
4139
|
-
|
|
4140
|
-
|
|
3902
|
+
sliderId: "wizard-top-p",
|
|
3903
|
+
label: labels.topPLabel,
|
|
3904
|
+
value: topP,
|
|
3905
|
+
onChange: (v) => {
|
|
3906
|
+
setTopP(v);
|
|
3907
|
+
markTouched();
|
|
4141
3908
|
},
|
|
4142
|
-
|
|
4143
|
-
|
|
4144
|
-
|
|
4145
|
-
|
|
4146
|
-
|
|
4147
|
-
|
|
4148
|
-
|
|
4149
|
-
/* @__PURE__ */ jsxRuntime.jsx(ReviewRow, { label: labels.topPLabel, value: topP.toFixed(2) }),
|
|
4150
|
-
/* @__PURE__ */ jsxRuntime.jsx(ReviewRow, { label: labels.topKLabel, value: String(topK) }),
|
|
4151
|
-
/* @__PURE__ */ jsxRuntime.jsx(ReviewRow, { label: labels.maxTokens, value: maxTokens.toLocaleString() })
|
|
4152
|
-
] }),
|
|
4153
|
-
systemPrompt && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-3", children: [
|
|
4154
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[10px] uppercase tracking-wider text-slate-400 dark:text-slate-500", children: labels.promptSystemPrompt }),
|
|
4155
|
-
/* @__PURE__ */ jsxRuntime.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 })
|
|
4156
|
-
] })
|
|
3909
|
+
min: 0,
|
|
3910
|
+
max: 1,
|
|
3911
|
+
step: 0.05,
|
|
3912
|
+
trackGradient: "linear-gradient(90deg, #6366f1, #8b5cf6)",
|
|
3913
|
+
formatValue: (v) => v.toFixed(2),
|
|
3914
|
+
zones: [
|
|
3915
|
+
{ label: "Top-P", max: 1, color: "text-violet-500", thumbColor: "#8b5cf6" }
|
|
4157
3916
|
]
|
|
4158
3917
|
}
|
|
4159
|
-
)
|
|
4160
|
-
|
|
4161
|
-
|
|
4162
|
-
|
|
4163
|
-
|
|
4164
|
-
|
|
4165
|
-
|
|
4166
|
-
|
|
4167
|
-
|
|
4168
|
-
|
|
4169
|
-
|
|
4170
|
-
|
|
4171
|
-
|
|
4172
|
-
|
|
4173
|
-
|
|
4174
|
-
|
|
4175
|
-
|
|
4176
|
-
|
|
4177
|
-
|
|
3918
|
+
),
|
|
3919
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3920
|
+
RangeSliderField,
|
|
3921
|
+
{
|
|
3922
|
+
sliderId: "wizard-top-k",
|
|
3923
|
+
label: labels.topKLabel,
|
|
3924
|
+
value: topK,
|
|
3925
|
+
onChange: (v) => {
|
|
3926
|
+
setTopK(Math.max(0, Math.floor(v)));
|
|
3927
|
+
markTouched();
|
|
3928
|
+
},
|
|
3929
|
+
min: 0,
|
|
3930
|
+
max: 500,
|
|
3931
|
+
step: 1,
|
|
3932
|
+
trackGradient: "linear-gradient(90deg, #10b981, #14b8a6)",
|
|
3933
|
+
formatValue: (v) => v.toString(),
|
|
3934
|
+
zones: [
|
|
3935
|
+
{ label: "Top-K", max: 500, color: "text-emerald-500", thumbColor: "#10b981" }
|
|
3936
|
+
]
|
|
3937
|
+
}
|
|
3938
|
+
),
|
|
3939
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkKZDABEML_js.FormGrid, { children: [
|
|
3940
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3941
|
+
chunkKZDABEML_js.FormInput,
|
|
3942
|
+
{
|
|
3943
|
+
label: labels.maxTokens,
|
|
3944
|
+
type: "number",
|
|
3945
|
+
value: String(maxTokens),
|
|
3946
|
+
onValueChange: (v) => {
|
|
3947
|
+
setMaxTokens(Math.max(1, Math.floor(Number(v) || 0)));
|
|
3948
|
+
markTouched();
|
|
3949
|
+
},
|
|
3950
|
+
min: 1,
|
|
3951
|
+
max: 32e3,
|
|
3952
|
+
step: 1,
|
|
3953
|
+
hint: maxTokens.toLocaleString()
|
|
3954
|
+
}
|
|
3955
|
+
),
|
|
3956
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3957
|
+
chunkKZDABEML_js.FormInput,
|
|
3958
|
+
{
|
|
3959
|
+
label: labels.tagsLabel,
|
|
3960
|
+
value: tagsInput,
|
|
3961
|
+
onValueChange: (v) => {
|
|
3962
|
+
setTagsInput(v);
|
|
3963
|
+
markTouched();
|
|
3964
|
+
},
|
|
3965
|
+
placeholder: labels.tagsPlaceholder
|
|
3966
|
+
}
|
|
3967
|
+
)
|
|
3968
|
+
] }),
|
|
3969
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
3970
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "mb-2 block text-xs font-semibold uppercase tracking-wider text-slate-600 dark:text-slate-400", children: labels.difficultyLabel }),
|
|
3971
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-2 gap-2 sm:grid-cols-4", children: DIFFICULTY_OPTIONS.map((opt) => {
|
|
3972
|
+
const selected = difficulty === opt.id;
|
|
3973
|
+
const label = opt.id === "beginner" ? labels.difficultyBeginner : opt.id === "intermediate" ? labels.difficultyIntermediate : opt.id === "advanced" ? labels.difficultyAdvanced : labels.difficultyExpert;
|
|
3974
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3975
|
+
chunkKZDABEML_js.PickerTile,
|
|
3976
|
+
{
|
|
3977
|
+
onClick: () => {
|
|
3978
|
+
setDifficulty(opt.id);
|
|
3979
|
+
markTouched();
|
|
3980
|
+
},
|
|
3981
|
+
selected,
|
|
3982
|
+
className: [
|
|
3983
|
+
"liquid-surface flex items-center gap-2 rounded-xl px-3 py-2 text-left transition-all",
|
|
3984
|
+
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"
|
|
3985
|
+
].join(" "),
|
|
3986
|
+
children: [
|
|
3987
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3988
|
+
"span",
|
|
3989
|
+
{
|
|
3990
|
+
"aria-hidden": "true",
|
|
3991
|
+
className: `flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-gradient-to-br ${opt.accent} text-base shadow-sm`,
|
|
3992
|
+
children: opt.emoji
|
|
3993
|
+
}
|
|
3994
|
+
),
|
|
3995
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-semibold text-slate-900 dark:text-white", children: label })
|
|
3996
|
+
]
|
|
3997
|
+
},
|
|
3998
|
+
opt.id
|
|
3999
|
+
);
|
|
4000
|
+
}) })
|
|
4001
|
+
] })
|
|
4002
|
+
] });
|
|
4003
|
+
}
|
|
4004
|
+
function renderStep5() {
|
|
4005
|
+
const modelLabel = models.find((m) => m.id === modelId)?.name ?? labels.modelEmpty;
|
|
4006
|
+
const connectionLabel = connectionId ? connections.find((c) => c.id === connectionId)?.name ?? labels.connectionInline : labels.connectionInline;
|
|
4007
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-5", children: [
|
|
4008
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4009
|
+
ReviewBlock,
|
|
4010
|
+
{
|
|
4011
|
+
stepTitle: labels.wizardStep1Title,
|
|
4012
|
+
stepSubtitle: labels.wizardStep1Subtitle,
|
|
4013
|
+
editLabel: labels.wizardReviewEdit,
|
|
4014
|
+
onEdit: () => goToStep(1),
|
|
4015
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-slate-700 dark:text-slate-200", children: presetId === "custom" ? labels.presetCustom : AGENT_PRESETS.find((p) => p.id === presetId)?.name ?? labels.presetCustom })
|
|
4016
|
+
}
|
|
4017
|
+
),
|
|
4018
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4019
|
+
ReviewBlock,
|
|
4020
|
+
{
|
|
4021
|
+
stepTitle: labels.wizardStep2Title,
|
|
4022
|
+
stepSubtitle: labels.wizardStep2Subtitle,
|
|
4023
|
+
editLabel: labels.wizardReviewEdit,
|
|
4024
|
+
onEdit: () => goToStep(2),
|
|
4025
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-3", children: [
|
|
4026
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4027
|
+
"span",
|
|
4028
|
+
{
|
|
4029
|
+
"aria-hidden": "true",
|
|
4030
|
+
className: `flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-gradient-to-br ${activePreset.accent} text-lg shadow-sm`,
|
|
4031
|
+
children: emoji
|
|
4032
|
+
}
|
|
4033
|
+
),
|
|
4034
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0", children: [
|
|
4035
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "truncate text-sm font-semibold text-slate-900 dark:text-white", children: name || labels.namePlaceholder }),
|
|
4036
|
+
role && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "truncate text-xs text-slate-500 dark:text-slate-400", children: role }),
|
|
4037
|
+
description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-xs text-slate-600 dark:text-slate-300", children: description })
|
|
4038
|
+
] })
|
|
4039
|
+
] })
|
|
4040
|
+
}
|
|
4041
|
+
),
|
|
4042
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4043
|
+
ReviewBlock,
|
|
4044
|
+
{
|
|
4045
|
+
stepTitle: labels.wizardStep3Title,
|
|
4046
|
+
stepSubtitle: labels.wizardStep3Subtitle,
|
|
4047
|
+
editLabel: labels.wizardReviewEdit,
|
|
4048
|
+
onEdit: () => goToStep(3),
|
|
4049
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("dl", { className: "grid grid-cols-1 gap-2 sm:grid-cols-2", children: [
|
|
4050
|
+
/* @__PURE__ */ jsxRuntime.jsx(ReviewRow, { label: labels.connectionLabel, value: connectionLabel }),
|
|
4051
|
+
/* @__PURE__ */ jsxRuntime.jsx(ReviewRow, { label: labels.frameworkLabel, value: framework || "\u2014" }),
|
|
4052
|
+
/* @__PURE__ */ jsxRuntime.jsx(ReviewRow, { label: labels.model, value: modelLabel }),
|
|
4053
|
+
outputSchema.trim() && /* @__PURE__ */ jsxRuntime.jsx(ReviewRow, { label: labels.outputSchemaLabel, value: outputSchema.trim().slice(0, 60) + (outputSchema.length > 60 ? "\u2026" : "") })
|
|
4054
|
+
] })
|
|
4055
|
+
}
|
|
4056
|
+
),
|
|
4057
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
4058
|
+
ReviewBlock,
|
|
4059
|
+
{
|
|
4060
|
+
stepTitle: labels.wizardStep4Title,
|
|
4061
|
+
stepSubtitle: labels.wizardStep4Subtitle,
|
|
4062
|
+
editLabel: labels.wizardReviewEdit,
|
|
4063
|
+
onEdit: () => goToStep(4),
|
|
4064
|
+
children: [
|
|
4065
|
+
/* @__PURE__ */ jsxRuntime.jsxs("dl", { className: "grid grid-cols-2 gap-2 sm:grid-cols-4", children: [
|
|
4066
|
+
/* @__PURE__ */ jsxRuntime.jsx(ReviewRow, { label: labels.temperature, value: temperature.toFixed(2) }),
|
|
4067
|
+
/* @__PURE__ */ jsxRuntime.jsx(ReviewRow, { label: labels.topPLabel, value: topP.toFixed(2) }),
|
|
4068
|
+
/* @__PURE__ */ jsxRuntime.jsx(ReviewRow, { label: labels.topKLabel, value: String(topK) }),
|
|
4069
|
+
/* @__PURE__ */ jsxRuntime.jsx(ReviewRow, { label: labels.maxTokens, value: maxTokens.toLocaleString() })
|
|
4070
|
+
] }),
|
|
4071
|
+
systemPrompt && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-3", children: [
|
|
4072
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[10px] uppercase tracking-wider text-slate-400 dark:text-slate-500", children: labels.promptSystemPrompt }),
|
|
4073
|
+
/* @__PURE__ */ jsxRuntime.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 })
|
|
4074
|
+
] })
|
|
4075
|
+
]
|
|
4076
|
+
}
|
|
4077
|
+
)
|
|
4078
|
+
] });
|
|
4079
|
+
}
|
|
4080
|
+
const stepBody = step === 1 ? renderStep1() : step === 2 ? renderStep2() : step === 3 ? renderStep3() : step === 4 ? renderStep4() : renderStep5();
|
|
4081
|
+
const advanceDisabled = !canAdvance(step);
|
|
4082
|
+
const isLast = step === TOTAL_STEPS;
|
|
4083
|
+
const scrollableStep = step === 4 || step === 5;
|
|
4084
|
+
const bodyClass = scrollableStep ? "p-5 pt-5 sm:p-8 sm:pt-8 max-h-[60vh] overflow-y-auto" : "p-5 pt-5 sm:p-8 sm:pt-8";
|
|
4085
|
+
const footer = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "liquid-divider flex items-center justify-between border-t pt-4", children: [
|
|
4086
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMXQ2EYG2_js.Button, { type: "button", outline: true, onClick: step === 1 ? cancelWithConfirm : goBack, disabled: submitting, children: step === 1 ? labels.wizardCancel : labels.wizardBack }),
|
|
4087
|
+
isLast ? /* @__PURE__ */ jsxRuntime.jsx(chunkMXQ2EYG2_js.Button, { type: "button", color: "ios-glass-blue", onClick: () => void submit(), disabled: submitting || !name.trim(), children: submitting ? labels.wizardCreate + "\u2026" : labels.wizardCreate }) : /* @__PURE__ */ jsxRuntime.jsx(chunkMXQ2EYG2_js.Button, { type: "button", color: "ios-glass-blue", onClick: goNext, disabled: advanceDisabled || submitting, children: labels.wizardNext })
|
|
4088
|
+
] });
|
|
4089
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4090
|
+
"form",
|
|
4091
|
+
{
|
|
4092
|
+
onSubmit: (e) => {
|
|
4093
|
+
e.preventDefault();
|
|
4094
|
+
if (step < TOTAL_STEPS) goNext();
|
|
4095
|
+
else void submit();
|
|
4178
4096
|
},
|
|
4179
4097
|
className: "space-y-4",
|
|
4180
4098
|
children: [
|
|
4181
|
-
|
|
4099
|
+
hero,
|
|
4100
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.Card, { variant: "default", children: /* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.CardContent, { className: bodyClass, children: stepBody }) }),
|
|
4182
4101
|
footer
|
|
4183
4102
|
]
|
|
4184
4103
|
}
|
|
4185
4104
|
);
|
|
4186
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
4187
|
-
hero,
|
|
4188
|
-
content
|
|
4189
|
-
] });
|
|
4190
4105
|
}
|
|
4191
4106
|
function ReviewRow({ label, value }) {
|
|
4192
4107
|
return /* @__PURE__ */ jsxRuntime.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: [
|
|
@@ -4194,6 +4109,27 @@ function ReviewRow({ label, value }) {
|
|
|
4194
4109
|
/* @__PURE__ */ jsxRuntime.jsx("dd", { className: "mt-0.5 truncate text-xs font-semibold text-slate-900 dark:text-white", children: value })
|
|
4195
4110
|
] });
|
|
4196
4111
|
}
|
|
4112
|
+
function ReviewBlock({
|
|
4113
|
+
stepTitle,
|
|
4114
|
+
stepSubtitle,
|
|
4115
|
+
editLabel,
|
|
4116
|
+
onEdit,
|
|
4117
|
+
children
|
|
4118
|
+
}) {
|
|
4119
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "border-b liquid-divider pb-4 last:border-b-0 last:pb-0", children: [
|
|
4120
|
+
/* @__PURE__ */ jsxRuntime.jsxs("header", { className: "mb-2 flex items-start justify-between gap-3", children: [
|
|
4121
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0", children: [
|
|
4122
|
+
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: "truncate text-sm font-semibold text-slate-900 dark:text-white", children: stepTitle }),
|
|
4123
|
+
stepSubtitle && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "truncate text-xs text-slate-500 dark:text-slate-400", children: stepSubtitle })
|
|
4124
|
+
] }),
|
|
4125
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkMXQ2EYG2_js.Button, { type: "button", size: "sm", outline: true, onClick: onEdit, children: [
|
|
4126
|
+
/* @__PURE__ */ jsxRuntime.jsx(outline.PencilSquareIcon, { className: "h-4 w-4" }),
|
|
4127
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-1.5", children: editLabel })
|
|
4128
|
+
] })
|
|
4129
|
+
] }),
|
|
4130
|
+
children
|
|
4131
|
+
] });
|
|
4132
|
+
}
|
|
4197
4133
|
var DIALECT_LOGO_SRC = {
|
|
4198
4134
|
bigquery: "/logos/datasources/bigquery.svg",
|
|
4199
4135
|
postgres: "/logos/datasources/postgres.svg",
|
|
@@ -4281,8 +4217,8 @@ function DatasourceNewWizardPageView({
|
|
|
4281
4217
|
const [submitting, setSubmitting] = react.useState(false);
|
|
4282
4218
|
const [touched, setTouched] = react.useState(false);
|
|
4283
4219
|
const [testStatus, setTestStatus] = react.useState("idle");
|
|
4284
|
-
const dialectOption = react.useMemo(() => dialect ?
|
|
4285
|
-
const category = react.useMemo(() => dialect ?
|
|
4220
|
+
const dialectOption = react.useMemo(() => dialect ? chunkPADXORD2_js.findDialect(dialect) : null, [dialect]);
|
|
4221
|
+
const category = react.useMemo(() => dialect ? chunkPADXORD2_js.findCategory(dialect) : null, [dialect]);
|
|
4286
4222
|
react.useEffect(() => {
|
|
4287
4223
|
if (dialectOption?.defaultPort && (port === "" || /^[0-9]+$/.test(port))) {
|
|
4288
4224
|
setPort(String(dialectOption.defaultPort));
|
|
@@ -4405,17 +4341,25 @@ function DatasourceNewWizardPageView({
|
|
|
4405
4341
|
id: String(idx + 1),
|
|
4406
4342
|
title
|
|
4407
4343
|
}));
|
|
4408
|
-
const counter = labels.wizardStepCounter.replace("{current}", String(step)).replace("{total}", String(TOTAL_STEPS2));
|
|
4409
4344
|
const hero = /* @__PURE__ */ jsxRuntime.jsx(
|
|
4410
|
-
|
|
4345
|
+
chunkKZDABEML_js.HeroSection,
|
|
4411
4346
|
{
|
|
4412
4347
|
icon: /* @__PURE__ */ jsxRuntime.jsx(outline.CircleStackIcon, { className: "h-5 w-5" }),
|
|
4413
|
-
label:
|
|
4414
|
-
title: labels.pageTitle,
|
|
4348
|
+
label: labels.pageTitle,
|
|
4349
|
+
title: stepTitles[step - 1] ?? labels.pageTitle,
|
|
4415
4350
|
subtitle: stepSubtitles[step - 1] ?? labels.pageSubtitle,
|
|
4416
4351
|
gradient: category?.gradient ?? "from-amber-500 to-orange-600",
|
|
4352
|
+
actions: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4353
|
+
chunkMXQ2EYG2_js.IconButton,
|
|
4354
|
+
{
|
|
4355
|
+
label: labels.wizardCancel,
|
|
4356
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(outline.XMarkIcon, { className: "h-5 w-5" }),
|
|
4357
|
+
variant: "ghost",
|
|
4358
|
+
onClick: cancelWithConfirm
|
|
4359
|
+
}
|
|
4360
|
+
),
|
|
4417
4361
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4418
|
-
|
|
4362
|
+
chunkKZDABEML_js.StepIndicator,
|
|
4419
4363
|
{
|
|
4420
4364
|
accent: "indigo",
|
|
4421
4365
|
currentStep: step - 1,
|
|
@@ -4427,48 +4371,42 @@ function DatasourceNewWizardPageView({
|
|
|
4427
4371
|
}
|
|
4428
4372
|
);
|
|
4429
4373
|
function renderStep1() {
|
|
4430
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-
|
|
4374
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-5", children: chunkPADXORD2_js.DIALECT_CATEGORIES.map((cat) => {
|
|
4431
4375
|
const color = CATEGORY_COLOR[cat.id] ?? "slate";
|
|
4432
4376
|
const categoryLabel = labels[cat.labelKey] ?? cat.id;
|
|
4433
|
-
return /* @__PURE__ */ jsxRuntime.
|
|
4434
|
-
|
|
4435
|
-
|
|
4436
|
-
|
|
4437
|
-
|
|
4438
|
-
|
|
4439
|
-
|
|
4440
|
-
|
|
4441
|
-
|
|
4442
|
-
|
|
4443
|
-
"
|
|
4444
|
-
{
|
|
4445
|
-
|
|
4446
|
-
|
|
4447
|
-
|
|
4448
|
-
|
|
4449
|
-
|
|
4450
|
-
|
|
4451
|
-
|
|
4452
|
-
|
|
4453
|
-
|
|
4454
|
-
|
|
4455
|
-
|
|
4456
|
-
|
|
4457
|
-
|
|
4458
|
-
|
|
4459
|
-
|
|
4460
|
-
|
|
4461
|
-
|
|
4462
|
-
|
|
4463
|
-
|
|
4464
|
-
|
|
4465
|
-
|
|
4466
|
-
})
|
|
4467
|
-
}
|
|
4468
|
-
)
|
|
4469
|
-
},
|
|
4470
|
-
cat.id
|
|
4471
|
-
);
|
|
4377
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
4378
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-2 flex items-center gap-2 text-xs font-semibold uppercase tracking-wider text-slate-600 dark:text-slate-400", children: [
|
|
4379
|
+
/* @__PURE__ */ jsxRuntime.jsx(cat.icon, { className: "h-3.5 w-3.5" }),
|
|
4380
|
+
categoryLabel
|
|
4381
|
+
] }),
|
|
4382
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4383
|
+
"div",
|
|
4384
|
+
{
|
|
4385
|
+
role: "radiogroup",
|
|
4386
|
+
"aria-label": categoryLabel,
|
|
4387
|
+
className: "grid grid-cols-2 gap-2 sm:grid-cols-3 lg:grid-cols-4",
|
|
4388
|
+
children: cat.dialects.map((opt) => {
|
|
4389
|
+
const selected = opt.value === dialect;
|
|
4390
|
+
const logoSrc = DIALECT_LOGO_SRC[opt.value.toLowerCase()];
|
|
4391
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4392
|
+
chunkKZDABEML_js.FilterTileButton,
|
|
4393
|
+
{
|
|
4394
|
+
isActive: selected,
|
|
4395
|
+
color,
|
|
4396
|
+
icon: logoSrc ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: logoSrc, alt: opt.label, className: "h-5 w-5 object-contain" }) : /* @__PURE__ */ jsxRuntime.jsx(outline.CircleStackIcon, { className: "h-5 w-5" }),
|
|
4397
|
+
label: opt.label,
|
|
4398
|
+
count: opt.formType.replace("-", " "),
|
|
4399
|
+
onClick: () => {
|
|
4400
|
+
setDialect(opt.value);
|
|
4401
|
+
markTouched();
|
|
4402
|
+
}
|
|
4403
|
+
},
|
|
4404
|
+
opt.value
|
|
4405
|
+
);
|
|
4406
|
+
})
|
|
4407
|
+
}
|
|
4408
|
+
)
|
|
4409
|
+
] }, cat.id);
|
|
4472
4410
|
}) });
|
|
4473
4411
|
}
|
|
4474
4412
|
function renderConnectionFields() {
|
|
@@ -4477,7 +4415,7 @@ function DatasourceNewWizardPageView({
|
|
|
4477
4415
|
case "standard":
|
|
4478
4416
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
4479
4417
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4480
|
-
|
|
4418
|
+
chunkKZDABEML_js.FormInput,
|
|
4481
4419
|
{
|
|
4482
4420
|
label: labels.fieldHost,
|
|
4483
4421
|
value: host,
|
|
@@ -4490,7 +4428,7 @@ function DatasourceNewWizardPageView({
|
|
|
4490
4428
|
}
|
|
4491
4429
|
),
|
|
4492
4430
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4493
|
-
|
|
4431
|
+
chunkKZDABEML_js.FormInput,
|
|
4494
4432
|
{
|
|
4495
4433
|
label: labels.fieldPort,
|
|
4496
4434
|
type: "number",
|
|
@@ -4502,7 +4440,7 @@ function DatasourceNewWizardPageView({
|
|
|
4502
4440
|
}
|
|
4503
4441
|
),
|
|
4504
4442
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4505
|
-
|
|
4443
|
+
chunkKZDABEML_js.FormInput,
|
|
4506
4444
|
{
|
|
4507
4445
|
label: labels.fieldDatabase,
|
|
4508
4446
|
value: database,
|
|
@@ -4515,7 +4453,7 @@ function DatasourceNewWizardPageView({
|
|
|
4515
4453
|
}
|
|
4516
4454
|
),
|
|
4517
4455
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4518
|
-
|
|
4456
|
+
chunkKZDABEML_js.FormInput,
|
|
4519
4457
|
{
|
|
4520
4458
|
label: labels.fieldUsername,
|
|
4521
4459
|
value: username,
|
|
@@ -4527,7 +4465,7 @@ function DatasourceNewWizardPageView({
|
|
|
4527
4465
|
}
|
|
4528
4466
|
),
|
|
4529
4467
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4530
|
-
|
|
4468
|
+
chunkKZDABEML_js.FormInput,
|
|
4531
4469
|
{
|
|
4532
4470
|
label: labels.fieldPassword,
|
|
4533
4471
|
type: "password",
|
|
@@ -4540,7 +4478,7 @@ function DatasourceNewWizardPageView({
|
|
|
4540
4478
|
}
|
|
4541
4479
|
),
|
|
4542
4480
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4543
|
-
|
|
4481
|
+
chunkKZDABEML_js.FormInput,
|
|
4544
4482
|
{
|
|
4545
4483
|
label: labels.fieldSchema,
|
|
4546
4484
|
value: schema,
|
|
@@ -4554,7 +4492,7 @@ function DatasourceNewWizardPageView({
|
|
|
4554
4492
|
] });
|
|
4555
4493
|
case "connection-string":
|
|
4556
4494
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-full", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4557
|
-
|
|
4495
|
+
chunkKZDABEML_js.FormInput,
|
|
4558
4496
|
{
|
|
4559
4497
|
label: labels.fieldConnectionString,
|
|
4560
4498
|
value: connectionString,
|
|
@@ -4569,7 +4507,7 @@ function DatasourceNewWizardPageView({
|
|
|
4569
4507
|
case "cloud-bigquery":
|
|
4570
4508
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
4571
4509
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4572
|
-
|
|
4510
|
+
chunkKZDABEML_js.FormInput,
|
|
4573
4511
|
{
|
|
4574
4512
|
label: labels.fieldProjectId,
|
|
4575
4513
|
value: projectId,
|
|
@@ -4582,7 +4520,7 @@ function DatasourceNewWizardPageView({
|
|
|
4582
4520
|
}
|
|
4583
4521
|
),
|
|
4584
4522
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4585
|
-
|
|
4523
|
+
chunkKZDABEML_js.FormInput,
|
|
4586
4524
|
{
|
|
4587
4525
|
label: labels.fieldDataset,
|
|
4588
4526
|
value: dataset,
|
|
@@ -4595,7 +4533,7 @@ function DatasourceNewWizardPageView({
|
|
|
4595
4533
|
}
|
|
4596
4534
|
),
|
|
4597
4535
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-full", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4598
|
-
|
|
4536
|
+
chunkKZDABEML_js.FormInput,
|
|
4599
4537
|
{
|
|
4600
4538
|
label: labels.fieldKeyFile,
|
|
4601
4539
|
value: keyFile,
|
|
@@ -4610,7 +4548,7 @@ function DatasourceNewWizardPageView({
|
|
|
4610
4548
|
case "cloud-snowflake":
|
|
4611
4549
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
4612
4550
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4613
|
-
|
|
4551
|
+
chunkKZDABEML_js.FormInput,
|
|
4614
4552
|
{
|
|
4615
4553
|
label: labels.fieldAccount,
|
|
4616
4554
|
value: account,
|
|
@@ -4623,7 +4561,7 @@ function DatasourceNewWizardPageView({
|
|
|
4623
4561
|
}
|
|
4624
4562
|
),
|
|
4625
4563
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4626
|
-
|
|
4564
|
+
chunkKZDABEML_js.FormInput,
|
|
4627
4565
|
{
|
|
4628
4566
|
label: labels.fieldWarehouse,
|
|
4629
4567
|
value: warehouseField,
|
|
@@ -4636,7 +4574,7 @@ function DatasourceNewWizardPageView({
|
|
|
4636
4574
|
}
|
|
4637
4575
|
),
|
|
4638
4576
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4639
|
-
|
|
4577
|
+
chunkKZDABEML_js.FormInput,
|
|
4640
4578
|
{
|
|
4641
4579
|
label: labels.fieldDatabase,
|
|
4642
4580
|
value: database,
|
|
@@ -4649,7 +4587,7 @@ function DatasourceNewWizardPageView({
|
|
|
4649
4587
|
}
|
|
4650
4588
|
),
|
|
4651
4589
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4652
|
-
|
|
4590
|
+
chunkKZDABEML_js.FormInput,
|
|
4653
4591
|
{
|
|
4654
4592
|
label: labels.fieldUsername,
|
|
4655
4593
|
value: username,
|
|
@@ -4662,7 +4600,7 @@ function DatasourceNewWizardPageView({
|
|
|
4662
4600
|
}
|
|
4663
4601
|
),
|
|
4664
4602
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4665
|
-
|
|
4603
|
+
chunkKZDABEML_js.FormInput,
|
|
4666
4604
|
{
|
|
4667
4605
|
label: labels.fieldPassword,
|
|
4668
4606
|
type: "password",
|
|
@@ -4675,7 +4613,7 @@ function DatasourceNewWizardPageView({
|
|
|
4675
4613
|
}
|
|
4676
4614
|
),
|
|
4677
4615
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4678
|
-
|
|
4616
|
+
chunkKZDABEML_js.FormInput,
|
|
4679
4617
|
{
|
|
4680
4618
|
label: labels.fieldSchema,
|
|
4681
4619
|
value: schema,
|
|
@@ -4690,7 +4628,7 @@ function DatasourceNewWizardPageView({
|
|
|
4690
4628
|
case "cloud-key":
|
|
4691
4629
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
4692
4630
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4693
|
-
|
|
4631
|
+
chunkKZDABEML_js.FormInput,
|
|
4694
4632
|
{
|
|
4695
4633
|
label: labels.fieldRegion,
|
|
4696
4634
|
value: region,
|
|
@@ -4703,7 +4641,7 @@ function DatasourceNewWizardPageView({
|
|
|
4703
4641
|
}
|
|
4704
4642
|
),
|
|
4705
4643
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4706
|
-
|
|
4644
|
+
chunkKZDABEML_js.FormInput,
|
|
4707
4645
|
{
|
|
4708
4646
|
label: labels.fieldToken,
|
|
4709
4647
|
type: "password",
|
|
@@ -4717,7 +4655,7 @@ function DatasourceNewWizardPageView({
|
|
|
4717
4655
|
}
|
|
4718
4656
|
),
|
|
4719
4657
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4720
|
-
|
|
4658
|
+
chunkKZDABEML_js.FormInput,
|
|
4721
4659
|
{
|
|
4722
4660
|
label: labels.fieldBucket,
|
|
4723
4661
|
value: bucket,
|
|
@@ -4732,7 +4670,7 @@ function DatasourceNewWizardPageView({
|
|
|
4732
4670
|
case "vector-key":
|
|
4733
4671
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
4734
4672
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4735
|
-
|
|
4673
|
+
chunkKZDABEML_js.FormInput,
|
|
4736
4674
|
{
|
|
4737
4675
|
label: labels.fieldApiKey,
|
|
4738
4676
|
type: "password",
|
|
@@ -4746,7 +4684,7 @@ function DatasourceNewWizardPageView({
|
|
|
4746
4684
|
}
|
|
4747
4685
|
),
|
|
4748
4686
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4749
|
-
|
|
4687
|
+
chunkKZDABEML_js.FormInput,
|
|
4750
4688
|
{
|
|
4751
4689
|
label: labels.fieldEnvironment,
|
|
4752
4690
|
value: environment,
|
|
@@ -4759,7 +4697,7 @@ function DatasourceNewWizardPageView({
|
|
|
4759
4697
|
}
|
|
4760
4698
|
),
|
|
4761
4699
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4762
|
-
|
|
4700
|
+
chunkKZDABEML_js.FormInput,
|
|
4763
4701
|
{
|
|
4764
4702
|
label: labels.fieldIndex,
|
|
4765
4703
|
value: index,
|
|
@@ -4775,249 +4713,212 @@ function DatasourceNewWizardPageView({
|
|
|
4775
4713
|
}
|
|
4776
4714
|
function renderStep2() {
|
|
4777
4715
|
if (!dialectOption) {
|
|
4778
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4716
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-3", children: [
|
|
4779
4717
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-slate-700 dark:text-slate-200", children: labels.wizardStep1Subtitle }),
|
|
4780
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4718
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMXQ2EYG2_js.Button, { type: "button", outline: true, onClick: () => goToStep(1), children: labels.wizardBack })
|
|
4781
4719
|
] });
|
|
4782
4720
|
}
|
|
4783
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4784
|
-
chunkFZUV7GNB_js.SectionCard,
|
|
4785
|
-
{
|
|
4786
|
-
variant: "glass",
|
|
4787
|
-
header: {
|
|
4788
|
-
title: dialectOption.label,
|
|
4789
|
-
subtitle: labels.wizardStep2Subtitle,
|
|
4790
|
-
icon: category?.icon ? /* @__PURE__ */ jsxRuntime.jsx(category.icon, { className: "h-4 w-4" }) : /* @__PURE__ */ jsxRuntime.jsx(outline.CircleStackIcon, { className: "h-4 w-4" }),
|
|
4791
|
-
gradient: category?.gradient
|
|
4792
|
-
},
|
|
4793
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
4794
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4795
|
-
chunkFZUV7GNB_js.FormInput,
|
|
4796
|
-
{
|
|
4797
|
-
label: labels.fieldName,
|
|
4798
|
-
value: name,
|
|
4799
|
-
onValueChange: (v) => {
|
|
4800
|
-
setName(v);
|
|
4801
|
-
markTouched();
|
|
4802
|
-
},
|
|
4803
|
-
placeholder: labels.fieldNamePlaceholder,
|
|
4804
|
-
required: true
|
|
4805
|
-
}
|
|
4806
|
-
),
|
|
4807
|
-
/* @__PURE__ */ jsxRuntime.jsx(chunkFZUV7GNB_js.FormGrid, { children: renderConnectionFields() }),
|
|
4808
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-6 pt-1", children: [
|
|
4809
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4810
|
-
chunkFZUV7GNB_js.FormToggle,
|
|
4811
|
-
{
|
|
4812
|
-
checked: ssl,
|
|
4813
|
-
onChange: (v) => {
|
|
4814
|
-
setSsl(v);
|
|
4815
|
-
markTouched();
|
|
4816
|
-
},
|
|
4817
|
-
label: labels.fieldSsl,
|
|
4818
|
-
variant: "inline"
|
|
4819
|
-
}
|
|
4820
|
-
),
|
|
4821
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4822
|
-
chunkFZUV7GNB_js.FormToggle,
|
|
4823
|
-
{
|
|
4824
|
-
checked: readOnly,
|
|
4825
|
-
onChange: (v) => {
|
|
4826
|
-
setReadOnly(v);
|
|
4827
|
-
markTouched();
|
|
4828
|
-
},
|
|
4829
|
-
label: labels.fieldReadOnly,
|
|
4830
|
-
variant: "inline"
|
|
4831
|
-
}
|
|
4832
|
-
)
|
|
4833
|
-
] }),
|
|
4834
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-slate-500 dark:text-slate-400", children: labels.fieldReadOnlyHelp }),
|
|
4835
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-3 border-t border-slate-200/60 pt-4 dark:border-white/10", children: [
|
|
4836
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4837
|
-
chunkMXQ2EYG2_js.Button,
|
|
4838
|
-
{
|
|
4839
|
-
type: "button",
|
|
4840
|
-
outline: true,
|
|
4841
|
-
onClick: () => void handleTestConnection(),
|
|
4842
|
-
disabled: testStatus === "testing",
|
|
4843
|
-
children: testStatus === "testing" ? /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-2", children: [
|
|
4844
|
-
/* @__PURE__ */ jsxRuntime.jsx(chunkFZUV7GNB_js.Spinner, { size: "xs" }),
|
|
4845
|
-
labels.testing
|
|
4846
|
-
] }) : labels.testConnection
|
|
4847
|
-
}
|
|
4848
|
-
),
|
|
4849
|
-
testStatus === "success" && /* @__PURE__ */ jsxRuntime.jsx(chunkFZUV7GNB_js.StatusBadge, { status: "success", label: labels.connectionSuccess }),
|
|
4850
|
-
testStatus === "failed" && /* @__PURE__ */ jsxRuntime.jsx(chunkFZUV7GNB_js.StatusBadge, { status: "error", label: labels.connectionFailed })
|
|
4851
|
-
] })
|
|
4852
|
-
] })
|
|
4853
|
-
}
|
|
4854
|
-
);
|
|
4855
|
-
}
|
|
4856
|
-
function renderStep3() {
|
|
4857
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4858
|
-
chunkFZUV7GNB_js.SectionCard,
|
|
4859
|
-
{
|
|
4860
|
-
variant: "glass",
|
|
4861
|
-
header: {
|
|
4862
|
-
title: labels.governanceSectionTitle,
|
|
4863
|
-
subtitle: labels.governanceSectionSubtitle
|
|
4864
|
-
},
|
|
4865
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
4866
|
-
/* @__PURE__ */ jsxRuntime.jsxs(chunkFZUV7GNB_js.FormGrid, { children: [
|
|
4867
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4868
|
-
chunkFZUV7GNB_js.FormInput,
|
|
4869
|
-
{
|
|
4870
|
-
label: labels.fieldMaxPoolSize,
|
|
4871
|
-
type: "number",
|
|
4872
|
-
min: 1,
|
|
4873
|
-
max: 100,
|
|
4874
|
-
value: maxPoolSize,
|
|
4875
|
-
onValueChange: (v) => {
|
|
4876
|
-
setMaxPoolSize(v);
|
|
4877
|
-
markTouched();
|
|
4878
|
-
},
|
|
4879
|
-
hint: labels.fieldMaxPoolSizeHint
|
|
4880
|
-
}
|
|
4881
|
-
),
|
|
4882
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4883
|
-
chunkFZUV7GNB_js.FormInput,
|
|
4884
|
-
{
|
|
4885
|
-
label: labels.fieldTimeoutMs,
|
|
4886
|
-
type: "number",
|
|
4887
|
-
min: 100,
|
|
4888
|
-
value: timeoutMs,
|
|
4889
|
-
onValueChange: (v) => {
|
|
4890
|
-
setTimeoutMs(v);
|
|
4891
|
-
markTouched();
|
|
4892
|
-
},
|
|
4893
|
-
hint: labels.fieldTimeoutMsHint
|
|
4894
|
-
}
|
|
4895
|
-
)
|
|
4896
|
-
] }),
|
|
4897
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
|
|
4898
|
-
/* @__PURE__ */ jsxRuntime.jsx("label", { className: "block text-xs font-medium text-slate-500 dark:text-slate-400", children: labels.fieldAllowedTables }),
|
|
4899
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4900
|
-
chunkFZUV7GNB_js.ChipPicker,
|
|
4901
|
-
{
|
|
4902
|
-
items: allowedTablesItems,
|
|
4903
|
-
selectedIds: allowedTablesSelected,
|
|
4904
|
-
onChange: (ids) => {
|
|
4905
|
-
setAllowedTablesSelected(ids);
|
|
4906
|
-
markTouched();
|
|
4907
|
-
},
|
|
4908
|
-
onItemsChange: (items) => {
|
|
4909
|
-
setAllowedTablesItems(items);
|
|
4910
|
-
markTouched();
|
|
4911
|
-
},
|
|
4912
|
-
allowCustom: true,
|
|
4913
|
-
unselectedStyle: allowedTablesStyle,
|
|
4914
|
-
showActions: false,
|
|
4915
|
-
addPlaceholder: labels.fieldAllowedTablesPlaceholder,
|
|
4916
|
-
addAriaLabel: labels.fieldAllowedTables
|
|
4917
|
-
}
|
|
4918
|
-
),
|
|
4919
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[11px] text-slate-500 dark:text-slate-400", children: labels.fieldAllowedTablesHint })
|
|
4920
|
-
] }),
|
|
4921
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
|
|
4922
|
-
/* @__PURE__ */ jsxRuntime.jsx("label", { className: "block text-xs font-medium text-slate-500 dark:text-slate-400", children: labels.fieldBlockedColumns }),
|
|
4923
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4924
|
-
chunkFZUV7GNB_js.ChipPicker,
|
|
4925
|
-
{
|
|
4926
|
-
items: blockedColumnsItems,
|
|
4927
|
-
selectedIds: blockedColumnsSelected,
|
|
4928
|
-
onChange: (ids) => {
|
|
4929
|
-
setBlockedColumnsSelected(ids);
|
|
4930
|
-
markTouched();
|
|
4931
|
-
},
|
|
4932
|
-
onItemsChange: (items) => {
|
|
4933
|
-
setBlockedColumnsItems(items);
|
|
4934
|
-
markTouched();
|
|
4935
|
-
},
|
|
4936
|
-
allowCustom: true,
|
|
4937
|
-
unselectedStyle: blockedColumnsStyle,
|
|
4938
|
-
showActions: false,
|
|
4939
|
-
addPlaceholder: labels.fieldBlockedColumnsPlaceholder,
|
|
4940
|
-
addAriaLabel: labels.fieldBlockedColumns
|
|
4941
|
-
}
|
|
4942
|
-
),
|
|
4943
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[11px] text-slate-500 dark:text-slate-400", children: labels.fieldBlockedColumnsHint })
|
|
4944
|
-
] }),
|
|
4945
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4946
|
-
chunkFZUV7GNB_js.FormCheckbox,
|
|
4947
|
-
{
|
|
4948
|
-
checked: maskPii,
|
|
4949
|
-
onChange: (v) => {
|
|
4950
|
-
setMaskPii(v);
|
|
4951
|
-
markTouched();
|
|
4952
|
-
},
|
|
4953
|
-
label: labels.fieldMaskPii,
|
|
4954
|
-
description: labels.fieldMaskPiiDescription
|
|
4955
|
-
}
|
|
4956
|
-
)
|
|
4957
|
-
] })
|
|
4958
|
-
}
|
|
4959
|
-
);
|
|
4960
|
-
}
|
|
4961
|
-
function renderStep4() {
|
|
4962
|
-
const categoryLabel = category ? labels[category.labelKey] ?? category.id : labels.reviewNoneValue;
|
|
4963
|
-
const dialectLabel = dialectOption?.label ?? labels.reviewNoneValue;
|
|
4964
|
-
const allowed = allowedTablesSelected;
|
|
4965
|
-
const blocked = blockedColumnsSelected;
|
|
4966
4721
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
4967
4722
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4968
|
-
|
|
4969
|
-
{
|
|
4970
|
-
variant: "glass",
|
|
4971
|
-
header: {
|
|
4972
|
-
title: labels.wizardStep1Title,
|
|
4973
|
-
subtitle: labels.wizardStep1Subtitle
|
|
4974
|
-
},
|
|
4975
|
-
actions: /* @__PURE__ */ jsxRuntime.jsxs(chunkMXQ2EYG2_js.Button, { type: "button", size: "sm", outline: true, onClick: () => goToStep(1), children: [
|
|
4976
|
-
/* @__PURE__ */ jsxRuntime.jsx(outline.PencilSquareIcon, { className: "h-4 w-4" }),
|
|
4977
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-1.5", children: labels.wizardReviewEdit })
|
|
4978
|
-
] }),
|
|
4979
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs("dl", { className: "grid grid-cols-1 gap-2 sm:grid-cols-2", children: [
|
|
4980
|
-
/* @__PURE__ */ jsxRuntime.jsx(ReviewRow2, { label: labels.reviewCategoryLabel, value: categoryLabel }),
|
|
4981
|
-
/* @__PURE__ */ jsxRuntime.jsx(ReviewRow2, { label: labels.reviewDialectLabel, value: dialectLabel })
|
|
4982
|
-
] })
|
|
4983
|
-
}
|
|
4984
|
-
),
|
|
4985
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4986
|
-
chunkFZUV7GNB_js.SectionCard,
|
|
4723
|
+
chunkKZDABEML_js.FormInput,
|
|
4987
4724
|
{
|
|
4988
|
-
|
|
4989
|
-
|
|
4990
|
-
|
|
4991
|
-
|
|
4725
|
+
label: labels.fieldName,
|
|
4726
|
+
value: name,
|
|
4727
|
+
onValueChange: (v) => {
|
|
4728
|
+
setName(v);
|
|
4729
|
+
markTouched();
|
|
4992
4730
|
},
|
|
4993
|
-
|
|
4994
|
-
|
|
4995
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-1.5", children: labels.wizardReviewEdit })
|
|
4996
|
-
] }),
|
|
4997
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs("dl", { className: "grid grid-cols-1 gap-2 sm:grid-cols-2", children: [
|
|
4998
|
-
/* @__PURE__ */ jsxRuntime.jsx(ReviewRow2, { label: labels.reviewNameLabel, value: name || labels.reviewNoneValue }),
|
|
4999
|
-
/* @__PURE__ */ jsxRuntime.jsx(ReviewRow2, { label: labels.reviewCredentialsLabel, value: labels.reviewCredentialsRedacted }),
|
|
5000
|
-
/* @__PURE__ */ jsxRuntime.jsx(ReviewRow2, { label: labels.reviewSslLabel, value: ssl ? labels.reviewYes : labels.reviewNo }),
|
|
5001
|
-
/* @__PURE__ */ jsxRuntime.jsx(ReviewRow2, { label: labels.reviewReadOnlyLabel, value: readOnly ? labels.reviewYes : labels.reviewNo })
|
|
5002
|
-
] })
|
|
4731
|
+
placeholder: labels.fieldNamePlaceholder,
|
|
4732
|
+
required: true
|
|
5003
4733
|
}
|
|
5004
4734
|
),
|
|
5005
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5006
|
-
|
|
5007
|
-
|
|
5008
|
-
|
|
5009
|
-
|
|
5010
|
-
|
|
5011
|
-
|
|
5012
|
-
|
|
5013
|
-
|
|
5014
|
-
|
|
5015
|
-
|
|
5016
|
-
|
|
5017
|
-
|
|
5018
|
-
|
|
5019
|
-
|
|
5020
|
-
|
|
4735
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.FormGrid, { children: renderConnectionFields() }),
|
|
4736
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-6 pt-1", children: [
|
|
4737
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4738
|
+
chunkKZDABEML_js.FormToggle,
|
|
4739
|
+
{
|
|
4740
|
+
checked: ssl,
|
|
4741
|
+
onChange: (v) => {
|
|
4742
|
+
setSsl(v);
|
|
4743
|
+
markTouched();
|
|
4744
|
+
},
|
|
4745
|
+
label: labels.fieldSsl,
|
|
4746
|
+
variant: "inline"
|
|
4747
|
+
}
|
|
4748
|
+
),
|
|
4749
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4750
|
+
chunkKZDABEML_js.FormToggle,
|
|
4751
|
+
{
|
|
4752
|
+
checked: readOnly,
|
|
4753
|
+
onChange: (v) => {
|
|
4754
|
+
setReadOnly(v);
|
|
4755
|
+
markTouched();
|
|
4756
|
+
},
|
|
4757
|
+
label: labels.fieldReadOnly,
|
|
4758
|
+
variant: "inline"
|
|
4759
|
+
}
|
|
4760
|
+
)
|
|
4761
|
+
] }),
|
|
4762
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-slate-500 dark:text-slate-400", children: labels.fieldReadOnlyHelp }),
|
|
4763
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "liquid-divider flex flex-wrap items-center gap-3 border-t pt-4", children: [
|
|
4764
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4765
|
+
chunkMXQ2EYG2_js.Button,
|
|
4766
|
+
{
|
|
4767
|
+
type: "button",
|
|
4768
|
+
outline: true,
|
|
4769
|
+
onClick: () => void handleTestConnection(),
|
|
4770
|
+
disabled: testStatus === "testing",
|
|
4771
|
+
children: testStatus === "testing" ? /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-2", children: [
|
|
4772
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.Spinner, { size: "xs" }),
|
|
4773
|
+
labels.testing
|
|
4774
|
+
] }) : labels.testConnection
|
|
4775
|
+
}
|
|
4776
|
+
),
|
|
4777
|
+
testStatus === "success" && /* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.StatusBadge, { status: "success", label: labels.connectionSuccess }),
|
|
4778
|
+
testStatus === "failed" && /* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.StatusBadge, { status: "error", label: labels.connectionFailed })
|
|
4779
|
+
] })
|
|
4780
|
+
] });
|
|
4781
|
+
}
|
|
4782
|
+
function renderStep3() {
|
|
4783
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
4784
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkKZDABEML_js.FormGrid, { children: [
|
|
4785
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4786
|
+
chunkKZDABEML_js.FormInput,
|
|
4787
|
+
{
|
|
4788
|
+
label: labels.fieldMaxPoolSize,
|
|
4789
|
+
type: "number",
|
|
4790
|
+
min: 1,
|
|
4791
|
+
max: 100,
|
|
4792
|
+
value: maxPoolSize,
|
|
4793
|
+
onValueChange: (v) => {
|
|
4794
|
+
setMaxPoolSize(v);
|
|
4795
|
+
markTouched();
|
|
4796
|
+
},
|
|
4797
|
+
hint: labels.fieldMaxPoolSizeHint
|
|
4798
|
+
}
|
|
4799
|
+
),
|
|
4800
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4801
|
+
chunkKZDABEML_js.FormInput,
|
|
4802
|
+
{
|
|
4803
|
+
label: labels.fieldTimeoutMs,
|
|
4804
|
+
type: "number",
|
|
4805
|
+
min: 100,
|
|
4806
|
+
value: timeoutMs,
|
|
4807
|
+
onValueChange: (v) => {
|
|
4808
|
+
setTimeoutMs(v);
|
|
4809
|
+
markTouched();
|
|
4810
|
+
},
|
|
4811
|
+
hint: labels.fieldTimeoutMsHint
|
|
4812
|
+
}
|
|
4813
|
+
)
|
|
4814
|
+
] }),
|
|
4815
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
|
|
4816
|
+
/* @__PURE__ */ jsxRuntime.jsx("label", { className: "block text-xs font-medium text-slate-500 dark:text-slate-400", children: labels.fieldAllowedTables }),
|
|
4817
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4818
|
+
chunkKZDABEML_js.ChipPicker,
|
|
4819
|
+
{
|
|
4820
|
+
items: allowedTablesItems,
|
|
4821
|
+
selectedIds: allowedTablesSelected,
|
|
4822
|
+
onChange: (ids) => {
|
|
4823
|
+
setAllowedTablesSelected(ids);
|
|
4824
|
+
markTouched();
|
|
4825
|
+
},
|
|
4826
|
+
onItemsChange: (items) => {
|
|
4827
|
+
setAllowedTablesItems(items);
|
|
4828
|
+
markTouched();
|
|
4829
|
+
},
|
|
4830
|
+
allowCustom: true,
|
|
4831
|
+
unselectedStyle: allowedTablesStyle,
|
|
4832
|
+
showActions: false,
|
|
4833
|
+
addPlaceholder: labels.fieldAllowedTablesPlaceholder,
|
|
4834
|
+
addAriaLabel: labels.fieldAllowedTables
|
|
4835
|
+
}
|
|
4836
|
+
),
|
|
4837
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[11px] text-slate-500 dark:text-slate-400", children: labels.fieldAllowedTablesHint })
|
|
4838
|
+
] }),
|
|
4839
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
|
|
4840
|
+
/* @__PURE__ */ jsxRuntime.jsx("label", { className: "block text-xs font-medium text-slate-500 dark:text-slate-400", children: labels.fieldBlockedColumns }),
|
|
4841
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4842
|
+
chunkKZDABEML_js.ChipPicker,
|
|
4843
|
+
{
|
|
4844
|
+
items: blockedColumnsItems,
|
|
4845
|
+
selectedIds: blockedColumnsSelected,
|
|
4846
|
+
onChange: (ids) => {
|
|
4847
|
+
setBlockedColumnsSelected(ids);
|
|
4848
|
+
markTouched();
|
|
4849
|
+
},
|
|
4850
|
+
onItemsChange: (items) => {
|
|
4851
|
+
setBlockedColumnsItems(items);
|
|
4852
|
+
markTouched();
|
|
4853
|
+
},
|
|
4854
|
+
allowCustom: true,
|
|
4855
|
+
unselectedStyle: blockedColumnsStyle,
|
|
4856
|
+
showActions: false,
|
|
4857
|
+
addPlaceholder: labels.fieldBlockedColumnsPlaceholder,
|
|
4858
|
+
addAriaLabel: labels.fieldBlockedColumns
|
|
4859
|
+
}
|
|
4860
|
+
),
|
|
4861
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[11px] text-slate-500 dark:text-slate-400", children: labels.fieldBlockedColumnsHint })
|
|
4862
|
+
] }),
|
|
4863
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4864
|
+
chunkKZDABEML_js.FormCheckbox,
|
|
4865
|
+
{
|
|
4866
|
+
checked: maskPii,
|
|
4867
|
+
onChange: (v) => {
|
|
4868
|
+
setMaskPii(v);
|
|
4869
|
+
markTouched();
|
|
4870
|
+
},
|
|
4871
|
+
label: labels.fieldMaskPii,
|
|
4872
|
+
description: labels.fieldMaskPiiDescription
|
|
4873
|
+
}
|
|
4874
|
+
)
|
|
4875
|
+
] });
|
|
4876
|
+
}
|
|
4877
|
+
function renderStep4() {
|
|
4878
|
+
const categoryLabel = category ? labels[category.labelKey] ?? category.id : labels.reviewNoneValue;
|
|
4879
|
+
const dialectLabel = dialectOption?.label ?? labels.reviewNoneValue;
|
|
4880
|
+
const allowed = allowedTablesSelected;
|
|
4881
|
+
const blocked = blockedColumnsSelected;
|
|
4882
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-5", children: [
|
|
4883
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4884
|
+
ReviewBlock2,
|
|
4885
|
+
{
|
|
4886
|
+
stepTitle: labels.wizardStep1Title,
|
|
4887
|
+
stepSubtitle: labels.wizardStep1Subtitle,
|
|
4888
|
+
editLabel: labels.wizardReviewEdit,
|
|
4889
|
+
onEdit: () => goToStep(1),
|
|
4890
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("dl", { className: "grid grid-cols-1 gap-2 sm:grid-cols-2", children: [
|
|
4891
|
+
/* @__PURE__ */ jsxRuntime.jsx(ReviewRow2, { label: labels.reviewCategoryLabel, value: categoryLabel }),
|
|
4892
|
+
/* @__PURE__ */ jsxRuntime.jsx(ReviewRow2, { label: labels.reviewDialectLabel, value: dialectLabel })
|
|
4893
|
+
] })
|
|
4894
|
+
}
|
|
4895
|
+
),
|
|
4896
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4897
|
+
ReviewBlock2,
|
|
4898
|
+
{
|
|
4899
|
+
stepTitle: labels.wizardStep2Title,
|
|
4900
|
+
stepSubtitle: labels.wizardStep2Subtitle,
|
|
4901
|
+
editLabel: labels.wizardReviewEdit,
|
|
4902
|
+
onEdit: () => goToStep(2),
|
|
4903
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("dl", { className: "grid grid-cols-1 gap-2 sm:grid-cols-2", children: [
|
|
4904
|
+
/* @__PURE__ */ jsxRuntime.jsx(ReviewRow2, { label: labels.reviewNameLabel, value: name || labels.reviewNoneValue }),
|
|
4905
|
+
/* @__PURE__ */ jsxRuntime.jsx(ReviewRow2, { label: labels.reviewCredentialsLabel, value: labels.reviewCredentialsRedacted }),
|
|
4906
|
+
/* @__PURE__ */ jsxRuntime.jsx(ReviewRow2, { label: labels.reviewSslLabel, value: ssl ? labels.reviewYes : labels.reviewNo }),
|
|
4907
|
+
/* @__PURE__ */ jsxRuntime.jsx(ReviewRow2, { label: labels.reviewReadOnlyLabel, value: readOnly ? labels.reviewYes : labels.reviewNo })
|
|
4908
|
+
] })
|
|
4909
|
+
}
|
|
4910
|
+
),
|
|
4911
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4912
|
+
ReviewBlock2,
|
|
4913
|
+
{
|
|
4914
|
+
stepTitle: labels.wizardStep3Title,
|
|
4915
|
+
stepSubtitle: labels.wizardStep3Subtitle,
|
|
4916
|
+
editLabel: labels.wizardReviewEdit,
|
|
4917
|
+
onEdit: () => goToStep(3),
|
|
4918
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("dl", { className: "grid grid-cols-1 gap-2 sm:grid-cols-2", children: [
|
|
4919
|
+
/* @__PURE__ */ jsxRuntime.jsx(ReviewRow2, { label: labels.reviewPoolLabel, value: maxPoolSize || labels.reviewNoneValue }),
|
|
4920
|
+
/* @__PURE__ */ jsxRuntime.jsx(ReviewRow2, { label: labels.reviewTimeoutLabel, value: timeoutMs ? `${timeoutMs}ms` : labels.reviewNoneValue }),
|
|
4921
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5021
4922
|
ReviewRow2,
|
|
5022
4923
|
{
|
|
5023
4924
|
label: labels.reviewAllowedTablesLabel,
|
|
@@ -5039,14 +4940,14 @@ function DatasourceNewWizardPageView({
|
|
|
5039
4940
|
}
|
|
5040
4941
|
const stepBody = step === 1 ? renderStep1() : step === 2 ? renderStep2() : step === 3 ? renderStep3() : renderStep4();
|
|
5041
4942
|
const advanceDisabled = !canAdvance(step);
|
|
5042
|
-
const
|
|
5043
|
-
|
|
5044
|
-
|
|
5045
|
-
|
|
5046
|
-
|
|
5047
|
-
|
|
4943
|
+
const isLast = step === TOTAL_STEPS2;
|
|
4944
|
+
const scrollableStep = step === 1 || step === 4;
|
|
4945
|
+
const bodyClass = scrollableStep ? "p-5 pt-5 sm:p-8 sm:pt-8 max-h-[60vh] overflow-y-auto" : "p-5 pt-5 sm:p-8 sm:pt-8";
|
|
4946
|
+
const footer = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "liquid-divider flex items-center justify-between border-t pt-4", children: [
|
|
4947
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMXQ2EYG2_js.Button, { type: "button", outline: true, onClick: step === 1 ? cancelWithConfirm : goBack, disabled: submitting, children: step === 1 ? labels.wizardCancel : labels.wizardBack }),
|
|
4948
|
+
isLast ? /* @__PURE__ */ jsxRuntime.jsx(chunkMXQ2EYG2_js.Button, { type: "button", color: "ios-glass-blue", onClick: () => void submit(), disabled: submitting || !dialect || !name.trim(), children: submitting ? labels.wizardCreate + "\u2026" : labels.wizardCreate }) : /* @__PURE__ */ jsxRuntime.jsx(chunkMXQ2EYG2_js.Button, { type: "button", color: "ios-glass-blue", onClick: goNext, disabled: advanceDisabled || submitting, children: labels.wizardNext })
|
|
5048
4949
|
] });
|
|
5049
|
-
|
|
4950
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5050
4951
|
"form",
|
|
5051
4952
|
{
|
|
5052
4953
|
onSubmit: (e) => {
|
|
@@ -5056,15 +4957,12 @@ function DatasourceNewWizardPageView({
|
|
|
5056
4957
|
},
|
|
5057
4958
|
className: "space-y-4",
|
|
5058
4959
|
children: [
|
|
5059
|
-
|
|
4960
|
+
hero,
|
|
4961
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.Card, { variant: "default", children: /* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.CardContent, { className: bodyClass, children: stepBody }) }),
|
|
5060
4962
|
footer
|
|
5061
4963
|
]
|
|
5062
4964
|
}
|
|
5063
4965
|
);
|
|
5064
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
5065
|
-
hero,
|
|
5066
|
-
content
|
|
5067
|
-
] });
|
|
5068
4966
|
}
|
|
5069
4967
|
function ReviewRow2({ label, value }) {
|
|
5070
4968
|
return /* @__PURE__ */ jsxRuntime.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: [
|
|
@@ -5072,6 +4970,27 @@ function ReviewRow2({ label, value }) {
|
|
|
5072
4970
|
/* @__PURE__ */ jsxRuntime.jsx("dd", { className: "mt-0.5 truncate text-xs font-semibold text-slate-900 dark:text-white", children: value })
|
|
5073
4971
|
] });
|
|
5074
4972
|
}
|
|
4973
|
+
function ReviewBlock2({
|
|
4974
|
+
stepTitle,
|
|
4975
|
+
stepSubtitle,
|
|
4976
|
+
editLabel,
|
|
4977
|
+
onEdit,
|
|
4978
|
+
children
|
|
4979
|
+
}) {
|
|
4980
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "border-b liquid-divider pb-4 last:border-b-0 last:pb-0", children: [
|
|
4981
|
+
/* @__PURE__ */ jsxRuntime.jsxs("header", { className: "mb-2 flex items-start justify-between gap-3", children: [
|
|
4982
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0", children: [
|
|
4983
|
+
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: "truncate text-sm font-semibold text-slate-900 dark:text-white", children: stepTitle }),
|
|
4984
|
+
stepSubtitle && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "truncate text-xs text-slate-500 dark:text-slate-400", children: stepSubtitle })
|
|
4985
|
+
] }),
|
|
4986
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkMXQ2EYG2_js.Button, { type: "button", size: "sm", outline: true, onClick: onEdit, children: [
|
|
4987
|
+
/* @__PURE__ */ jsxRuntime.jsx(outline.PencilSquareIcon, { className: "h-4 w-4" }),
|
|
4988
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-1.5", children: editLabel })
|
|
4989
|
+
] })
|
|
4990
|
+
] }),
|
|
4991
|
+
children
|
|
4992
|
+
] });
|
|
4993
|
+
}
|
|
5075
4994
|
async function simulateTest() {
|
|
5076
4995
|
await new Promise((r) => setTimeout(r, 1500));
|
|
5077
4996
|
return true;
|
|
@@ -5192,9 +5111,9 @@ function RuleNewWizardPageView({
|
|
|
5192
5111
|
text: "text-fuchsia-700 dark:text-fuchsia-300"
|
|
5193
5112
|
};
|
|
5194
5113
|
const [combinator, setCombinator] = react.useState("and");
|
|
5195
|
-
const [condition, setCondition] = react.useState(
|
|
5114
|
+
const [condition, setCondition] = react.useState(chunkKRS2CLPR_js.defaultRuleCondition());
|
|
5196
5115
|
const [actionTileId, setActionTileId] = react.useState("");
|
|
5197
|
-
const [action, setAction] = react.useState(
|
|
5116
|
+
const [action, setAction] = react.useState(chunkKRS2CLPR_js.defaultRuleAction());
|
|
5198
5117
|
const [validFromDate, setValidFromDate] = react.useState(null);
|
|
5199
5118
|
const [validFromTime, setValidFromTime] = react.useState(null);
|
|
5200
5119
|
const [validUntilDate, setValidUntilDate] = react.useState(null);
|
|
@@ -5321,17 +5240,25 @@ function RuleNewWizardPageView({
|
|
|
5321
5240
|
id: String(idx + 1),
|
|
5322
5241
|
title
|
|
5323
5242
|
}));
|
|
5324
|
-
const counter = labels.wizardStepCounter.replace("{current}", String(step)).replace("{total}", String(TOTAL_STEPS3));
|
|
5325
5243
|
const hero = /* @__PURE__ */ jsxRuntime.jsx(
|
|
5326
|
-
|
|
5244
|
+
chunkKZDABEML_js.HeroSection,
|
|
5327
5245
|
{
|
|
5328
5246
|
icon: /* @__PURE__ */ jsxRuntime.jsx(outline.AdjustmentsHorizontalIcon, { className: "h-5 w-5" }),
|
|
5329
|
-
label:
|
|
5330
|
-
title: labels.pageTitle,
|
|
5247
|
+
label: labels.pageTitle,
|
|
5248
|
+
title: stepTitles[step - 1] ?? labels.pageTitle,
|
|
5331
5249
|
subtitle: stepSubtitles[step - 1] ?? labels.pageSubtitle,
|
|
5332
5250
|
gradient: "from-fuchsia-500 to-purple-700",
|
|
5251
|
+
actions: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5252
|
+
chunkMXQ2EYG2_js.IconButton,
|
|
5253
|
+
{
|
|
5254
|
+
label: labels.wizardCancel,
|
|
5255
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(outline.XMarkIcon, { className: "h-5 w-5" }),
|
|
5256
|
+
variant: "ghost",
|
|
5257
|
+
onClick: cancelWithConfirm
|
|
5258
|
+
}
|
|
5259
|
+
),
|
|
5333
5260
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5334
|
-
|
|
5261
|
+
chunkKZDABEML_js.StepIndicator,
|
|
5335
5262
|
{
|
|
5336
5263
|
accent: "violet",
|
|
5337
5264
|
currentStep: step - 1,
|
|
@@ -5343,399 +5270,346 @@ function RuleNewWizardPageView({
|
|
|
5343
5270
|
}
|
|
5344
5271
|
);
|
|
5345
5272
|
function renderStep1() {
|
|
5346
|
-
return /* @__PURE__ */ jsxRuntime.
|
|
5347
|
-
|
|
5348
|
-
|
|
5349
|
-
|
|
5350
|
-
|
|
5351
|
-
|
|
5352
|
-
|
|
5353
|
-
|
|
5354
|
-
|
|
5355
|
-
|
|
5356
|
-
|
|
5357
|
-
|
|
5358
|
-
|
|
5359
|
-
|
|
5360
|
-
|
|
5361
|
-
|
|
5362
|
-
|
|
5363
|
-
|
|
5364
|
-
|
|
5365
|
-
|
|
5366
|
-
|
|
5367
|
-
|
|
5368
|
-
|
|
5369
|
-
|
|
5370
|
-
|
|
5371
|
-
|
|
5372
|
-
|
|
5373
|
-
|
|
5374
|
-
|
|
5375
|
-
|
|
5376
|
-
|
|
5377
|
-
|
|
5378
|
-
|
|
5379
|
-
|
|
5380
|
-
|
|
5381
|
-
|
|
5382
|
-
|
|
5383
|
-
|
|
5384
|
-
|
|
5385
|
-
|
|
5386
|
-
|
|
5387
|
-
|
|
5388
|
-
|
|
5389
|
-
|
|
5390
|
-
|
|
5391
|
-
|
|
5392
|
-
|
|
5393
|
-
|
|
5394
|
-
|
|
5395
|
-
|
|
5396
|
-
|
|
5397
|
-
|
|
5398
|
-
|
|
5399
|
-
|
|
5400
|
-
|
|
5401
|
-
|
|
5402
|
-
|
|
5403
|
-
|
|
5404
|
-
|
|
5405
|
-
|
|
5406
|
-
|
|
5407
|
-
|
|
5408
|
-
|
|
5409
|
-
setEnabled(v);
|
|
5410
|
-
markTouched();
|
|
5411
|
-
},
|
|
5412
|
-
label: labels.enabledLabel,
|
|
5413
|
-
variant: "card"
|
|
5414
|
-
}
|
|
5415
|
-
)
|
|
5416
|
-
] })
|
|
5417
|
-
}
|
|
5418
|
-
);
|
|
5273
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
5274
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5275
|
+
chunkKZDABEML_js.FormInput,
|
|
5276
|
+
{
|
|
5277
|
+
label: labels.nameLabel,
|
|
5278
|
+
value: name,
|
|
5279
|
+
onValueChange: (v) => {
|
|
5280
|
+
setName(v);
|
|
5281
|
+
markTouched();
|
|
5282
|
+
},
|
|
5283
|
+
placeholder: labels.namePlaceholder,
|
|
5284
|
+
required: true
|
|
5285
|
+
}
|
|
5286
|
+
),
|
|
5287
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5288
|
+
chunkKZDABEML_js.FormTextarea,
|
|
5289
|
+
{
|
|
5290
|
+
label: labels.descriptionLabel,
|
|
5291
|
+
value: description,
|
|
5292
|
+
onValueChange: (v) => {
|
|
5293
|
+
setDescription(v);
|
|
5294
|
+
markTouched();
|
|
5295
|
+
},
|
|
5296
|
+
placeholder: labels.descriptionPlaceholder,
|
|
5297
|
+
rows: 3
|
|
5298
|
+
}
|
|
5299
|
+
),
|
|
5300
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5301
|
+
RangeSliderField2,
|
|
5302
|
+
{
|
|
5303
|
+
sliderId: "wizard-rule-priority",
|
|
5304
|
+
label: labels.priorityLabel,
|
|
5305
|
+
value: priority,
|
|
5306
|
+
onChange: (v) => {
|
|
5307
|
+
setPriority(Math.round(v));
|
|
5308
|
+
markTouched();
|
|
5309
|
+
},
|
|
5310
|
+
min: 0,
|
|
5311
|
+
max: 100,
|
|
5312
|
+
step: 1,
|
|
5313
|
+
trackGradient: "linear-gradient(90deg, #10b981, #38bdf8 33%, #f59e0b 66%, #f43f5e)",
|
|
5314
|
+
formatValue: (v) => String(Math.round(v)),
|
|
5315
|
+
zones: [
|
|
5316
|
+
{ label: labels.priorityLow, max: 25, color: "text-emerald-500", thumbColor: "#10b981" },
|
|
5317
|
+
{ label: labels.priorityNormal, max: 50, color: "text-sky-500", thumbColor: "#38bdf8" },
|
|
5318
|
+
{ label: labels.priorityHigh, max: 75, color: "text-amber-500", thumbColor: "#f59e0b" },
|
|
5319
|
+
{ label: labels.priorityCritical, max: 100, color: "text-rose-500", thumbColor: "#f43f5e" }
|
|
5320
|
+
]
|
|
5321
|
+
}
|
|
5322
|
+
),
|
|
5323
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5324
|
+
chunkKZDABEML_js.FormToggle,
|
|
5325
|
+
{
|
|
5326
|
+
checked: enabled,
|
|
5327
|
+
onChange: (v) => {
|
|
5328
|
+
setEnabled(v);
|
|
5329
|
+
markTouched();
|
|
5330
|
+
},
|
|
5331
|
+
label: labels.enabledLabel,
|
|
5332
|
+
variant: "card"
|
|
5333
|
+
}
|
|
5334
|
+
)
|
|
5335
|
+
] });
|
|
5419
5336
|
}
|
|
5420
5337
|
function renderStep2() {
|
|
5421
|
-
return /* @__PURE__ */ jsxRuntime.
|
|
5422
|
-
|
|
5423
|
-
|
|
5424
|
-
|
|
5425
|
-
|
|
5426
|
-
|
|
5427
|
-
|
|
5428
|
-
|
|
5429
|
-
|
|
5430
|
-
|
|
5431
|
-
|
|
5432
|
-
|
|
5433
|
-
|
|
5434
|
-
|
|
5435
|
-
|
|
5436
|
-
|
|
5437
|
-
|
|
5438
|
-
|
|
5439
|
-
|
|
5440
|
-
|
|
5441
|
-
|
|
5442
|
-
|
|
5443
|
-
|
|
5444
|
-
|
|
5445
|
-
|
|
5446
|
-
|
|
5447
|
-
)
|
|
5448
|
-
|
|
5449
|
-
|
|
5450
|
-
|
|
5451
|
-
|
|
5452
|
-
value: condition,
|
|
5453
|
-
onChange: (next) => {
|
|
5454
|
-
setCondition(next);
|
|
5455
|
-
markTouched();
|
|
5456
|
-
}
|
|
5457
|
-
}
|
|
5458
|
-
)
|
|
5459
|
-
] })
|
|
5460
|
-
}
|
|
5461
|
-
);
|
|
5338
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
5339
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
5340
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "mb-2 block text-xs font-semibold uppercase tracking-wider text-slate-600 dark:text-slate-400", children: labels.combinatorLabel }),
|
|
5341
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5342
|
+
chunkKZDABEML_js.SegmentedControl,
|
|
5343
|
+
{
|
|
5344
|
+
segments: [
|
|
5345
|
+
{ value: "and", label: labels.combinatorAnd },
|
|
5346
|
+
{ value: "or", label: labels.combinatorOr },
|
|
5347
|
+
{ value: "not", label: labels.combinatorNot }
|
|
5348
|
+
],
|
|
5349
|
+
value: combinator,
|
|
5350
|
+
onChange: (v) => {
|
|
5351
|
+
setCombinator(v);
|
|
5352
|
+
markTouched();
|
|
5353
|
+
},
|
|
5354
|
+
size: "sm"
|
|
5355
|
+
}
|
|
5356
|
+
)
|
|
5357
|
+
] }),
|
|
5358
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5359
|
+
chunkKRS2CLPR_js.RuleConditionBuilder,
|
|
5360
|
+
{
|
|
5361
|
+
value: condition,
|
|
5362
|
+
onChange: (next) => {
|
|
5363
|
+
setCondition(next);
|
|
5364
|
+
markTouched();
|
|
5365
|
+
}
|
|
5366
|
+
}
|
|
5367
|
+
)
|
|
5368
|
+
] });
|
|
5462
5369
|
}
|
|
5463
5370
|
function renderStep3() {
|
|
5464
|
-
|
|
5465
|
-
|
|
5466
|
-
|
|
5467
|
-
|
|
5468
|
-
|
|
5469
|
-
|
|
5470
|
-
|
|
5471
|
-
|
|
5472
|
-
|
|
5473
|
-
|
|
5474
|
-
|
|
5475
|
-
"
|
|
5476
|
-
|
|
5477
|
-
|
|
5478
|
-
|
|
5479
|
-
|
|
5480
|
-
|
|
5481
|
-
|
|
5482
|
-
|
|
5483
|
-
|
|
5484
|
-
|
|
5485
|
-
|
|
5486
|
-
|
|
5487
|
-
{
|
|
5488
|
-
isActive: selected,
|
|
5489
|
-
color: tile.color,
|
|
5490
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(Icon, { className: "h-5 w-5" }),
|
|
5491
|
-
label,
|
|
5492
|
-
count: description2,
|
|
5493
|
-
onClick: () => {
|
|
5494
|
-
setActionTileId(tile.id);
|
|
5495
|
-
markTouched();
|
|
5496
|
-
}
|
|
5497
|
-
},
|
|
5498
|
-
tile.id
|
|
5499
|
-
);
|
|
5500
|
-
})
|
|
5501
|
-
}
|
|
5502
|
-
),
|
|
5503
|
-
selectedTile && /* @__PURE__ */ jsxRuntime.jsx(
|
|
5504
|
-
chunkFZUV7GNB_js.SectionCard,
|
|
5505
|
-
{
|
|
5506
|
-
variant: "glass",
|
|
5507
|
-
header: {
|
|
5508
|
-
title: labels[selectedTile.labelKey] ?? selectedTile.id,
|
|
5509
|
-
subtitle: labels.actionConfigSubtitle
|
|
5510
|
-
},
|
|
5511
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5512
|
-
chunkZIRD3X6G_js.RuleActionBuilder,
|
|
5513
|
-
{
|
|
5514
|
-
value: action,
|
|
5515
|
-
onChange: (next) => {
|
|
5516
|
-
setAction(next);
|
|
5517
|
-
markTouched();
|
|
5518
|
-
}
|
|
5371
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-5", children: [
|
|
5372
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5373
|
+
"div",
|
|
5374
|
+
{
|
|
5375
|
+
role: "radiogroup",
|
|
5376
|
+
"aria-label": labels.actionSectionTitle,
|
|
5377
|
+
className: "grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3",
|
|
5378
|
+
children: ACTION_TILES.map((tile) => {
|
|
5379
|
+
const Icon = tile.icon;
|
|
5380
|
+
const selected = tile.id === actionTileId;
|
|
5381
|
+
const label = labels[tile.labelKey] ?? tile.id;
|
|
5382
|
+
const description2 = labels[tile.descriptionKey] ?? "";
|
|
5383
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5384
|
+
chunkKZDABEML_js.FilterTileButton,
|
|
5385
|
+
{
|
|
5386
|
+
isActive: selected,
|
|
5387
|
+
color: tile.color,
|
|
5388
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(Icon, { className: "h-5 w-5" }),
|
|
5389
|
+
label,
|
|
5390
|
+
count: description2,
|
|
5391
|
+
onClick: () => {
|
|
5392
|
+
setActionTileId(tile.id);
|
|
5393
|
+
markTouched();
|
|
5519
5394
|
}
|
|
5520
|
-
)
|
|
5521
|
-
}
|
|
5522
|
-
)
|
|
5523
|
-
] })
|
|
5524
|
-
}
|
|
5525
|
-
);
|
|
5526
|
-
}
|
|
5527
|
-
function renderStep4() {
|
|
5528
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-4", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5529
|
-
chunkFZUV7GNB_js.SectionCard,
|
|
5530
|
-
{
|
|
5531
|
-
variant: "glass",
|
|
5532
|
-
header: {
|
|
5533
|
-
title: labels.scheduleSectionTitle,
|
|
5534
|
-
subtitle: labels.scheduleSectionSubtitle
|
|
5535
|
-
},
|
|
5536
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-5", children: [
|
|
5537
|
-
/* @__PURE__ */ jsxRuntime.jsxs(chunkFZUV7GNB_js.FormGrid, { children: [
|
|
5538
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
5539
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "block text-xs font-semibold uppercase tracking-wider text-slate-600 dark:text-slate-400", children: labels.validFromLabel }),
|
|
5540
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
5541
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5542
|
-
chunkFZUV7GNB_js.DatePicker,
|
|
5543
|
-
{
|
|
5544
|
-
value: validFromDate,
|
|
5545
|
-
onChange: (d) => {
|
|
5546
|
-
setValidFromDate(d);
|
|
5547
|
-
markTouched();
|
|
5548
|
-
},
|
|
5549
|
-
placeholder: labels.validFromDateLabel
|
|
5550
|
-
}
|
|
5551
|
-
),
|
|
5552
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5553
|
-
chunkFZUV7GNB_js.TimePicker,
|
|
5554
|
-
{
|
|
5555
|
-
value: validFromTime,
|
|
5556
|
-
onChange: (t) => {
|
|
5557
|
-
setValidFromTime(t);
|
|
5558
|
-
markTouched();
|
|
5559
|
-
},
|
|
5560
|
-
placeholder: labels.validFromTimeLabel
|
|
5561
|
-
}
|
|
5562
|
-
)
|
|
5563
|
-
] })
|
|
5564
|
-
] }),
|
|
5565
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
5566
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "block text-xs font-semibold uppercase tracking-wider text-slate-600 dark:text-slate-400", children: labels.validUntilLabel }),
|
|
5567
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
5568
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5569
|
-
chunkFZUV7GNB_js.DatePicker,
|
|
5570
|
-
{
|
|
5571
|
-
value: validUntilDate,
|
|
5572
|
-
onChange: (d) => {
|
|
5573
|
-
setValidUntilDate(d);
|
|
5574
|
-
markTouched();
|
|
5575
|
-
},
|
|
5576
|
-
placeholder: labels.validUntilDateLabel
|
|
5577
|
-
}
|
|
5578
|
-
),
|
|
5579
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5580
|
-
chunkFZUV7GNB_js.TimePicker,
|
|
5581
|
-
{
|
|
5582
|
-
value: validUntilTime,
|
|
5583
|
-
onChange: (t) => {
|
|
5584
|
-
setValidUntilTime(t);
|
|
5585
|
-
markTouched();
|
|
5586
|
-
},
|
|
5587
|
-
placeholder: labels.validUntilTimeLabel
|
|
5588
|
-
}
|
|
5589
|
-
)
|
|
5590
|
-
] })
|
|
5591
|
-
] })
|
|
5592
|
-
] }),
|
|
5593
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5594
|
-
chunkFZUV7GNB_js.FormCheckbox,
|
|
5595
|
-
{
|
|
5596
|
-
checked: noExpiry,
|
|
5597
|
-
onChange: (v) => {
|
|
5598
|
-
setNoExpiry(v);
|
|
5599
|
-
markTouched();
|
|
5600
5395
|
},
|
|
5601
|
-
|
|
5602
|
-
|
|
5396
|
+
tile.id
|
|
5397
|
+
);
|
|
5398
|
+
})
|
|
5399
|
+
}
|
|
5400
|
+
),
|
|
5401
|
+
actionTileId && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "border-t liquid-divider pt-4", children: [
|
|
5402
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-2 text-xs text-slate-500 dark:text-slate-400", children: labels.actionConfigSubtitle }),
|
|
5403
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5404
|
+
chunkKRS2CLPR_js.RuleActionBuilder,
|
|
5405
|
+
{
|
|
5406
|
+
value: action,
|
|
5407
|
+
onChange: (next) => {
|
|
5408
|
+
setAction(next);
|
|
5409
|
+
markTouched();
|
|
5603
5410
|
}
|
|
5604
|
-
|
|
5605
|
-
|
|
5606
|
-
|
|
5411
|
+
}
|
|
5412
|
+
)
|
|
5413
|
+
] })
|
|
5414
|
+
] });
|
|
5415
|
+
}
|
|
5416
|
+
function renderStep4() {
|
|
5417
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-5", children: [
|
|
5418
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkKZDABEML_js.FormGrid, { children: [
|
|
5419
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
5420
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "block text-xs font-semibold uppercase tracking-wider text-slate-600 dark:text-slate-400", children: labels.validFromLabel }),
|
|
5421
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
5607
5422
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5608
|
-
|
|
5423
|
+
chunkKZDABEML_js.DatePicker,
|
|
5609
5424
|
{
|
|
5610
|
-
|
|
5611
|
-
|
|
5612
|
-
|
|
5613
|
-
{ value: "archived", label: labels.statusArchived }
|
|
5614
|
-
],
|
|
5615
|
-
value: status,
|
|
5616
|
-
onChange: (v) => {
|
|
5617
|
-
setStatus(v);
|
|
5425
|
+
value: validFromDate,
|
|
5426
|
+
onChange: (d) => {
|
|
5427
|
+
setValidFromDate(d);
|
|
5618
5428
|
markTouched();
|
|
5619
5429
|
},
|
|
5620
|
-
|
|
5430
|
+
placeholder: labels.validFromDateLabel
|
|
5621
5431
|
}
|
|
5622
|
-
)
|
|
5623
|
-
] }),
|
|
5624
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
|
|
5625
|
-
/* @__PURE__ */ jsxRuntime.jsx("label", { className: "block text-xs font-semibold uppercase tracking-wider text-slate-600 dark:text-slate-400", children: labels.tagsLabel }),
|
|
5432
|
+
),
|
|
5626
5433
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5627
|
-
|
|
5434
|
+
chunkKZDABEML_js.TimePicker,
|
|
5628
5435
|
{
|
|
5629
|
-
|
|
5630
|
-
|
|
5631
|
-
|
|
5632
|
-
setTagsSelected(ids);
|
|
5436
|
+
value: validFromTime,
|
|
5437
|
+
onChange: (t) => {
|
|
5438
|
+
setValidFromTime(t);
|
|
5633
5439
|
markTouched();
|
|
5634
5440
|
},
|
|
5635
|
-
|
|
5636
|
-
|
|
5441
|
+
placeholder: labels.validFromTimeLabel
|
|
5442
|
+
}
|
|
5443
|
+
)
|
|
5444
|
+
] })
|
|
5445
|
+
] }),
|
|
5446
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
5447
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "block text-xs font-semibold uppercase tracking-wider text-slate-600 dark:text-slate-400", children: labels.validUntilLabel }),
|
|
5448
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
5449
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5450
|
+
chunkKZDABEML_js.DatePicker,
|
|
5451
|
+
{
|
|
5452
|
+
value: validUntilDate,
|
|
5453
|
+
onChange: (d) => {
|
|
5454
|
+
setValidUntilDate(d);
|
|
5637
5455
|
markTouched();
|
|
5638
5456
|
},
|
|
5639
|
-
|
|
5640
|
-
unselectedStyle: tagsStyle,
|
|
5641
|
-
showActions: false,
|
|
5642
|
-
addPlaceholder: labels.tagsPlaceholder,
|
|
5643
|
-
addAriaLabel: labels.tagsLabel
|
|
5457
|
+
placeholder: labels.validUntilDateLabel
|
|
5644
5458
|
}
|
|
5645
5459
|
),
|
|
5646
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[11px] text-slate-500 dark:text-slate-400", children: labels.tagsHint })
|
|
5647
|
-
] }),
|
|
5648
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
5649
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "mb-2 block text-xs font-semibold uppercase tracking-wider text-slate-600 dark:text-slate-400", children: labels.recurrenceLabel }),
|
|
5650
5460
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5651
|
-
|
|
5461
|
+
chunkKZDABEML_js.TimePicker,
|
|
5652
5462
|
{
|
|
5653
|
-
|
|
5654
|
-
|
|
5655
|
-
|
|
5656
|
-
{ value: "recurring", label: labels.recurrenceRecurring }
|
|
5657
|
-
],
|
|
5658
|
-
value: recurrence,
|
|
5659
|
-
onChange: (v) => {
|
|
5660
|
-
setRecurrence(v);
|
|
5463
|
+
value: validUntilTime,
|
|
5464
|
+
onChange: (t) => {
|
|
5465
|
+
setValidUntilTime(t);
|
|
5661
5466
|
markTouched();
|
|
5662
5467
|
},
|
|
5663
|
-
|
|
5468
|
+
placeholder: labels.validUntilTimeLabel
|
|
5664
5469
|
}
|
|
5665
5470
|
)
|
|
5666
|
-
] })
|
|
5667
|
-
|
|
5668
|
-
|
|
5471
|
+
] })
|
|
5472
|
+
] })
|
|
5473
|
+
] }),
|
|
5474
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5475
|
+
chunkKZDABEML_js.FormCheckbox,
|
|
5476
|
+
{
|
|
5477
|
+
checked: noExpiry,
|
|
5478
|
+
onChange: (v) => {
|
|
5479
|
+
setNoExpiry(v);
|
|
5480
|
+
markTouched();
|
|
5481
|
+
},
|
|
5482
|
+
label: labels.noExpiryLabel,
|
|
5483
|
+
description: labels.noExpiryDescription
|
|
5484
|
+
}
|
|
5485
|
+
),
|
|
5486
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
5487
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "mb-2 block text-xs font-semibold uppercase tracking-wider text-slate-600 dark:text-slate-400", children: labels.statusLabel }),
|
|
5488
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5489
|
+
chunkKZDABEML_js.SegmentedControl,
|
|
5490
|
+
{
|
|
5491
|
+
segments: [
|
|
5492
|
+
{ value: "active", label: labels.statusActive },
|
|
5493
|
+
{ value: "paused", label: labels.statusPaused },
|
|
5494
|
+
{ value: "archived", label: labels.statusArchived }
|
|
5495
|
+
],
|
|
5496
|
+
value: status,
|
|
5497
|
+
onChange: (v) => {
|
|
5498
|
+
setStatus(v);
|
|
5499
|
+
markTouched();
|
|
5500
|
+
},
|
|
5501
|
+
size: "sm"
|
|
5502
|
+
}
|
|
5503
|
+
)
|
|
5504
|
+
] }),
|
|
5505
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
|
|
5506
|
+
/* @__PURE__ */ jsxRuntime.jsx("label", { className: "block text-xs font-semibold uppercase tracking-wider text-slate-600 dark:text-slate-400", children: labels.tagsLabel }),
|
|
5507
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5508
|
+
chunkKZDABEML_js.ChipPicker,
|
|
5509
|
+
{
|
|
5510
|
+
items: tagsItems,
|
|
5511
|
+
selectedIds: tagsSelected,
|
|
5512
|
+
onChange: (ids) => {
|
|
5513
|
+
setTagsSelected(ids);
|
|
5514
|
+
markTouched();
|
|
5515
|
+
},
|
|
5516
|
+
onItemsChange: (items) => {
|
|
5517
|
+
setTagsItems(items);
|
|
5518
|
+
markTouched();
|
|
5519
|
+
},
|
|
5520
|
+
allowCustom: true,
|
|
5521
|
+
unselectedStyle: tagsStyle,
|
|
5522
|
+
showActions: false,
|
|
5523
|
+
addPlaceholder: labels.tagsPlaceholder,
|
|
5524
|
+
addAriaLabel: labels.tagsLabel
|
|
5525
|
+
}
|
|
5526
|
+
),
|
|
5527
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[11px] text-slate-500 dark:text-slate-400", children: labels.tagsHint })
|
|
5528
|
+
] }),
|
|
5529
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
5530
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "mb-2 block text-xs font-semibold uppercase tracking-wider text-slate-600 dark:text-slate-400", children: labels.recurrenceLabel }),
|
|
5531
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5532
|
+
chunkKZDABEML_js.SegmentedControl,
|
|
5533
|
+
{
|
|
5534
|
+
segments: [
|
|
5535
|
+
{ value: "one-off", label: labels.recurrenceOneOff },
|
|
5536
|
+
{ value: "cron", label: labels.recurrenceCron },
|
|
5537
|
+
{ value: "recurring", label: labels.recurrenceRecurring }
|
|
5538
|
+
],
|
|
5539
|
+
value: recurrence,
|
|
5540
|
+
onChange: (v) => {
|
|
5541
|
+
setRecurrence(v);
|
|
5542
|
+
markTouched();
|
|
5543
|
+
},
|
|
5544
|
+
size: "sm"
|
|
5545
|
+
}
|
|
5546
|
+
)
|
|
5547
|
+
] }),
|
|
5548
|
+
recurrence === "cron" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
5549
|
+
chunkKZDABEML_js.FormInput,
|
|
5550
|
+
{
|
|
5551
|
+
label: labels.cronExpressionLabel,
|
|
5552
|
+
value: cronExpression,
|
|
5553
|
+
onValueChange: (v) => {
|
|
5554
|
+
setCronExpression(v);
|
|
5555
|
+
markTouched();
|
|
5556
|
+
},
|
|
5557
|
+
placeholder: labels.cronExpressionPlaceholder,
|
|
5558
|
+
hint: labels.cronExpressionHint
|
|
5559
|
+
}
|
|
5560
|
+
),
|
|
5561
|
+
recurrence === "recurring" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-3", children: [
|
|
5562
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
5563
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "mb-2 block text-xs font-semibold uppercase tracking-wider text-slate-600 dark:text-slate-400", children: labels.weekdaysLabel }),
|
|
5564
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5565
|
+
chunkKZDABEML_js.ChipPicker,
|
|
5669
5566
|
{
|
|
5670
|
-
|
|
5671
|
-
|
|
5672
|
-
|
|
5673
|
-
|
|
5567
|
+
items: WEEKDAYS.map((d) => ({
|
|
5568
|
+
id: d.id,
|
|
5569
|
+
name: labels[d.labelKey] ?? d.id,
|
|
5570
|
+
style: {
|
|
5571
|
+
bg: "bg-fuchsia-500/15",
|
|
5572
|
+
text: "text-fuchsia-700 dark:text-fuchsia-300"
|
|
5573
|
+
}
|
|
5574
|
+
})),
|
|
5575
|
+
selectedIds: weekdays,
|
|
5576
|
+
onChange: (ids) => {
|
|
5577
|
+
setWeekdays(ids);
|
|
5674
5578
|
markTouched();
|
|
5675
5579
|
},
|
|
5676
|
-
|
|
5677
|
-
hint: labels.cronExpressionHint
|
|
5580
|
+
showActions: false
|
|
5678
5581
|
}
|
|
5679
|
-
)
|
|
5680
|
-
|
|
5681
|
-
|
|
5682
|
-
|
|
5683
|
-
|
|
5684
|
-
|
|
5685
|
-
|
|
5686
|
-
|
|
5687
|
-
|
|
5688
|
-
|
|
5689
|
-
|
|
5690
|
-
|
|
5691
|
-
|
|
5692
|
-
|
|
5693
|
-
|
|
5694
|
-
selectedIds: weekdays,
|
|
5695
|
-
onChange: (ids) => {
|
|
5696
|
-
setWeekdays(ids);
|
|
5697
|
-
markTouched();
|
|
5698
|
-
},
|
|
5699
|
-
showActions: false
|
|
5700
|
-
}
|
|
5701
|
-
)
|
|
5702
|
-
] }),
|
|
5703
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
5704
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "mb-2 block text-xs font-semibold uppercase tracking-wider text-slate-600 dark:text-slate-400", children: labels.timeOfDayLabel }),
|
|
5705
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5706
|
-
chunkFZUV7GNB_js.TimePicker,
|
|
5707
|
-
{
|
|
5708
|
-
value: recurringTime,
|
|
5709
|
-
onChange: (t) => {
|
|
5710
|
-
setRecurringTime(t);
|
|
5711
|
-
markTouched();
|
|
5712
|
-
},
|
|
5713
|
-
placeholder: labels.timeOfDayLabel
|
|
5714
|
-
}
|
|
5715
|
-
)
|
|
5716
|
-
] })
|
|
5717
|
-
] })
|
|
5582
|
+
)
|
|
5583
|
+
] }),
|
|
5584
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
5585
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "mb-2 block text-xs font-semibold uppercase tracking-wider text-slate-600 dark:text-slate-400", children: labels.timeOfDayLabel }),
|
|
5586
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5587
|
+
chunkKZDABEML_js.TimePicker,
|
|
5588
|
+
{
|
|
5589
|
+
value: recurringTime,
|
|
5590
|
+
onChange: (t) => {
|
|
5591
|
+
setRecurringTime(t);
|
|
5592
|
+
markTouched();
|
|
5593
|
+
},
|
|
5594
|
+
placeholder: labels.timeOfDayLabel
|
|
5595
|
+
}
|
|
5596
|
+
)
|
|
5718
5597
|
] })
|
|
5719
|
-
}
|
|
5720
|
-
|
|
5598
|
+
] })
|
|
5599
|
+
] });
|
|
5721
5600
|
}
|
|
5722
5601
|
function renderStep5() {
|
|
5723
5602
|
const payload = buildPayload();
|
|
5724
5603
|
const conditionSentence = humanReadableCondition(payload.condition, labels);
|
|
5725
5604
|
const actionSentence = humanReadableAction(payload.action, labels, ACTION_TILES, actionTileId);
|
|
5726
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-
|
|
5605
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-5", children: [
|
|
5727
5606
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5728
|
-
|
|
5607
|
+
ReviewBlock3,
|
|
5729
5608
|
{
|
|
5730
|
-
|
|
5731
|
-
|
|
5732
|
-
|
|
5733
|
-
|
|
5734
|
-
},
|
|
5735
|
-
actions: /* @__PURE__ */ jsxRuntime.jsxs(chunkMXQ2EYG2_js.Button, { type: "button", size: "sm", outline: true, onClick: () => goToStep(1), children: [
|
|
5736
|
-
/* @__PURE__ */ jsxRuntime.jsx(outline.PencilSquareIcon, { className: "h-4 w-4" }),
|
|
5737
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-1.5", children: labels.wizardReviewEdit })
|
|
5738
|
-
] }),
|
|
5609
|
+
stepTitle: labels.wizardStep1Title,
|
|
5610
|
+
stepSubtitle: labels.wizardStep1Subtitle,
|
|
5611
|
+
editLabel: labels.wizardReviewEdit,
|
|
5612
|
+
onEdit: () => goToStep(1),
|
|
5739
5613
|
children: /* @__PURE__ */ jsxRuntime.jsxs("dl", { className: "grid grid-cols-1 gap-2 sm:grid-cols-2", children: [
|
|
5740
5614
|
/* @__PURE__ */ jsxRuntime.jsx(ReviewRow3, { label: labels.reviewNameLabel, value: payload.name }),
|
|
5741
5615
|
/* @__PURE__ */ jsxRuntime.jsx(ReviewRow3, { label: labels.reviewPriorityLabel, value: String(payload.priority) }),
|
|
@@ -5751,54 +5625,35 @@ function RuleNewWizardPageView({
|
|
|
5751
5625
|
}
|
|
5752
5626
|
),
|
|
5753
5627
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
5754
|
-
|
|
5628
|
+
ReviewBlock3,
|
|
5755
5629
|
{
|
|
5756
|
-
|
|
5757
|
-
|
|
5758
|
-
|
|
5759
|
-
|
|
5760
|
-
},
|
|
5761
|
-
actions: /* @__PURE__ */ jsxRuntime.jsxs(chunkMXQ2EYG2_js.Button, { type: "button", size: "sm", outline: true, onClick: () => goToStep(2), children: [
|
|
5762
|
-
/* @__PURE__ */ jsxRuntime.jsx(outline.PencilSquareIcon, { className: "h-4 w-4" }),
|
|
5763
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-1.5", children: labels.wizardReviewEdit })
|
|
5764
|
-
] }),
|
|
5630
|
+
stepTitle: labels.wizardStep2Title,
|
|
5631
|
+
stepSubtitle: labels.wizardStep2Subtitle,
|
|
5632
|
+
editLabel: labels.wizardReviewEdit,
|
|
5633
|
+
onEdit: () => goToStep(2),
|
|
5765
5634
|
children: [
|
|
5766
5635
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-2 text-sm text-slate-700 dark:text-slate-200", children: conditionSentence }),
|
|
5767
|
-
/* @__PURE__ */ jsxRuntime.jsx(ReviewRow3, { label: labels.reviewCombinatorLabel, value: combinator.toUpperCase() })
|
|
5768
|
-
/* @__PURE__ */ jsxRuntime.jsx("pre", { className: "mt-3 max-h-48 overflow-auto 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: JSON.stringify(payload.condition, null, 2) })
|
|
5636
|
+
/* @__PURE__ */ jsxRuntime.jsx(ReviewRow3, { label: labels.reviewCombinatorLabel, value: combinator.toUpperCase() })
|
|
5769
5637
|
]
|
|
5770
5638
|
}
|
|
5771
5639
|
),
|
|
5772
|
-
/* @__PURE__ */ jsxRuntime.
|
|
5773
|
-
|
|
5640
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5641
|
+
ReviewBlock3,
|
|
5774
5642
|
{
|
|
5775
|
-
|
|
5776
|
-
|
|
5777
|
-
|
|
5778
|
-
|
|
5779
|
-
}
|
|
5780
|
-
actions: /* @__PURE__ */ jsxRuntime.jsxs(chunkMXQ2EYG2_js.Button, { type: "button", size: "sm", outline: true, onClick: () => goToStep(3), children: [
|
|
5781
|
-
/* @__PURE__ */ jsxRuntime.jsx(outline.PencilSquareIcon, { className: "h-4 w-4" }),
|
|
5782
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-1.5", children: labels.wizardReviewEdit })
|
|
5783
|
-
] }),
|
|
5784
|
-
children: [
|
|
5785
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-2 text-sm text-slate-700 dark:text-slate-200", children: actionSentence }),
|
|
5786
|
-
/* @__PURE__ */ jsxRuntime.jsx("pre", { className: "mt-3 max-h-48 overflow-auto 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: JSON.stringify(payload.action, null, 2) })
|
|
5787
|
-
]
|
|
5643
|
+
stepTitle: labels.wizardStep3Title,
|
|
5644
|
+
stepSubtitle: labels.wizardStep3Subtitle,
|
|
5645
|
+
editLabel: labels.wizardReviewEdit,
|
|
5646
|
+
onEdit: () => goToStep(3),
|
|
5647
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-slate-700 dark:text-slate-200", children: actionSentence })
|
|
5788
5648
|
}
|
|
5789
5649
|
),
|
|
5790
5650
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5791
|
-
|
|
5651
|
+
ReviewBlock3,
|
|
5792
5652
|
{
|
|
5793
|
-
|
|
5794
|
-
|
|
5795
|
-
|
|
5796
|
-
|
|
5797
|
-
},
|
|
5798
|
-
actions: /* @__PURE__ */ jsxRuntime.jsxs(chunkMXQ2EYG2_js.Button, { type: "button", size: "sm", outline: true, onClick: () => goToStep(4), children: [
|
|
5799
|
-
/* @__PURE__ */ jsxRuntime.jsx(outline.PencilSquareIcon, { className: "h-4 w-4" }),
|
|
5800
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-1.5", children: labels.wizardReviewEdit })
|
|
5801
|
-
] }),
|
|
5653
|
+
stepTitle: labels.wizardStep4Title,
|
|
5654
|
+
stepSubtitle: labels.wizardStep4Subtitle,
|
|
5655
|
+
editLabel: labels.wizardReviewEdit,
|
|
5656
|
+
onEdit: () => goToStep(4),
|
|
5802
5657
|
children: /* @__PURE__ */ jsxRuntime.jsxs("dl", { className: "grid grid-cols-1 gap-2 sm:grid-cols-2", children: [
|
|
5803
5658
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5804
5659
|
ReviewRow3,
|
|
@@ -5830,23 +5685,23 @@ function RuleNewWizardPageView({
|
|
|
5830
5685
|
}
|
|
5831
5686
|
const stepBody = step === 1 ? renderStep1() : step === 2 ? renderStep2() : step === 3 ? renderStep3() : step === 4 ? renderStep4() : renderStep5();
|
|
5832
5687
|
const advanceDisabled = !canAdvance(step);
|
|
5833
|
-
const
|
|
5834
|
-
|
|
5835
|
-
|
|
5836
|
-
|
|
5837
|
-
|
|
5838
|
-
|
|
5839
|
-
|
|
5840
|
-
|
|
5841
|
-
|
|
5842
|
-
|
|
5843
|
-
|
|
5844
|
-
|
|
5845
|
-
|
|
5846
|
-
|
|
5847
|
-
|
|
5688
|
+
const isLast = step === TOTAL_STEPS3;
|
|
5689
|
+
const scrollableStep = step === 2 || step === 3 || step === 4 || step === 5;
|
|
5690
|
+
const bodyClass = scrollableStep ? "p-5 pt-5 sm:p-8 sm:pt-8 max-h-[60vh] overflow-y-auto" : "p-5 pt-5 sm:p-8 sm:pt-8";
|
|
5691
|
+
const footer = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "liquid-divider flex items-center justify-between border-t pt-4", children: [
|
|
5692
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMXQ2EYG2_js.Button, { type: "button", outline: true, onClick: step === 1 ? cancelWithConfirm : goBack, disabled: submitting, children: step === 1 ? labels.wizardCancel : labels.wizardBack }),
|
|
5693
|
+
isLast ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
5694
|
+
chunkMXQ2EYG2_js.Button,
|
|
5695
|
+
{
|
|
5696
|
+
type: "button",
|
|
5697
|
+
color: "ios-glass-blue",
|
|
5698
|
+
onClick: () => void submit(),
|
|
5699
|
+
disabled: submitting || !name.trim() || !actionTileId,
|
|
5700
|
+
children: submitting ? labels.wizardCreate + "\u2026" : labels.wizardCreate
|
|
5701
|
+
}
|
|
5702
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(chunkMXQ2EYG2_js.Button, { type: "button", color: "ios-glass-blue", onClick: goNext, disabled: advanceDisabled || submitting, children: labels.wizardNext })
|
|
5848
5703
|
] });
|
|
5849
|
-
|
|
5704
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5850
5705
|
"form",
|
|
5851
5706
|
{
|
|
5852
5707
|
onSubmit: (e) => {
|
|
@@ -5856,15 +5711,12 @@ function RuleNewWizardPageView({
|
|
|
5856
5711
|
},
|
|
5857
5712
|
className: "space-y-4",
|
|
5858
5713
|
children: [
|
|
5859
|
-
|
|
5714
|
+
hero,
|
|
5715
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.Card, { variant: "default", children: /* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.CardContent, { className: bodyClass, children: stepBody }) }),
|
|
5860
5716
|
footer
|
|
5861
5717
|
]
|
|
5862
5718
|
}
|
|
5863
5719
|
);
|
|
5864
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
5865
|
-
hero,
|
|
5866
|
-
content
|
|
5867
|
-
] });
|
|
5868
5720
|
}
|
|
5869
5721
|
function ReviewRow3({ label, value }) {
|
|
5870
5722
|
return /* @__PURE__ */ jsxRuntime.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: [
|
|
@@ -5872,6 +5724,27 @@ function ReviewRow3({ label, value }) {
|
|
|
5872
5724
|
/* @__PURE__ */ jsxRuntime.jsx("dd", { className: "mt-0.5 whitespace-pre-wrap break-words text-xs font-semibold text-slate-900 dark:text-white", children: value })
|
|
5873
5725
|
] });
|
|
5874
5726
|
}
|
|
5727
|
+
function ReviewBlock3({
|
|
5728
|
+
stepTitle,
|
|
5729
|
+
stepSubtitle,
|
|
5730
|
+
editLabel,
|
|
5731
|
+
onEdit,
|
|
5732
|
+
children
|
|
5733
|
+
}) {
|
|
5734
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "border-b liquid-divider pb-4 last:border-b-0 last:pb-0", children: [
|
|
5735
|
+
/* @__PURE__ */ jsxRuntime.jsxs("header", { className: "mb-2 flex items-start justify-between gap-3", children: [
|
|
5736
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0", children: [
|
|
5737
|
+
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: "truncate text-sm font-semibold text-slate-900 dark:text-white", children: stepTitle }),
|
|
5738
|
+
stepSubtitle && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "truncate text-xs text-slate-500 dark:text-slate-400", children: stepSubtitle })
|
|
5739
|
+
] }),
|
|
5740
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkMXQ2EYG2_js.Button, { type: "button", size: "sm", outline: true, onClick: onEdit, children: [
|
|
5741
|
+
/* @__PURE__ */ jsxRuntime.jsx(outline.PencilSquareIcon, { className: "h-4 w-4" }),
|
|
5742
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-1.5", children: editLabel })
|
|
5743
|
+
] })
|
|
5744
|
+
] }),
|
|
5745
|
+
children
|
|
5746
|
+
] });
|
|
5747
|
+
}
|
|
5875
5748
|
function pad(n) {
|
|
5876
5749
|
return String(n).padStart(2, "0");
|
|
5877
5750
|
}
|
|
@@ -5921,7 +5794,7 @@ function humanReadableAction(action, labels, tiles, actionTileId) {
|
|
|
5921
5794
|
}
|
|
5922
5795
|
function AgentNewModal({ open, onClose, ...wizardProps }) {
|
|
5923
5796
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5924
|
-
|
|
5797
|
+
chunkKZDABEML_js.GlassModal,
|
|
5925
5798
|
{
|
|
5926
5799
|
open,
|
|
5927
5800
|
onClose,
|
|
@@ -5934,7 +5807,7 @@ function AgentNewModal({ open, onClose, ...wizardProps }) {
|
|
|
5934
5807
|
}
|
|
5935
5808
|
function DatasourceNewModal({ open, onClose, ...wizardProps }) {
|
|
5936
5809
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5937
|
-
|
|
5810
|
+
chunkKZDABEML_js.GlassModal,
|
|
5938
5811
|
{
|
|
5939
5812
|
open,
|
|
5940
5813
|
onClose,
|
|
@@ -5947,7 +5820,7 @@ function DatasourceNewModal({ open, onClose, ...wizardProps }) {
|
|
|
5947
5820
|
}
|
|
5948
5821
|
function RuleNewModal({ open, onClose, ...wizardProps }) {
|
|
5949
5822
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5950
|
-
|
|
5823
|
+
chunkKZDABEML_js.GlassModal,
|
|
5951
5824
|
{
|
|
5952
5825
|
open,
|
|
5953
5826
|
onClose,
|
|
@@ -6108,17 +5981,25 @@ function ModelNewWizardPageView({
|
|
|
6108
5981
|
const stepTitles = [labels.step1Title, labels.step2Title, labels.step3Title, labels.step4Title];
|
|
6109
5982
|
const stepSubtitles = [labels.step1Subtitle, labels.step2Subtitle, labels.step3Subtitle, labels.step4Subtitle];
|
|
6110
5983
|
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
5984
|
const hero = /* @__PURE__ */ jsxRuntime.jsx(
|
|
6113
|
-
|
|
5985
|
+
chunkKZDABEML_js.HeroSection,
|
|
6114
5986
|
{
|
|
6115
5987
|
icon: /* @__PURE__ */ jsxRuntime.jsx(outline.CubeTransparentIcon, { className: "h-5 w-5" }),
|
|
6116
|
-
label:
|
|
6117
|
-
title: labels.pageTitle,
|
|
5988
|
+
label: labels.pageTitle,
|
|
5989
|
+
title: stepTitles[step - 1] ?? labels.pageTitle,
|
|
6118
5990
|
subtitle: stepSubtitles[step - 1] ?? labels.pageSubtitle,
|
|
6119
5991
|
gradient: "from-emerald-500 to-teal-700",
|
|
5992
|
+
actions: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5993
|
+
chunkMXQ2EYG2_js.IconButton,
|
|
5994
|
+
{
|
|
5995
|
+
label: labels.wizardCancel,
|
|
5996
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(outline.XMarkIcon, { className: "h-5 w-5" }),
|
|
5997
|
+
variant: "ghost",
|
|
5998
|
+
onClick: cancelWithConfirm
|
|
5999
|
+
}
|
|
6000
|
+
),
|
|
6120
6001
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6121
|
-
|
|
6002
|
+
chunkKZDABEML_js.StepIndicator,
|
|
6122
6003
|
{
|
|
6123
6004
|
accent: "indigo",
|
|
6124
6005
|
currentStep: step - 1,
|
|
@@ -6131,185 +6012,166 @@ function ModelNewWizardPageView({
|
|
|
6131
6012
|
);
|
|
6132
6013
|
function renderStep1() {
|
|
6133
6014
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6134
|
-
|
|
6135
|
-
{
|
|
6136
|
-
variant: "glass",
|
|
6137
|
-
header: { title: labels.providerLabel, subtitle: labels.step1Subtitle },
|
|
6138
|
-
children: /* @__PURE__ */ jsxRuntime.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] ?? outline.GlobeAltIcon;
|
|
6146
|
-
const color = PROVIDER_COLOR[p.value] ?? "slate";
|
|
6147
|
-
const selected = providerSlug === p.value;
|
|
6148
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6149
|
-
chunkFZUV7GNB_js.FilterTileButton,
|
|
6150
|
-
{
|
|
6151
|
-
isActive: selected,
|
|
6152
|
-
color,
|
|
6153
|
-
icon: /* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.jsx(
|
|
6171
|
-
chunkFZUV7GNB_js.SectionCard,
|
|
6015
|
+
"div",
|
|
6172
6016
|
{
|
|
6173
|
-
|
|
6174
|
-
|
|
6175
|
-
|
|
6176
|
-
|
|
6177
|
-
|
|
6017
|
+
role: "radiogroup",
|
|
6018
|
+
"aria-label": labels.providerLabel,
|
|
6019
|
+
className: "grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3",
|
|
6020
|
+
children: MODEL_PROVIDERS.map((p) => {
|
|
6021
|
+
const Icon = PROVIDER_ICON[p.value] ?? outline.GlobeAltIcon;
|
|
6022
|
+
const color = PROVIDER_COLOR[p.value] ?? "slate";
|
|
6023
|
+
const selected = providerSlug === p.value;
|
|
6024
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6025
|
+
chunkKZDABEML_js.FilterTileButton,
|
|
6178
6026
|
{
|
|
6179
|
-
|
|
6180
|
-
|
|
6181
|
-
|
|
6182
|
-
|
|
6183
|
-
|
|
6184
|
-
|
|
6185
|
-
|
|
6186
|
-
required: true
|
|
6187
|
-
}
|
|
6188
|
-
),
|
|
6189
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6190
|
-
chunkFZUV7GNB_js.FormInput,
|
|
6191
|
-
{
|
|
6192
|
-
label: labels.apiKeyLabel,
|
|
6193
|
-
type: "password",
|
|
6194
|
-
value: apiKey,
|
|
6195
|
-
onValueChange: (v) => {
|
|
6196
|
-
setApiKey(v);
|
|
6027
|
+
isActive: selected,
|
|
6028
|
+
color,
|
|
6029
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(Icon, { className: "h-5 w-5" }),
|
|
6030
|
+
label: p.label,
|
|
6031
|
+
count: p.category,
|
|
6032
|
+
onClick: () => {
|
|
6033
|
+
setProviderSlug(p.value);
|
|
6197
6034
|
markTouched();
|
|
6198
|
-
}
|
|
6199
|
-
|
|
6200
|
-
|
|
6201
|
-
)
|
|
6202
|
-
|
|
6035
|
+
}
|
|
6036
|
+
},
|
|
6037
|
+
p.value
|
|
6038
|
+
);
|
|
6039
|
+
})
|
|
6203
6040
|
}
|
|
6204
6041
|
);
|
|
6205
6042
|
}
|
|
6043
|
+
function renderStep2() {
|
|
6044
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-4", children: /* @__PURE__ */ jsxRuntime.jsxs(chunkKZDABEML_js.FormGrid, { children: [
|
|
6045
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6046
|
+
chunkKZDABEML_js.FormInput,
|
|
6047
|
+
{
|
|
6048
|
+
label: labels.nameLabel,
|
|
6049
|
+
value: name,
|
|
6050
|
+
onValueChange: (v) => {
|
|
6051
|
+
setName(v);
|
|
6052
|
+
markTouched();
|
|
6053
|
+
},
|
|
6054
|
+
placeholder: labels.namePlaceholder || `${preset.label} \u2014 produ\xE7\xE3o`,
|
|
6055
|
+
required: true
|
|
6056
|
+
}
|
|
6057
|
+
),
|
|
6058
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6059
|
+
chunkKZDABEML_js.FormInput,
|
|
6060
|
+
{
|
|
6061
|
+
label: labels.apiKeyLabel,
|
|
6062
|
+
type: "password",
|
|
6063
|
+
value: apiKey,
|
|
6064
|
+
onValueChange: (v) => {
|
|
6065
|
+
setApiKey(v);
|
|
6066
|
+
markTouched();
|
|
6067
|
+
},
|
|
6068
|
+
placeholder: labels.apiKeyPlaceholder
|
|
6069
|
+
}
|
|
6070
|
+
)
|
|
6071
|
+
] }) });
|
|
6072
|
+
}
|
|
6206
6073
|
function renderStep3() {
|
|
6207
6074
|
const showRegion = preset.needsRegion === true;
|
|
6208
6075
|
const showEndpoint = preset.needsEndpoint === true;
|
|
6209
|
-
return /* @__PURE__ */ jsxRuntime.
|
|
6210
|
-
|
|
6211
|
-
|
|
6212
|
-
|
|
6213
|
-
|
|
6214
|
-
|
|
6215
|
-
|
|
6216
|
-
|
|
6217
|
-
|
|
6218
|
-
|
|
6219
|
-
|
|
6220
|
-
|
|
6221
|
-
|
|
6222
|
-
|
|
6223
|
-
|
|
6224
|
-
|
|
6225
|
-
|
|
6226
|
-
|
|
6227
|
-
|
|
6228
|
-
|
|
6229
|
-
|
|
6230
|
-
|
|
6231
|
-
|
|
6232
|
-
|
|
6233
|
-
|
|
6234
|
-
|
|
6235
|
-
|
|
6236
|
-
|
|
6237
|
-
|
|
6238
|
-
|
|
6239
|
-
|
|
6240
|
-
|
|
6241
|
-
|
|
6242
|
-
|
|
6243
|
-
|
|
6244
|
-
|
|
6245
|
-
|
|
6246
|
-
|
|
6247
|
-
|
|
6248
|
-
|
|
6249
|
-
|
|
6250
|
-
|
|
6251
|
-
|
|
6252
|
-
|
|
6253
|
-
|
|
6254
|
-
|
|
6255
|
-
|
|
6256
|
-
|
|
6257
|
-
|
|
6258
|
-
|
|
6259
|
-
|
|
6260
|
-
|
|
6261
|
-
|
|
6262
|
-
|
|
6263
|
-
|
|
6264
|
-
|
|
6265
|
-
|
|
6266
|
-
|
|
6267
|
-
|
|
6268
|
-
|
|
6269
|
-
|
|
6270
|
-
|
|
6271
|
-
|
|
6272
|
-
|
|
6273
|
-
|
|
6274
|
-
|
|
6275
|
-
|
|
6276
|
-
|
|
6277
|
-
|
|
6278
|
-
|
|
6279
|
-
|
|
6280
|
-
|
|
6281
|
-
|
|
6282
|
-
|
|
6283
|
-
|
|
6284
|
-
|
|
6285
|
-
|
|
6286
|
-
|
|
6287
|
-
|
|
6288
|
-
),
|
|
6289
|
-
testStatus === "success" && /* @__PURE__ */ jsxRuntime.jsx(chunkFZUV7GNB_js.StatusBadge, { status: "success", label: labels.connectionSuccess }),
|
|
6290
|
-
testStatus === "failed" && /* @__PURE__ */ jsxRuntime.jsx(chunkFZUV7GNB_js.StatusBadge, { status: "error", label: labels.connectionFailed })
|
|
6291
|
-
] })
|
|
6292
|
-
] })
|
|
6293
|
-
}
|
|
6294
|
-
);
|
|
6076
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
6077
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkKZDABEML_js.FormGrid, { children: [
|
|
6078
|
+
showRegion && (preset.regions ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
6079
|
+
chunkKZDABEML_js.FormSelect,
|
|
6080
|
+
{
|
|
6081
|
+
label: labels.regionLabel,
|
|
6082
|
+
value: region,
|
|
6083
|
+
onValueChange: (v) => {
|
|
6084
|
+
setRegion(v);
|
|
6085
|
+
markTouched();
|
|
6086
|
+
},
|
|
6087
|
+
options: [...preset.regions]
|
|
6088
|
+
}
|
|
6089
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
6090
|
+
chunkKZDABEML_js.FormInput,
|
|
6091
|
+
{
|
|
6092
|
+
label: labels.regionLabel,
|
|
6093
|
+
value: region,
|
|
6094
|
+
onValueChange: (v) => {
|
|
6095
|
+
setRegion(v);
|
|
6096
|
+
markTouched();
|
|
6097
|
+
},
|
|
6098
|
+
placeholder: labels.regionPlaceholder ?? preset.defaultRegion
|
|
6099
|
+
}
|
|
6100
|
+
)),
|
|
6101
|
+
showEndpoint && /* @__PURE__ */ jsxRuntime.jsx(
|
|
6102
|
+
chunkKZDABEML_js.FormInput,
|
|
6103
|
+
{
|
|
6104
|
+
label: labels.endpointLabel,
|
|
6105
|
+
type: "url",
|
|
6106
|
+
value: endpoint,
|
|
6107
|
+
onValueChange: (v) => {
|
|
6108
|
+
setEndpoint(v);
|
|
6109
|
+
markTouched();
|
|
6110
|
+
},
|
|
6111
|
+
placeholder: labels.endpointPlaceholder ?? "https://\u2026"
|
|
6112
|
+
}
|
|
6113
|
+
)
|
|
6114
|
+
] }),
|
|
6115
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
|
|
6116
|
+
/* @__PURE__ */ jsxRuntime.jsx("label", { className: "block text-xs font-medium text-slate-500 dark:text-slate-400", children: labels.modelFilterLabel }),
|
|
6117
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6118
|
+
chunkKZDABEML_js.ChipPicker,
|
|
6119
|
+
{
|
|
6120
|
+
items: modelFilterItems,
|
|
6121
|
+
selectedIds: modelFilterSelected,
|
|
6122
|
+
onChange: (ids) => {
|
|
6123
|
+
setModelFilterSelected(ids);
|
|
6124
|
+
markTouched();
|
|
6125
|
+
},
|
|
6126
|
+
onItemsChange: (items) => {
|
|
6127
|
+
setModelFilterItems(items);
|
|
6128
|
+
markTouched();
|
|
6129
|
+
},
|
|
6130
|
+
allowCustom: true,
|
|
6131
|
+
showActions: false,
|
|
6132
|
+
addPlaceholder: labels.modelFilterPlaceholder,
|
|
6133
|
+
addAriaLabel: labels.modelFilterLabel
|
|
6134
|
+
}
|
|
6135
|
+
)
|
|
6136
|
+
] }),
|
|
6137
|
+
onTestConnection && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "liquid-divider flex flex-wrap items-center gap-3 border-t pt-4", children: [
|
|
6138
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6139
|
+
chunkMXQ2EYG2_js.Button,
|
|
6140
|
+
{
|
|
6141
|
+
type: "button",
|
|
6142
|
+
outline: true,
|
|
6143
|
+
onClick: () => void handleTestConnection(),
|
|
6144
|
+
disabled: testStatus === "testing",
|
|
6145
|
+
children: testStatus === "testing" ? /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-2", children: [
|
|
6146
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.Spinner, { size: "xs" }),
|
|
6147
|
+
labels.testing
|
|
6148
|
+
] }) : labels.testConnection
|
|
6149
|
+
}
|
|
6150
|
+
),
|
|
6151
|
+
testStatus === "success" && /* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.StatusBadge, { status: "success", label: labels.connectionSuccess }),
|
|
6152
|
+
testStatus === "failed" && /* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.StatusBadge, { status: "error", label: labels.connectionFailed })
|
|
6153
|
+
] })
|
|
6154
|
+
] });
|
|
6295
6155
|
}
|
|
6296
6156
|
function renderStep4() {
|
|
6297
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-
|
|
6157
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-5", children: [
|
|
6298
6158
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6299
|
-
|
|
6159
|
+
ReviewBlock4,
|
|
6300
6160
|
{
|
|
6301
|
-
|
|
6302
|
-
|
|
6303
|
-
|
|
6161
|
+
stepTitle: labels.step1Title,
|
|
6162
|
+
stepSubtitle: labels.step1Subtitle,
|
|
6163
|
+
editLabel: labels.wizardReviewEdit,
|
|
6164
|
+
onEdit: () => goToStep(1),
|
|
6304
6165
|
children: /* @__PURE__ */ jsxRuntime.jsx("dl", { className: "grid grid-cols-1 gap-2 sm:grid-cols-2", children: /* @__PURE__ */ jsxRuntime.jsx(ReviewRow4, { label: labels.reviewProviderLabel, value: preset.label }) })
|
|
6305
6166
|
}
|
|
6306
6167
|
),
|
|
6307
6168
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6308
|
-
|
|
6169
|
+
ReviewBlock4,
|
|
6309
6170
|
{
|
|
6310
|
-
|
|
6311
|
-
|
|
6312
|
-
|
|
6171
|
+
stepTitle: labels.step2Title,
|
|
6172
|
+
stepSubtitle: labels.step2Subtitle,
|
|
6173
|
+
editLabel: labels.wizardReviewEdit,
|
|
6174
|
+
onEdit: () => goToStep(2),
|
|
6313
6175
|
children: /* @__PURE__ */ jsxRuntime.jsxs("dl", { className: "grid grid-cols-1 gap-2 sm:grid-cols-2", children: [
|
|
6314
6176
|
/* @__PURE__ */ jsxRuntime.jsx(ReviewRow4, { label: labels.reviewNameLabel, value: name || labels.reviewNoneValue }),
|
|
6315
6177
|
/* @__PURE__ */ jsxRuntime.jsx(ReviewRow4, { label: labels.reviewApiKeyLabel, value: apiKey ? labels.reviewApiKeyRedacted : labels.reviewNoneValue })
|
|
@@ -6317,11 +6179,12 @@ function ModelNewWizardPageView({
|
|
|
6317
6179
|
}
|
|
6318
6180
|
),
|
|
6319
6181
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6320
|
-
|
|
6182
|
+
ReviewBlock4,
|
|
6321
6183
|
{
|
|
6322
|
-
|
|
6323
|
-
|
|
6324
|
-
|
|
6184
|
+
stepTitle: labels.step3Title,
|
|
6185
|
+
stepSubtitle: labels.step3Subtitle,
|
|
6186
|
+
editLabel: labels.wizardReviewEdit,
|
|
6187
|
+
onEdit: () => goToStep(3),
|
|
6325
6188
|
children: /* @__PURE__ */ jsxRuntime.jsxs("dl", { className: "grid grid-cols-1 gap-2 sm:grid-cols-2", children: [
|
|
6326
6189
|
/* @__PURE__ */ jsxRuntime.jsx(ReviewRow4, { label: labels.reviewRegionLabel, value: region || labels.reviewNoneValue }),
|
|
6327
6190
|
/* @__PURE__ */ jsxRuntime.jsx(ReviewRow4, { label: labels.reviewEndpointLabel, value: endpoint || labels.reviewNoneValue }),
|
|
@@ -6339,14 +6202,14 @@ function ModelNewWizardPageView({
|
|
|
6339
6202
|
}
|
|
6340
6203
|
const stepBody = step === 1 ? renderStep1() : step === 2 ? renderStep2() : step === 3 ? renderStep3() : renderStep4();
|
|
6341
6204
|
const advanceDisabled = !canAdvance(step);
|
|
6342
|
-
const
|
|
6343
|
-
|
|
6344
|
-
|
|
6345
|
-
|
|
6346
|
-
|
|
6347
|
-
|
|
6205
|
+
const isLast = step === TOTAL_STEPS4;
|
|
6206
|
+
const scrollableStep = step === 1 || step === 4;
|
|
6207
|
+
const bodyClass = scrollableStep ? "p-5 pt-5 sm:p-8 sm:pt-8 max-h-[60vh] overflow-y-auto" : "p-5 pt-5 sm:p-8 sm:pt-8";
|
|
6208
|
+
const footer = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "liquid-divider flex items-center justify-between border-t pt-4", children: [
|
|
6209
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMXQ2EYG2_js.Button, { type: "button", outline: true, onClick: step === 1 ? cancelWithConfirm : goBack, disabled: submitting, children: step === 1 ? labels.wizardCancel : labels.wizardBack }),
|
|
6210
|
+
isLast ? /* @__PURE__ */ jsxRuntime.jsx(chunkMXQ2EYG2_js.Button, { type: "button", color: "ios-glass-blue", onClick: () => void submit(), disabled: submitting || !name.trim(), children: submitting ? labels.wizardCreate + "\u2026" : labels.wizardCreate }) : /* @__PURE__ */ jsxRuntime.jsx(chunkMXQ2EYG2_js.Button, { type: "button", color: "ios-glass-blue", onClick: goNext, disabled: advanceDisabled || submitting, children: labels.wizardNext })
|
|
6348
6211
|
] });
|
|
6349
|
-
|
|
6212
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6350
6213
|
"form",
|
|
6351
6214
|
{
|
|
6352
6215
|
onSubmit: (e) => {
|
|
@@ -6356,15 +6219,12 @@ function ModelNewWizardPageView({
|
|
|
6356
6219
|
},
|
|
6357
6220
|
className: "space-y-4",
|
|
6358
6221
|
children: [
|
|
6359
|
-
|
|
6222
|
+
hero,
|
|
6223
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.Card, { variant: "default", children: /* @__PURE__ */ jsxRuntime.jsx(chunkKZDABEML_js.CardContent, { className: bodyClass, children: stepBody }) }),
|
|
6360
6224
|
footer
|
|
6361
6225
|
]
|
|
6362
6226
|
}
|
|
6363
6227
|
);
|
|
6364
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
6365
|
-
hero,
|
|
6366
|
-
content
|
|
6367
|
-
] });
|
|
6368
6228
|
}
|
|
6369
6229
|
function ReviewRow4({ label, value }) {
|
|
6370
6230
|
return /* @__PURE__ */ jsxRuntime.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: [
|
|
@@ -6372,9 +6232,30 @@ function ReviewRow4({ label, value }) {
|
|
|
6372
6232
|
/* @__PURE__ */ jsxRuntime.jsx("dd", { className: "mt-0.5 truncate text-xs font-semibold text-slate-900 dark:text-white", children: value })
|
|
6373
6233
|
] });
|
|
6374
6234
|
}
|
|
6235
|
+
function ReviewBlock4({
|
|
6236
|
+
stepTitle,
|
|
6237
|
+
stepSubtitle,
|
|
6238
|
+
editLabel,
|
|
6239
|
+
onEdit,
|
|
6240
|
+
children
|
|
6241
|
+
}) {
|
|
6242
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "border-b liquid-divider pb-4 last:border-b-0 last:pb-0", children: [
|
|
6243
|
+
/* @__PURE__ */ jsxRuntime.jsxs("header", { className: "mb-2 flex items-start justify-between gap-3", children: [
|
|
6244
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0", children: [
|
|
6245
|
+
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: "truncate text-sm font-semibold text-slate-900 dark:text-white", children: stepTitle }),
|
|
6246
|
+
stepSubtitle && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "truncate text-xs text-slate-500 dark:text-slate-400", children: stepSubtitle })
|
|
6247
|
+
] }),
|
|
6248
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkMXQ2EYG2_js.Button, { type: "button", size: "sm", outline: true, onClick: onEdit, children: [
|
|
6249
|
+
/* @__PURE__ */ jsxRuntime.jsx(outline.PencilSquareIcon, { className: "h-4 w-4" }),
|
|
6250
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-1.5", children: editLabel })
|
|
6251
|
+
] })
|
|
6252
|
+
] }),
|
|
6253
|
+
children
|
|
6254
|
+
] });
|
|
6255
|
+
}
|
|
6375
6256
|
function ModelNewModal({ open, onClose, ...wizardProps }) {
|
|
6376
6257
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6377
|
-
|
|
6258
|
+
chunkKZDABEML_js.GlassModal,
|
|
6378
6259
|
{
|
|
6379
6260
|
open,
|
|
6380
6261
|
onClose,
|
|
@@ -6388,31 +6269,31 @@ function ModelNewModal({ open, onClose, ...wizardProps }) {
|
|
|
6388
6269
|
|
|
6389
6270
|
Object.defineProperty(exports, "RolesPageView", {
|
|
6390
6271
|
enumerable: true,
|
|
6391
|
-
get: function () { return
|
|
6272
|
+
get: function () { return chunkOQM252SM_js.RolesPageView; }
|
|
6392
6273
|
});
|
|
6393
6274
|
Object.defineProperty(exports, "UsersPageView", {
|
|
6394
6275
|
enumerable: true,
|
|
6395
|
-
get: function () { return
|
|
6276
|
+
get: function () { return chunkOQM252SM_js.UsersPageView; }
|
|
6396
6277
|
});
|
|
6397
6278
|
Object.defineProperty(exports, "DIALECT_CATEGORIES", {
|
|
6398
6279
|
enumerable: true,
|
|
6399
|
-
get: function () { return
|
|
6280
|
+
get: function () { return chunkPADXORD2_js.DIALECT_CATEGORIES; }
|
|
6400
6281
|
});
|
|
6401
6282
|
Object.defineProperty(exports, "DatasourceFormModal", {
|
|
6402
6283
|
enumerable: true,
|
|
6403
|
-
get: function () { return
|
|
6284
|
+
get: function () { return chunkPADXORD2_js.DatasourceFormModal; }
|
|
6404
6285
|
});
|
|
6405
6286
|
Object.defineProperty(exports, "DatasourceModal", {
|
|
6406
6287
|
enumerable: true,
|
|
6407
|
-
get: function () { return
|
|
6288
|
+
get: function () { return chunkPADXORD2_js.DatasourceModal; }
|
|
6408
6289
|
});
|
|
6409
6290
|
Object.defineProperty(exports, "findCategory", {
|
|
6410
6291
|
enumerable: true,
|
|
6411
|
-
get: function () { return
|
|
6292
|
+
get: function () { return chunkPADXORD2_js.findCategory; }
|
|
6412
6293
|
});
|
|
6413
6294
|
Object.defineProperty(exports, "findDialect", {
|
|
6414
6295
|
enumerable: true,
|
|
6415
|
-
get: function () { return
|
|
6296
|
+
get: function () { return chunkPADXORD2_js.findDialect; }
|
|
6416
6297
|
});
|
|
6417
6298
|
exports.AgentNewModal = AgentNewModal;
|
|
6418
6299
|
exports.AgentNewWizardPageView = AgentNewWizardPageView;
|