@datatechsolutions/ui 3.8.0 → 3.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/astrlabe/index.js +107 -107
- package/dist/astrlabe/index.mjs +3 -3
- package/dist/astrlabe/workflow-canvas.js +3 -3
- package/dist/astrlabe/workflow-canvas.mjs +2 -2
- package/dist/{chunk-KKXI7CPF.mjs → chunk-2E7HYTS7.mjs} +3 -3
- package/dist/{chunk-KKXI7CPF.mjs.map → chunk-2E7HYTS7.mjs.map} +1 -1
- package/dist/{chunk-EWYAM4WJ.mjs → chunk-2ZY3IQ2I.mjs} +3 -3
- package/dist/{chunk-EWYAM4WJ.mjs.map → chunk-2ZY3IQ2I.mjs.map} +1 -1
- package/dist/{chunk-VPFVW7ZF.js → chunk-6E2YH67A.js} +35 -35
- package/dist/{chunk-VPFVW7ZF.js.map → chunk-6E2YH67A.js.map} +1 -1
- package/dist/{chunk-A4A3SQTV.mjs → chunk-6QJI5YOJ.mjs} +3 -3
- package/dist/{chunk-A4A3SQTV.mjs.map → chunk-6QJI5YOJ.mjs.map} +1 -1
- package/dist/{chunk-3X3IYDG6.js → chunk-7AM2SXEF.js} +68 -68
- package/dist/{chunk-3X3IYDG6.js.map → chunk-7AM2SXEF.js.map} +1 -1
- package/dist/{chunk-H37VDL7Y.js → chunk-A2RIX2RK.js} +4 -4
- package/dist/{chunk-H37VDL7Y.js.map → chunk-A2RIX2RK.js.map} +1 -1
- package/dist/{chunk-32DHEVOH.mjs → chunk-ARLYOLSO.mjs} +3 -3
- package/dist/{chunk-32DHEVOH.mjs.map → chunk-ARLYOLSO.mjs.map} +1 -1
- package/dist/{chunk-5YVOLHSW.mjs → chunk-AXBD6OAF.mjs} +4 -4
- package/dist/{chunk-5YVOLHSW.mjs.map → chunk-AXBD6OAF.mjs.map} +1 -1
- package/dist/{chunk-ZP37M2QK.mjs → chunk-BWUFLW5W.mjs} +6 -6
- package/dist/{chunk-ZP37M2QK.mjs.map → chunk-BWUFLW5W.mjs.map} +1 -1
- package/dist/{chunk-HBOORO52.js → chunk-CLTNCBSP.js} +4 -4
- package/dist/{chunk-HBOORO52.js.map → chunk-CLTNCBSP.js.map} +1 -1
- package/dist/{chunk-F35GFICG.js → chunk-CRBGZA6Y.js} +13 -13
- package/dist/{chunk-F35GFICG.js.map → chunk-CRBGZA6Y.js.map} +1 -1
- package/dist/{chunk-7JZFNKJD.js → chunk-DQIEVLA3.js} +35 -35
- package/dist/{chunk-7JZFNKJD.js.map → chunk-DQIEVLA3.js.map} +1 -1
- package/dist/{chunk-57E4TCB2.mjs → chunk-EAIE4QGD.mjs} +3 -3
- package/dist/{chunk-57E4TCB2.mjs.map → chunk-EAIE4QGD.mjs.map} +1 -1
- package/dist/{chunk-5W6LMDXV.mjs → chunk-GQWC4EKE.mjs} +4 -4
- package/dist/{chunk-5W6LMDXV.mjs.map → chunk-GQWC4EKE.mjs.map} +1 -1
- package/dist/{chunk-FKUIVS6I.js → chunk-IVKFXPLO.js} +28 -28
- package/dist/{chunk-FKUIVS6I.js.map → chunk-IVKFXPLO.js.map} +1 -1
- package/dist/{chunk-FNA66TT4.js → chunk-MT66VKLS.js} +163 -219
- package/dist/chunk-MT66VKLS.js.map +1 -0
- package/dist/{chunk-74BU2EBZ.mjs → chunk-OEZ7GAJY.mjs} +6 -6
- package/dist/{chunk-74BU2EBZ.mjs.map → chunk-OEZ7GAJY.mjs.map} +1 -1
- package/dist/{chunk-CZZOCKEA.mjs → chunk-OVQ4MKCV.mjs} +3 -3
- package/dist/{chunk-CZZOCKEA.mjs.map → chunk-OVQ4MKCV.mjs.map} +1 -1
- package/dist/{chunk-WDBVIU7W.mjs → chunk-PD3JLDA5.mjs} +3 -3
- package/dist/{chunk-WDBVIU7W.mjs.map → chunk-PD3JLDA5.mjs.map} +1 -1
- package/dist/{chunk-TJPPZU77.js → chunk-R6GEJBFC.js} +34 -34
- package/dist/{chunk-TJPPZU77.js.map → chunk-R6GEJBFC.js.map} +1 -1
- package/dist/{chunk-Q4QORAMH.js → chunk-RFUSH7WD.js} +10 -10
- package/dist/{chunk-Q4QORAMH.js.map → chunk-RFUSH7WD.js.map} +1 -1
- package/dist/{chunk-VS6PTRQ7.mjs → chunk-SJ6SUS7H.mjs} +3 -3
- package/dist/{chunk-VS6PTRQ7.mjs.map → chunk-SJ6SUS7H.mjs.map} +1 -1
- package/dist/{chunk-E57RZXOR.js → chunk-T4IYOKHR.js} +25 -25
- package/dist/{chunk-E57RZXOR.js.map → chunk-T4IYOKHR.js.map} +1 -1
- package/dist/{chunk-3H5CFLVK.js → chunk-U6VFS3RD.js} +135 -135
- package/dist/{chunk-3H5CFLVK.js.map → chunk-U6VFS3RD.js.map} +1 -1
- package/dist/{chunk-RCHTRG7R.js → chunk-UZIICTIY.js} +55 -55
- package/dist/{chunk-RCHTRG7R.js.map → chunk-UZIICTIY.js.map} +1 -1
- package/dist/{chunk-TCP45Q4B.js → chunk-WJENX6KB.js} +9 -9
- package/dist/{chunk-TCP45Q4B.js.map → chunk-WJENX6KB.js.map} +1 -1
- package/dist/{chunk-PYNXIDG3.mjs → chunk-WS3IJFPW.mjs} +3 -3
- package/dist/{chunk-PYNXIDG3.mjs.map → chunk-WS3IJFPW.mjs.map} +1 -1
- package/dist/{chunk-Q7HRCCFT.js → chunk-ZDXEGSCF.js} +45 -45
- package/dist/{chunk-Q7HRCCFT.js.map → chunk-ZDXEGSCF.js.map} +1 -1
- package/dist/{chunk-PCUINUIC.mjs → chunk-ZQEMKEEH.mjs} +3 -3
- package/dist/{chunk-PCUINUIC.mjs.map → chunk-ZQEMKEEH.mjs.map} +1 -1
- package/dist/{chunk-E6C7MFHJ.mjs → chunk-ZQRUAXGP.mjs} +164 -218
- package/dist/chunk-ZQRUAXGP.mjs.map +1 -0
- package/dist/index.d.mts +43 -42
- package/dist/index.d.ts +43 -42
- package/dist/index.js +662 -670
- package/dist/index.mjs +1 -1
- package/dist/platform/admin/index.js +9 -9
- package/dist/platform/admin/index.mjs +3 -3
- package/dist/platform/agents-workspace.js +6 -6
- package/dist/platform/agents-workspace.mjs +5 -5
- package/dist/platform/app-shell.js +3 -3
- package/dist/platform/app-shell.mjs +2 -2
- package/dist/platform/auth/index.js +21 -21
- package/dist/platform/auth/index.mjs +3 -3
- package/dist/platform/billing/index.js +3 -3
- package/dist/platform/billing/index.mjs +2 -2
- package/dist/platform/impersonation/index.js +3 -3
- package/dist/platform/impersonation/index.mjs +2 -2
- package/dist/platform/index.d.mts +1 -1
- package/dist/platform/index.d.ts +1 -1
- package/dist/platform/index.js +74 -74
- package/dist/platform/index.mjs +17 -17
- package/dist/platform/pages/index.d.mts +93 -4
- package/dist/platform/pages/index.d.ts +93 -4
- package/dist/platform/pages/index.js +1009 -575
- package/dist/platform/pages/index.js.map +1 -1
- package/dist/platform/pages/index.mjs +805 -372
- package/dist/platform/pages/index.mjs.map +1 -1
- package/dist/platform/settings/index.js +6 -6
- package/dist/platform/settings/index.mjs +5 -5
- package/dist/platform/workflow-canvas-shell.js +4 -4
- package/dist/platform/workflow-canvas-shell.mjs +3 -3
- package/package.json +1 -1
- package/dist/chunk-E6C7MFHJ.mjs.map +0 -1
- package/dist/chunk-FNA66TT4.js.map +0 -1
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
var chunk3T2WGL47_js = require('../../chunk-3T2WGL47.js');
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
5
|
+
var chunkIVKFXPLO_js = require('../../chunk-IVKFXPLO.js');
|
|
6
|
+
var chunkR6GEJBFC_js = require('../../chunk-R6GEJBFC.js');
|
|
7
|
+
var chunkU6VFS3RD_js = require('../../chunk-U6VFS3RD.js');
|
|
8
8
|
require('../../chunk-55H6WZQP.js');
|
|
9
9
|
require('../../chunk-DJDZIRM6.js');
|
|
10
|
-
require('../../chunk-
|
|
11
|
-
var
|
|
10
|
+
require('../../chunk-7AM2SXEF.js');
|
|
11
|
+
var chunkMT66VKLS_js = require('../../chunk-MT66VKLS.js');
|
|
12
12
|
require('../../chunk-YXN2K77G.js');
|
|
13
13
|
require('../../chunk-SY4MUT5V.js');
|
|
14
14
|
require('../../chunk-2OZZH2IO.js');
|
|
@@ -27,7 +27,7 @@ function AgentsModelsPageView({ labels, models, loading }) {
|
|
|
27
27
|
const filteredModels = searchTerm.trim() ? allModels.filter((model) => model.name.toLowerCase().includes(searchTerm.trim().toLowerCase())) : allModels;
|
|
28
28
|
const isEmpty = allModels.length === 0;
|
|
29
29
|
const hero = /* @__PURE__ */ jsxRuntime.jsx(
|
|
30
|
-
|
|
30
|
+
chunkMT66VKLS_js.HeroSection,
|
|
31
31
|
{
|
|
32
32
|
icon: /* @__PURE__ */ jsxRuntime.jsx(outline.CubeTransparentIcon, { className: "h-5 w-5" }),
|
|
33
33
|
label: labels.title,
|
|
@@ -36,9 +36,9 @@ function AgentsModelsPageView({ labels, models, loading }) {
|
|
|
36
36
|
gradient: "from-emerald-500 to-teal-700"
|
|
37
37
|
}
|
|
38
38
|
);
|
|
39
|
-
const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
39
|
+
const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(chunkMT66VKLS_js.PageLoadingState, {}) : isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(chunkMT66VKLS_js.PageEmptyState, { title: labels.empty, message: labels.subtitle, iconName: "folder-open" }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
40
40
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
41
|
-
|
|
41
|
+
chunkMT66VKLS_js.SearchBar,
|
|
42
42
|
{
|
|
43
43
|
searchTerm,
|
|
44
44
|
onSearchChange: setSearchTerm,
|
|
@@ -46,7 +46,7 @@ function AgentsModelsPageView({ labels, models, loading }) {
|
|
|
46
46
|
}
|
|
47
47
|
),
|
|
48
48
|
/* @__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(
|
|
49
|
-
|
|
49
|
+
chunkMT66VKLS_js.EntityCard,
|
|
50
50
|
{
|
|
51
51
|
accentGradient: "from-emerald-500 to-teal-700",
|
|
52
52
|
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" }) }),
|
|
@@ -57,7 +57,10 @@ function AgentsModelsPageView({ labels, models, loading }) {
|
|
|
57
57
|
model.id
|
|
58
58
|
)) })
|
|
59
59
|
] });
|
|
60
|
-
return /* @__PURE__ */ jsxRuntime.
|
|
60
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
61
|
+
hero,
|
|
62
|
+
content
|
|
63
|
+
] });
|
|
61
64
|
}
|
|
62
65
|
function AgentsConfigPageView({ labels, agents, models, loading, onCreate, onUpdate, onDelete }) {
|
|
63
66
|
const [editing, setEditing] = react.useState(null);
|
|
@@ -68,7 +71,7 @@ function AgentsConfigPageView({ labels, agents, models, loading, onCreate, onUpd
|
|
|
68
71
|
const filteredAgents = searchTerm.trim() ? allAgents.filter((agent) => String(agent.name ?? "").toLowerCase().includes(searchTerm.trim().toLowerCase())) : allAgents;
|
|
69
72
|
const isEmpty = allAgents.length === 0;
|
|
70
73
|
const hero = /* @__PURE__ */ jsxRuntime.jsx(
|
|
71
|
-
|
|
74
|
+
chunkMT66VKLS_js.HeroSection,
|
|
72
75
|
{
|
|
73
76
|
icon: /* @__PURE__ */ jsxRuntime.jsx(outline.CpuChipIcon, { className: "h-5 w-5" }),
|
|
74
77
|
label: labels.title,
|
|
@@ -76,7 +79,7 @@ function AgentsConfigPageView({ labels, agents, models, loading, onCreate, onUpd
|
|
|
76
79
|
subtitle: labels.subtitle,
|
|
77
80
|
gradient: "from-violet-500 to-indigo-700",
|
|
78
81
|
toolbar: !isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
79
|
-
|
|
82
|
+
chunkMT66VKLS_js.SearchBar,
|
|
80
83
|
{
|
|
81
84
|
searchTerm,
|
|
82
85
|
onSearchChange: setSearchTerm,
|
|
@@ -85,7 +88,7 @@ function AgentsConfigPageView({ labels, agents, models, loading, onCreate, onUpd
|
|
|
85
88
|
}
|
|
86
89
|
) : void 0,
|
|
87
90
|
actions: /* @__PURE__ */ jsxRuntime.jsx(
|
|
88
|
-
|
|
91
|
+
chunkMT66VKLS_js.CreateActionButton,
|
|
89
92
|
{
|
|
90
93
|
mode: "desktop",
|
|
91
94
|
label: labels.addAgent,
|
|
@@ -96,7 +99,7 @@ function AgentsConfigPageView({ labels, agents, models, loading, onCreate, onUpd
|
|
|
96
99
|
}
|
|
97
100
|
);
|
|
98
101
|
const mobileAction = /* @__PURE__ */ jsxRuntime.jsx(
|
|
99
|
-
|
|
102
|
+
chunkMT66VKLS_js.CreateActionButton,
|
|
100
103
|
{
|
|
101
104
|
mode: "mobile",
|
|
102
105
|
label: labels.addAgent,
|
|
@@ -104,10 +107,10 @@ function AgentsConfigPageView({ labels, agents, models, loading, onCreate, onUpd
|
|
|
104
107
|
accent: "violet"
|
|
105
108
|
}
|
|
106
109
|
);
|
|
107
|
-
const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
110
|
+
const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(chunkMT66VKLS_js.PageLoadingState, {}) : isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(chunkMT66VKLS_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) => {
|
|
108
111
|
const modelRecord = models.find((model) => model.id === String(agent.modelId ?? ""));
|
|
109
112
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
110
|
-
|
|
113
|
+
chunkMT66VKLS_js.EntityCard,
|
|
111
114
|
{
|
|
112
115
|
accentGradient: "from-violet-500 to-indigo-700",
|
|
113
116
|
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" }) }),
|
|
@@ -144,7 +147,7 @@ function AgentsConfigPageView({ labels, agents, models, loading, onCreate, onUpd
|
|
|
144
147
|
);
|
|
145
148
|
}) });
|
|
146
149
|
const renderForm = (initial, onSubmit) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
147
|
-
|
|
150
|
+
chunkMT66VKLS_js.GlassModal,
|
|
148
151
|
{
|
|
149
152
|
open: true,
|
|
150
153
|
onClose: () => {
|
|
@@ -167,18 +170,22 @@ function AgentsConfigPageView({ labels, agents, models, loading, onCreate, onUpd
|
|
|
167
170
|
outputSchema: String(form.get("outputSchema") ?? "").trim() || void 0
|
|
168
171
|
});
|
|
169
172
|
},
|
|
170
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
171
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
172
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
173
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
174
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
175
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
176
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
173
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(chunkMT66VKLS_js.FormGrid, { children: [
|
|
174
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMT66VKLS_js.FormInput, { name: "name", label: labels.name, defaultValue: initial.name ?? "", required: true }),
|
|
175
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMT66VKLS_js.FormSelect, { name: "modelId", label: labels.model, options: modelOptions, defaultValue: initial.modelId ?? modelOptions[0]?.value ?? "", required: true }),
|
|
176
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMT66VKLS_js.FormInput, { name: "maxTokens", label: String(labels.maxTokens), type: "number", defaultValue: String(initial.maxTokens ?? 2048) }),
|
|
177
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMT66VKLS_js.FormInput, { name: "temperature", label: labels.temperature, type: "number", step: 0.1, min: 0, max: 2, defaultValue: String(initial.temperature ?? 0.2) }),
|
|
178
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMT66VKLS_js.FormTextarea, { name: "systemPrompt", label: labels.systemPrompt, defaultValue: initial.systemPrompt ?? "", rows: 4 }),
|
|
179
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMT66VKLS_js.FormTextarea, { name: "outputSchema", label: labels.outputSchema, placeholder: labels.outputSchemaPlaceholder, defaultValue: initial.outputSchema ?? "", rows: 4 })
|
|
177
180
|
] })
|
|
178
181
|
}
|
|
179
182
|
);
|
|
180
183
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
181
|
-
/* @__PURE__ */ jsxRuntime.
|
|
184
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
185
|
+
hero,
|
|
186
|
+
content,
|
|
187
|
+
mobileAction
|
|
188
|
+
] }),
|
|
182
189
|
createOpen && renderForm({ title: labels.createTitle }, (input) => {
|
|
183
190
|
onCreate(input);
|
|
184
191
|
setCreateOpen(false);
|
|
@@ -236,7 +243,7 @@ function AgentsPromptsPageView({ labels, agents, prompts, loading, onCreate, onA
|
|
|
236
243
|
}) : allPrompts;
|
|
237
244
|
const isEmpty = allPrompts.length === 0;
|
|
238
245
|
const hero = /* @__PURE__ */ jsxRuntime.jsx(
|
|
239
|
-
|
|
246
|
+
chunkMT66VKLS_js.HeroSection,
|
|
240
247
|
{
|
|
241
248
|
icon: /* @__PURE__ */ jsxRuntime.jsx(outline.ChatBubbleLeftEllipsisIcon, { className: "h-5 w-5" }),
|
|
242
249
|
label: labels.title,
|
|
@@ -244,7 +251,7 @@ function AgentsPromptsPageView({ labels, agents, prompts, loading, onCreate, onA
|
|
|
244
251
|
subtitle: labels.subtitle,
|
|
245
252
|
gradient: "from-sky-500 to-blue-700",
|
|
246
253
|
toolbar: /* @__PURE__ */ jsxRuntime.jsx(
|
|
247
|
-
|
|
254
|
+
chunkMT66VKLS_js.CreateActionButton,
|
|
248
255
|
{
|
|
249
256
|
mode: "desktop",
|
|
250
257
|
label: labels.addPrompt,
|
|
@@ -255,7 +262,7 @@ function AgentsPromptsPageView({ labels, agents, prompts, loading, onCreate, onA
|
|
|
255
262
|
}
|
|
256
263
|
);
|
|
257
264
|
const mobileAction = /* @__PURE__ */ jsxRuntime.jsx(
|
|
258
|
-
|
|
265
|
+
chunkMT66VKLS_js.CreateActionButton,
|
|
259
266
|
{
|
|
260
267
|
mode: "mobile",
|
|
261
268
|
label: labels.addPrompt,
|
|
@@ -263,9 +270,9 @@ function AgentsPromptsPageView({ labels, agents, prompts, loading, onCreate, onA
|
|
|
263
270
|
accent: "sky"
|
|
264
271
|
}
|
|
265
272
|
);
|
|
266
|
-
const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
273
|
+
const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(chunkMT66VKLS_js.PageLoadingState, {}) : isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(chunkMT66VKLS_js.PageEmptyState, { title: labels.empty, message: labels.subtitle, iconName: "folder-open" }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
267
274
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
268
|
-
|
|
275
|
+
chunkMT66VKLS_js.SearchBar,
|
|
269
276
|
{
|
|
270
277
|
searchTerm,
|
|
271
278
|
onSearchChange: setSearchTerm,
|
|
@@ -276,7 +283,7 @@ function AgentsPromptsPageView({ labels, agents, prompts, loading, onCreate, onA
|
|
|
276
283
|
const agentName = agentNameById.get(prompt.agentId) ?? prompt.agentId;
|
|
277
284
|
const key = `${prompt.agentId}:${prompt.locale}:${prompt.version}`;
|
|
278
285
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
279
|
-
|
|
286
|
+
chunkMT66VKLS_js.EntityCard,
|
|
280
287
|
{
|
|
281
288
|
accentGradient: "from-sky-500 to-blue-700",
|
|
282
289
|
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" }) }),
|
|
@@ -305,9 +312,13 @@ function AgentsPromptsPageView({ labels, agents, prompts, loading, onCreate, onA
|
|
|
305
312
|
}) })
|
|
306
313
|
] });
|
|
307
314
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
308
|
-
/* @__PURE__ */ jsxRuntime.
|
|
315
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
316
|
+
hero,
|
|
317
|
+
content,
|
|
318
|
+
mobileAction
|
|
319
|
+
] }),
|
|
309
320
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
310
|
-
|
|
321
|
+
chunkMT66VKLS_js.GlassModal,
|
|
311
322
|
{
|
|
312
323
|
open: createOpen,
|
|
313
324
|
onClose: () => setCreateOpen(false),
|
|
@@ -331,11 +342,11 @@ function AgentsPromptsPageView({ labels, agents, prompts, loading, onCreate, onA
|
|
|
331
342
|
});
|
|
332
343
|
setCreateOpen(false);
|
|
333
344
|
},
|
|
334
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
335
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
336
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
345
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(chunkMT66VKLS_js.FormGrid, { children: [
|
|
346
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMT66VKLS_js.FormSelect, { name: "agentId", label: labels.agent, options: agentOptions, required: true }),
|
|
347
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMT66VKLS_js.FormSelect, { name: "locale", label: labels.locale, options: LOCALE_OPTIONS, defaultValue: "en" }),
|
|
337
348
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
338
|
-
|
|
349
|
+
chunkMT66VKLS_js.FormSelect,
|
|
339
350
|
{
|
|
340
351
|
name: "isActive",
|
|
341
352
|
label: labels.isActive,
|
|
@@ -343,10 +354,10 @@ function AgentsPromptsPageView({ labels, agents, prompts, loading, onCreate, onA
|
|
|
343
354
|
defaultValue: "true"
|
|
344
355
|
}
|
|
345
356
|
),
|
|
346
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
347
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
348
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
349
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
357
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMT66VKLS_js.FormInput, { name: "reason", label: labels.reason }),
|
|
358
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMT66VKLS_js.FormTextarea, { name: "systemPrompt", label: labels.systemPrompt, rows: 3 }),
|
|
359
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMT66VKLS_js.FormTextarea, { name: "userTemplate", label: labels.userTemplate, rows: 3 }),
|
|
360
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMT66VKLS_js.FormTextarea, { name: "prompt", label: labels.prompt, rows: 6, required: true })
|
|
350
361
|
] })
|
|
351
362
|
}
|
|
352
363
|
)
|
|
@@ -381,7 +392,7 @@ function AgentsToolDefinitionsPageView({ labels, tools, loading, onCreate, onUpd
|
|
|
381
392
|
const filteredTools = searchTerm.trim() ? allTools.filter((tool) => tool.name.toLowerCase().includes(searchTerm.trim().toLowerCase())) : allTools;
|
|
382
393
|
const isEmpty = allTools.length === 0;
|
|
383
394
|
const hero = /* @__PURE__ */ jsxRuntime.jsx(
|
|
384
|
-
|
|
395
|
+
chunkMT66VKLS_js.HeroSection,
|
|
385
396
|
{
|
|
386
397
|
icon: /* @__PURE__ */ jsxRuntime.jsx(outline.WrenchScrewdriverIcon, { className: "h-5 w-5" }),
|
|
387
398
|
label: labels.title,
|
|
@@ -389,7 +400,7 @@ function AgentsToolDefinitionsPageView({ labels, tools, loading, onCreate, onUpd
|
|
|
389
400
|
subtitle: labels.subtitle,
|
|
390
401
|
gradient: "from-amber-500 to-orange-700",
|
|
391
402
|
toolbar: /* @__PURE__ */ jsxRuntime.jsx(
|
|
392
|
-
|
|
403
|
+
chunkMT66VKLS_js.CreateActionButton,
|
|
393
404
|
{
|
|
394
405
|
mode: "desktop",
|
|
395
406
|
label: labels.addTool,
|
|
@@ -400,7 +411,7 @@ function AgentsToolDefinitionsPageView({ labels, tools, loading, onCreate, onUpd
|
|
|
400
411
|
}
|
|
401
412
|
);
|
|
402
413
|
const mobileAction = /* @__PURE__ */ jsxRuntime.jsx(
|
|
403
|
-
|
|
414
|
+
chunkMT66VKLS_js.CreateActionButton,
|
|
404
415
|
{
|
|
405
416
|
mode: "mobile",
|
|
406
417
|
label: labels.addTool,
|
|
@@ -408,9 +419,9 @@ function AgentsToolDefinitionsPageView({ labels, tools, loading, onCreate, onUpd
|
|
|
408
419
|
accent: "amber"
|
|
409
420
|
}
|
|
410
421
|
);
|
|
411
|
-
const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
422
|
+
const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(chunkMT66VKLS_js.PageLoadingState, {}) : isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(chunkMT66VKLS_js.PageEmptyState, { title: labels.empty, message: labels.subtitle, iconName: "folder-open" }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
412
423
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
413
|
-
|
|
424
|
+
chunkMT66VKLS_js.SearchBar,
|
|
414
425
|
{
|
|
415
426
|
searchTerm,
|
|
416
427
|
onSearchChange: setSearchTerm,
|
|
@@ -418,7 +429,7 @@ function AgentsToolDefinitionsPageView({ labels, tools, loading, onCreate, onUpd
|
|
|
418
429
|
}
|
|
419
430
|
),
|
|
420
431
|
/* @__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(
|
|
421
|
-
|
|
432
|
+
chunkMT66VKLS_js.EntityCard,
|
|
422
433
|
{
|
|
423
434
|
accentGradient: "from-amber-500 to-orange-700",
|
|
424
435
|
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" }) }),
|
|
@@ -446,7 +457,11 @@ function AgentsToolDefinitionsPageView({ labels, tools, loading, onCreate, onUpd
|
|
|
446
457
|
)) })
|
|
447
458
|
] });
|
|
448
459
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
449
|
-
/* @__PURE__ */ jsxRuntime.
|
|
460
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
461
|
+
hero,
|
|
462
|
+
content,
|
|
463
|
+
mobileAction
|
|
464
|
+
] }),
|
|
450
465
|
createOpen && /* @__PURE__ */ jsxRuntime.jsx(
|
|
451
466
|
ToolEditor,
|
|
452
467
|
{
|
|
@@ -504,7 +519,7 @@ function ToolEditor({
|
|
|
504
519
|
setValue((v) => ({ ...v, [key]: next }));
|
|
505
520
|
};
|
|
506
521
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
507
|
-
|
|
522
|
+
chunkMT66VKLS_js.GlassModal,
|
|
508
523
|
{
|
|
509
524
|
open: true,
|
|
510
525
|
onClose,
|
|
@@ -517,9 +532,9 @@ function ToolEditor({
|
|
|
517
532
|
handleSubmit();
|
|
518
533
|
},
|
|
519
534
|
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-5", children: [
|
|
520
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
535
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkMT66VKLS_js.FormGrid, { children: [
|
|
521
536
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
522
|
-
|
|
537
|
+
chunkMT66VKLS_js.FormInput,
|
|
523
538
|
{
|
|
524
539
|
label: "Name",
|
|
525
540
|
required: true,
|
|
@@ -529,7 +544,7 @@ function ToolEditor({
|
|
|
529
544
|
}
|
|
530
545
|
),
|
|
531
546
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
532
|
-
|
|
547
|
+
chunkMT66VKLS_js.FormSelect,
|
|
533
548
|
{
|
|
534
549
|
label: "Tool type",
|
|
535
550
|
value: value.toolType,
|
|
@@ -539,7 +554,7 @@ function ToolEditor({
|
|
|
539
554
|
}
|
|
540
555
|
),
|
|
541
556
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
542
|
-
|
|
557
|
+
chunkMT66VKLS_js.FormSelect,
|
|
543
558
|
{
|
|
544
559
|
label: "Enabled",
|
|
545
560
|
value: value.enabled ? "true" : "false",
|
|
@@ -548,7 +563,7 @@ function ToolEditor({
|
|
|
548
563
|
}
|
|
549
564
|
),
|
|
550
565
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
551
|
-
|
|
566
|
+
chunkMT66VKLS_js.FormInput,
|
|
552
567
|
{
|
|
553
568
|
label: "Icon (optional)",
|
|
554
569
|
value: value.icon ?? "",
|
|
@@ -558,7 +573,7 @@ function ToolEditor({
|
|
|
558
573
|
)
|
|
559
574
|
] }),
|
|
560
575
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
561
|
-
|
|
576
|
+
chunkMT66VKLS_js.FormTextarea,
|
|
562
577
|
{
|
|
563
578
|
label: "Description",
|
|
564
579
|
rows: 2,
|
|
@@ -606,7 +621,7 @@ function ParametersEditor({
|
|
|
606
621
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
607
622
|
parameters.map((param, index) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-[1fr_160px_1fr_110px_auto] items-end gap-2", children: [
|
|
608
623
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
609
|
-
|
|
624
|
+
chunkMT66VKLS_js.FormInput,
|
|
610
625
|
{
|
|
611
626
|
label: "Name",
|
|
612
627
|
value: param.name,
|
|
@@ -615,7 +630,7 @@ function ParametersEditor({
|
|
|
615
630
|
}
|
|
616
631
|
),
|
|
617
632
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
618
|
-
|
|
633
|
+
chunkMT66VKLS_js.FormSelect,
|
|
619
634
|
{
|
|
620
635
|
label: "Type",
|
|
621
636
|
value: param.type,
|
|
@@ -624,7 +639,7 @@ function ParametersEditor({
|
|
|
624
639
|
}
|
|
625
640
|
),
|
|
626
641
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
627
|
-
|
|
642
|
+
chunkMT66VKLS_js.FormInput,
|
|
628
643
|
{
|
|
629
644
|
label: "Description",
|
|
630
645
|
value: param.description,
|
|
@@ -658,9 +673,9 @@ function HandlerConfigEditor({
|
|
|
658
673
|
if (toolType === "http") {
|
|
659
674
|
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: [
|
|
660
675
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "mb-2 text-sm font-semibold text-slate-700 dark:text-slate-200", children: "HTTP handler" }),
|
|
661
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
676
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkMT66VKLS_js.FormGrid, { children: [
|
|
662
677
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
663
|
-
|
|
678
|
+
chunkMT66VKLS_js.FormSelect,
|
|
664
679
|
{
|
|
665
680
|
label: "Method",
|
|
666
681
|
value: stringProp(config, "method", "GET"),
|
|
@@ -669,7 +684,7 @@ function HandlerConfigEditor({
|
|
|
669
684
|
}
|
|
670
685
|
),
|
|
671
686
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
672
|
-
|
|
687
|
+
chunkMT66VKLS_js.FormInput,
|
|
673
688
|
{
|
|
674
689
|
label: "URL template",
|
|
675
690
|
value: stringProp(config, "url"),
|
|
@@ -679,7 +694,7 @@ function HandlerConfigEditor({
|
|
|
679
694
|
)
|
|
680
695
|
] }),
|
|
681
696
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
682
|
-
|
|
697
|
+
chunkMT66VKLS_js.FormTextarea,
|
|
683
698
|
{
|
|
684
699
|
label: "Headers (JSON)",
|
|
685
700
|
rows: 3,
|
|
@@ -689,7 +704,7 @@ function HandlerConfigEditor({
|
|
|
689
704
|
}
|
|
690
705
|
),
|
|
691
706
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
692
|
-
|
|
707
|
+
chunkMT66VKLS_js.FormTextarea,
|
|
693
708
|
{
|
|
694
709
|
label: "Body template",
|
|
695
710
|
rows: 3,
|
|
@@ -704,7 +719,7 @@ function HandlerConfigEditor({
|
|
|
704
719
|
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: [
|
|
705
720
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "mb-2 text-sm font-semibold text-slate-700 dark:text-slate-200", children: "Function handler" }),
|
|
706
721
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
707
|
-
|
|
722
|
+
chunkMT66VKLS_js.FormInput,
|
|
708
723
|
{
|
|
709
724
|
label: "Implementation key",
|
|
710
725
|
value: stringProp(config, "implementationKey"),
|
|
@@ -718,9 +733,9 @@ function HandlerConfigEditor({
|
|
|
718
733
|
if (toolType === "database_query") {
|
|
719
734
|
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: [
|
|
720
735
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "mb-2 text-sm font-semibold text-slate-700 dark:text-slate-200", children: "Database query handler" }),
|
|
721
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
736
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkMT66VKLS_js.FormGrid, { children: [
|
|
722
737
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
723
|
-
|
|
738
|
+
chunkMT66VKLS_js.FormInput,
|
|
724
739
|
{
|
|
725
740
|
label: "Datasource ID",
|
|
726
741
|
value: stringProp(config, "datasourceId"),
|
|
@@ -729,7 +744,7 @@ function HandlerConfigEditor({
|
|
|
729
744
|
}
|
|
730
745
|
),
|
|
731
746
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
732
|
-
|
|
747
|
+
chunkMT66VKLS_js.FormInput,
|
|
733
748
|
{
|
|
734
749
|
label: "Max rows",
|
|
735
750
|
type: "number",
|
|
@@ -739,7 +754,7 @@ function HandlerConfigEditor({
|
|
|
739
754
|
)
|
|
740
755
|
] }),
|
|
741
756
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
742
|
-
|
|
757
|
+
chunkMT66VKLS_js.FormTextarea,
|
|
743
758
|
{
|
|
744
759
|
label: "Query template",
|
|
745
760
|
rows: 4,
|
|
@@ -755,7 +770,7 @@ function HandlerConfigEditor({
|
|
|
755
770
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "mb-2 text-sm font-semibold text-slate-700 dark:text-slate-200", children: "Code execution handler" }),
|
|
756
771
|
/* @__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." }),
|
|
757
772
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
758
|
-
|
|
773
|
+
chunkMT66VKLS_js.FormSelect,
|
|
759
774
|
{
|
|
760
775
|
label: "Language",
|
|
761
776
|
value: stringProp(config, "language", "javascript"),
|
|
@@ -767,7 +782,7 @@ function HandlerConfigEditor({
|
|
|
767
782
|
}
|
|
768
783
|
),
|
|
769
784
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
770
|
-
|
|
785
|
+
chunkMT66VKLS_js.FormTextarea,
|
|
771
786
|
{
|
|
772
787
|
label: "Code",
|
|
773
788
|
rows: 6,
|
|
@@ -780,9 +795,9 @@ function HandlerConfigEditor({
|
|
|
780
795
|
}
|
|
781
796
|
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: [
|
|
782
797
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "mb-2 text-sm font-semibold text-slate-700 dark:text-slate-200", children: "API call handler" }),
|
|
783
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
798
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkMT66VKLS_js.FormGrid, { children: [
|
|
784
799
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
785
|
-
|
|
800
|
+
chunkMT66VKLS_js.FormInput,
|
|
786
801
|
{
|
|
787
802
|
label: "URL",
|
|
788
803
|
value: stringProp(config, "url"),
|
|
@@ -790,7 +805,7 @@ function HandlerConfigEditor({
|
|
|
790
805
|
}
|
|
791
806
|
),
|
|
792
807
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
793
|
-
|
|
808
|
+
chunkMT66VKLS_js.FormSelect,
|
|
794
809
|
{
|
|
795
810
|
label: "Auth",
|
|
796
811
|
value: stringProp(config, "authType", "bearer"),
|
|
@@ -804,7 +819,7 @@ function HandlerConfigEditor({
|
|
|
804
819
|
}
|
|
805
820
|
),
|
|
806
821
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
807
|
-
|
|
822
|
+
chunkMT66VKLS_js.FormInput,
|
|
808
823
|
{
|
|
809
824
|
label: "Credential secret id",
|
|
810
825
|
value: stringProp(config, "credentialRef"),
|
|
@@ -937,7 +952,7 @@ function RulesPageView({ labels, rules, loading, onCreate, onUpdate, onDelete })
|
|
|
937
952
|
const filteredRules = searchTerm.trim() ? allRules.filter((rule) => (rule.name ?? "").toLowerCase().includes(searchTerm.trim().toLowerCase())) : allRules;
|
|
938
953
|
const isEmpty = allRules.length === 0;
|
|
939
954
|
const hero = /* @__PURE__ */ jsxRuntime.jsx(
|
|
940
|
-
|
|
955
|
+
chunkMT66VKLS_js.HeroSection,
|
|
941
956
|
{
|
|
942
957
|
icon: /* @__PURE__ */ jsxRuntime.jsx(outline.AdjustmentsHorizontalIcon, { className: "h-5 w-5" }),
|
|
943
958
|
label: labels.title,
|
|
@@ -945,7 +960,7 @@ function RulesPageView({ labels, rules, loading, onCreate, onUpdate, onDelete })
|
|
|
945
960
|
subtitle: labels.subtitle,
|
|
946
961
|
gradient: "from-fuchsia-500 to-purple-700",
|
|
947
962
|
toolbar: /* @__PURE__ */ jsxRuntime.jsx(
|
|
948
|
-
|
|
963
|
+
chunkMT66VKLS_js.CreateActionButton,
|
|
949
964
|
{
|
|
950
965
|
mode: "desktop",
|
|
951
966
|
label: labels.addRule,
|
|
@@ -956,7 +971,7 @@ function RulesPageView({ labels, rules, loading, onCreate, onUpdate, onDelete })
|
|
|
956
971
|
}
|
|
957
972
|
);
|
|
958
973
|
const mobileAction = /* @__PURE__ */ jsxRuntime.jsx(
|
|
959
|
-
|
|
974
|
+
chunkMT66VKLS_js.CreateActionButton,
|
|
960
975
|
{
|
|
961
976
|
mode: "mobile",
|
|
962
977
|
label: labels.addRule,
|
|
@@ -964,9 +979,9 @@ function RulesPageView({ labels, rules, loading, onCreate, onUpdate, onDelete })
|
|
|
964
979
|
accent: "fuchsia"
|
|
965
980
|
}
|
|
966
981
|
);
|
|
967
|
-
const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
982
|
+
const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(chunkMT66VKLS_js.PageLoadingState, {}) : isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(chunkMT66VKLS_js.PageEmptyState, { title: labels.empty, message: labels.subtitle, iconName: "folder-open" }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
968
983
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
969
|
-
|
|
984
|
+
chunkMT66VKLS_js.SearchBar,
|
|
970
985
|
{
|
|
971
986
|
searchTerm,
|
|
972
987
|
onSearchChange: setSearchTerm,
|
|
@@ -974,7 +989,7 @@ function RulesPageView({ labels, rules, loading, onCreate, onUpdate, onDelete })
|
|
|
974
989
|
}
|
|
975
990
|
),
|
|
976
991
|
/* @__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(
|
|
977
|
-
|
|
992
|
+
chunkMT66VKLS_js.EntityCard,
|
|
978
993
|
{
|
|
979
994
|
accentGradient: "from-fuchsia-500 to-purple-700",
|
|
980
995
|
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" }) }),
|
|
@@ -1002,13 +1017,17 @@ function RulesPageView({ labels, rules, loading, onCreate, onUpdate, onDelete })
|
|
|
1002
1017
|
)) })
|
|
1003
1018
|
] });
|
|
1004
1019
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1005
|
-
/* @__PURE__ */ jsxRuntime.
|
|
1020
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
1021
|
+
hero,
|
|
1022
|
+
content,
|
|
1023
|
+
mobileAction
|
|
1024
|
+
] }),
|
|
1006
1025
|
createOpen && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1007
1026
|
RuleEditor,
|
|
1008
1027
|
{
|
|
1009
1028
|
title: labels.createTitle,
|
|
1010
1029
|
saveLabel: labels.save,
|
|
1011
|
-
initial:
|
|
1030
|
+
initial: chunkU6VFS3RD_js.defaultRuleForm(),
|
|
1012
1031
|
onClose: () => setCreateOpen(false),
|
|
1013
1032
|
onSubmit: (value) => {
|
|
1014
1033
|
onCreate(value);
|
|
@@ -1040,7 +1059,7 @@ function RuleEditor({
|
|
|
1040
1059
|
}) {
|
|
1041
1060
|
const [value, setValue] = react.useState(initial);
|
|
1042
1061
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1043
|
-
|
|
1062
|
+
chunkMT66VKLS_js.GlassModal,
|
|
1044
1063
|
{
|
|
1045
1064
|
open: true,
|
|
1046
1065
|
onClose,
|
|
@@ -1052,12 +1071,12 @@ function RuleEditor({
|
|
|
1052
1071
|
event.preventDefault();
|
|
1053
1072
|
onSubmit(value);
|
|
1054
1073
|
},
|
|
1055
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1074
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(chunkU6VFS3RD_js.RuleForm, { value, onChange: setValue })
|
|
1056
1075
|
}
|
|
1057
1076
|
);
|
|
1058
1077
|
}
|
|
1059
1078
|
function ruleToFormValue(rule) {
|
|
1060
|
-
const base =
|
|
1079
|
+
const base = chunkU6VFS3RD_js.defaultRuleForm();
|
|
1061
1080
|
const rawCondition = rule.condition ?? rule.conditions;
|
|
1062
1081
|
const rawAction = pickAction(rule);
|
|
1063
1082
|
return {
|
|
@@ -1188,7 +1207,7 @@ var SAMPLE_DATASOURCES = [
|
|
|
1188
1207
|
];
|
|
1189
1208
|
function getDialectLabel(dialect) {
|
|
1190
1209
|
if (!dialect) return "Unknown";
|
|
1191
|
-
for (const category of
|
|
1210
|
+
for (const category of chunkR6GEJBFC_js.DIALECT_CATEGORIES) {
|
|
1192
1211
|
const found = category.dialects.find((d) => d.value === dialect);
|
|
1193
1212
|
if (found) return found.label;
|
|
1194
1213
|
}
|
|
@@ -1196,12 +1215,12 @@ function getDialectLabel(dialect) {
|
|
|
1196
1215
|
}
|
|
1197
1216
|
function getDialectGradient(dialect) {
|
|
1198
1217
|
if (!dialect) return "from-gray-400 to-gray-500";
|
|
1199
|
-
const category =
|
|
1218
|
+
const category = chunkR6GEJBFC_js.findCategory(dialect);
|
|
1200
1219
|
return category?.gradient ?? "from-gray-400 to-gray-500";
|
|
1201
1220
|
}
|
|
1202
1221
|
function getDialectIcon(dialect) {
|
|
1203
1222
|
if (!dialect) return outline.CircleStackIcon;
|
|
1204
|
-
const category =
|
|
1223
|
+
const category = chunkR6GEJBFC_js.findCategory(dialect);
|
|
1205
1224
|
return category?.icon ?? outline.CircleStackIcon;
|
|
1206
1225
|
}
|
|
1207
1226
|
var DIALECT_LOGO = {
|
|
@@ -1275,7 +1294,7 @@ function DatasourcesPageView({
|
|
|
1275
1294
|
}
|
|
1276
1295
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
1277
1296
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1278
|
-
|
|
1297
|
+
chunkMT66VKLS_js.HeroSection,
|
|
1279
1298
|
{
|
|
1280
1299
|
icon: /* @__PURE__ */ jsxRuntime.jsx(outline.CircleStackIcon, { className: "h-5 w-5" }),
|
|
1281
1300
|
label: labels.title,
|
|
@@ -1283,7 +1302,7 @@ function DatasourcesPageView({
|
|
|
1283
1302
|
subtitle: labels.subtitle,
|
|
1284
1303
|
gradient: "from-amber-500 to-orange-600",
|
|
1285
1304
|
toolbar: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1286
|
-
|
|
1305
|
+
chunkMT66VKLS_js.CreateActionButton,
|
|
1287
1306
|
{
|
|
1288
1307
|
mode: "desktop",
|
|
1289
1308
|
label: labels.addDatasource,
|
|
@@ -1294,7 +1313,7 @@ function DatasourcesPageView({
|
|
|
1294
1313
|
}
|
|
1295
1314
|
),
|
|
1296
1315
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1297
|
-
|
|
1316
|
+
chunkMT66VKLS_js.CreateActionButton,
|
|
1298
1317
|
{
|
|
1299
1318
|
mode: "mobile",
|
|
1300
1319
|
label: labels.addDatasource,
|
|
@@ -1303,7 +1322,7 @@ function DatasourcesPageView({
|
|
|
1303
1322
|
}
|
|
1304
1323
|
),
|
|
1305
1324
|
!isEmpty && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1306
|
-
|
|
1325
|
+
chunkMT66VKLS_js.SearchBar,
|
|
1307
1326
|
{
|
|
1308
1327
|
searchTerm,
|
|
1309
1328
|
onSearchChange: setSearchTerm,
|
|
@@ -1311,7 +1330,7 @@ function DatasourcesPageView({
|
|
|
1311
1330
|
}
|
|
1312
1331
|
),
|
|
1313
1332
|
isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1314
|
-
|
|
1333
|
+
chunkMT66VKLS_js.PageEmptyState,
|
|
1315
1334
|
{
|
|
1316
1335
|
title: labels.emptyTitle,
|
|
1317
1336
|
message: labels.emptyDescription,
|
|
@@ -1325,7 +1344,7 @@ function DatasourcesPageView({
|
|
|
1325
1344
|
const logoSrc = getDialectLogoSrc(ds.dialect);
|
|
1326
1345
|
const iconElement = logoSrc ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "liquid-surface flex h-11 w-11 items-center justify-center rounded-lg", 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" }) });
|
|
1327
1346
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1328
|
-
|
|
1347
|
+
chunkMT66VKLS_js.EntityCard,
|
|
1329
1348
|
{
|
|
1330
1349
|
accentGradient: gradient,
|
|
1331
1350
|
icon: iconElement,
|
|
@@ -1355,7 +1374,7 @@ function DatasourcesPageView({
|
|
|
1355
1374
|
);
|
|
1356
1375
|
}) }),
|
|
1357
1376
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1358
|
-
|
|
1377
|
+
chunkR6GEJBFC_js.DatasourceModal,
|
|
1359
1378
|
{
|
|
1360
1379
|
open: modalOpen,
|
|
1361
1380
|
onClose: () => setModalOpen(false),
|
|
@@ -1370,7 +1389,7 @@ function DashboardPageView({ labels, appLogo }) {
|
|
|
1370
1389
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-center mb-6", children: appLogo }),
|
|
1371
1390
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-3 text-base text-slate-600 dark:text-slate-300", children: labels.subtitle })
|
|
1372
1391
|
] });
|
|
1373
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1392
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-4", children: hero });
|
|
1374
1393
|
}
|
|
1375
1394
|
function AgentsIndexPageView({ labels }) {
|
|
1376
1395
|
const Link = chunkS7KHTUHA_js.useLink();
|
|
@@ -1384,7 +1403,7 @@ function AgentsIndexPageView({ labels }) {
|
|
|
1384
1403
|
const filteredTiles = searchTerm.trim() ? allTiles.filter((tile) => tile.title.toLowerCase().includes(searchTerm.trim().toLowerCase())) : allTiles;
|
|
1385
1404
|
const isEmpty = allTiles.length === 0;
|
|
1386
1405
|
const hero = /* @__PURE__ */ jsxRuntime.jsx(
|
|
1387
|
-
|
|
1406
|
+
chunkMT66VKLS_js.HeroSection,
|
|
1388
1407
|
{
|
|
1389
1408
|
icon: /* @__PURE__ */ jsxRuntime.jsx(outline.CpuChipIcon, { className: "h-5 w-5" }),
|
|
1390
1409
|
label: labels.title,
|
|
@@ -1395,7 +1414,7 @@ function AgentsIndexPageView({ labels }) {
|
|
|
1395
1414
|
);
|
|
1396
1415
|
const content = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1397
1416
|
!isEmpty && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1398
|
-
|
|
1417
|
+
chunkMT66VKLS_js.SearchBar,
|
|
1399
1418
|
{
|
|
1400
1419
|
searchTerm,
|
|
1401
1420
|
onSearchChange: setSearchTerm,
|
|
@@ -1405,7 +1424,7 @@ function AgentsIndexPageView({ labels }) {
|
|
|
1405
1424
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4", children: filteredTiles.map((tile) => {
|
|
1406
1425
|
const Icon = tile.icon;
|
|
1407
1426
|
return /* @__PURE__ */ jsxRuntime.jsx(Link, { href: tile.href, className: "block focus:outline-none", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1408
|
-
|
|
1427
|
+
chunkMT66VKLS_js.EntityCard,
|
|
1409
1428
|
{
|
|
1410
1429
|
accentGradient: tile.gradient,
|
|
1411
1430
|
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" }) }),
|
|
@@ -1415,13 +1434,16 @@ function AgentsIndexPageView({ labels }) {
|
|
|
1415
1434
|
) }, tile.id);
|
|
1416
1435
|
}) })
|
|
1417
1436
|
] });
|
|
1418
|
-
return /* @__PURE__ */ jsxRuntime.
|
|
1437
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
1438
|
+
hero,
|
|
1439
|
+
content
|
|
1440
|
+
] });
|
|
1419
1441
|
}
|
|
1420
1442
|
function WorkflowsPageView({ labels, workflows, onCreate, onUpdateMeta, onPublish }) {
|
|
1421
1443
|
const selectedWorkflow = workflows[0] ?? null;
|
|
1422
1444
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6", children: [
|
|
1423
1445
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1424
|
-
|
|
1446
|
+
chunkMT66VKLS_js.SectionHeader,
|
|
1425
1447
|
{
|
|
1426
1448
|
icon: /* @__PURE__ */ jsxRuntime.jsx(outline.RectangleStackIcon, { className: "h-5 w-5 text-white" }),
|
|
1427
1449
|
title: labels.title,
|
|
@@ -1430,9 +1452,9 @@ function WorkflowsPageView({ labels, workflows, onCreate, onUpdateMeta, onPublis
|
|
|
1430
1452
|
}
|
|
1431
1453
|
),
|
|
1432
1454
|
/* @__PURE__ */ jsxRuntime.jsxs("section", { className: "liquid-surface rounded-2xl p-4 space-y-3", children: [
|
|
1433
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1455
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMT66VKLS_js.Text, { className: "font-semibold text-slate-900 dark:text-slate-100", children: labels.add }),
|
|
1434
1456
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1435
|
-
|
|
1457
|
+
chunkMT66VKLS_js.Form,
|
|
1436
1458
|
{
|
|
1437
1459
|
onSubmit: (event) => {
|
|
1438
1460
|
event.preventDefault();
|
|
@@ -1443,32 +1465,32 @@ function WorkflowsPageView({ labels, workflows, onCreate, onUpdateMeta, onPublis
|
|
|
1443
1465
|
onCreate({ name, description });
|
|
1444
1466
|
event.currentTarget.reset();
|
|
1445
1467
|
},
|
|
1446
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1447
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1448
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1449
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1468
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(chunkMT66VKLS_js.FormGrid, { children: [
|
|
1469
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMT66VKLS_js.FormInput, { name: "name", label: labels.workflowName, placeholder: labels.workflowNamePlaceholder, required: true }),
|
|
1470
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMT66VKLS_js.FormTextarea, { name: "description", label: labels.description, placeholder: labels.workflowDescriptionPlaceholder, rows: 3 }),
|
|
1471
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMT66VKLS_js.FormActionsRow, { children: /* @__PURE__ */ jsxRuntime.jsx(chunkBHOT22QL_js.Button, { type: "submit", children: labels.create }) })
|
|
1450
1472
|
] })
|
|
1451
1473
|
}
|
|
1452
1474
|
)
|
|
1453
1475
|
] }),
|
|
1454
1476
|
/* @__PURE__ */ jsxRuntime.jsxs("section", { className: "liquid-surface rounded-2xl p-4 space-y-3", children: [
|
|
1455
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1456
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1457
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1458
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1459
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1460
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1461
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1462
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1477
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMT66VKLS_js.Text, { className: "font-semibold text-slate-900 dark:text-slate-100", children: labels.registry }),
|
|
1478
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkMT66VKLS_js.Table, { children: [
|
|
1479
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMT66VKLS_js.TableHead, { children: /* @__PURE__ */ jsxRuntime.jsxs(chunkMT66VKLS_js.TableRow, { children: [
|
|
1480
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMT66VKLS_js.TableHeader, { children: labels.name }),
|
|
1481
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMT66VKLS_js.TableHeader, { children: labels.description }),
|
|
1482
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMT66VKLS_js.TableHeader, { children: labels.version }),
|
|
1483
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMT66VKLS_js.TableHeader, { children: labels.status }),
|
|
1484
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMT66VKLS_js.TableHeader, { children: labels.actions })
|
|
1463
1485
|
] }) }),
|
|
1464
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1465
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1466
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1467
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1468
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1469
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1486
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMT66VKLS_js.TableBody, { children: workflows.map((workflow) => /* @__PURE__ */ jsxRuntime.jsxs(chunkMT66VKLS_js.TableRow, { children: [
|
|
1487
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMT66VKLS_js.TableCell, { children: workflow.name }),
|
|
1488
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMT66VKLS_js.TableCell, { children: workflow.description }),
|
|
1489
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMT66VKLS_js.TableCell, { children: String(workflow.version) }),
|
|
1490
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMT66VKLS_js.TableCell, { children: /* @__PURE__ */ jsxRuntime.jsx(chunkBHOT22QL_js.Badge, { children: workflow.isDraft ? labels.statusDraft : labels.statusPublished }) }),
|
|
1491
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMT66VKLS_js.TableCell, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
1470
1492
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1471
|
-
|
|
1493
|
+
chunkMT66VKLS_js.Form,
|
|
1472
1494
|
{
|
|
1473
1495
|
onSubmit: (event) => {
|
|
1474
1496
|
event.preventDefault();
|
|
@@ -1478,7 +1500,7 @@ function WorkflowsPageView({ labels, workflows, onCreate, onUpdateMeta, onPublis
|
|
|
1478
1500
|
description: workflow.description ?? ""
|
|
1479
1501
|
});
|
|
1480
1502
|
},
|
|
1481
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1503
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(chunkMT66VKLS_js.InlineForm, { children: /* @__PURE__ */ jsxRuntime.jsx(chunkBHOT22QL_js.Button, { type: "submit", outline: true, children: labels.saveMeta }) })
|
|
1482
1504
|
}
|
|
1483
1505
|
),
|
|
1484
1506
|
/* @__PURE__ */ jsxRuntime.jsx(chunkBHOT22QL_js.Button, { type: "button", color: "sky", onClick: () => onPublish(workflow.id), children: labels.publish })
|
|
@@ -1487,8 +1509,8 @@ function WorkflowsPageView({ labels, workflows, onCreate, onUpdateMeta, onPublis
|
|
|
1487
1509
|
] })
|
|
1488
1510
|
] }),
|
|
1489
1511
|
/* @__PURE__ */ jsxRuntime.jsxs("section", { className: "liquid-surface rounded-2xl p-4 space-y-3", children: [
|
|
1490
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1491
|
-
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(
|
|
1512
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMT66VKLS_js.Text, { className: "font-semibold text-slate-900 dark:text-slate-100", children: labels.workspace }),
|
|
1513
|
+
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(chunkIVKFXPLO_js.WorkflowWorkspace, { graph: chunk3T2WGL47_js.adaptWorkflowGraphToUi(selectedWorkflow.graph) }) }) : /* @__PURE__ */ jsxRuntime.jsx(chunkMT66VKLS_js.Text, { children: labels.empty })
|
|
1492
1514
|
] })
|
|
1493
1515
|
] });
|
|
1494
1516
|
}
|
|
@@ -1537,7 +1559,7 @@ function WorkflowRunsPageView({ labels, runs, loading, onCancel, onReplay, onVie
|
|
|
1537
1559
|
});
|
|
1538
1560
|
const isEmpty = allRuns.length === 0;
|
|
1539
1561
|
const hero = /* @__PURE__ */ jsxRuntime.jsx(
|
|
1540
|
-
|
|
1562
|
+
chunkMT66VKLS_js.HeroSection,
|
|
1541
1563
|
{
|
|
1542
1564
|
icon: /* @__PURE__ */ jsxRuntime.jsx(outline.ClockIcon, { className: "h-5 w-5" }),
|
|
1543
1565
|
label: labels.title,
|
|
@@ -1545,7 +1567,7 @@ function WorkflowRunsPageView({ labels, runs, loading, onCancel, onReplay, onVie
|
|
|
1545
1567
|
subtitle: labels.subtitle,
|
|
1546
1568
|
gradient: "from-indigo-500 to-sky-700",
|
|
1547
1569
|
toolbar: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full sm:w-48", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1548
|
-
|
|
1570
|
+
chunkMT66VKLS_js.FormSelect,
|
|
1549
1571
|
{
|
|
1550
1572
|
name: "statusFilter",
|
|
1551
1573
|
label: labels.filterStatus,
|
|
@@ -1556,9 +1578,9 @@ function WorkflowRunsPageView({ labels, runs, loading, onCancel, onReplay, onVie
|
|
|
1556
1578
|
) })
|
|
1557
1579
|
}
|
|
1558
1580
|
);
|
|
1559
|
-
const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1581
|
+
const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(chunkMT66VKLS_js.PageLoadingState, {}) : filteredRuns.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(chunkMT66VKLS_js.PageEmptyState, { title: labels.empty, message: labels.subtitle, iconName: "folder-open" }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1560
1582
|
!isEmpty && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1561
|
-
|
|
1583
|
+
chunkMT66VKLS_js.SearchBar,
|
|
1562
1584
|
{
|
|
1563
1585
|
searchTerm,
|
|
1564
1586
|
onSearchChange: setSearchTerm,
|
|
@@ -1566,7 +1588,7 @@ function WorkflowRunsPageView({ labels, runs, loading, onCancel, onReplay, onVie
|
|
|
1566
1588
|
}
|
|
1567
1589
|
),
|
|
1568
1590
|
/* @__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(
|
|
1569
|
-
|
|
1591
|
+
chunkMT66VKLS_js.EntityCard,
|
|
1570
1592
|
{
|
|
1571
1593
|
accentGradient: "from-indigo-500 to-sky-700",
|
|
1572
1594
|
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" }) }),
|
|
@@ -1592,11 +1614,14 @@ function WorkflowRunsPageView({ labels, runs, loading, onCancel, onReplay, onVie
|
|
|
1592
1614
|
run.id
|
|
1593
1615
|
)) })
|
|
1594
1616
|
] });
|
|
1595
|
-
return /* @__PURE__ */ jsxRuntime.
|
|
1617
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
1618
|
+
hero,
|
|
1619
|
+
content
|
|
1620
|
+
] });
|
|
1596
1621
|
}
|
|
1597
1622
|
function RunTimelinePageView({ labels, entries, loading, runId }) {
|
|
1598
1623
|
const hero = /* @__PURE__ */ jsxRuntime.jsx(
|
|
1599
|
-
|
|
1624
|
+
chunkMT66VKLS_js.HeroSection,
|
|
1600
1625
|
{
|
|
1601
1626
|
icon: /* @__PURE__ */ jsxRuntime.jsx(outline.ClockIcon, { className: "h-5 w-5" }),
|
|
1602
1627
|
label: labels.title,
|
|
@@ -1606,30 +1631,27 @@ function RunTimelinePageView({ labels, entries, loading, runId }) {
|
|
|
1606
1631
|
}
|
|
1607
1632
|
);
|
|
1608
1633
|
if (loading) {
|
|
1609
|
-
return /* @__PURE__ */ jsxRuntime.
|
|
1634
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
1635
|
+
hero,
|
|
1636
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMT66VKLS_js.PageLoadingState, {})
|
|
1637
|
+
] });
|
|
1610
1638
|
}
|
|
1611
1639
|
if (entries.length === 0) {
|
|
1612
|
-
return /* @__PURE__ */ jsxRuntime.
|
|
1613
|
-
|
|
1640
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
1641
|
+
hero,
|
|
1642
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMT66VKLS_js.PageEmptyState, { title: labels.empty ?? "", message: "", iconName: "folder-open" })
|
|
1643
|
+
] });
|
|
1644
|
+
}
|
|
1645
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
1646
|
+
hero,
|
|
1647
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1648
|
+
chunkU6VFS3RD_js.ExecutionTimelinePanel,
|
|
1614
1649
|
{
|
|
1615
|
-
|
|
1616
|
-
|
|
1650
|
+
entries,
|
|
1651
|
+
labels
|
|
1617
1652
|
}
|
|
1618
|
-
)
|
|
1619
|
-
}
|
|
1620
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1621
|
-
chunkFNA66TT4_js.ManagementPageLayout,
|
|
1622
|
-
{
|
|
1623
|
-
hero,
|
|
1624
|
-
content: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1625
|
-
chunk3H5CFLVK_js.ExecutionTimelinePanel,
|
|
1626
|
-
{
|
|
1627
|
-
entries,
|
|
1628
|
-
labels
|
|
1629
|
-
}
|
|
1630
|
-
)
|
|
1631
|
-
}
|
|
1632
|
-
);
|
|
1653
|
+
)
|
|
1654
|
+
] });
|
|
1633
1655
|
}
|
|
1634
1656
|
var PROVIDER_PRESETS = {
|
|
1635
1657
|
anthropic_api: {
|
|
@@ -1708,7 +1730,7 @@ function ConnectionsPageView({
|
|
|
1708
1730
|
const filteredConnections = searchTerm.trim() ? allConnections.filter((conn) => conn.name.toLowerCase().includes(searchTerm.trim().toLowerCase())) : allConnections;
|
|
1709
1731
|
const isEmpty = allConnections.length === 0;
|
|
1710
1732
|
const hero = /* @__PURE__ */ jsxRuntime.jsx(
|
|
1711
|
-
|
|
1733
|
+
chunkMT66VKLS_js.HeroSection,
|
|
1712
1734
|
{
|
|
1713
1735
|
icon: /* @__PURE__ */ jsxRuntime.jsx(outline.LinkIcon, { className: "h-5 w-5" }),
|
|
1714
1736
|
label: labels.title,
|
|
@@ -1716,7 +1738,7 @@ function ConnectionsPageView({
|
|
|
1716
1738
|
subtitle: labels.subtitle,
|
|
1717
1739
|
gradient: "from-sky-500 to-indigo-600",
|
|
1718
1740
|
toolbar: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1719
|
-
|
|
1741
|
+
chunkMT66VKLS_js.CreateActionButton,
|
|
1720
1742
|
{
|
|
1721
1743
|
mode: "desktop",
|
|
1722
1744
|
label: labels.add,
|
|
@@ -1727,7 +1749,7 @@ function ConnectionsPageView({
|
|
|
1727
1749
|
}
|
|
1728
1750
|
);
|
|
1729
1751
|
const mobileAction = /* @__PURE__ */ jsxRuntime.jsx(
|
|
1730
|
-
|
|
1752
|
+
chunkMT66VKLS_js.CreateActionButton,
|
|
1731
1753
|
{
|
|
1732
1754
|
mode: "mobile",
|
|
1733
1755
|
label: labels.add,
|
|
@@ -1735,9 +1757,9 @@ function ConnectionsPageView({
|
|
|
1735
1757
|
accent: "sky"
|
|
1736
1758
|
}
|
|
1737
1759
|
);
|
|
1738
|
-
const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1760
|
+
const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(chunkMT66VKLS_js.PageLoadingState, {}) : isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(chunkMT66VKLS_js.PageEmptyState, { title: labels.empty, message: labels.subtitle, iconName: "folder-open" }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1739
1761
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1740
|
-
|
|
1762
|
+
chunkMT66VKLS_js.SearchBar,
|
|
1741
1763
|
{
|
|
1742
1764
|
searchTerm,
|
|
1743
1765
|
onSearchChange: setSearchTerm,
|
|
@@ -1745,7 +1767,7 @@ function ConnectionsPageView({
|
|
|
1745
1767
|
}
|
|
1746
1768
|
),
|
|
1747
1769
|
/* @__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(
|
|
1748
|
-
|
|
1770
|
+
chunkMT66VKLS_js.EntityCard,
|
|
1749
1771
|
{
|
|
1750
1772
|
accentGradient: "from-sky-500 to-indigo-600",
|
|
1751
1773
|
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" }) }),
|
|
@@ -1780,7 +1802,11 @@ function ConnectionsPageView({
|
|
|
1780
1802
|
)) })
|
|
1781
1803
|
] });
|
|
1782
1804
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1783
|
-
/* @__PURE__ */ jsxRuntime.
|
|
1805
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
1806
|
+
hero,
|
|
1807
|
+
content,
|
|
1808
|
+
mobileAction
|
|
1809
|
+
] }),
|
|
1784
1810
|
createOpen && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1785
1811
|
ConnectionEditor,
|
|
1786
1812
|
{
|
|
@@ -1894,7 +1920,7 @@ function ConnectionEditor({
|
|
|
1894
1920
|
return preset.exampleModels?.join(", ") ?? "";
|
|
1895
1921
|
}, [preset]);
|
|
1896
1922
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1897
|
-
|
|
1923
|
+
chunkMT66VKLS_js.GlassModal,
|
|
1898
1924
|
{
|
|
1899
1925
|
open: true,
|
|
1900
1926
|
onClose,
|
|
@@ -1907,9 +1933,9 @@ function ConnectionEditor({
|
|
|
1907
1933
|
void handleSubmit();
|
|
1908
1934
|
},
|
|
1909
1935
|
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
1910
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1936
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkMT66VKLS_js.FormGrid, { children: [
|
|
1911
1937
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1912
|
-
|
|
1938
|
+
chunkMT66VKLS_js.FormSelect,
|
|
1913
1939
|
{
|
|
1914
1940
|
label: "Provider",
|
|
1915
1941
|
value: value.providerSlug,
|
|
@@ -1920,7 +1946,7 @@ function ConnectionEditor({
|
|
|
1920
1946
|
}
|
|
1921
1947
|
),
|
|
1922
1948
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1923
|
-
|
|
1949
|
+
chunkMT66VKLS_js.FormInput,
|
|
1924
1950
|
{
|
|
1925
1951
|
label: "Display name",
|
|
1926
1952
|
required: true,
|
|
@@ -1930,7 +1956,7 @@ function ConnectionEditor({
|
|
|
1930
1956
|
}
|
|
1931
1957
|
),
|
|
1932
1958
|
preset.needsRegion && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1933
|
-
|
|
1959
|
+
chunkMT66VKLS_js.FormInput,
|
|
1934
1960
|
{
|
|
1935
1961
|
label: "Region",
|
|
1936
1962
|
value: value.region,
|
|
@@ -1939,7 +1965,7 @@ function ConnectionEditor({
|
|
|
1939
1965
|
}
|
|
1940
1966
|
),
|
|
1941
1967
|
preset.needsEndpoint && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1942
|
-
|
|
1968
|
+
chunkMT66VKLS_js.FormInput,
|
|
1943
1969
|
{
|
|
1944
1970
|
label: "Endpoint URL",
|
|
1945
1971
|
value: value.endpoint,
|
|
@@ -1949,7 +1975,7 @@ function ConnectionEditor({
|
|
|
1949
1975
|
)
|
|
1950
1976
|
] }),
|
|
1951
1977
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1952
|
-
|
|
1978
|
+
chunkMT66VKLS_js.FormInput,
|
|
1953
1979
|
{
|
|
1954
1980
|
label: value.credentialRef ? "Rotate API key (leave blank to keep current)" : "API key",
|
|
1955
1981
|
type: "password",
|
|
@@ -1960,7 +1986,7 @@ function ConnectionEditor({
|
|
|
1960
1986
|
}
|
|
1961
1987
|
),
|
|
1962
1988
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1963
|
-
|
|
1989
|
+
chunkMT66VKLS_js.FormInput,
|
|
1964
1990
|
{
|
|
1965
1991
|
label: "Model filter (comma-separated, optional)",
|
|
1966
1992
|
value: value.modelFilter,
|
|
@@ -1972,7 +1998,7 @@ function ConnectionEditor({
|
|
|
1972
1998
|
/* @__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: [
|
|
1973
1999
|
/* @__PURE__ */ jsxRuntime.jsx("summary", { className: "cursor-pointer font-medium text-slate-700 dark:text-slate-200", children: "Advanced config (JSON)" }),
|
|
1974
2000
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-3", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1975
|
-
|
|
2001
|
+
chunkMT66VKLS_js.FormTextarea,
|
|
1976
2002
|
{
|
|
1977
2003
|
rows: 4,
|
|
1978
2004
|
value: value.configJson,
|
|
@@ -2042,7 +2068,7 @@ function CredentialsPageView({ labels, credentials, loading, onCreate, onRotate,
|
|
|
2042
2068
|
{ value: "password", label: labels.typePassword }
|
|
2043
2069
|
];
|
|
2044
2070
|
const hero = /* @__PURE__ */ jsxRuntime.jsx(
|
|
2045
|
-
|
|
2071
|
+
chunkMT66VKLS_js.HeroSection,
|
|
2046
2072
|
{
|
|
2047
2073
|
icon: /* @__PURE__ */ jsxRuntime.jsx(outline.KeyIcon, { className: "h-5 w-5" }),
|
|
2048
2074
|
label: labels.title,
|
|
@@ -2050,7 +2076,7 @@ function CredentialsPageView({ labels, credentials, loading, onCreate, onRotate,
|
|
|
2050
2076
|
subtitle: labels.subtitle,
|
|
2051
2077
|
gradient: "from-rose-500 to-orange-600",
|
|
2052
2078
|
toolbar: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2053
|
-
|
|
2079
|
+
chunkMT66VKLS_js.CreateActionButton,
|
|
2054
2080
|
{
|
|
2055
2081
|
mode: "desktop",
|
|
2056
2082
|
label: labels.addCredential,
|
|
@@ -2061,7 +2087,7 @@ function CredentialsPageView({ labels, credentials, loading, onCreate, onRotate,
|
|
|
2061
2087
|
}
|
|
2062
2088
|
);
|
|
2063
2089
|
const mobileAction = /* @__PURE__ */ jsxRuntime.jsx(
|
|
2064
|
-
|
|
2090
|
+
chunkMT66VKLS_js.CreateActionButton,
|
|
2065
2091
|
{
|
|
2066
2092
|
mode: "mobile",
|
|
2067
2093
|
label: labels.addCredential,
|
|
@@ -2069,9 +2095,9 @@ function CredentialsPageView({ labels, credentials, loading, onCreate, onRotate,
|
|
|
2069
2095
|
accent: "rose"
|
|
2070
2096
|
}
|
|
2071
2097
|
);
|
|
2072
|
-
const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
2098
|
+
const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(chunkMT66VKLS_js.PageLoadingState, {}) : isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(chunkMT66VKLS_js.PageEmptyState, { title: labels.empty, message: labels.subtitle, iconName: "folder-open" }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2073
2099
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2074
|
-
|
|
2100
|
+
chunkMT66VKLS_js.SearchBar,
|
|
2075
2101
|
{
|
|
2076
2102
|
searchTerm,
|
|
2077
2103
|
onSearchChange: setSearchTerm,
|
|
@@ -2079,7 +2105,7 @@ function CredentialsPageView({ labels, credentials, loading, onCreate, onRotate,
|
|
|
2079
2105
|
}
|
|
2080
2106
|
),
|
|
2081
2107
|
/* @__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(
|
|
2082
|
-
|
|
2108
|
+
chunkMT66VKLS_js.EntityCard,
|
|
2083
2109
|
{
|
|
2084
2110
|
accentGradient: "from-rose-500 to-orange-700",
|
|
2085
2111
|
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" }) }),
|
|
@@ -2087,7 +2113,7 @@ function CredentialsPageView({ labels, credentials, loading, onCreate, onRotate,
|
|
|
2087
2113
|
subtitle: secret.secretType,
|
|
2088
2114
|
status: /* @__PURE__ */ jsxRuntime.jsx(chunkBHOT22QL_js.Badge, { color: secret.disabled ? "zinc" : "emerald", children: secret.disabled ? labels.disable : "Active" }),
|
|
2089
2115
|
footer: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-2", children: [
|
|
2090
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2116
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMT66VKLS_js.CopyableId, { id: secret.secretId }),
|
|
2091
2117
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-2", children: [
|
|
2092
2118
|
/* @__PURE__ */ jsxRuntime.jsxs(chunkBHOT22QL_js.Button, { type: "button", size: "sm", outline: true, onClick: () => setRotateFor(secret), children: [
|
|
2093
2119
|
/* @__PURE__ */ jsxRuntime.jsx(outline.ArrowPathIcon, { className: "mr-1 h-3.5 w-3.5" }),
|
|
@@ -2124,9 +2150,13 @@ function CredentialsPageView({ labels, credentials, loading, onCreate, onRotate,
|
|
|
2124
2150
|
)) })
|
|
2125
2151
|
] });
|
|
2126
2152
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2127
|
-
/* @__PURE__ */ jsxRuntime.
|
|
2153
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
2154
|
+
hero,
|
|
2155
|
+
content,
|
|
2156
|
+
mobileAction
|
|
2157
|
+
] }),
|
|
2128
2158
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2129
|
-
|
|
2159
|
+
chunkMT66VKLS_js.GlassModal,
|
|
2130
2160
|
{
|
|
2131
2161
|
open: createOpen,
|
|
2132
2162
|
onClose: () => setCreateOpen(false),
|
|
@@ -2144,16 +2174,16 @@ function CredentialsPageView({ labels, credentials, loading, onCreate, onRotate,
|
|
|
2144
2174
|
onCreate({ name, value, secretType, description });
|
|
2145
2175
|
setCreateOpen(false);
|
|
2146
2176
|
},
|
|
2147
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2148
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2149
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2150
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2151
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2177
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(chunkMT66VKLS_js.FormGrid, { children: [
|
|
2178
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMT66VKLS_js.FormInput, { name: "name", label: labels.name, placeholder: labels.namePlaceholder, required: true }),
|
|
2179
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMT66VKLS_js.FormSelect, { name: "secretType", label: labels.type, options: typeOptions, defaultValue: "generic" }),
|
|
2180
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMT66VKLS_js.FormInput, { name: "value", label: labels.value, placeholder: labels.valuePlaceholder, required: true, type: "password" }),
|
|
2181
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMT66VKLS_js.FormTextarea, { name: "description", label: labels.description, placeholder: labels.descriptionPlaceholder, rows: 2 })
|
|
2152
2182
|
] })
|
|
2153
2183
|
}
|
|
2154
2184
|
),
|
|
2155
2185
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2156
|
-
|
|
2186
|
+
chunkMT66VKLS_js.GlassModal,
|
|
2157
2187
|
{
|
|
2158
2188
|
open: rotateFor !== null,
|
|
2159
2189
|
onClose: () => setRotateFor(null),
|
|
@@ -2168,7 +2198,7 @@ function CredentialsPageView({ labels, credentials, loading, onCreate, onRotate,
|
|
|
2168
2198
|
onRotate(rotateFor, value);
|
|
2169
2199
|
setRotateFor(null);
|
|
2170
2200
|
},
|
|
2171
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2201
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(chunkMT66VKLS_js.FormGrid, { children: /* @__PURE__ */ jsxRuntime.jsx(chunkMT66VKLS_js.FormInput, { name: "value", label: labels.value, placeholder: labels.valuePlaceholder, required: true, type: "password" }) })
|
|
2172
2202
|
}
|
|
2173
2203
|
)
|
|
2174
2204
|
] });
|
|
@@ -2190,7 +2220,7 @@ function AgentsWorkspacePageView({
|
|
|
2190
2220
|
loading,
|
|
2191
2221
|
promptsByAgent = {},
|
|
2192
2222
|
onSelectAgent,
|
|
2193
|
-
|
|
2223
|
+
onNewAgent,
|
|
2194
2224
|
onUpdateAgent,
|
|
2195
2225
|
onDeleteAgent,
|
|
2196
2226
|
onCreatePrompt,
|
|
@@ -2200,7 +2230,6 @@ function AgentsWorkspacePageView({
|
|
|
2200
2230
|
onUpdateModel
|
|
2201
2231
|
}) {
|
|
2202
2232
|
const [searchTerm, setSearchTerm] = react.useState("");
|
|
2203
|
-
const [createOpen, setCreateOpen] = react.useState(false);
|
|
2204
2233
|
const [selectedId, setSelectedId] = react.useState(null);
|
|
2205
2234
|
react.useEffect(() => {
|
|
2206
2235
|
if (!selectedId && agents.length > 0) {
|
|
@@ -2222,7 +2251,7 @@ function AgentsWorkspacePageView({
|
|
|
2222
2251
|
}, [agents, selectedId]);
|
|
2223
2252
|
const isEmpty = agents.length === 0;
|
|
2224
2253
|
const hero = /* @__PURE__ */ jsxRuntime.jsx(
|
|
2225
|
-
|
|
2254
|
+
chunkMT66VKLS_js.HeroSection,
|
|
2226
2255
|
{
|
|
2227
2256
|
icon: /* @__PURE__ */ jsxRuntime.jsx(outline.CpuChipIcon, { className: "h-5 w-5" }),
|
|
2228
2257
|
label: labels.title,
|
|
@@ -2230,27 +2259,27 @@ function AgentsWorkspacePageView({
|
|
|
2230
2259
|
subtitle: labels.subtitle,
|
|
2231
2260
|
gradient: "from-violet-500 to-indigo-700",
|
|
2232
2261
|
actions: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2233
|
-
|
|
2262
|
+
chunkMT66VKLS_js.CreateActionButton,
|
|
2234
2263
|
{
|
|
2235
2264
|
mode: "desktop",
|
|
2236
2265
|
label: labels.addAgent,
|
|
2237
|
-
onClick:
|
|
2266
|
+
onClick: onNewAgent,
|
|
2238
2267
|
accent: "violet"
|
|
2239
2268
|
}
|
|
2240
2269
|
)
|
|
2241
2270
|
}
|
|
2242
2271
|
);
|
|
2243
2272
|
const mobileAction = /* @__PURE__ */ jsxRuntime.jsx(
|
|
2244
|
-
|
|
2273
|
+
chunkMT66VKLS_js.CreateActionButton,
|
|
2245
2274
|
{
|
|
2246
2275
|
mode: "mobile",
|
|
2247
2276
|
label: labels.addAgent,
|
|
2248
|
-
onClick:
|
|
2277
|
+
onClick: onNewAgent,
|
|
2249
2278
|
accent: "violet"
|
|
2250
2279
|
}
|
|
2251
2280
|
);
|
|
2252
|
-
const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
2253
|
-
|
|
2281
|
+
const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(chunkMT66VKLS_js.PageLoadingState, {}) : isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
2282
|
+
chunkMT66VKLS_js.PageEmptyState,
|
|
2254
2283
|
{
|
|
2255
2284
|
title: labels.empty,
|
|
2256
2285
|
message: labels.emptyMessage,
|
|
@@ -2258,7 +2287,7 @@ function AgentsWorkspacePageView({
|
|
|
2258
2287
|
}
|
|
2259
2288
|
) : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
2260
2289
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2261
|
-
|
|
2290
|
+
chunkMT66VKLS_js.SearchBar,
|
|
2262
2291
|
{
|
|
2263
2292
|
searchTerm,
|
|
2264
2293
|
onSearchChange: setSearchTerm,
|
|
@@ -2266,15 +2295,15 @@ function AgentsWorkspacePageView({
|
|
|
2266
2295
|
}
|
|
2267
2296
|
),
|
|
2268
2297
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 gap-4 lg:grid-cols-[20rem_minmax(0,1fr)]", children: [
|
|
2269
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "lg:sticky lg:top-4", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2298
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "lg:sticky lg:top-4", children: /* @__PURE__ */ jsxRuntime.jsx(chunkMT66VKLS_js.ListCard, { variant: "glass", children: filteredAgents.map((agent) => {
|
|
2270
2299
|
const id = String(agent.agentId ?? agent.id ?? "");
|
|
2271
2300
|
const active = id === selectedId;
|
|
2272
2301
|
const initials = deriveInitials(String(agent.name ?? id));
|
|
2273
2302
|
const modelName = models.find((m) => m.id === String(agent.modelId ?? ""))?.name ?? String(agent.modelId ?? "");
|
|
2274
2303
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2275
|
-
|
|
2304
|
+
chunkMT66VKLS_js.ListCardItem,
|
|
2276
2305
|
{
|
|
2277
|
-
leading: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2306
|
+
leading: /* @__PURE__ */ jsxRuntime.jsx(chunkMT66VKLS_js.Avatar, { tone: active ? "violet" : "slate", initials }),
|
|
2278
2307
|
trailing: agent.activePromptVersion > 0 ? /* @__PURE__ */ jsxRuntime.jsxs(chunkBHOT22QL_js.Badge, { color: "emerald", children: [
|
|
2279
2308
|
"v",
|
|
2280
2309
|
agent.activePromptVersion
|
|
@@ -2316,7 +2345,7 @@ function AgentsWorkspacePageView({
|
|
|
2316
2345
|
},
|
|
2317
2346
|
String(selectedAgent.agentId ?? selectedAgent.id ?? "")
|
|
2318
2347
|
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
2319
|
-
|
|
2348
|
+
chunkMT66VKLS_js.SectionCard,
|
|
2320
2349
|
{
|
|
2321
2350
|
header: {
|
|
2322
2351
|
icon: /* @__PURE__ */ jsxRuntime.jsx(outline.CpuChipIcon, { className: "h-4 w-4" }),
|
|
@@ -2324,7 +2353,7 @@ function AgentsWorkspacePageView({
|
|
|
2324
2353
|
subtitle: labels.noSelectionMessage
|
|
2325
2354
|
},
|
|
2326
2355
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2327
|
-
|
|
2356
|
+
chunkMT66VKLS_js.PageEmptyState,
|
|
2328
2357
|
{
|
|
2329
2358
|
title: labels.noSelection,
|
|
2330
2359
|
message: labels.noSelectionMessage,
|
|
@@ -2335,21 +2364,10 @@ function AgentsWorkspacePageView({
|
|
|
2335
2364
|
) })
|
|
2336
2365
|
] })
|
|
2337
2366
|
] });
|
|
2338
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
{
|
|
2343
|
-
labels,
|
|
2344
|
-
models,
|
|
2345
|
-
connections,
|
|
2346
|
-
onClose: () => setCreateOpen(false),
|
|
2347
|
-
onSubmit: async (input) => {
|
|
2348
|
-
await onCreateAgent(input);
|
|
2349
|
-
setCreateOpen(false);
|
|
2350
|
-
}
|
|
2351
|
-
}
|
|
2352
|
-
)
|
|
2367
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
2368
|
+
hero,
|
|
2369
|
+
content,
|
|
2370
|
+
mobileAction
|
|
2353
2371
|
] });
|
|
2354
2372
|
}
|
|
2355
2373
|
function AgentDetail({
|
|
@@ -2370,7 +2388,7 @@ function AgentDetail({
|
|
|
2370
2388
|
}) {
|
|
2371
2389
|
const agentId = String(agent.agentId ?? agent.id ?? "");
|
|
2372
2390
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2373
|
-
|
|
2391
|
+
chunkMT66VKLS_js.SectionCard,
|
|
2374
2392
|
{
|
|
2375
2393
|
header: {
|
|
2376
2394
|
icon: /* @__PURE__ */ jsxRuntime.jsx(outline.CpuChipIcon, { className: "h-4 w-4" }),
|
|
@@ -2395,15 +2413,15 @@ function AgentDetail({
|
|
|
2395
2413
|
]
|
|
2396
2414
|
}
|
|
2397
2415
|
),
|
|
2398
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2399
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2400
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2401
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2402
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2403
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2416
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(chunkMT66VKLS_js.Tabs, { defaultValue: "general", className: "w-full", children: [
|
|
2417
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkMT66VKLS_js.TabsList, { className: "bg-white/40 dark:bg-white/[0.06]", children: [
|
|
2418
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMT66VKLS_js.TabsTrigger, { value: "general", children: labels.generalTab }),
|
|
2419
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMT66VKLS_js.TabsTrigger, { value: "prompt", children: labels.promptTab }),
|
|
2420
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMT66VKLS_js.TabsTrigger, { value: "tools", children: labels.toolsTab }),
|
|
2421
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMT66VKLS_js.TabsTrigger, { value: "model", children: labels.modelTab })
|
|
2404
2422
|
] }),
|
|
2405
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2406
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2423
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMT66VKLS_js.TabsContent, { value: "general", className: "space-y-4 pt-4", children: /* @__PURE__ */ jsxRuntime.jsx(GeneralTab, { agent, labels, onSubmit: (input) => onUpdateAgent(agentId, input) }) }),
|
|
2424
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMT66VKLS_js.TabsContent, { value: "prompt", className: "space-y-4 pt-4", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2407
2425
|
PromptTab,
|
|
2408
2426
|
{
|
|
2409
2427
|
agent,
|
|
@@ -2413,7 +2431,7 @@ function AgentDetail({
|
|
|
2413
2431
|
onActivate: (promptId) => onActivatePrompt(agentId, promptId)
|
|
2414
2432
|
}
|
|
2415
2433
|
) }),
|
|
2416
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2434
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMT66VKLS_js.TabsContent, { value: "tools", className: "space-y-4 pt-4", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2417
2435
|
ToolsTab,
|
|
2418
2436
|
{
|
|
2419
2437
|
agent,
|
|
@@ -2423,7 +2441,7 @@ function AgentDetail({
|
|
|
2423
2441
|
onDetach: (toolId) => onDetachTool(agentId, toolId)
|
|
2424
2442
|
}
|
|
2425
2443
|
) }),
|
|
2426
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2444
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMT66VKLS_js.TabsContent, { value: "model", className: "space-y-4 pt-4", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2427
2445
|
ModelTab,
|
|
2428
2446
|
{
|
|
2429
2447
|
agent,
|
|
@@ -2455,7 +2473,7 @@ function GeneralTab({
|
|
|
2455
2473
|
const initialRole = String(agent.role ?? "");
|
|
2456
2474
|
const initialStatus = String(agent.status ?? "draft");
|
|
2457
2475
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2458
|
-
|
|
2476
|
+
chunkMT66VKLS_js.SectionCard,
|
|
2459
2477
|
{
|
|
2460
2478
|
variant: "glass",
|
|
2461
2479
|
header: {
|
|
@@ -2484,10 +2502,10 @@ function GeneralTab({
|
|
|
2484
2502
|
},
|
|
2485
2503
|
className: "space-y-4",
|
|
2486
2504
|
children: [
|
|
2487
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2488
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2505
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkMT66VKLS_js.FormGrid, { children: [
|
|
2506
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMT66VKLS_js.FormInput, { name: "name", label: labels.name, defaultValue: initial.name, required: true }),
|
|
2489
2507
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2490
|
-
|
|
2508
|
+
chunkMT66VKLS_js.FormSelect,
|
|
2491
2509
|
{
|
|
2492
2510
|
name: "status",
|
|
2493
2511
|
label: labels.status,
|
|
@@ -2499,9 +2517,9 @@ function GeneralTab({
|
|
|
2499
2517
|
]
|
|
2500
2518
|
}
|
|
2501
2519
|
),
|
|
2502
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2520
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMT66VKLS_js.FormInput, { name: "role", label: labels.role, placeholder: labels.rolePlaceholder, defaultValue: initialRole }),
|
|
2503
2521
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2504
|
-
|
|
2522
|
+
chunkMT66VKLS_js.FormInput,
|
|
2505
2523
|
{
|
|
2506
2524
|
name: "maxTokens",
|
|
2507
2525
|
label: labels.maxTokens,
|
|
@@ -2510,7 +2528,7 @@ function GeneralTab({
|
|
|
2510
2528
|
}
|
|
2511
2529
|
),
|
|
2512
2530
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2513
|
-
|
|
2531
|
+
chunkMT66VKLS_js.FormInput,
|
|
2514
2532
|
{
|
|
2515
2533
|
name: "temperature",
|
|
2516
2534
|
label: labels.temperature,
|
|
@@ -2522,7 +2540,7 @@ function GeneralTab({
|
|
|
2522
2540
|
}
|
|
2523
2541
|
)
|
|
2524
2542
|
] }),
|
|
2525
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2543
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMT66VKLS_js.FormTextarea, { name: "description", label: labels.description, defaultValue: initialDescription, rows: 3 }),
|
|
2526
2544
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-end", children: /* @__PURE__ */ jsxRuntime.jsx(chunkBHOT22QL_js.Button, { type: "submit", color: "indigo", disabled: submitting, children: submitting ? labels.saving : labels.save }) })
|
|
2527
2545
|
]
|
|
2528
2546
|
}
|
|
@@ -2542,7 +2560,7 @@ function PromptTab({
|
|
|
2542
2560
|
const currentSystem = String(agent.systemPrompt ?? "");
|
|
2543
2561
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
2544
2562
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2545
|
-
|
|
2563
|
+
chunkMT66VKLS_js.SectionCard,
|
|
2546
2564
|
{
|
|
2547
2565
|
variant: "glass",
|
|
2548
2566
|
header: {
|
|
@@ -2554,7 +2572,7 @@ function PromptTab({
|
|
|
2554
2572
|
}
|
|
2555
2573
|
),
|
|
2556
2574
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2557
|
-
|
|
2575
|
+
chunkMT66VKLS_js.SectionCard,
|
|
2558
2576
|
{
|
|
2559
2577
|
variant: "glass",
|
|
2560
2578
|
header: {
|
|
@@ -2565,10 +2583,10 @@ function PromptTab({
|
|
|
2565
2583
|
/* @__PURE__ */ jsxRuntime.jsx(outline.PlusIcon, { className: "h-4 w-4" }),
|
|
2566
2584
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-1.5", children: labels.addPrompt })
|
|
2567
2585
|
] }),
|
|
2568
|
-
children: prompts.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-slate-500 dark:text-slate-400", children: labels.promptVersionsEmpty }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
2586
|
+
children: prompts.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-slate-500 dark:text-slate-400", children: labels.promptVersionsEmpty }) : /* @__PURE__ */ jsxRuntime.jsx(chunkMT66VKLS_js.ListCard, { children: prompts.map((prompt) => {
|
|
2569
2587
|
const id = `${prompt.agentId}:${prompt.locale}:${prompt.version}`;
|
|
2570
2588
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2571
|
-
|
|
2589
|
+
chunkMT66VKLS_js.ListCardItem,
|
|
2572
2590
|
{
|
|
2573
2591
|
leading: /* @__PURE__ */ jsxRuntime.jsxs(chunkBHOT22QL_js.Badge, { color: prompt.isActive ? "emerald" : "zinc", children: [
|
|
2574
2592
|
"v",
|
|
@@ -2586,7 +2604,7 @@ function PromptTab({
|
|
|
2586
2604
|
}
|
|
2587
2605
|
),
|
|
2588
2606
|
addOpen && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2589
|
-
|
|
2607
|
+
chunkMT66VKLS_js.GlassModal,
|
|
2590
2608
|
{
|
|
2591
2609
|
open: true,
|
|
2592
2610
|
onClose: () => setAddOpen(false),
|
|
@@ -2607,10 +2625,10 @@ function PromptTab({
|
|
|
2607
2625
|
});
|
|
2608
2626
|
setAddOpen(false);
|
|
2609
2627
|
},
|
|
2610
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2611
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2628
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(chunkMT66VKLS_js.FormGrid, { children: [
|
|
2629
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMT66VKLS_js.FormSelect, { name: "locale", label: labels.promptLocale, options: LOCALE_OPTIONS2, defaultValue: "en" }),
|
|
2612
2630
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2613
|
-
|
|
2631
|
+
chunkMT66VKLS_js.FormSelect,
|
|
2614
2632
|
{
|
|
2615
2633
|
name: "isActive",
|
|
2616
2634
|
label: labels.promptIsActive,
|
|
@@ -2621,10 +2639,10 @@ function PromptTab({
|
|
|
2621
2639
|
defaultValue: "true"
|
|
2622
2640
|
}
|
|
2623
2641
|
),
|
|
2624
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2625
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2626
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2627
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2642
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMT66VKLS_js.FormInput, { name: "reason", label: labels.promptReason }),
|
|
2643
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMT66VKLS_js.FormTextarea, { name: "systemPrompt", label: labels.promptSystemPrompt, rows: 3 }),
|
|
2644
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMT66VKLS_js.FormTextarea, { name: "userTemplate", label: labels.promptUserTemplate, rows: 3 }),
|
|
2645
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMT66VKLS_js.FormTextarea, { name: "prompt", label: labels.promptText, rows: 6, required: true })
|
|
2628
2646
|
] })
|
|
2629
2647
|
}
|
|
2630
2648
|
)
|
|
@@ -2647,15 +2665,15 @@ function ToolsTab({
|
|
|
2647
2665
|
const availableTools = tools.filter((tool) => !attachedSet.has(tool.agentToolId));
|
|
2648
2666
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
2649
2667
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2650
|
-
|
|
2668
|
+
chunkMT66VKLS_js.SectionCard,
|
|
2651
2669
|
{
|
|
2652
2670
|
variant: "glass",
|
|
2653
2671
|
header: {
|
|
2654
2672
|
icon: /* @__PURE__ */ jsxRuntime.jsx(outline.WrenchScrewdriverIcon, { className: "h-4 w-4" }),
|
|
2655
2673
|
title: labels.toolsAttached
|
|
2656
2674
|
},
|
|
2657
|
-
children: attachedTools.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-slate-500 dark:text-slate-400", children: labels.toolsEmpty }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
2658
|
-
|
|
2675
|
+
children: attachedTools.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-slate-500 dark:text-slate-400", children: labels.toolsEmpty }) : /* @__PURE__ */ jsxRuntime.jsx(chunkMT66VKLS_js.ListCard, { children: attachedTools.map((tool) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2676
|
+
chunkMT66VKLS_js.ListCardItem,
|
|
2659
2677
|
{
|
|
2660
2678
|
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" }) }),
|
|
2661
2679
|
trailing: /* @__PURE__ */ jsxRuntime.jsx(chunkBHOT22QL_js.Button, { type: "button", size: "sm", outline: true, onClick: () => onDetach(tool.agentToolId), children: labels.detachTool }),
|
|
@@ -2669,15 +2687,15 @@ function ToolsTab({
|
|
|
2669
2687
|
}
|
|
2670
2688
|
),
|
|
2671
2689
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2672
|
-
|
|
2690
|
+
chunkMT66VKLS_js.SectionCard,
|
|
2673
2691
|
{
|
|
2674
2692
|
variant: "glass",
|
|
2675
2693
|
header: {
|
|
2676
2694
|
icon: /* @__PURE__ */ jsxRuntime.jsx(outline.WrenchScrewdriverIcon, { className: "h-4 w-4" }),
|
|
2677
2695
|
title: labels.toolsAvailable
|
|
2678
2696
|
},
|
|
2679
|
-
children: availableTools.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-slate-500 dark:text-slate-400", children: labels.toolsEmpty }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
2680
|
-
|
|
2697
|
+
children: availableTools.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-slate-500 dark:text-slate-400", children: labels.toolsEmpty }) : /* @__PURE__ */ jsxRuntime.jsx(chunkMT66VKLS_js.ListCard, { children: availableTools.map((tool) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2698
|
+
chunkMT66VKLS_js.ListCardItem,
|
|
2681
2699
|
{
|
|
2682
2700
|
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" }) }),
|
|
2683
2701
|
trailing: /* @__PURE__ */ jsxRuntime.jsxs(chunkBHOT22QL_js.Button, { type: "button", size: "sm", color: "indigo", onClick: () => onAttach(tool.agentToolId), children: [
|
|
@@ -2718,7 +2736,7 @@ function ModelTab({
|
|
|
2718
2736
|
return matches.length > 0 ? matches : connections;
|
|
2719
2737
|
}, [selectedModel, connections]);
|
|
2720
2738
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2721
|
-
|
|
2739
|
+
chunkMT66VKLS_js.SectionCard,
|
|
2722
2740
|
{
|
|
2723
2741
|
variant: "glass",
|
|
2724
2742
|
header: {
|
|
@@ -2739,9 +2757,9 @@ function ModelTab({
|
|
|
2739
2757
|
},
|
|
2740
2758
|
className: "space-y-4",
|
|
2741
2759
|
children: [
|
|
2742
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2760
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkMT66VKLS_js.FormGrid, { children: [
|
|
2743
2761
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2744
|
-
|
|
2762
|
+
chunkMT66VKLS_js.FormSelect,
|
|
2745
2763
|
{
|
|
2746
2764
|
label: labels.model,
|
|
2747
2765
|
value: modelId,
|
|
@@ -2750,7 +2768,7 @@ function ModelTab({
|
|
|
2750
2768
|
}
|
|
2751
2769
|
),
|
|
2752
2770
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2753
|
-
|
|
2771
|
+
chunkMT66VKLS_js.FormSelect,
|
|
2754
2772
|
{
|
|
2755
2773
|
label: labels.connection,
|
|
2756
2774
|
value: connectionId,
|
|
@@ -2770,6 +2788,13 @@ function ModelTab({
|
|
|
2770
2788
|
}
|
|
2771
2789
|
);
|
|
2772
2790
|
}
|
|
2791
|
+
function deriveInitials(name) {
|
|
2792
|
+
const trimmed = name.trim();
|
|
2793
|
+
if (!trimmed) return "?";
|
|
2794
|
+
const parts = trimmed.split(/\s+/);
|
|
2795
|
+
if (parts.length === 1) return parts[0].slice(0, 2).toUpperCase();
|
|
2796
|
+
return (parts[0][0] + parts[parts.length - 1][0]).toUpperCase();
|
|
2797
|
+
}
|
|
2773
2798
|
var AGENT_PRESETS = [
|
|
2774
2799
|
{ id: "sales", emoji: "\u{1F4BC}", name: "Sales Specialist", role: "Lead qualification & CRM", systemPrompt: "You are a sales assistant. Help qualify leads, manage CRM entries, and schedule follow-ups. Always be professional and proactive.", temperature: 0.7, maxTokens: 2048, accent: "from-emerald-500 to-teal-600", framework: "anthropic" },
|
|
2775
2800
|
{ id: "support", emoji: "\u{1F3A7}", name: "Customer Support", role: "Ticket resolution & escalation", systemPrompt: "You are a customer support agent. Resolve tickets, answer questions, and escalate complex issues. Prioritize customer satisfaction.", temperature: 0.3, maxTokens: 2048, accent: "from-sky-500 to-indigo-600", framework: "crewai" },
|
|
@@ -2785,13 +2810,96 @@ var DIFFICULTY_OPTIONS = [
|
|
|
2785
2810
|
{ id: "expert", emoji: "\u{1F9E0}", accent: "from-rose-500 to-purple-600" }
|
|
2786
2811
|
];
|
|
2787
2812
|
var EMOJI_PALETTE = ["\u{1F4BC}", "\u{1F3A7}", "\u{1F4CA}", "\u{1F6E1}\uFE0F", "\u{1F52C}", "\u2728", "\u{1F916}", "\u26A1", "\u{1F3AF}", "\u{1F680}", "\u{1F9E0}", "\u{1F9BE}", "\u{1F4E1}", "\u{1F52E}", "\u{1F310}", "\u{1F5C2}\uFE0F"];
|
|
2788
|
-
function
|
|
2813
|
+
function RangeSliderField({
|
|
2814
|
+
sliderId,
|
|
2815
|
+
label,
|
|
2816
|
+
value,
|
|
2817
|
+
onChange,
|
|
2818
|
+
min,
|
|
2819
|
+
max,
|
|
2820
|
+
step,
|
|
2821
|
+
zones,
|
|
2822
|
+
trackGradient,
|
|
2823
|
+
formatValue,
|
|
2824
|
+
ariaLabel
|
|
2825
|
+
}) {
|
|
2826
|
+
const percent = (value - min) / (max - min) * 100;
|
|
2827
|
+
const activeZone = zones?.find((z) => value <= z.max) ?? zones?.[zones.length - 1];
|
|
2828
|
+
const thumbColor = activeZone?.thumbColor ?? "#6366f1";
|
|
2829
|
+
const glow = hexToGlow(thumbColor);
|
|
2830
|
+
const displayValue = formatValue ? formatValue(value) : value.toString();
|
|
2831
|
+
const ariaText = activeZone ? `${displayValue} \u2014 ${activeZone.label}` : displayValue;
|
|
2832
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
2833
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-2 flex items-center justify-between", children: [
|
|
2834
|
+
/* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: sliderId, className: "text-xs font-medium text-gray-500 dark:text-gray-400", children: label }),
|
|
2835
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-bold tabular-nums text-gray-900 dark:text-white", children: displayValue })
|
|
2836
|
+
] }),
|
|
2837
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
|
|
2838
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-x-0 top-1/2 h-2 -translate-y-1/2 overflow-hidden rounded-full bg-gray-200 dark:bg-gray-700", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2839
|
+
"div",
|
|
2840
|
+
{
|
|
2841
|
+
className: "h-full rounded-full transition-all duration-300 ease-out motion-reduce:transition-none",
|
|
2842
|
+
style: {
|
|
2843
|
+
width: `${Math.max(0, Math.min(100, percent))}%`,
|
|
2844
|
+
background: trackGradient ?? `linear-gradient(90deg, ${thumbColor}, ${thumbColor})`
|
|
2845
|
+
}
|
|
2846
|
+
}
|
|
2847
|
+
) }),
|
|
2848
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2849
|
+
"input",
|
|
2850
|
+
{
|
|
2851
|
+
id: sliderId,
|
|
2852
|
+
"data-slider-id": sliderId,
|
|
2853
|
+
type: "range",
|
|
2854
|
+
min,
|
|
2855
|
+
max,
|
|
2856
|
+
step,
|
|
2857
|
+
value,
|
|
2858
|
+
onChange: (e) => onChange(parseFloat(e.target.value)),
|
|
2859
|
+
"aria-label": ariaLabel ?? label,
|
|
2860
|
+
"aria-valuemin": min,
|
|
2861
|
+
"aria-valuemax": max,
|
|
2862
|
+
"aria-valuenow": value,
|
|
2863
|
+
"aria-valuetext": ariaText,
|
|
2864
|
+
className: "relative z-10 h-5 w-full cursor-pointer appearance-none bg-transparent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 [&::-webkit-slider-thumb]:h-5 [&::-webkit-slider-thumb]:w-5 [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:border-2 [&::-webkit-slider-thumb]:border-white [&::-webkit-slider-thumb]:shadow-lg dark:[&::-webkit-slider-thumb]:border-gray-900"
|
|
2865
|
+
}
|
|
2866
|
+
),
|
|
2867
|
+
/* @__PURE__ */ jsxRuntime.jsx("style", { children: `[data-slider-id="${sliderId}"]::-webkit-slider-thumb { background: ${thumbColor}; box-shadow: 0 0 8px ${glow}; } [data-slider-id="${sliderId}"]::-moz-range-thumb { background: ${thumbColor}; border: 2px solid white; box-shadow: 0 0 8px ${glow}; }` })
|
|
2868
|
+
] }),
|
|
2869
|
+
zones && zones.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-1 flex items-center justify-between", children: zones.map((z) => {
|
|
2870
|
+
const isActive = z.label === activeZone?.label;
|
|
2871
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2872
|
+
"span",
|
|
2873
|
+
{
|
|
2874
|
+
className: `text-[10px] font-medium transition-colors motion-reduce:transition-none ${isActive ? z.color : "text-gray-400 dark:text-gray-500"}`,
|
|
2875
|
+
children: z.label
|
|
2876
|
+
},
|
|
2877
|
+
z.label
|
|
2878
|
+
);
|
|
2879
|
+
}) })
|
|
2880
|
+
] });
|
|
2881
|
+
}
|
|
2882
|
+
function hexToGlow(hex) {
|
|
2883
|
+
const m = /^#?([0-9a-f]{6})$/i.exec(hex);
|
|
2884
|
+
if (!m) return "rgba(99,102,241,0.5)";
|
|
2885
|
+
const int = parseInt(m[1], 16);
|
|
2886
|
+
const r = int >> 16 & 255;
|
|
2887
|
+
const g = int >> 8 & 255;
|
|
2888
|
+
const b = int & 255;
|
|
2889
|
+
return `rgba(${r},${g},${b},0.5)`;
|
|
2890
|
+
}
|
|
2891
|
+
var TOTAL_STEPS = 5;
|
|
2892
|
+
function AgentNewWizardPageView({
|
|
2789
2893
|
labels,
|
|
2790
2894
|
models,
|
|
2791
2895
|
connections,
|
|
2792
|
-
|
|
2793
|
-
|
|
2896
|
+
initialStep,
|
|
2897
|
+
onStepChange,
|
|
2898
|
+
onSubmit,
|
|
2899
|
+
onCancel
|
|
2794
2900
|
}) {
|
|
2901
|
+
const clampedInitial = Math.min(TOTAL_STEPS, Math.max(1, initialStep ?? 1));
|
|
2902
|
+
const [step, setStep] = react.useState(clampedInitial);
|
|
2795
2903
|
const [presetId, setPresetId] = react.useState("custom");
|
|
2796
2904
|
const [emoji, setEmoji] = react.useState("\u2728");
|
|
2797
2905
|
const [name, setName] = react.useState("");
|
|
@@ -2809,7 +2917,16 @@ function CreateAgentDialog({
|
|
|
2809
2917
|
const [tagsInput, setTagsInput] = react.useState("");
|
|
2810
2918
|
const [outputSchema, setOutputSchema] = react.useState("");
|
|
2811
2919
|
const [modelId, setModelId] = react.useState(models[0]?.id ?? "");
|
|
2920
|
+
const [submitting, setSubmitting] = react.useState(false);
|
|
2921
|
+
const [touched, setTouched] = react.useState(false);
|
|
2812
2922
|
const activePreset = AGENT_PRESETS.find((p) => p.id === presetId) ?? AGENT_PRESETS[AGENT_PRESETS.length - 1];
|
|
2923
|
+
react.useEffect(() => {
|
|
2924
|
+
const next = Math.min(TOTAL_STEPS, Math.max(1, initialStep ?? 1));
|
|
2925
|
+
if (next !== step) setStep(next);
|
|
2926
|
+
}, [initialStep]);
|
|
2927
|
+
react.useEffect(() => {
|
|
2928
|
+
if (!modelId && models.length > 0) setModelId(models[0].id);
|
|
2929
|
+
}, [models, modelId]);
|
|
2813
2930
|
const matchingModels = react.useMemo(() => {
|
|
2814
2931
|
if (!connectionId) return models;
|
|
2815
2932
|
const conn = connections.find((c) => c.id === connectionId);
|
|
@@ -2822,7 +2939,7 @@ function CreateAgentDialog({
|
|
|
2822
2939
|
}, [models, connections, connectionId]);
|
|
2823
2940
|
const modelOptions = matchingModels.map((m) => ({ value: m.id, label: `${m.name} (${m.provider})` }));
|
|
2824
2941
|
const connectionOptions = react.useMemo(() => {
|
|
2825
|
-
const inline = { value: "", label: labels.connectionInline
|
|
2942
|
+
const inline = { value: "", label: labels.connectionInline };
|
|
2826
2943
|
return [
|
|
2827
2944
|
inline,
|
|
2828
2945
|
...connections.map((c) => ({
|
|
@@ -2832,13 +2949,36 @@ function CreateAgentDialog({
|
|
|
2832
2949
|
];
|
|
2833
2950
|
}, [connections, labels.connectionInline]);
|
|
2834
2951
|
const frameworkOptions = react.useMemo(() => [
|
|
2835
|
-
{ value: "", label: labels.connectionInline
|
|
2836
|
-
{ value: "anthropic", label: labels.frameworkAnthropic
|
|
2837
|
-
{ value: "langchain", label: labels.frameworkLangChain
|
|
2838
|
-
{ value: "crewai", label: labels.frameworkCrewAI
|
|
2839
|
-
{ value: "google-adk", label: labels.frameworkGoogleADK
|
|
2840
|
-
{ value: "openai", label: labels.frameworkOpenAI
|
|
2952
|
+
{ value: "", label: labels.connectionInline },
|
|
2953
|
+
{ value: "anthropic", label: labels.frameworkAnthropic },
|
|
2954
|
+
{ value: "langchain", label: labels.frameworkLangChain },
|
|
2955
|
+
{ value: "crewai", label: labels.frameworkCrewAI },
|
|
2956
|
+
{ value: "google-adk", label: labels.frameworkGoogleADK },
|
|
2957
|
+
{ value: "openai", label: labels.frameworkOpenAI }
|
|
2841
2958
|
], [labels]);
|
|
2959
|
+
const stepTitles = [
|
|
2960
|
+
labels.wizardStep1Title,
|
|
2961
|
+
labels.wizardStep2Title,
|
|
2962
|
+
labels.wizardStep3Title,
|
|
2963
|
+
labels.wizardStep4Title,
|
|
2964
|
+
labels.wizardStep5Title
|
|
2965
|
+
];
|
|
2966
|
+
const stepSubtitles = [
|
|
2967
|
+
labels.wizardStep1Subtitle,
|
|
2968
|
+
labels.wizardStep2Subtitle,
|
|
2969
|
+
labels.wizardStep3Subtitle,
|
|
2970
|
+
labels.wizardStep4Subtitle,
|
|
2971
|
+
labels.wizardStep5Subtitle
|
|
2972
|
+
];
|
|
2973
|
+
const timelineSteps = stepTitles.map((title, idx) => ({
|
|
2974
|
+
id: String(idx + 1),
|
|
2975
|
+
name: title,
|
|
2976
|
+
description: stepSubtitles[idx],
|
|
2977
|
+
status: idx + 1 < step ? "complete" : idx + 1 === step ? "current" : "upcoming"
|
|
2978
|
+
}));
|
|
2979
|
+
function markTouched() {
|
|
2980
|
+
if (!touched) setTouched(true);
|
|
2981
|
+
}
|
|
2842
2982
|
function applyPreset(preset) {
|
|
2843
2983
|
setPresetId(preset.id);
|
|
2844
2984
|
setEmoji(preset.emoji);
|
|
@@ -2850,14 +2990,78 @@ function CreateAgentDialog({
|
|
|
2850
2990
|
setMaxTokens(preset.maxTokens);
|
|
2851
2991
|
if (preset.framework) setFramework(preset.framework);
|
|
2852
2992
|
}
|
|
2993
|
+
markTouched();
|
|
2853
2994
|
}
|
|
2854
|
-
|
|
2855
|
-
|
|
2995
|
+
const goToStep = react.useCallback((next) => {
|
|
2996
|
+
const clamped = Math.min(TOTAL_STEPS, Math.max(1, next));
|
|
2997
|
+
setStep(clamped);
|
|
2998
|
+
onStepChange?.(clamped);
|
|
2999
|
+
}, [onStepChange]);
|
|
3000
|
+
function canAdvance(from) {
|
|
3001
|
+
if (from <= 1) return true;
|
|
3002
|
+
if (from === 2) return name.trim().length > 0;
|
|
3003
|
+
return true;
|
|
3004
|
+
}
|
|
3005
|
+
const goNext = react.useCallback(() => {
|
|
3006
|
+
if (!canAdvance(step)) return;
|
|
3007
|
+
if (step < TOTAL_STEPS) goToStep(step + 1);
|
|
3008
|
+
}, [step, name]);
|
|
3009
|
+
const goBack = react.useCallback(() => {
|
|
3010
|
+
if (step > 1) goToStep(step - 1);
|
|
3011
|
+
}, [step, goToStep]);
|
|
3012
|
+
const cancelWithConfirm = react.useCallback(() => {
|
|
3013
|
+
if (touched && !window.confirm(labels.wizardCancelConfirm)) return;
|
|
3014
|
+
onCancel();
|
|
3015
|
+
}, [touched, labels.wizardCancelConfirm, onCancel]);
|
|
3016
|
+
react.useEffect(() => {
|
|
3017
|
+
function onKey(e) {
|
|
3018
|
+
if (e.key === "Escape") {
|
|
3019
|
+
e.preventDefault();
|
|
3020
|
+
cancelWithConfirm();
|
|
3021
|
+
return;
|
|
3022
|
+
}
|
|
3023
|
+
if (e.key === "Enter") {
|
|
3024
|
+
const target = e.target;
|
|
3025
|
+
const tag = target?.tagName?.toLowerCase();
|
|
3026
|
+
if (tag === "textarea" || tag === "select" || tag === "input" || tag === "button") return;
|
|
3027
|
+
e.preventDefault();
|
|
3028
|
+
if (step < TOTAL_STEPS) goNext();
|
|
3029
|
+
else void submit();
|
|
3030
|
+
}
|
|
3031
|
+
}
|
|
3032
|
+
window.addEventListener("keydown", onKey);
|
|
3033
|
+
return () => window.removeEventListener("keydown", onKey);
|
|
3034
|
+
}, [step, name, touched]);
|
|
3035
|
+
async function submit() {
|
|
3036
|
+
setSubmitting(true);
|
|
3037
|
+
try {
|
|
3038
|
+
const parsedTags = tagsInput.split(",").map((t) => t.trim()).filter((t) => t.length > 0);
|
|
3039
|
+
await onSubmit({
|
|
3040
|
+
name: name.trim() || activePreset.name || "Untitled Agent",
|
|
3041
|
+
role: role.trim() || void 0,
|
|
3042
|
+
description: description.trim() || void 0,
|
|
3043
|
+
avatar: emoji,
|
|
3044
|
+
modelId,
|
|
3045
|
+
connectionId: connectionId || void 0,
|
|
3046
|
+
framework: framework || void 0,
|
|
3047
|
+
systemPrompt,
|
|
3048
|
+
userPrompt: userPrompt.trim() || void 0,
|
|
3049
|
+
maxTokens,
|
|
3050
|
+
temperature,
|
|
3051
|
+
topP,
|
|
3052
|
+
topK,
|
|
3053
|
+
difficulty: difficulty || void 0,
|
|
3054
|
+
tags: parsedTags.length > 0 ? parsedTags : void 0,
|
|
3055
|
+
outputSchema: outputSchema.trim() || void 0
|
|
3056
|
+
});
|
|
3057
|
+
} finally {
|
|
3058
|
+
setSubmitting(false);
|
|
3059
|
+
}
|
|
3060
|
+
}
|
|
3061
|
+
const counter = labels.wizardStepCounter.replace("{current}", String(step)).replace("{total}", String(TOTAL_STEPS));
|
|
3062
|
+
const hero = /* @__PURE__ */ jsxRuntime.jsx(
|
|
3063
|
+
chunkMT66VKLS_js.HeroSection,
|
|
2856
3064
|
{
|
|
2857
|
-
open: true,
|
|
2858
|
-
onClose,
|
|
2859
|
-
title: labels.createAgentTitle,
|
|
2860
|
-
label: labels.createAgentEyebrow ?? "NEW AGENT",
|
|
2861
3065
|
icon: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2862
3066
|
"div",
|
|
2863
3067
|
{
|
|
@@ -2866,358 +3070,588 @@ function CreateAgentDialog({
|
|
|
2866
3070
|
children: emoji
|
|
2867
3071
|
}
|
|
2868
3072
|
),
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2897
|
-
chunkFNA66TT4_js.SectionCard,
|
|
2898
|
-
{
|
|
2899
|
-
variant: "glass",
|
|
2900
|
-
padded: false,
|
|
2901
|
-
header: {
|
|
2902
|
-
title: labels.presetTitle ?? "Start from a template",
|
|
2903
|
-
subtitle: labels.presetSubtitle ?? "Pick a role or build a custom agent"
|
|
2904
|
-
},
|
|
2905
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-2 gap-2 px-4 pb-4 sm:grid-cols-3", children: AGENT_PRESETS.map((preset) => {
|
|
2906
|
-
const selected = preset.id === presetId;
|
|
2907
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2908
|
-
"button",
|
|
2909
|
-
{
|
|
2910
|
-
type: "button",
|
|
2911
|
-
onClick: () => applyPreset(preset),
|
|
2912
|
-
className: [
|
|
2913
|
-
"liquid-surface group flex items-center gap-3 rounded-xl px-3 py-2.5 text-left transition-all",
|
|
2914
|
-
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"
|
|
2915
|
-
].join(" "),
|
|
2916
|
-
children: [
|
|
2917
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2918
|
-
"span",
|
|
2919
|
-
{
|
|
2920
|
-
"aria-hidden": "true",
|
|
2921
|
-
className: `flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-gradient-to-br ${preset.accent} text-base shadow-sm`,
|
|
2922
|
-
children: preset.emoji
|
|
2923
|
-
}
|
|
2924
|
-
),
|
|
2925
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "min-w-0 flex-1", children: [
|
|
2926
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "block truncate text-sm font-semibold text-slate-900 dark:text-white", children: preset.id === "custom" ? labels.presetCustom ?? "Custom" : preset.name }),
|
|
2927
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "block truncate text-xs text-slate-500 dark:text-slate-400", children: preset.role || (labels.presetCustomHint ?? "Start from scratch") })
|
|
2928
|
-
] })
|
|
2929
|
-
]
|
|
2930
|
-
},
|
|
2931
|
-
preset.id
|
|
2932
|
-
);
|
|
2933
|
-
}) })
|
|
2934
|
-
}
|
|
2935
|
-
),
|
|
2936
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2937
|
-
chunkFNA66TT4_js.SectionCard,
|
|
2938
|
-
{
|
|
2939
|
-
variant: "glass",
|
|
2940
|
-
header: {
|
|
2941
|
-
title: labels.identitySection ?? "Identity",
|
|
2942
|
-
subtitle: labels.identitySubtitle ?? "How your agent shows up across workflows"
|
|
2943
|
-
},
|
|
2944
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
2945
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
2946
|
-
/* @__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 ?? "Avatar" }),
|
|
2947
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-1.5", children: EMOJI_PALETTE.map((e) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2948
|
-
"button",
|
|
2949
|
-
{
|
|
2950
|
-
type: "button",
|
|
2951
|
-
onClick: () => setEmoji(e),
|
|
2952
|
-
"aria-pressed": emoji === e,
|
|
2953
|
-
className: [
|
|
2954
|
-
"flex h-9 w-9 items-center justify-center rounded-lg text-base transition-all",
|
|
2955
|
-
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"
|
|
2956
|
-
].join(" "),
|
|
2957
|
-
children: e
|
|
2958
|
-
},
|
|
2959
|
-
e
|
|
2960
|
-
)) })
|
|
2961
|
-
] }),
|
|
2962
|
-
/* @__PURE__ */ jsxRuntime.jsxs(chunkFNA66TT4_js.FormGrid, { children: [
|
|
3073
|
+
label: counter,
|
|
3074
|
+
title: labels.pageTitle,
|
|
3075
|
+
subtitle: stepSubtitles[step - 1],
|
|
3076
|
+
gradient: activePreset.accent
|
|
3077
|
+
}
|
|
3078
|
+
);
|
|
3079
|
+
function renderStep1() {
|
|
3080
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3081
|
+
chunkMT66VKLS_js.SectionCard,
|
|
3082
|
+
{
|
|
3083
|
+
variant: "glass",
|
|
3084
|
+
header: {
|
|
3085
|
+
title: labels.presetTitle,
|
|
3086
|
+
subtitle: labels.presetSubtitle
|
|
3087
|
+
},
|
|
3088
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-1 gap-2 sm:grid-cols-2 lg:grid-cols-3", children: AGENT_PRESETS.map((preset) => {
|
|
3089
|
+
const selected = preset.id === presetId;
|
|
3090
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3091
|
+
"button",
|
|
3092
|
+
{
|
|
3093
|
+
type: "button",
|
|
3094
|
+
onClick: () => applyPreset(preset),
|
|
3095
|
+
className: [
|
|
3096
|
+
"liquid-surface group flex items-center gap-3 rounded-xl px-3 py-2.5 text-left transition-all",
|
|
3097
|
+
selected ? "ring-2 ring-indigo-500/70 ring-offset-1 ring-offset-transparent" : "hover:border-indigo-400/40 focus-visible:ring-2 focus-visible:ring-indigo-500/70 focus-visible:ring-offset-1"
|
|
3098
|
+
].join(" "),
|
|
3099
|
+
children: [
|
|
2963
3100
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2964
|
-
|
|
3101
|
+
"span",
|
|
2965
3102
|
{
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
required: true,
|
|
2970
|
-
placeholder: labels.namePlaceholder ?? "Sales Specialist"
|
|
3103
|
+
"aria-hidden": "true",
|
|
3104
|
+
className: `flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-gradient-to-br ${preset.accent} text-base shadow-sm`,
|
|
3105
|
+
children: preset.emoji
|
|
2971
3106
|
}
|
|
2972
3107
|
),
|
|
2973
|
-
/* @__PURE__ */ jsxRuntime.
|
|
2974
|
-
|
|
2975
|
-
{
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
onValueChange: setRole,
|
|
2979
|
-
placeholder: labels.rolePlaceholder
|
|
2980
|
-
}
|
|
2981
|
-
)
|
|
2982
|
-
] }),
|
|
2983
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2984
|
-
chunkFNA66TT4_js.FormTextarea,
|
|
2985
|
-
{
|
|
2986
|
-
label: labels.descriptionLabel ?? labels.description,
|
|
2987
|
-
value: description,
|
|
2988
|
-
onValueChange: setDescription,
|
|
2989
|
-
rows: 2,
|
|
2990
|
-
placeholder: labels.descriptionPlaceholder ?? "A short summary of what this agent does."
|
|
2991
|
-
}
|
|
2992
|
-
)
|
|
2993
|
-
] })
|
|
2994
|
-
}
|
|
2995
|
-
),
|
|
2996
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2997
|
-
chunkFNA66TT4_js.SectionCard,
|
|
2998
|
-
{
|
|
2999
|
-
variant: "glass",
|
|
3000
|
-
header: {
|
|
3001
|
-
title: labels.modelSection ?? "Model and connection",
|
|
3002
|
-
subtitle: labels.connectionPickPrompt ?? "Pick the provider connection or use an inline model"
|
|
3108
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "min-w-0 flex-1", children: [
|
|
3109
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "block truncate text-sm font-semibold text-slate-900 dark:text-white", children: preset.id === "custom" ? labels.presetCustom : preset.name }),
|
|
3110
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "block truncate text-xs text-slate-500 dark:text-slate-400", children: preset.role || labels.presetCustomHint })
|
|
3111
|
+
] })
|
|
3112
|
+
]
|
|
3003
3113
|
},
|
|
3004
|
-
|
|
3005
|
-
|
|
3006
|
-
|
|
3007
|
-
|
|
3008
|
-
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
|
|
3028
|
-
|
|
3029
|
-
|
|
3030
|
-
|
|
3031
|
-
|
|
3032
|
-
|
|
3033
|
-
|
|
3114
|
+
preset.id
|
|
3115
|
+
);
|
|
3116
|
+
}) })
|
|
3117
|
+
}
|
|
3118
|
+
);
|
|
3119
|
+
}
|
|
3120
|
+
function renderStep2() {
|
|
3121
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3122
|
+
chunkMT66VKLS_js.SectionCard,
|
|
3123
|
+
{
|
|
3124
|
+
variant: "glass",
|
|
3125
|
+
header: {
|
|
3126
|
+
title: labels.identitySection,
|
|
3127
|
+
subtitle: labels.identitySubtitle
|
|
3128
|
+
},
|
|
3129
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
3130
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
3131
|
+
/* @__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 }),
|
|
3132
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-1.5", children: EMOJI_PALETTE.map((e) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3133
|
+
"button",
|
|
3134
|
+
{
|
|
3135
|
+
type: "button",
|
|
3136
|
+
onClick: () => {
|
|
3137
|
+
setEmoji(e);
|
|
3138
|
+
markTouched();
|
|
3139
|
+
},
|
|
3140
|
+
"aria-pressed": emoji === e,
|
|
3141
|
+
className: [
|
|
3142
|
+
"flex h-9 w-9 items-center justify-center rounded-lg text-base transition-all",
|
|
3143
|
+
emoji === e ? `bg-gradient-to-br ${activePreset.accent} shadow-sm ring-2 ring-indigo-500/70 ring-offset-1 ring-offset-transparent` : "liquid-surface hover:border-indigo-400/40 focus-visible:ring-2 focus-visible:ring-indigo-500/70 focus-visible:ring-offset-1"
|
|
3144
|
+
].join(" "),
|
|
3145
|
+
children: e
|
|
3146
|
+
},
|
|
3147
|
+
e
|
|
3148
|
+
)) })
|
|
3149
|
+
] }),
|
|
3150
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkMT66VKLS_js.FormGrid, { children: [
|
|
3151
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3152
|
+
chunkMT66VKLS_js.FormInput,
|
|
3153
|
+
{
|
|
3154
|
+
label: labels.name,
|
|
3155
|
+
value: name,
|
|
3156
|
+
onValueChange: (v) => {
|
|
3157
|
+
setName(v);
|
|
3158
|
+
markTouched();
|
|
3159
|
+
},
|
|
3160
|
+
required: true,
|
|
3161
|
+
placeholder: labels.namePlaceholder
|
|
3162
|
+
}
|
|
3163
|
+
),
|
|
3164
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3165
|
+
chunkMT66VKLS_js.FormInput,
|
|
3166
|
+
{
|
|
3167
|
+
label: labels.role,
|
|
3168
|
+
value: role,
|
|
3169
|
+
onValueChange: (v) => {
|
|
3170
|
+
setRole(v);
|
|
3171
|
+
markTouched();
|
|
3172
|
+
},
|
|
3173
|
+
placeholder: labels.rolePlaceholder
|
|
3174
|
+
}
|
|
3175
|
+
)
|
|
3176
|
+
] }),
|
|
3177
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3178
|
+
chunkMT66VKLS_js.FormTextarea,
|
|
3179
|
+
{
|
|
3180
|
+
label: labels.descriptionLabel,
|
|
3181
|
+
value: description,
|
|
3182
|
+
onValueChange: (v) => {
|
|
3183
|
+
setDescription(v);
|
|
3184
|
+
markTouched();
|
|
3185
|
+
},
|
|
3186
|
+
rows: 3,
|
|
3187
|
+
placeholder: labels.descriptionPlaceholder
|
|
3188
|
+
}
|
|
3189
|
+
)
|
|
3190
|
+
] })
|
|
3191
|
+
}
|
|
3192
|
+
);
|
|
3193
|
+
}
|
|
3194
|
+
function renderStep3() {
|
|
3195
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3196
|
+
chunkMT66VKLS_js.SectionCard,
|
|
3197
|
+
{
|
|
3198
|
+
variant: "glass",
|
|
3199
|
+
header: {
|
|
3200
|
+
title: labels.modelSection,
|
|
3201
|
+
subtitle: labels.connectionPickPrompt
|
|
3202
|
+
},
|
|
3203
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
3204
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkMT66VKLS_js.FormGrid, { children: [
|
|
3205
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3206
|
+
chunkMT66VKLS_js.FormSelect,
|
|
3207
|
+
{
|
|
3208
|
+
label: labels.connectionLabel,
|
|
3209
|
+
value: connectionId,
|
|
3210
|
+
onValueChange: (v) => {
|
|
3211
|
+
setConnectionId(v);
|
|
3212
|
+
markTouched();
|
|
3213
|
+
},
|
|
3214
|
+
options: connectionOptions,
|
|
3215
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(outline.LinkIcon, { className: "h-4 w-4" })
|
|
3216
|
+
}
|
|
3217
|
+
),
|
|
3218
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3219
|
+
chunkMT66VKLS_js.FormSelect,
|
|
3220
|
+
{
|
|
3221
|
+
label: labels.frameworkLabel,
|
|
3222
|
+
value: framework,
|
|
3223
|
+
onValueChange: (v) => {
|
|
3224
|
+
setFramework(v);
|
|
3225
|
+
markTouched();
|
|
3226
|
+
},
|
|
3227
|
+
options: frameworkOptions
|
|
3228
|
+
}
|
|
3229
|
+
),
|
|
3230
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3231
|
+
chunkMT66VKLS_js.FormSelect,
|
|
3232
|
+
{
|
|
3233
|
+
label: labels.model,
|
|
3234
|
+
value: modelId,
|
|
3235
|
+
onValueChange: (v) => {
|
|
3236
|
+
setModelId(v);
|
|
3237
|
+
markTouched();
|
|
3238
|
+
},
|
|
3239
|
+
options: modelOptions.length > 0 ? modelOptions : [{ value: "", label: labels.modelEmpty }]
|
|
3240
|
+
}
|
|
3241
|
+
)
|
|
3242
|
+
] }),
|
|
3243
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3244
|
+
chunkMT66VKLS_js.FormTextarea,
|
|
3245
|
+
{
|
|
3246
|
+
label: labels.outputSchemaLabel,
|
|
3247
|
+
value: outputSchema,
|
|
3248
|
+
onValueChange: (v) => {
|
|
3249
|
+
setOutputSchema(v);
|
|
3250
|
+
markTouched();
|
|
3251
|
+
},
|
|
3252
|
+
rows: 5,
|
|
3253
|
+
placeholder: labels.outputSchemaPlaceholder
|
|
3254
|
+
}
|
|
3255
|
+
)
|
|
3256
|
+
] })
|
|
3257
|
+
}
|
|
3258
|
+
);
|
|
3259
|
+
}
|
|
3260
|
+
function renderStep4() {
|
|
3261
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
3262
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3263
|
+
chunkMT66VKLS_js.SectionCard,
|
|
3264
|
+
{
|
|
3265
|
+
variant: "glass",
|
|
3266
|
+
header: {
|
|
3267
|
+
title: labels.behaviorSection,
|
|
3268
|
+
subtitle: labels.behaviorSubtitle
|
|
3269
|
+
},
|
|
3270
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
3271
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
3272
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-1 flex items-center justify-between", children: [
|
|
3273
|
+
/* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: "wizard-system-prompt", className: "text-xs font-medium text-gray-500 dark:text-gray-400", children: labels.promptSystemPrompt }),
|
|
3274
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-[10px] text-gray-400 dark:text-gray-500", children: [
|
|
3275
|
+
systemPrompt.length,
|
|
3276
|
+
" chars"
|
|
3277
|
+
] })
|
|
3034
3278
|
] }),
|
|
3035
3279
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3036
|
-
|
|
3280
|
+
"textarea",
|
|
3037
3281
|
{
|
|
3038
|
-
|
|
3039
|
-
value:
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
|
|
3282
|
+
id: "wizard-system-prompt",
|
|
3283
|
+
value: systemPrompt,
|
|
3284
|
+
onChange: (e) => {
|
|
3285
|
+
setSystemPrompt(e.target.value);
|
|
3286
|
+
markTouched();
|
|
3287
|
+
},
|
|
3288
|
+
rows: 8,
|
|
3289
|
+
className: "w-full resize-y rounded-lg border border-gray-200/50 bg-gray-50/50 px-3 py-2.5 font-mono text-xs leading-relaxed text-gray-700 outline-none transition-colors placeholder:text-gray-400 focus:border-indigo-300/50 focus:ring-1 focus:ring-indigo-300/30 motion-reduce:transition-none dark:border-white/10 dark:bg-white/5 dark:text-gray-300 dark:placeholder:text-gray-500 dark:focus:border-indigo-500/30 dark:focus:ring-indigo-500/20",
|
|
3290
|
+
placeholder: labels.promptPlaceholder
|
|
3043
3291
|
}
|
|
3044
3292
|
)
|
|
3045
|
-
] })
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
|
|
3052
|
-
|
|
3053
|
-
|
|
3054
|
-
subtitle: labels.behaviorSubtitle ?? "System prompt shapes how the agent thinks"
|
|
3055
|
-
},
|
|
3056
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
3293
|
+
] }),
|
|
3294
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
3295
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-1 flex items-center justify-between", children: [
|
|
3296
|
+
/* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: "wizard-user-prompt", className: "text-xs font-medium text-gray-500 dark:text-gray-400", children: labels.userPromptLabel }),
|
|
3297
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-[10px] text-gray-400 dark:text-gray-500", children: [
|
|
3298
|
+
userPrompt.length,
|
|
3299
|
+
" chars"
|
|
3300
|
+
] })
|
|
3301
|
+
] }),
|
|
3057
3302
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3058
|
-
|
|
3303
|
+
"textarea",
|
|
3059
3304
|
{
|
|
3060
|
-
|
|
3061
|
-
value:
|
|
3062
|
-
|
|
3305
|
+
id: "wizard-user-prompt",
|
|
3306
|
+
value: userPrompt,
|
|
3307
|
+
onChange: (e) => {
|
|
3308
|
+
setUserPrompt(e.target.value);
|
|
3309
|
+
markTouched();
|
|
3310
|
+
},
|
|
3063
3311
|
rows: 5,
|
|
3064
|
-
|
|
3312
|
+
className: "w-full resize-y rounded-lg border border-gray-200/50 bg-gray-50/50 px-3 py-2.5 font-mono text-xs leading-relaxed text-gray-700 outline-none transition-colors placeholder:text-gray-400 focus:border-indigo-300/50 focus:ring-1 focus:ring-indigo-300/30 motion-reduce:transition-none dark:border-white/10 dark:bg-white/5 dark:text-gray-300 dark:placeholder:text-gray-500 dark:focus:border-indigo-500/30 dark:focus:ring-indigo-500/20",
|
|
3313
|
+
placeholder: labels.userPromptPlaceholder
|
|
3065
3314
|
}
|
|
3066
|
-
)
|
|
3315
|
+
)
|
|
3316
|
+
] }),
|
|
3317
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3318
|
+
RangeSliderField,
|
|
3319
|
+
{
|
|
3320
|
+
sliderId: "wizard-temperature",
|
|
3321
|
+
label: labels.temperature,
|
|
3322
|
+
value: temperature,
|
|
3323
|
+
onChange: (v) => {
|
|
3324
|
+
setTemperature(v);
|
|
3325
|
+
markTouched();
|
|
3326
|
+
},
|
|
3327
|
+
min: 0,
|
|
3328
|
+
max: 1,
|
|
3329
|
+
step: 0.05,
|
|
3330
|
+
trackGradient: "linear-gradient(90deg, #3b82f6, #8b5cf6 50%, #ec4899)",
|
|
3331
|
+
formatValue: (v) => v.toFixed(2),
|
|
3332
|
+
zones: [
|
|
3333
|
+
{ label: "Precise", max: 0.3, color: "text-blue-500", thumbColor: "#3b82f6" },
|
|
3334
|
+
{ label: "Balanced", max: 0.7, color: "text-purple-500", thumbColor: "#8b5cf6" },
|
|
3335
|
+
{ label: "Creative", max: 1, color: "text-pink-500", thumbColor: "#ec4899" }
|
|
3336
|
+
]
|
|
3337
|
+
}
|
|
3338
|
+
),
|
|
3339
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3340
|
+
RangeSliderField,
|
|
3341
|
+
{
|
|
3342
|
+
sliderId: "wizard-top-p",
|
|
3343
|
+
label: labels.topPLabel,
|
|
3344
|
+
value: topP,
|
|
3345
|
+
onChange: (v) => {
|
|
3346
|
+
setTopP(v);
|
|
3347
|
+
markTouched();
|
|
3348
|
+
},
|
|
3349
|
+
min: 0,
|
|
3350
|
+
max: 1,
|
|
3351
|
+
step: 0.05,
|
|
3352
|
+
trackGradient: "linear-gradient(90deg, #6366f1, #8b5cf6)",
|
|
3353
|
+
formatValue: (v) => v.toFixed(2),
|
|
3354
|
+
zones: [
|
|
3355
|
+
{ label: "Top-P", max: 1, color: "text-violet-500", thumbColor: "#8b5cf6" }
|
|
3356
|
+
]
|
|
3357
|
+
}
|
|
3358
|
+
),
|
|
3359
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3360
|
+
RangeSliderField,
|
|
3361
|
+
{
|
|
3362
|
+
sliderId: "wizard-top-k",
|
|
3363
|
+
label: labels.topKLabel,
|
|
3364
|
+
value: topK,
|
|
3365
|
+
onChange: (v) => {
|
|
3366
|
+
setTopK(Math.max(0, Math.floor(v)));
|
|
3367
|
+
markTouched();
|
|
3368
|
+
},
|
|
3369
|
+
min: 0,
|
|
3370
|
+
max: 500,
|
|
3371
|
+
step: 1,
|
|
3372
|
+
trackGradient: "linear-gradient(90deg, #10b981, #14b8a6)",
|
|
3373
|
+
formatValue: (v) => v.toString(),
|
|
3374
|
+
zones: [
|
|
3375
|
+
{ label: "Top-K", max: 500, color: "text-emerald-500", thumbColor: "#10b981" }
|
|
3376
|
+
]
|
|
3377
|
+
}
|
|
3378
|
+
),
|
|
3379
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
3380
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-2 flex items-center justify-between", children: [
|
|
3381
|
+
/* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: "wizard-max-tokens", className: "text-xs font-medium text-gray-500 dark:text-gray-400", children: labels.maxTokens }),
|
|
3382
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-bold tabular-nums text-gray-900 dark:text-white", children: maxTokens.toLocaleString() })
|
|
3383
|
+
] }),
|
|
3067
3384
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3068
|
-
|
|
3385
|
+
"input",
|
|
3069
3386
|
{
|
|
3070
|
-
|
|
3071
|
-
|
|
3072
|
-
|
|
3073
|
-
|
|
3074
|
-
|
|
3387
|
+
id: "wizard-max-tokens",
|
|
3388
|
+
type: "number",
|
|
3389
|
+
value: maxTokens,
|
|
3390
|
+
onChange: (e) => {
|
|
3391
|
+
setMaxTokens(Math.max(1, Math.floor(Number(e.target.value) || 0)));
|
|
3392
|
+
markTouched();
|
|
3393
|
+
},
|
|
3394
|
+
min: 1,
|
|
3395
|
+
max: 32e3,
|
|
3396
|
+
step: 1,
|
|
3397
|
+
className: "w-full rounded-lg border border-gray-200/50 bg-gray-50/50 px-3 py-2.5 text-sm tabular-nums text-gray-700 outline-none transition-colors focus:border-indigo-300/50 focus:ring-1 focus:ring-indigo-300/30 motion-reduce:transition-none dark:border-white/10 dark:bg-white/5 dark:text-gray-300 dark:focus:border-indigo-500/30 dark:focus:ring-indigo-500/20"
|
|
3075
3398
|
}
|
|
3076
|
-
)
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
type: "number",
|
|
3095
|
-
value: String(maxTokens),
|
|
3096
|
-
onValueChange: (v) => setMaxTokens(Number(v) || 0),
|
|
3097
|
-
min: 1,
|
|
3098
|
-
max: 32e3
|
|
3099
|
-
}
|
|
3100
|
-
),
|
|
3101
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3102
|
-
chunkFNA66TT4_js.FormInput,
|
|
3103
|
-
{
|
|
3104
|
-
label: `${labels.topPLabel ?? "Top-P"} (${topP.toFixed(2)})`,
|
|
3105
|
-
type: "number",
|
|
3106
|
-
value: String(topP),
|
|
3107
|
-
onValueChange: (v) => setTopP(Number(v) || 0),
|
|
3108
|
-
step: 0.05,
|
|
3109
|
-
min: 0,
|
|
3110
|
-
max: 1
|
|
3111
|
-
}
|
|
3112
|
-
),
|
|
3113
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3114
|
-
chunkFNA66TT4_js.FormInput,
|
|
3115
|
-
{
|
|
3116
|
-
label: labels.topKLabel ?? "Top-K",
|
|
3117
|
-
type: "number",
|
|
3118
|
-
value: String(topK),
|
|
3119
|
-
onValueChange: (v) => setTopK(Math.max(0, Math.floor(Number(v) || 0))),
|
|
3120
|
-
step: 1,
|
|
3121
|
-
min: 0,
|
|
3122
|
-
max: 500
|
|
3123
|
-
}
|
|
3124
|
-
)
|
|
3399
|
+
)
|
|
3400
|
+
] }),
|
|
3401
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "overflow-hidden rounded-lg border border-gray-200/30 dark:border-white/10", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-3 gap-px bg-gray-200/30 dark:bg-white/10", children: [
|
|
3402
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-white/60 px-3 py-2 dark:bg-gray-900/60", children: [
|
|
3403
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[9px] uppercase tracking-wider text-gray-400 dark:text-gray-500", children: labels.model }),
|
|
3404
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "truncate text-xs font-semibold text-gray-900 dark:text-white", children: matchingModels.find((m) => m.id === modelId)?.name ?? labels.modelEmpty })
|
|
3405
|
+
] }),
|
|
3406
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-white/60 px-3 py-2 dark:bg-gray-900/60", children: [
|
|
3407
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[9px] uppercase tracking-wider text-gray-400 dark:text-gray-500", children: labels.maxTokens }),
|
|
3408
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-semibold text-gray-900 dark:text-white", children: maxTokens.toLocaleString() })
|
|
3409
|
+
] }),
|
|
3410
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-white/60 px-3 py-2 dark:bg-gray-900/60", children: [
|
|
3411
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[9px] uppercase tracking-wider text-gray-400 dark:text-gray-500", children: labels.temperature }),
|
|
3412
|
+
/* @__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: [
|
|
3413
|
+
temperature.toFixed(2),
|
|
3414
|
+
" \xB7 ",
|
|
3415
|
+
temperature <= 0.3 ? "Precise" : temperature <= 0.7 ? "Balanced" : "Creative"
|
|
3416
|
+
] })
|
|
3125
3417
|
] })
|
|
3418
|
+
] }) })
|
|
3419
|
+
] })
|
|
3420
|
+
}
|
|
3421
|
+
),
|
|
3422
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3423
|
+
chunkMT66VKLS_js.SectionCard,
|
|
3424
|
+
{
|
|
3425
|
+
variant: "glass",
|
|
3426
|
+
header: {
|
|
3427
|
+
title: labels.metadataSection,
|
|
3428
|
+
subtitle: labels.metadataSubtitle
|
|
3429
|
+
},
|
|
3430
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
3431
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
3432
|
+
/* @__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 }),
|
|
3433
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-2 gap-2 sm:grid-cols-4", children: DIFFICULTY_OPTIONS.map((opt) => {
|
|
3434
|
+
const selected = difficulty === opt.id;
|
|
3435
|
+
const label = opt.id === "beginner" ? labels.difficultyBeginner : opt.id === "intermediate" ? labels.difficultyIntermediate : opt.id === "advanced" ? labels.difficultyAdvanced : labels.difficultyExpert;
|
|
3436
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3437
|
+
"button",
|
|
3438
|
+
{
|
|
3439
|
+
type: "button",
|
|
3440
|
+
onClick: () => {
|
|
3441
|
+
setDifficulty(opt.id);
|
|
3442
|
+
markTouched();
|
|
3443
|
+
},
|
|
3444
|
+
"aria-pressed": selected,
|
|
3445
|
+
className: [
|
|
3446
|
+
"liquid-surface flex items-center gap-2 rounded-xl px-3 py-2 text-left transition-all",
|
|
3447
|
+
selected ? "ring-2 ring-indigo-500/70 ring-offset-1 ring-offset-transparent" : "hover:border-indigo-400/40 focus-visible:ring-2 focus-visible:ring-indigo-500/70 focus-visible:ring-offset-1"
|
|
3448
|
+
].join(" "),
|
|
3449
|
+
children: [
|
|
3450
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3451
|
+
"span",
|
|
3452
|
+
{
|
|
3453
|
+
"aria-hidden": "true",
|
|
3454
|
+
className: `flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-gradient-to-br ${opt.accent} text-base shadow-sm`,
|
|
3455
|
+
children: opt.emoji
|
|
3456
|
+
}
|
|
3457
|
+
),
|
|
3458
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-semibold text-slate-900 dark:text-white", children: label })
|
|
3459
|
+
]
|
|
3460
|
+
},
|
|
3461
|
+
opt.id
|
|
3462
|
+
);
|
|
3463
|
+
}) })
|
|
3464
|
+
] }),
|
|
3465
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3466
|
+
chunkMT66VKLS_js.FormInput,
|
|
3467
|
+
{
|
|
3468
|
+
label: labels.tagsLabel,
|
|
3469
|
+
value: tagsInput,
|
|
3470
|
+
onValueChange: (v) => {
|
|
3471
|
+
setTagsInput(v);
|
|
3472
|
+
markTouched();
|
|
3473
|
+
},
|
|
3474
|
+
placeholder: labels.tagsPlaceholder
|
|
3475
|
+
}
|
|
3476
|
+
)
|
|
3477
|
+
] })
|
|
3478
|
+
}
|
|
3479
|
+
)
|
|
3480
|
+
] });
|
|
3481
|
+
}
|
|
3482
|
+
function renderStep5() {
|
|
3483
|
+
const modelLabel = models.find((m) => m.id === modelId)?.name ?? labels.modelEmpty;
|
|
3484
|
+
const connectionLabel = connectionId ? connections.find((c) => c.id === connectionId)?.name ?? labels.connectionInline : labels.connectionInline;
|
|
3485
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
3486
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3487
|
+
chunkMT66VKLS_js.SectionCard,
|
|
3488
|
+
{
|
|
3489
|
+
variant: "glass",
|
|
3490
|
+
header: {
|
|
3491
|
+
title: labels.wizardStep1Title,
|
|
3492
|
+
subtitle: labels.wizardStep1Subtitle
|
|
3493
|
+
},
|
|
3494
|
+
actions: /* @__PURE__ */ jsxRuntime.jsxs(chunkBHOT22QL_js.Button, { type: "button", size: "sm", outline: true, onClick: () => goToStep(1), children: [
|
|
3495
|
+
/* @__PURE__ */ jsxRuntime.jsx(outline.PencilSquareIcon, { className: "h-4 w-4" }),
|
|
3496
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-1.5", children: labels.wizardReviewEdit })
|
|
3497
|
+
] }),
|
|
3498
|
+
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 })
|
|
3499
|
+
}
|
|
3500
|
+
),
|
|
3501
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3502
|
+
chunkMT66VKLS_js.SectionCard,
|
|
3503
|
+
{
|
|
3504
|
+
variant: "glass",
|
|
3505
|
+
header: {
|
|
3506
|
+
title: labels.wizardStep2Title,
|
|
3507
|
+
subtitle: labels.wizardStep2Subtitle
|
|
3508
|
+
},
|
|
3509
|
+
actions: /* @__PURE__ */ jsxRuntime.jsxs(chunkBHOT22QL_js.Button, { type: "button", size: "sm", outline: true, onClick: () => goToStep(2), children: [
|
|
3510
|
+
/* @__PURE__ */ jsxRuntime.jsx(outline.PencilSquareIcon, { className: "h-4 w-4" }),
|
|
3511
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-1.5", children: labels.wizardReviewEdit })
|
|
3512
|
+
] }),
|
|
3513
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-3", children: [
|
|
3514
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3515
|
+
"span",
|
|
3516
|
+
{
|
|
3517
|
+
"aria-hidden": "true",
|
|
3518
|
+
className: `flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-gradient-to-br ${activePreset.accent} text-lg shadow-sm`,
|
|
3519
|
+
children: emoji
|
|
3520
|
+
}
|
|
3521
|
+
),
|
|
3522
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0", children: [
|
|
3523
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "truncate text-sm font-semibold text-slate-900 dark:text-white", children: name || labels.namePlaceholder }),
|
|
3524
|
+
role && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "truncate text-xs text-slate-500 dark:text-slate-400", children: role }),
|
|
3525
|
+
description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-xs text-slate-600 dark:text-slate-300", children: description })
|
|
3126
3526
|
] })
|
|
3127
|
-
}
|
|
3128
|
-
|
|
3527
|
+
] })
|
|
3528
|
+
}
|
|
3529
|
+
),
|
|
3530
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3531
|
+
chunkMT66VKLS_js.SectionCard,
|
|
3532
|
+
{
|
|
3533
|
+
variant: "glass",
|
|
3534
|
+
header: {
|
|
3535
|
+
title: labels.wizardStep3Title,
|
|
3536
|
+
subtitle: labels.wizardStep3Subtitle
|
|
3537
|
+
},
|
|
3538
|
+
actions: /* @__PURE__ */ jsxRuntime.jsxs(chunkBHOT22QL_js.Button, { type: "button", size: "sm", outline: true, onClick: () => goToStep(3), children: [
|
|
3539
|
+
/* @__PURE__ */ jsxRuntime.jsx(outline.PencilSquareIcon, { className: "h-4 w-4" }),
|
|
3540
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-1.5", children: labels.wizardReviewEdit })
|
|
3541
|
+
] }),
|
|
3542
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("dl", { className: "grid grid-cols-1 gap-2 sm:grid-cols-2", children: [
|
|
3543
|
+
/* @__PURE__ */ jsxRuntime.jsx(ReviewRow, { label: labels.connectionLabel, value: connectionLabel }),
|
|
3544
|
+
/* @__PURE__ */ jsxRuntime.jsx(ReviewRow, { label: labels.frameworkLabel, value: framework || "\u2014" }),
|
|
3545
|
+
/* @__PURE__ */ jsxRuntime.jsx(ReviewRow, { label: labels.model, value: modelLabel }),
|
|
3546
|
+
outputSchema.trim() && /* @__PURE__ */ jsxRuntime.jsx(ReviewRow, { label: labels.outputSchemaLabel, value: outputSchema.trim().slice(0, 60) + (outputSchema.length > 60 ? "\u2026" : "") })
|
|
3547
|
+
] })
|
|
3548
|
+
}
|
|
3549
|
+
),
|
|
3550
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
3551
|
+
chunkMT66VKLS_js.SectionCard,
|
|
3552
|
+
{
|
|
3553
|
+
variant: "glass",
|
|
3554
|
+
header: {
|
|
3555
|
+
title: labels.wizardStep4Title,
|
|
3556
|
+
subtitle: labels.wizardStep4Subtitle
|
|
3557
|
+
},
|
|
3558
|
+
actions: /* @__PURE__ */ jsxRuntime.jsxs(chunkBHOT22QL_js.Button, { type: "button", size: "sm", outline: true, onClick: () => goToStep(4), children: [
|
|
3559
|
+
/* @__PURE__ */ jsxRuntime.jsx(outline.PencilSquareIcon, { className: "h-4 w-4" }),
|
|
3560
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-1.5", children: labels.wizardReviewEdit })
|
|
3561
|
+
] }),
|
|
3562
|
+
children: [
|
|
3563
|
+
/* @__PURE__ */ jsxRuntime.jsxs("dl", { className: "grid grid-cols-2 gap-2 sm:grid-cols-4", children: [
|
|
3564
|
+
/* @__PURE__ */ jsxRuntime.jsx(ReviewRow, { label: labels.temperature, value: temperature.toFixed(2) }),
|
|
3565
|
+
/* @__PURE__ */ jsxRuntime.jsx(ReviewRow, { label: labels.topPLabel, value: topP.toFixed(2) }),
|
|
3566
|
+
/* @__PURE__ */ jsxRuntime.jsx(ReviewRow, { label: labels.topKLabel, value: String(topK) }),
|
|
3567
|
+
/* @__PURE__ */ jsxRuntime.jsx(ReviewRow, { label: labels.maxTokens, value: maxTokens.toLocaleString() })
|
|
3568
|
+
] }),
|
|
3569
|
+
systemPrompt && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-3", children: [
|
|
3570
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[10px] uppercase tracking-wider text-gray-400 dark:text-gray-500", children: labels.promptSystemPrompt }),
|
|
3571
|
+
/* @__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 })
|
|
3572
|
+
] })
|
|
3573
|
+
]
|
|
3574
|
+
}
|
|
3575
|
+
)
|
|
3576
|
+
] });
|
|
3577
|
+
}
|
|
3578
|
+
const stepBody = step === 1 ? renderStep1() : step === 2 ? renderStep2() : step === 3 ? renderStep3() : step === 4 ? renderStep4() : renderStep5();
|
|
3579
|
+
const advanceDisabled = !canAdvance(step);
|
|
3580
|
+
const footer = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center justify-between gap-2 border-t border-slate-200/60 pt-4 dark:border-white/10", children: [
|
|
3581
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ jsxRuntime.jsx(chunkBHOT22QL_js.Button, { type: "button", outline: true, onClick: goBack, disabled: step === 1 || submitting, children: labels.wizardBack }) }),
|
|
3582
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
3583
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkBHOT22QL_js.Button, { type: "button", outline: true, onClick: cancelWithConfirm, disabled: submitting, children: labels.wizardCancel }),
|
|
3584
|
+
step < TOTAL_STEPS ? /* @__PURE__ */ jsxRuntime.jsx(chunkBHOT22QL_js.Button, { type: "button", color: "indigo", onClick: goNext, disabled: advanceDisabled || submitting, children: labels.wizardNext }) : /* @__PURE__ */ jsxRuntime.jsx(chunkBHOT22QL_js.Button, { type: "button", color: "indigo", onClick: () => void submit(), disabled: submitting, children: submitting ? labels.wizardCreate + "\u2026" : labels.wizardCreate })
|
|
3585
|
+
] })
|
|
3586
|
+
] });
|
|
3587
|
+
const content = /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3588
|
+
"form",
|
|
3589
|
+
{
|
|
3590
|
+
onSubmit: (e) => {
|
|
3591
|
+
e.preventDefault();
|
|
3592
|
+
if (step < TOTAL_STEPS) goNext();
|
|
3593
|
+
else void submit();
|
|
3594
|
+
},
|
|
3595
|
+
className: "space-y-5",
|
|
3596
|
+
children: [
|
|
3129
3597
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3130
|
-
|
|
3598
|
+
chunkMT66VKLS_js.StepTimeline,
|
|
3131
3599
|
{
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
}
|
|
3137
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
3138
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
3139
|
-
/* @__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 ?? "Difficulty" }),
|
|
3140
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-2 gap-2 sm:grid-cols-4", children: DIFFICULTY_OPTIONS.map((opt) => {
|
|
3141
|
-
const selected = difficulty === opt.id;
|
|
3142
|
-
const label = opt.id === "beginner" ? labels.difficultyBeginner ?? "Beginner" : opt.id === "intermediate" ? labels.difficultyIntermediate ?? "Intermediate" : opt.id === "advanced" ? labels.difficultyAdvanced ?? "Advanced" : labels.difficultyExpert ?? "Expert";
|
|
3143
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3144
|
-
"button",
|
|
3145
|
-
{
|
|
3146
|
-
type: "button",
|
|
3147
|
-
onClick: () => setDifficulty(opt.id),
|
|
3148
|
-
"aria-pressed": selected,
|
|
3149
|
-
className: [
|
|
3150
|
-
"liquid-surface flex items-center gap-2 rounded-xl px-3 py-2 text-left transition-all",
|
|
3151
|
-
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"
|
|
3152
|
-
].join(" "),
|
|
3153
|
-
children: [
|
|
3154
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3155
|
-
"span",
|
|
3156
|
-
{
|
|
3157
|
-
"aria-hidden": "true",
|
|
3158
|
-
className: `flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-gradient-to-br ${opt.accent} text-base shadow-sm`,
|
|
3159
|
-
children: opt.emoji
|
|
3160
|
-
}
|
|
3161
|
-
),
|
|
3162
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-semibold text-slate-900 dark:text-white", children: label })
|
|
3163
|
-
]
|
|
3164
|
-
},
|
|
3165
|
-
opt.id
|
|
3166
|
-
);
|
|
3167
|
-
}) })
|
|
3168
|
-
] }),
|
|
3169
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3170
|
-
chunkFNA66TT4_js.FormInput,
|
|
3171
|
-
{
|
|
3172
|
-
label: labels.tagsLabel ?? "Tags",
|
|
3173
|
-
value: tagsInput,
|
|
3174
|
-
onValueChange: setTagsInput,
|
|
3175
|
-
placeholder: labels.tagsPlaceholder ?? "comma, separated, tags"
|
|
3176
|
-
}
|
|
3177
|
-
)
|
|
3178
|
-
] })
|
|
3600
|
+
steps: timelineSteps,
|
|
3601
|
+
progressLabel: labels.pageTitle,
|
|
3602
|
+
onStepClick: (idx) => {
|
|
3603
|
+
goToStep(idx + 1);
|
|
3604
|
+
}
|
|
3179
3605
|
}
|
|
3180
|
-
)
|
|
3181
|
-
|
|
3606
|
+
),
|
|
3607
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mx-auto max-w-3xl space-y-5", children: [
|
|
3608
|
+
stepBody,
|
|
3609
|
+
footer
|
|
3610
|
+
] })
|
|
3611
|
+
]
|
|
3182
3612
|
}
|
|
3183
3613
|
);
|
|
3614
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
3615
|
+
hero,
|
|
3616
|
+
content
|
|
3617
|
+
] });
|
|
3184
3618
|
}
|
|
3185
|
-
function
|
|
3186
|
-
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
return (parts[0][0] + parts[parts.length - 1][0]).toUpperCase();
|
|
3619
|
+
function ReviewRow({ label, value }) {
|
|
3620
|
+
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: [
|
|
3621
|
+
/* @__PURE__ */ jsxRuntime.jsx("dt", { className: "text-[10px] uppercase tracking-wider text-gray-400 dark:text-gray-500", children: label }),
|
|
3622
|
+
/* @__PURE__ */ jsxRuntime.jsx("dd", { className: "mt-0.5 truncate text-xs font-semibold text-gray-900 dark:text-white", children: value })
|
|
3623
|
+
] });
|
|
3191
3624
|
}
|
|
3192
3625
|
|
|
3193
3626
|
Object.defineProperty(exports, "RolesPageView", {
|
|
3194
3627
|
enumerable: true,
|
|
3195
|
-
get: function () { return
|
|
3628
|
+
get: function () { return chunkIVKFXPLO_js.RolesPageView; }
|
|
3196
3629
|
});
|
|
3197
3630
|
Object.defineProperty(exports, "UsersPageView", {
|
|
3198
3631
|
enumerable: true,
|
|
3199
|
-
get: function () { return
|
|
3632
|
+
get: function () { return chunkIVKFXPLO_js.UsersPageView; }
|
|
3200
3633
|
});
|
|
3201
3634
|
Object.defineProperty(exports, "DIALECT_CATEGORIES", {
|
|
3202
3635
|
enumerable: true,
|
|
3203
|
-
get: function () { return
|
|
3636
|
+
get: function () { return chunkR6GEJBFC_js.DIALECT_CATEGORIES; }
|
|
3204
3637
|
});
|
|
3205
3638
|
Object.defineProperty(exports, "DatasourceFormModal", {
|
|
3206
3639
|
enumerable: true,
|
|
3207
|
-
get: function () { return
|
|
3640
|
+
get: function () { return chunkR6GEJBFC_js.DatasourceFormModal; }
|
|
3208
3641
|
});
|
|
3209
3642
|
Object.defineProperty(exports, "DatasourceModal", {
|
|
3210
3643
|
enumerable: true,
|
|
3211
|
-
get: function () { return
|
|
3644
|
+
get: function () { return chunkR6GEJBFC_js.DatasourceModal; }
|
|
3212
3645
|
});
|
|
3213
3646
|
Object.defineProperty(exports, "findCategory", {
|
|
3214
3647
|
enumerable: true,
|
|
3215
|
-
get: function () { return
|
|
3648
|
+
get: function () { return chunkR6GEJBFC_js.findCategory; }
|
|
3216
3649
|
});
|
|
3217
3650
|
Object.defineProperty(exports, "findDialect", {
|
|
3218
3651
|
enumerable: true,
|
|
3219
|
-
get: function () { return
|
|
3652
|
+
get: function () { return chunkR6GEJBFC_js.findDialect; }
|
|
3220
3653
|
});
|
|
3654
|
+
exports.AgentNewWizardPageView = AgentNewWizardPageView;
|
|
3221
3655
|
exports.AgentsConfigPageView = AgentsConfigPageView;
|
|
3222
3656
|
exports.AgentsIndexPageView = AgentsIndexPageView;
|
|
3223
3657
|
exports.AgentsModelsPageView = AgentsModelsPageView;
|