@datatechsolutions/ui 3.5.1 → 3.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/astrlabe/index.js +107 -107
- package/dist/astrlabe/index.mjs +3 -3
- package/dist/astrlabe/workflow-canvas.js +3 -3
- package/dist/astrlabe/workflow-canvas.mjs +2 -2
- package/dist/{chunk-R3Q5RXXO.mjs → chunk-3Z66NXEB.mjs} +3 -3
- package/dist/{chunk-R3Q5RXXO.mjs.map → chunk-3Z66NXEB.mjs.map} +1 -1
- package/dist/{chunk-CDYNTHUE.mjs → chunk-4JDJRGAB.mjs} +9 -8
- package/dist/chunk-4JDJRGAB.mjs.map +1 -0
- package/dist/{chunk-EUXHJMGC.mjs → chunk-4OFG6POC.mjs} +9 -5
- package/dist/chunk-4OFG6POC.mjs.map +1 -0
- package/dist/{chunk-37ZLBCJF.mjs → chunk-5ZAZ2C7A.mjs} +6 -6
- package/dist/{chunk-37ZLBCJF.mjs.map → chunk-5ZAZ2C7A.mjs.map} +1 -1
- package/dist/{chunk-PYQLY2RH.js → chunk-6ZMTJSQF.js} +161 -161
- package/dist/chunk-6ZMTJSQF.js.map +1 -0
- package/dist/{chunk-PI2C3S6A.mjs → chunk-7LILNZMR.mjs} +3 -3
- package/dist/{chunk-PI2C3S6A.mjs.map → chunk-7LILNZMR.mjs.map} +1 -1
- package/dist/{chunk-EI6FIA45.js → chunk-AMYQSPQC.js} +16 -16
- package/dist/{chunk-EI6FIA45.js.map → chunk-AMYQSPQC.js.map} +1 -1
- package/dist/{chunk-VMIAMBCP.js → chunk-DRORQGN2.js} +39 -39
- package/dist/{chunk-VMIAMBCP.js.map → chunk-DRORQGN2.js.map} +1 -1
- package/dist/{chunk-CP5QXRXA.mjs → chunk-ESLKQJQS.mjs} +4 -4
- package/dist/{chunk-CP5QXRXA.mjs.map → chunk-ESLKQJQS.mjs.map} +1 -1
- package/dist/{chunk-K4M4B6ME.js → chunk-GCYYGSHU.js} +9 -5
- package/dist/chunk-GCYYGSHU.js.map +1 -0
- package/dist/{chunk-2TBNOQ7M.mjs → chunk-HGWVJ3VB.mjs} +21 -21
- package/dist/{chunk-2TBNOQ7M.mjs.map → chunk-HGWVJ3VB.mjs.map} +1 -1
- package/dist/{chunk-7OZ4MVEF.mjs → chunk-IHHGT3LP.mjs} +19 -19
- package/dist/{chunk-7OZ4MVEF.mjs.map → chunk-IHHGT3LP.mjs.map} +1 -1
- package/dist/{chunk-YV2SE5LS.mjs → chunk-JQYDJ75Q.mjs} +3 -3
- package/dist/{chunk-YV2SE5LS.mjs.map → chunk-JQYDJ75Q.mjs.map} +1 -1
- package/dist/{chunk-WKCR4KVQ.mjs → chunk-KDFBN2L2.mjs} +34 -31
- package/dist/chunk-KDFBN2L2.mjs.map +1 -0
- package/dist/{chunk-MT4FJRMD.js → chunk-KEWRLEYV.js} +4 -4
- package/dist/{chunk-MT4FJRMD.js.map → chunk-KEWRLEYV.js.map} +1 -1
- package/dist/{chunk-SFFSXC5E.js → chunk-LVK7VXW7.js} +54 -54
- package/dist/{chunk-SFFSXC5E.js.map → chunk-LVK7VXW7.js.map} +1 -1
- package/dist/{chunk-EGXB3WXT.mjs → chunk-MQNXKBFP.mjs} +8 -8
- package/dist/chunk-MQNXKBFP.mjs.map +1 -0
- package/dist/{chunk-ULEPJXTN.mjs → chunk-MRRFDIUQ.mjs} +3 -3
- package/dist/{chunk-ULEPJXTN.mjs.map → chunk-MRRFDIUQ.mjs.map} +1 -1
- package/dist/{chunk-U6XA2OYE.js → chunk-MUOTTGCX.js} +33 -32
- package/dist/chunk-MUOTTGCX.js.map +1 -0
- package/dist/{chunk-RQBTLFYH.js → chunk-NJZIE4EH.js} +5 -5
- package/dist/{chunk-RQBTLFYH.js.map → chunk-NJZIE4EH.js.map} +1 -1
- package/dist/{chunk-HVDDCBQ2.js → chunk-P5F257N3.js} +33 -33
- package/dist/{chunk-HVDDCBQ2.js.map → chunk-P5F257N3.js.map} +1 -1
- package/dist/{chunk-2UMDWOUY.js → chunk-QRNFTG6A.js} +4 -4
- package/dist/{chunk-2UMDWOUY.js.map → chunk-QRNFTG6A.js.map} +1 -1
- package/dist/{chunk-F5UDX6JA.js → chunk-SQZGQOKU.js} +104 -101
- package/dist/chunk-SQZGQOKU.js.map +1 -0
- package/dist/{chunk-KIBOX3UQ.js → chunk-UGJZ3M4Q.js} +53 -53
- package/dist/{chunk-KIBOX3UQ.js.map → chunk-UGJZ3M4Q.js.map} +1 -1
- package/dist/{chunk-PFHXKWFT.mjs → chunk-UOABOFKO.mjs} +3 -3
- package/dist/{chunk-PFHXKWFT.mjs.map → chunk-UOABOFKO.mjs.map} +1 -1
- package/dist/{chunk-L5O4NWQO.mjs → chunk-VDLAZR7S.mjs} +3 -3
- package/dist/{chunk-L5O4NWQO.mjs.map → chunk-VDLAZR7S.mjs.map} +1 -1
- package/dist/{chunk-CJGNEALB.mjs → chunk-VUAGVZJM.mjs} +4 -4
- package/dist/{chunk-CJGNEALB.mjs.map → chunk-VUAGVZJM.mjs.map} +1 -1
- package/dist/{chunk-QIUVK4BI.js → chunk-W5YCZOXO.js} +77 -77
- package/dist/{chunk-QIUVK4BI.js.map → chunk-W5YCZOXO.js.map} +1 -1
- package/dist/{chunk-OWJIKCR2.js → chunk-WBEZATIB.js} +13 -13
- package/dist/{chunk-OWJIKCR2.js.map → chunk-WBEZATIB.js.map} +1 -1
- package/dist/{chunk-KRPSTXN5.js → chunk-YOJIPZ72.js} +9 -9
- package/dist/{chunk-KRPSTXN5.js.map → chunk-YOJIPZ72.js.map} +1 -1
- package/dist/{chunk-5AVO5DJO.js → chunk-YTE6WCBX.js} +76 -76
- package/dist/{chunk-5AVO5DJO.js.map → chunk-YTE6WCBX.js.map} +1 -1
- package/dist/{chunk-R6O57NTJ.mjs → chunk-ZYVDDSAC.mjs} +6 -6
- package/dist/{chunk-R6O57NTJ.mjs.map → chunk-ZYVDDSAC.mjs.map} +1 -1
- package/dist/index.js +704 -704
- package/dist/index.mjs +1 -1
- package/dist/platform/admin/index.js +10 -10
- package/dist/platform/admin/index.mjs +4 -4
- 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 +27 -27
- package/dist/platform/auth/index.mjs +4 -4
- package/dist/platform/billing/index.js +3 -3
- package/dist/platform/billing/index.mjs +2 -2
- package/dist/platform/impersonation/index.js +3 -3
- package/dist/platform/impersonation/index.mjs +2 -2
- package/dist/platform/index.js +82 -82
- package/dist/platform/index.mjs +18 -18
- package/dist/platform/pages/index.d.mts +1 -0
- package/dist/platform/pages/index.d.ts +1 -0
- package/dist/platform/pages/index.js +477 -448
- package/dist/platform/pages/index.js.map +1 -1
- package/dist/platform/pages/index.mjs +335 -306
- package/dist/platform/pages/index.mjs.map +1 -1
- package/dist/platform/settings/index.js +7 -7
- package/dist/platform/settings/index.mjs +6 -6
- package/dist/platform/workflow-canvas-shell.js +4 -4
- package/dist/platform/workflow-canvas-shell.mjs +3 -3
- package/package.json +1 -1
- package/dist/chunk-CDYNTHUE.mjs.map +0 -1
- package/dist/chunk-EGXB3WXT.mjs.map +0 -1
- package/dist/chunk-EUXHJMGC.mjs.map +0 -1
- package/dist/chunk-F5UDX6JA.js.map +0 -1
- package/dist/chunk-K4M4B6ME.js.map +0 -1
- package/dist/chunk-PYQLY2RH.js.map +0 -1
- package/dist/chunk-U6XA2OYE.js.map +0 -1
- package/dist/chunk-WKCR4KVQ.mjs.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 chunkMUOTTGCX_js = require('../../chunk-MUOTTGCX.js');
|
|
6
|
+
var chunkLVK7VXW7_js = require('../../chunk-LVK7VXW7.js');
|
|
7
|
+
var chunk6ZMTJSQF_js = require('../../chunk-6ZMTJSQF.js');
|
|
8
8
|
require('../../chunk-55H6WZQP.js');
|
|
9
9
|
require('../../chunk-DJDZIRM6.js');
|
|
10
|
-
require('../../chunk-
|
|
11
|
-
var
|
|
10
|
+
require('../../chunk-SQZGQOKU.js');
|
|
11
|
+
var chunkGCYYGSHU_js = require('../../chunk-GCYYGSHU.js');
|
|
12
12
|
require('../../chunk-UZ3CMNUJ.js');
|
|
13
13
|
require('../../chunk-YXN2K77G.js');
|
|
14
14
|
var chunkS7KHTUHA_js = require('../../chunk-S7KHTUHA.js');
|
|
@@ -26,7 +26,7 @@ function AgentsModelsPageView({ labels, models, loading }) {
|
|
|
26
26
|
const filteredModels = searchTerm.trim() ? allModels.filter((model) => model.name.toLowerCase().includes(searchTerm.trim().toLowerCase())) : allModels;
|
|
27
27
|
const isEmpty = allModels.length === 0;
|
|
28
28
|
const hero = /* @__PURE__ */ jsxRuntime.jsx(
|
|
29
|
-
|
|
29
|
+
chunkGCYYGSHU_js.HeroSection,
|
|
30
30
|
{
|
|
31
31
|
icon: /* @__PURE__ */ jsxRuntime.jsx(outline.CubeTransparentIcon, { className: "h-5 w-5" }),
|
|
32
32
|
label: labels.title,
|
|
@@ -35,41 +35,56 @@ function AgentsModelsPageView({ labels, models, loading }) {
|
|
|
35
35
|
gradient: "from-emerald-500 to-teal-700"
|
|
36
36
|
}
|
|
37
37
|
);
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
38
|
+
const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.PageLoadingState, {}) : isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.PageEmptyState, { title: labels.empty, message: labels.subtitle, iconName: "folder-open" }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
39
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
40
|
+
chunkGCYYGSHU_js.SearchBar,
|
|
41
|
+
{
|
|
42
|
+
searchTerm,
|
|
43
|
+
onSearchChange: setSearchTerm,
|
|
44
|
+
placeholder: labels.searchPlaceholder ?? labels.title
|
|
45
|
+
}
|
|
46
|
+
),
|
|
47
|
+
/* @__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(
|
|
48
|
+
chunkGCYYGSHU_js.EntityCard,
|
|
49
|
+
{
|
|
50
|
+
accentGradient: "from-emerald-500 to-teal-700",
|
|
51
|
+
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" }) }),
|
|
52
|
+
title: model.name,
|
|
53
|
+
subtitle: `${labels.provider}: ${model.provider}`,
|
|
54
|
+
status: /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.Badge, { color: model.enabled ? "emerald" : "zinc", children: model.enabled ? labels.enabled : labels.disabled })
|
|
55
|
+
},
|
|
56
|
+
model.id
|
|
57
|
+
)) })
|
|
58
|
+
] });
|
|
59
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.ManagementPageLayout, { hero, content });
|
|
58
60
|
}
|
|
59
61
|
function AgentsConfigPageView({ labels, agents, models, loading, onCreate, onUpdate, onDelete }) {
|
|
60
62
|
const [editing, setEditing] = react.useState(null);
|
|
61
63
|
const [createOpen, setCreateOpen] = react.useState(false);
|
|
64
|
+
const [searchTerm, setSearchTerm] = react.useState("");
|
|
62
65
|
const modelOptions = models.map((model) => ({ value: model.id, label: `${model.name} (${model.provider})` }));
|
|
66
|
+
const allAgents = agents;
|
|
67
|
+
const filteredAgents = searchTerm.trim() ? allAgents.filter((agent) => String(agent.name ?? "").toLowerCase().includes(searchTerm.trim().toLowerCase())) : allAgents;
|
|
68
|
+
const isEmpty = allAgents.length === 0;
|
|
63
69
|
const hero = /* @__PURE__ */ jsxRuntime.jsx(
|
|
64
|
-
|
|
70
|
+
chunkGCYYGSHU_js.HeroSection,
|
|
65
71
|
{
|
|
66
72
|
icon: /* @__PURE__ */ jsxRuntime.jsx(outline.CpuChipIcon, { className: "h-5 w-5" }),
|
|
67
73
|
label: labels.title,
|
|
68
74
|
title: labels.title,
|
|
69
75
|
subtitle: labels.subtitle,
|
|
70
76
|
gradient: "from-violet-500 to-indigo-700",
|
|
71
|
-
toolbar: /* @__PURE__ */ jsxRuntime.jsx(
|
|
72
|
-
|
|
77
|
+
toolbar: !isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
78
|
+
chunkGCYYGSHU_js.SearchBar,
|
|
79
|
+
{
|
|
80
|
+
searchTerm,
|
|
81
|
+
onSearchChange: setSearchTerm,
|
|
82
|
+
placeholder: labels.searchPlaceholder ?? labels.title,
|
|
83
|
+
noBorder: true
|
|
84
|
+
}
|
|
85
|
+
) : void 0,
|
|
86
|
+
actions: /* @__PURE__ */ jsxRuntime.jsx(
|
|
87
|
+
chunkGCYYGSHU_js.CreateActionButton,
|
|
73
88
|
{
|
|
74
89
|
mode: "desktop",
|
|
75
90
|
label: labels.addAgent,
|
|
@@ -80,7 +95,7 @@ function AgentsConfigPageView({ labels, agents, models, loading, onCreate, onUpd
|
|
|
80
95
|
}
|
|
81
96
|
);
|
|
82
97
|
const mobileAction = /* @__PURE__ */ jsxRuntime.jsx(
|
|
83
|
-
|
|
98
|
+
chunkGCYYGSHU_js.CreateActionButton,
|
|
84
99
|
{
|
|
85
100
|
mode: "mobile",
|
|
86
101
|
label: labels.addAgent,
|
|
@@ -88,23 +103,23 @@ function AgentsConfigPageView({ labels, agents, models, loading, onCreate, onUpd
|
|
|
88
103
|
accent: "violet"
|
|
89
104
|
}
|
|
90
105
|
);
|
|
91
|
-
const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
106
|
+
const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.PageLoadingState, {}) : isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_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) => {
|
|
92
107
|
const modelRecord = models.find((model) => model.id === String(agent.modelId ?? ""));
|
|
93
108
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
94
|
-
|
|
109
|
+
chunkGCYYGSHU_js.EntityCard,
|
|
95
110
|
{
|
|
96
111
|
accentGradient: "from-violet-500 to-indigo-700",
|
|
97
112
|
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" }) }),
|
|
98
113
|
title: String(agent.name ?? ""),
|
|
99
114
|
subtitle: String(modelRecord?.name ?? agent.modelId ?? ""),
|
|
100
|
-
status: agent.activePromptVersion > 0 ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
115
|
+
status: agent.activePromptVersion > 0 ? /* @__PURE__ */ jsxRuntime.jsxs(chunkGCYYGSHU_js.Badge, { color: "emerald", children: [
|
|
101
116
|
"v",
|
|
102
117
|
agent.activePromptVersion
|
|
103
118
|
] }) : null,
|
|
104
119
|
footer: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-2", children: [
|
|
105
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
120
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.Button, { type: "button", size: "sm", outline: true, onClick: () => setEditing(agent), children: labels.edit }),
|
|
106
121
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
107
|
-
|
|
122
|
+
chunkGCYYGSHU_js.Button,
|
|
108
123
|
{
|
|
109
124
|
type: "button",
|
|
110
125
|
size: "sm",
|
|
@@ -128,7 +143,7 @@ function AgentsConfigPageView({ labels, agents, models, loading, onCreate, onUpd
|
|
|
128
143
|
);
|
|
129
144
|
}) });
|
|
130
145
|
const renderForm = (initial, onSubmit) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
131
|
-
|
|
146
|
+
chunkGCYYGSHU_js.GlassModal,
|
|
132
147
|
{
|
|
133
148
|
open: true,
|
|
134
149
|
onClose: () => {
|
|
@@ -151,18 +166,18 @@ function AgentsConfigPageView({ labels, agents, models, loading, onCreate, onUpd
|
|
|
151
166
|
outputSchema: String(form.get("outputSchema") ?? "").trim() || void 0
|
|
152
167
|
});
|
|
153
168
|
},
|
|
154
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
155
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
156
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
157
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
158
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
159
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
160
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
169
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(chunkGCYYGSHU_js.FormGrid, { children: [
|
|
170
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.FormInput, { name: "name", label: labels.name, defaultValue: initial.name ?? "", required: true }),
|
|
171
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.FormSelect, { name: "modelId", label: labels.model, options: modelOptions, defaultValue: initial.modelId ?? modelOptions[0]?.value ?? "", required: true }),
|
|
172
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.FormInput, { name: "maxTokens", label: String(labels.maxTokens), type: "number", defaultValue: String(initial.maxTokens ?? 2048) }),
|
|
173
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.FormInput, { name: "temperature", label: labels.temperature, type: "number", step: 0.1, min: 0, max: 2, defaultValue: String(initial.temperature ?? 0.2) }),
|
|
174
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.FormTextarea, { name: "systemPrompt", label: labels.systemPrompt, defaultValue: initial.systemPrompt ?? "", rows: 4 }),
|
|
175
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.FormTextarea, { name: "outputSchema", label: labels.outputSchema, placeholder: labels.outputSchemaPlaceholder, defaultValue: initial.outputSchema ?? "", rows: 4 })
|
|
161
176
|
] })
|
|
162
177
|
}
|
|
163
178
|
);
|
|
164
179
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
165
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
180
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.ManagementPageLayout, { hero, content, mobileAction }),
|
|
166
181
|
createOpen && renderForm({ title: labels.createTitle }, (input) => {
|
|
167
182
|
onCreate(input);
|
|
168
183
|
setCreateOpen(false);
|
|
@@ -211,8 +226,16 @@ function AgentsPromptsPageView({ labels, agents, prompts, loading, onCreate, onA
|
|
|
211
226
|
}
|
|
212
227
|
return map;
|
|
213
228
|
}, [agents]);
|
|
229
|
+
const allPrompts = prompts;
|
|
230
|
+
const filteredPrompts = searchTerm.trim() ? allPrompts.filter((prompt) => {
|
|
231
|
+
const term = searchTerm.trim().toLowerCase();
|
|
232
|
+
const agentName = agentNameById.get(prompt.agentId) ?? prompt.agentId;
|
|
233
|
+
const promptText = prompt.prompt ?? "";
|
|
234
|
+
return agentName.toLowerCase().includes(term) || promptText.toLowerCase().includes(term);
|
|
235
|
+
}) : allPrompts;
|
|
236
|
+
const isEmpty = allPrompts.length === 0;
|
|
214
237
|
const hero = /* @__PURE__ */ jsxRuntime.jsx(
|
|
215
|
-
|
|
238
|
+
chunkGCYYGSHU_js.HeroSection,
|
|
216
239
|
{
|
|
217
240
|
icon: /* @__PURE__ */ jsxRuntime.jsx(outline.ChatBubbleLeftEllipsisIcon, { className: "h-5 w-5" }),
|
|
218
241
|
label: labels.title,
|
|
@@ -220,7 +243,7 @@ function AgentsPromptsPageView({ labels, agents, prompts, loading, onCreate, onA
|
|
|
220
243
|
subtitle: labels.subtitle,
|
|
221
244
|
gradient: "from-sky-500 to-blue-700",
|
|
222
245
|
toolbar: /* @__PURE__ */ jsxRuntime.jsx(
|
|
223
|
-
|
|
246
|
+
chunkGCYYGSHU_js.CreateActionButton,
|
|
224
247
|
{
|
|
225
248
|
mode: "desktop",
|
|
226
249
|
label: labels.addPrompt,
|
|
@@ -231,7 +254,7 @@ function AgentsPromptsPageView({ labels, agents, prompts, loading, onCreate, onA
|
|
|
231
254
|
}
|
|
232
255
|
);
|
|
233
256
|
const mobileAction = /* @__PURE__ */ jsxRuntime.jsx(
|
|
234
|
-
|
|
257
|
+
chunkGCYYGSHU_js.CreateActionButton,
|
|
235
258
|
{
|
|
236
259
|
mode: "mobile",
|
|
237
260
|
label: labels.addPrompt,
|
|
@@ -239,57 +262,51 @@ function AgentsPromptsPageView({ labels, agents, prompts, loading, onCreate, onA
|
|
|
239
262
|
accent: "sky"
|
|
240
263
|
}
|
|
241
264
|
);
|
|
242
|
-
const
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
const agentName = agentNameById.get(prompt.agentId) ?? prompt.agentId;
|
|
246
|
-
const promptText = prompt.prompt ?? "";
|
|
247
|
-
return agentName.toLowerCase().includes(term) || promptText.toLowerCase().includes(term);
|
|
248
|
-
}) : allPrompts;
|
|
249
|
-
const isEmpty = allPrompts.length === 0;
|
|
250
|
-
const summary = !isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
251
|
-
chunkK4M4B6ME_js.SearchBar,
|
|
252
|
-
{
|
|
253
|
-
searchTerm,
|
|
254
|
-
onSearchChange: setSearchTerm,
|
|
255
|
-
placeholder: labels.searchPlaceholder ?? labels.title
|
|
256
|
-
}
|
|
257
|
-
) : void 0;
|
|
258
|
-
const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(chunkK4M4B6ME_js.PageLoadingState, {}) : isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(chunkK4M4B6ME_js.PageEmptyState, { title: labels.empty, message: labels.subtitle, iconName: "folder-open" }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3", children: filteredPrompts.map((prompt) => {
|
|
259
|
-
const agentName = agentNameById.get(prompt.agentId) ?? prompt.agentId;
|
|
260
|
-
const key = `${prompt.agentId}:${prompt.locale}:${prompt.version}`;
|
|
261
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
262
|
-
chunkK4M4B6ME_js.EntityCard,
|
|
265
|
+
const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.PageLoadingState, {}) : isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.PageEmptyState, { title: labels.empty, message: labels.subtitle, iconName: "folder-open" }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
266
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
267
|
+
chunkGCYYGSHU_js.SearchBar,
|
|
263
268
|
{
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
269
|
+
searchTerm,
|
|
270
|
+
onSearchChange: setSearchTerm,
|
|
271
|
+
placeholder: labels.searchPlaceholder ?? labels.title
|
|
272
|
+
}
|
|
273
|
+
),
|
|
274
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3", children: filteredPrompts.map((prompt) => {
|
|
275
|
+
const agentName = agentNameById.get(prompt.agentId) ?? prompt.agentId;
|
|
276
|
+
const key = `${prompt.agentId}:${prompt.locale}:${prompt.version}`;
|
|
277
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
278
|
+
chunkGCYYGSHU_js.EntityCard,
|
|
279
|
+
{
|
|
280
|
+
accentGradient: "from-sky-500 to-blue-700",
|
|
281
|
+
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" }) }),
|
|
282
|
+
title: agentName,
|
|
283
|
+
subtitle: `${prompt.locale} \xB7 v${prompt.version}`,
|
|
284
|
+
status: prompt.isActive ? /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.Badge, { color: "emerald", children: labels.isActive }) : null,
|
|
285
|
+
footer: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-2", children: [
|
|
286
|
+
!prompt.isActive && /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.Button, { type: "button", size: "sm", outline: true, onClick: () => onActivate(prompt), children: labels.activate }),
|
|
287
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
288
|
+
chunkGCYYGSHU_js.Button,
|
|
289
|
+
{
|
|
290
|
+
type: "button",
|
|
291
|
+
size: "sm",
|
|
292
|
+
color: "rose",
|
|
293
|
+
onClick: () => {
|
|
294
|
+
if (window.confirm(labels.deleteConfirm)) onDelete(prompt);
|
|
295
|
+
},
|
|
296
|
+
children: labels.delete
|
|
297
|
+
}
|
|
298
|
+
)
|
|
299
|
+
] }),
|
|
300
|
+
children: prompt.prompt && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 line-clamp-3 text-xs text-slate-500 dark:text-slate-400", children: prompt.prompt })
|
|
301
|
+
},
|
|
302
|
+
key
|
|
303
|
+
);
|
|
304
|
+
}) })
|
|
305
|
+
] });
|
|
289
306
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
290
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
307
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.ManagementPageLayout, { hero, content, mobileAction }),
|
|
291
308
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
292
|
-
|
|
309
|
+
chunkGCYYGSHU_js.GlassModal,
|
|
293
310
|
{
|
|
294
311
|
open: createOpen,
|
|
295
312
|
onClose: () => setCreateOpen(false),
|
|
@@ -313,11 +330,11 @@ function AgentsPromptsPageView({ labels, agents, prompts, loading, onCreate, onA
|
|
|
313
330
|
});
|
|
314
331
|
setCreateOpen(false);
|
|
315
332
|
},
|
|
316
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
317
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
318
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
333
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(chunkGCYYGSHU_js.FormGrid, { children: [
|
|
334
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.FormSelect, { name: "agentId", label: labels.agent, options: agentOptions, required: true }),
|
|
335
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.FormSelect, { name: "locale", label: labels.locale, options: LOCALE_OPTIONS, defaultValue: "en" }),
|
|
319
336
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
320
|
-
|
|
337
|
+
chunkGCYYGSHU_js.FormSelect,
|
|
321
338
|
{
|
|
322
339
|
name: "isActive",
|
|
323
340
|
label: labels.isActive,
|
|
@@ -325,10 +342,10 @@ function AgentsPromptsPageView({ labels, agents, prompts, loading, onCreate, onA
|
|
|
325
342
|
defaultValue: "true"
|
|
326
343
|
}
|
|
327
344
|
),
|
|
328
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
329
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
330
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
331
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
345
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.FormInput, { name: "reason", label: labels.reason }),
|
|
346
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.FormTextarea, { name: "systemPrompt", label: labels.systemPrompt, rows: 3 }),
|
|
347
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.FormTextarea, { name: "userTemplate", label: labels.userTemplate, rows: 3 }),
|
|
348
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.FormTextarea, { name: "prompt", label: labels.prompt, rows: 6, required: true })
|
|
332
349
|
] })
|
|
333
350
|
}
|
|
334
351
|
)
|
|
@@ -362,16 +379,8 @@ function AgentsToolDefinitionsPageView({ labels, tools, loading, onCreate, onUpd
|
|
|
362
379
|
const allTools = tools;
|
|
363
380
|
const filteredTools = searchTerm.trim() ? allTools.filter((tool) => tool.name.toLowerCase().includes(searchTerm.trim().toLowerCase())) : allTools;
|
|
364
381
|
const isEmpty = allTools.length === 0;
|
|
365
|
-
const summary = !isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
366
|
-
chunkK4M4B6ME_js.SearchBar,
|
|
367
|
-
{
|
|
368
|
-
searchTerm,
|
|
369
|
-
onSearchChange: setSearchTerm,
|
|
370
|
-
placeholder: labels.searchPlaceholder ?? labels.title
|
|
371
|
-
}
|
|
372
|
-
) : void 0;
|
|
373
382
|
const hero = /* @__PURE__ */ jsxRuntime.jsx(
|
|
374
|
-
|
|
383
|
+
chunkGCYYGSHU_js.HeroSection,
|
|
375
384
|
{
|
|
376
385
|
icon: /* @__PURE__ */ jsxRuntime.jsx(outline.WrenchScrewdriverIcon, { className: "h-5 w-5" }),
|
|
377
386
|
label: labels.title,
|
|
@@ -379,7 +388,7 @@ function AgentsToolDefinitionsPageView({ labels, tools, loading, onCreate, onUpd
|
|
|
379
388
|
subtitle: labels.subtitle,
|
|
380
389
|
gradient: "from-amber-500 to-orange-700",
|
|
381
390
|
toolbar: /* @__PURE__ */ jsxRuntime.jsx(
|
|
382
|
-
|
|
391
|
+
chunkGCYYGSHU_js.CreateActionButton,
|
|
383
392
|
{
|
|
384
393
|
mode: "desktop",
|
|
385
394
|
label: labels.addTool,
|
|
@@ -390,7 +399,7 @@ function AgentsToolDefinitionsPageView({ labels, tools, loading, onCreate, onUpd
|
|
|
390
399
|
}
|
|
391
400
|
);
|
|
392
401
|
const mobileAction = /* @__PURE__ */ jsxRuntime.jsx(
|
|
393
|
-
|
|
402
|
+
chunkGCYYGSHU_js.CreateActionButton,
|
|
394
403
|
{
|
|
395
404
|
mode: "mobile",
|
|
396
405
|
label: labels.addTool,
|
|
@@ -398,35 +407,45 @@ function AgentsToolDefinitionsPageView({ labels, tools, loading, onCreate, onUpd
|
|
|
398
407
|
accent: "amber"
|
|
399
408
|
}
|
|
400
409
|
);
|
|
401
|
-
const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
410
|
+
const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.PageLoadingState, {}) : isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.PageEmptyState, { title: labels.empty, message: labels.subtitle, iconName: "folder-open" }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
411
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
412
|
+
chunkGCYYGSHU_js.SearchBar,
|
|
413
|
+
{
|
|
414
|
+
searchTerm,
|
|
415
|
+
onSearchChange: setSearchTerm,
|
|
416
|
+
placeholder: labels.searchPlaceholder ?? labels.title
|
|
417
|
+
}
|
|
418
|
+
),
|
|
419
|
+
/* @__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(
|
|
420
|
+
chunkGCYYGSHU_js.EntityCard,
|
|
421
|
+
{
|
|
422
|
+
accentGradient: "from-amber-500 to-orange-700",
|
|
423
|
+
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" }) }),
|
|
424
|
+
title: tool.name,
|
|
425
|
+
subtitle: toolTypeLabel(tool),
|
|
426
|
+
status: /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.Badge, { color: tool.enabled ? "emerald" : "zinc", children: tool.enabled ? labels.enabled : labels.disabled }),
|
|
427
|
+
footer: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-2", children: [
|
|
428
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.Button, { type: "button", size: "sm", outline: true, onClick: () => setEditing(tool), children: labels.edit }),
|
|
429
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
430
|
+
chunkGCYYGSHU_js.Button,
|
|
431
|
+
{
|
|
432
|
+
type: "button",
|
|
433
|
+
size: "sm",
|
|
434
|
+
color: "rose",
|
|
435
|
+
onClick: () => {
|
|
436
|
+
if (window.confirm(labels.deleteConfirm)) onDelete(tool);
|
|
437
|
+
},
|
|
438
|
+
children: labels.delete
|
|
439
|
+
}
|
|
440
|
+
)
|
|
441
|
+
] }),
|
|
442
|
+
children: tool.description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-xs text-slate-500 dark:text-slate-400", children: tool.description })
|
|
443
|
+
},
|
|
444
|
+
tool.agentToolId
|
|
445
|
+
)) })
|
|
446
|
+
] });
|
|
428
447
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
429
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
448
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.ManagementPageLayout, { hero, content, mobileAction }),
|
|
430
449
|
createOpen && /* @__PURE__ */ jsxRuntime.jsx(
|
|
431
450
|
ToolEditor,
|
|
432
451
|
{
|
|
@@ -484,7 +503,7 @@ function ToolEditor({
|
|
|
484
503
|
setValue((v) => ({ ...v, [key]: next }));
|
|
485
504
|
};
|
|
486
505
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
487
|
-
|
|
506
|
+
chunkGCYYGSHU_js.GlassModal,
|
|
488
507
|
{
|
|
489
508
|
open: true,
|
|
490
509
|
onClose,
|
|
@@ -497,9 +516,9 @@ function ToolEditor({
|
|
|
497
516
|
handleSubmit();
|
|
498
517
|
},
|
|
499
518
|
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-5", children: [
|
|
500
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
519
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkGCYYGSHU_js.FormGrid, { children: [
|
|
501
520
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
502
|
-
|
|
521
|
+
chunkGCYYGSHU_js.FormInput,
|
|
503
522
|
{
|
|
504
523
|
label: "Name",
|
|
505
524
|
required: true,
|
|
@@ -509,7 +528,7 @@ function ToolEditor({
|
|
|
509
528
|
}
|
|
510
529
|
),
|
|
511
530
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
512
|
-
|
|
531
|
+
chunkGCYYGSHU_js.FormSelect,
|
|
513
532
|
{
|
|
514
533
|
label: "Tool type",
|
|
515
534
|
value: value.toolType,
|
|
@@ -519,7 +538,7 @@ function ToolEditor({
|
|
|
519
538
|
}
|
|
520
539
|
),
|
|
521
540
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
522
|
-
|
|
541
|
+
chunkGCYYGSHU_js.FormSelect,
|
|
523
542
|
{
|
|
524
543
|
label: "Enabled",
|
|
525
544
|
value: value.enabled ? "true" : "false",
|
|
@@ -528,7 +547,7 @@ function ToolEditor({
|
|
|
528
547
|
}
|
|
529
548
|
),
|
|
530
549
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
531
|
-
|
|
550
|
+
chunkGCYYGSHU_js.FormInput,
|
|
532
551
|
{
|
|
533
552
|
label: "Icon (optional)",
|
|
534
553
|
value: value.icon ?? "",
|
|
@@ -538,7 +557,7 @@ function ToolEditor({
|
|
|
538
557
|
)
|
|
539
558
|
] }),
|
|
540
559
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
541
|
-
|
|
560
|
+
chunkGCYYGSHU_js.FormTextarea,
|
|
542
561
|
{
|
|
543
562
|
label: "Description",
|
|
544
563
|
rows: 2,
|
|
@@ -586,7 +605,7 @@ function ParametersEditor({
|
|
|
586
605
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
587
606
|
parameters.map((param, index) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-[1fr_160px_1fr_110px_auto] items-end gap-2", children: [
|
|
588
607
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
589
|
-
|
|
608
|
+
chunkGCYYGSHU_js.FormInput,
|
|
590
609
|
{
|
|
591
610
|
label: "Name",
|
|
592
611
|
value: param.name,
|
|
@@ -595,7 +614,7 @@ function ParametersEditor({
|
|
|
595
614
|
}
|
|
596
615
|
),
|
|
597
616
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
598
|
-
|
|
617
|
+
chunkGCYYGSHU_js.FormSelect,
|
|
599
618
|
{
|
|
600
619
|
label: "Type",
|
|
601
620
|
value: param.type,
|
|
@@ -604,28 +623,28 @@ function ParametersEditor({
|
|
|
604
623
|
}
|
|
605
624
|
),
|
|
606
625
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
607
|
-
|
|
626
|
+
chunkGCYYGSHU_js.FormInput,
|
|
608
627
|
{
|
|
609
628
|
label: "Description",
|
|
610
629
|
value: param.description,
|
|
611
630
|
onValueChange: (description) => update(index, { description })
|
|
612
631
|
}
|
|
613
632
|
),
|
|
614
|
-
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-2 pb-2 text-xs text-
|
|
633
|
+
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-2 pb-2 text-xs text-slate-700 dark:text-slate-300", children: [
|
|
615
634
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
616
635
|
"input",
|
|
617
636
|
{
|
|
618
637
|
type: "checkbox",
|
|
619
638
|
checked: param.required,
|
|
620
639
|
onChange: (event) => update(index, { required: event.target.checked }),
|
|
621
|
-
className: "h-4 w-4 rounded border-
|
|
640
|
+
className: "h-4 w-4 rounded border-slate-300 text-indigo-600 focus:ring-2 focus:ring-indigo-500/70 focus:ring-offset-1 dark:border-white/15 dark:bg-white/[0.08]"
|
|
622
641
|
}
|
|
623
642
|
),
|
|
624
643
|
"Required"
|
|
625
644
|
] }),
|
|
626
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
645
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.Button, { type: "button", plain: true, onClick: () => remove(index), children: "Remove" })
|
|
627
646
|
] }, index)),
|
|
628
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
647
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.Button, { type: "button", outline: true, onClick: add, children: "+ Add parameter" })
|
|
629
648
|
] })
|
|
630
649
|
] });
|
|
631
650
|
}
|
|
@@ -638,9 +657,9 @@ function HandlerConfigEditor({
|
|
|
638
657
|
if (toolType === "http") {
|
|
639
658
|
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: [
|
|
640
659
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "mb-2 text-sm font-semibold text-slate-700 dark:text-slate-200", children: "HTTP handler" }),
|
|
641
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
660
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkGCYYGSHU_js.FormGrid, { children: [
|
|
642
661
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
643
|
-
|
|
662
|
+
chunkGCYYGSHU_js.FormSelect,
|
|
644
663
|
{
|
|
645
664
|
label: "Method",
|
|
646
665
|
value: stringProp(config, "method", "GET"),
|
|
@@ -649,7 +668,7 @@ function HandlerConfigEditor({
|
|
|
649
668
|
}
|
|
650
669
|
),
|
|
651
670
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
652
|
-
|
|
671
|
+
chunkGCYYGSHU_js.FormInput,
|
|
653
672
|
{
|
|
654
673
|
label: "URL template",
|
|
655
674
|
value: stringProp(config, "url"),
|
|
@@ -659,7 +678,7 @@ function HandlerConfigEditor({
|
|
|
659
678
|
)
|
|
660
679
|
] }),
|
|
661
680
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
662
|
-
|
|
681
|
+
chunkGCYYGSHU_js.FormTextarea,
|
|
663
682
|
{
|
|
664
683
|
label: "Headers (JSON)",
|
|
665
684
|
rows: 3,
|
|
@@ -669,7 +688,7 @@ function HandlerConfigEditor({
|
|
|
669
688
|
}
|
|
670
689
|
),
|
|
671
690
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
672
|
-
|
|
691
|
+
chunkGCYYGSHU_js.FormTextarea,
|
|
673
692
|
{
|
|
674
693
|
label: "Body template",
|
|
675
694
|
rows: 3,
|
|
@@ -684,7 +703,7 @@ function HandlerConfigEditor({
|
|
|
684
703
|
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: [
|
|
685
704
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "mb-2 text-sm font-semibold text-slate-700 dark:text-slate-200", children: "Function handler" }),
|
|
686
705
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
687
|
-
|
|
706
|
+
chunkGCYYGSHU_js.FormInput,
|
|
688
707
|
{
|
|
689
708
|
label: "Implementation key",
|
|
690
709
|
value: stringProp(config, "implementationKey"),
|
|
@@ -698,9 +717,9 @@ function HandlerConfigEditor({
|
|
|
698
717
|
if (toolType === "database_query") {
|
|
699
718
|
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: [
|
|
700
719
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "mb-2 text-sm font-semibold text-slate-700 dark:text-slate-200", children: "Database query handler" }),
|
|
701
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
720
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkGCYYGSHU_js.FormGrid, { children: [
|
|
702
721
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
703
|
-
|
|
722
|
+
chunkGCYYGSHU_js.FormInput,
|
|
704
723
|
{
|
|
705
724
|
label: "Datasource ID",
|
|
706
725
|
value: stringProp(config, "datasourceId"),
|
|
@@ -709,7 +728,7 @@ function HandlerConfigEditor({
|
|
|
709
728
|
}
|
|
710
729
|
),
|
|
711
730
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
712
|
-
|
|
731
|
+
chunkGCYYGSHU_js.FormInput,
|
|
713
732
|
{
|
|
714
733
|
label: "Max rows",
|
|
715
734
|
type: "number",
|
|
@@ -719,7 +738,7 @@ function HandlerConfigEditor({
|
|
|
719
738
|
)
|
|
720
739
|
] }),
|
|
721
740
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
722
|
-
|
|
741
|
+
chunkGCYYGSHU_js.FormTextarea,
|
|
723
742
|
{
|
|
724
743
|
label: "Query template",
|
|
725
744
|
rows: 4,
|
|
@@ -735,7 +754,7 @@ function HandlerConfigEditor({
|
|
|
735
754
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "mb-2 text-sm font-semibold text-slate-700 dark:text-slate-200", children: "Code execution handler" }),
|
|
736
755
|
/* @__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." }),
|
|
737
756
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
738
|
-
|
|
757
|
+
chunkGCYYGSHU_js.FormSelect,
|
|
739
758
|
{
|
|
740
759
|
label: "Language",
|
|
741
760
|
value: stringProp(config, "language", "javascript"),
|
|
@@ -747,7 +766,7 @@ function HandlerConfigEditor({
|
|
|
747
766
|
}
|
|
748
767
|
),
|
|
749
768
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
750
|
-
|
|
769
|
+
chunkGCYYGSHU_js.FormTextarea,
|
|
751
770
|
{
|
|
752
771
|
label: "Code",
|
|
753
772
|
rows: 6,
|
|
@@ -760,9 +779,9 @@ function HandlerConfigEditor({
|
|
|
760
779
|
}
|
|
761
780
|
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: [
|
|
762
781
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "mb-2 text-sm font-semibold text-slate-700 dark:text-slate-200", children: "API call handler" }),
|
|
763
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
782
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkGCYYGSHU_js.FormGrid, { children: [
|
|
764
783
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
765
|
-
|
|
784
|
+
chunkGCYYGSHU_js.FormInput,
|
|
766
785
|
{
|
|
767
786
|
label: "URL",
|
|
768
787
|
value: stringProp(config, "url"),
|
|
@@ -770,7 +789,7 @@ function HandlerConfigEditor({
|
|
|
770
789
|
}
|
|
771
790
|
),
|
|
772
791
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
773
|
-
|
|
792
|
+
chunkGCYYGSHU_js.FormSelect,
|
|
774
793
|
{
|
|
775
794
|
label: "Auth",
|
|
776
795
|
value: stringProp(config, "authType", "bearer"),
|
|
@@ -784,7 +803,7 @@ function HandlerConfigEditor({
|
|
|
784
803
|
}
|
|
785
804
|
),
|
|
786
805
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
787
|
-
|
|
806
|
+
chunkGCYYGSHU_js.FormInput,
|
|
788
807
|
{
|
|
789
808
|
label: "Credential secret id",
|
|
790
809
|
value: stringProp(config, "credentialRef"),
|
|
@@ -916,16 +935,8 @@ function RulesPageView({ labels, rules, loading, onCreate, onUpdate, onDelete })
|
|
|
916
935
|
const allRules = rules;
|
|
917
936
|
const filteredRules = searchTerm.trim() ? allRules.filter((rule) => (rule.name ?? "").toLowerCase().includes(searchTerm.trim().toLowerCase())) : allRules;
|
|
918
937
|
const isEmpty = allRules.length === 0;
|
|
919
|
-
const summary = !isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
920
|
-
chunkK4M4B6ME_js.SearchBar,
|
|
921
|
-
{
|
|
922
|
-
searchTerm,
|
|
923
|
-
onSearchChange: setSearchTerm,
|
|
924
|
-
placeholder: labels.searchPlaceholder ?? labels.title
|
|
925
|
-
}
|
|
926
|
-
) : void 0;
|
|
927
938
|
const hero = /* @__PURE__ */ jsxRuntime.jsx(
|
|
928
|
-
|
|
939
|
+
chunkGCYYGSHU_js.HeroSection,
|
|
929
940
|
{
|
|
930
941
|
icon: /* @__PURE__ */ jsxRuntime.jsx(outline.AdjustmentsHorizontalIcon, { className: "h-5 w-5" }),
|
|
931
942
|
label: labels.title,
|
|
@@ -933,7 +944,7 @@ function RulesPageView({ labels, rules, loading, onCreate, onUpdate, onDelete })
|
|
|
933
944
|
subtitle: labels.subtitle,
|
|
934
945
|
gradient: "from-fuchsia-500 to-purple-700",
|
|
935
946
|
toolbar: /* @__PURE__ */ jsxRuntime.jsx(
|
|
936
|
-
|
|
947
|
+
chunkGCYYGSHU_js.CreateActionButton,
|
|
937
948
|
{
|
|
938
949
|
mode: "desktop",
|
|
939
950
|
label: labels.addRule,
|
|
@@ -944,7 +955,7 @@ function RulesPageView({ labels, rules, loading, onCreate, onUpdate, onDelete })
|
|
|
944
955
|
}
|
|
945
956
|
);
|
|
946
957
|
const mobileAction = /* @__PURE__ */ jsxRuntime.jsx(
|
|
947
|
-
|
|
958
|
+
chunkGCYYGSHU_js.CreateActionButton,
|
|
948
959
|
{
|
|
949
960
|
mode: "mobile",
|
|
950
961
|
label: labels.addRule,
|
|
@@ -952,41 +963,51 @@ function RulesPageView({ labels, rules, loading, onCreate, onUpdate, onDelete })
|
|
|
952
963
|
accent: "fuchsia"
|
|
953
964
|
}
|
|
954
965
|
);
|
|
955
|
-
const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
966
|
+
const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.PageLoadingState, {}) : isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.PageEmptyState, { title: labels.empty, message: labels.subtitle, iconName: "folder-open" }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
967
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
968
|
+
chunkGCYYGSHU_js.SearchBar,
|
|
969
|
+
{
|
|
970
|
+
searchTerm,
|
|
971
|
+
onSearchChange: setSearchTerm,
|
|
972
|
+
placeholder: labels.searchPlaceholder ?? labels.title
|
|
973
|
+
}
|
|
974
|
+
),
|
|
975
|
+
/* @__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(
|
|
976
|
+
chunkGCYYGSHU_js.EntityCard,
|
|
977
|
+
{
|
|
978
|
+
accentGradient: "from-fuchsia-500 to-purple-700",
|
|
979
|
+
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" }) }),
|
|
980
|
+
title: rule.name,
|
|
981
|
+
subtitle: `${labels.order}: ${rule.order ?? 0}`,
|
|
982
|
+
status: /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.Badge, { color: rule.enabled ? "emerald" : "zinc", children: rule.enabled ? labels.enabled : labels.disabled }),
|
|
983
|
+
footer: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-2", children: [
|
|
984
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.Button, { type: "button", size: "sm", outline: true, onClick: () => setEditing(rule), children: labels.edit }),
|
|
985
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
986
|
+
chunkGCYYGSHU_js.Button,
|
|
987
|
+
{
|
|
988
|
+
type: "button",
|
|
989
|
+
size: "sm",
|
|
990
|
+
color: "rose",
|
|
991
|
+
onClick: () => {
|
|
992
|
+
if (window.confirm(labels.deleteConfirm)) onDelete(rule);
|
|
993
|
+
},
|
|
994
|
+
children: labels.delete
|
|
995
|
+
}
|
|
996
|
+
)
|
|
997
|
+
] }),
|
|
998
|
+
children: rule.description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-xs text-slate-500 dark:text-slate-400", children: rule.description })
|
|
999
|
+
},
|
|
1000
|
+
rule.ruleId
|
|
1001
|
+
)) })
|
|
1002
|
+
] });
|
|
982
1003
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
983
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1004
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.ManagementPageLayout, { hero, content, mobileAction }),
|
|
984
1005
|
createOpen && /* @__PURE__ */ jsxRuntime.jsx(
|
|
985
1006
|
RuleEditor,
|
|
986
1007
|
{
|
|
987
1008
|
title: labels.createTitle,
|
|
988
1009
|
saveLabel: labels.save,
|
|
989
|
-
initial:
|
|
1010
|
+
initial: chunk6ZMTJSQF_js.defaultRuleForm(),
|
|
990
1011
|
onClose: () => setCreateOpen(false),
|
|
991
1012
|
onSubmit: (value) => {
|
|
992
1013
|
onCreate(value);
|
|
@@ -1018,7 +1039,7 @@ function RuleEditor({
|
|
|
1018
1039
|
}) {
|
|
1019
1040
|
const [value, setValue] = react.useState(initial);
|
|
1020
1041
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1021
|
-
|
|
1042
|
+
chunkGCYYGSHU_js.GlassModal,
|
|
1022
1043
|
{
|
|
1023
1044
|
open: true,
|
|
1024
1045
|
onClose,
|
|
@@ -1030,12 +1051,12 @@ function RuleEditor({
|
|
|
1030
1051
|
event.preventDefault();
|
|
1031
1052
|
onSubmit(value);
|
|
1032
1053
|
},
|
|
1033
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1054
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(chunk6ZMTJSQF_js.RuleForm, { value, onChange: setValue })
|
|
1034
1055
|
}
|
|
1035
1056
|
);
|
|
1036
1057
|
}
|
|
1037
1058
|
function ruleToFormValue(rule) {
|
|
1038
|
-
const base =
|
|
1059
|
+
const base = chunk6ZMTJSQF_js.defaultRuleForm();
|
|
1039
1060
|
const rawCondition = rule.condition ?? rule.conditions;
|
|
1040
1061
|
const rawAction = pickAction(rule);
|
|
1041
1062
|
return {
|
|
@@ -1166,7 +1187,7 @@ var SAMPLE_DATASOURCES = [
|
|
|
1166
1187
|
];
|
|
1167
1188
|
function getDialectLabel(dialect) {
|
|
1168
1189
|
if (!dialect) return "Unknown";
|
|
1169
|
-
for (const category of
|
|
1190
|
+
for (const category of chunkLVK7VXW7_js.DIALECT_CATEGORIES) {
|
|
1170
1191
|
const found = category.dialects.find((d) => d.value === dialect);
|
|
1171
1192
|
if (found) return found.label;
|
|
1172
1193
|
}
|
|
@@ -1174,12 +1195,12 @@ function getDialectLabel(dialect) {
|
|
|
1174
1195
|
}
|
|
1175
1196
|
function getDialectGradient(dialect) {
|
|
1176
1197
|
if (!dialect) return "from-gray-400 to-gray-500";
|
|
1177
|
-
const category =
|
|
1198
|
+
const category = chunkLVK7VXW7_js.findCategory(dialect);
|
|
1178
1199
|
return category?.gradient ?? "from-gray-400 to-gray-500";
|
|
1179
1200
|
}
|
|
1180
1201
|
function getDialectIcon(dialect) {
|
|
1181
1202
|
if (!dialect) return outline.CircleStackIcon;
|
|
1182
|
-
const category =
|
|
1203
|
+
const category = chunkLVK7VXW7_js.findCategory(dialect);
|
|
1183
1204
|
return category?.icon ?? outline.CircleStackIcon;
|
|
1184
1205
|
}
|
|
1185
1206
|
var DIALECT_LOGO = {
|
|
@@ -1249,7 +1270,7 @@ function DatasourcesPageView({
|
|
|
1249
1270
|
}
|
|
1250
1271
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
1251
1272
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1252
|
-
|
|
1273
|
+
chunkGCYYGSHU_js.HeroSection,
|
|
1253
1274
|
{
|
|
1254
1275
|
icon: /* @__PURE__ */ jsxRuntime.jsx(outline.CircleStackIcon, { className: "h-5 w-5" }),
|
|
1255
1276
|
label: labels.title,
|
|
@@ -1257,7 +1278,7 @@ function DatasourcesPageView({
|
|
|
1257
1278
|
subtitle: labels.subtitle,
|
|
1258
1279
|
gradient: "from-amber-500 to-orange-600",
|
|
1259
1280
|
toolbar: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1260
|
-
|
|
1281
|
+
chunkGCYYGSHU_js.CreateActionButton,
|
|
1261
1282
|
{
|
|
1262
1283
|
mode: "desktop",
|
|
1263
1284
|
label: labels.addDatasource,
|
|
@@ -1268,7 +1289,7 @@ function DatasourcesPageView({
|
|
|
1268
1289
|
}
|
|
1269
1290
|
),
|
|
1270
1291
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1271
|
-
|
|
1292
|
+
chunkGCYYGSHU_js.CreateActionButton,
|
|
1272
1293
|
{
|
|
1273
1294
|
mode: "mobile",
|
|
1274
1295
|
label: labels.addDatasource,
|
|
@@ -1277,7 +1298,7 @@ function DatasourcesPageView({
|
|
|
1277
1298
|
}
|
|
1278
1299
|
),
|
|
1279
1300
|
!isEmpty && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1280
|
-
|
|
1301
|
+
chunkGCYYGSHU_js.SearchBar,
|
|
1281
1302
|
{
|
|
1282
1303
|
searchTerm,
|
|
1283
1304
|
onSearchChange: setSearchTerm,
|
|
@@ -1285,7 +1306,7 @@ function DatasourcesPageView({
|
|
|
1285
1306
|
}
|
|
1286
1307
|
),
|
|
1287
1308
|
isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1288
|
-
|
|
1309
|
+
chunkGCYYGSHU_js.PageEmptyState,
|
|
1289
1310
|
{
|
|
1290
1311
|
title: labels.emptyTitle,
|
|
1291
1312
|
message: labels.emptyDescription,
|
|
@@ -1297,29 +1318,29 @@ function DatasourcesPageView({
|
|
|
1297
1318
|
const gradient = getDialectGradient(ds.dialect);
|
|
1298
1319
|
const dialectLabel = getDialectLabel(ds.dialect);
|
|
1299
1320
|
const logoSrc = getDialectLogoSrc(ds.dialect);
|
|
1300
|
-
const iconElement = logoSrc ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-11 w-11 items-center justify-center rounded-lg
|
|
1321
|
+
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" }) });
|
|
1301
1322
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1302
|
-
|
|
1323
|
+
chunkGCYYGSHU_js.EntityCard,
|
|
1303
1324
|
{
|
|
1304
1325
|
accentGradient: gradient,
|
|
1305
1326
|
icon: iconElement,
|
|
1306
1327
|
title: ds.name ?? ds.id,
|
|
1307
1328
|
subtitle: dialectLabel,
|
|
1308
|
-
status: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1309
|
-
footer: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 text-xs text-
|
|
1310
|
-
ds.readOnly && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1329
|
+
status: /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.Badge, { color: ds.enabled ? "emerald" : "zinc", children: ds.enabled ? labels.enabled : labels.disabled }),
|
|
1330
|
+
footer: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 text-xs text-slate-500 dark:text-slate-400", children: [
|
|
1331
|
+
ds.readOnly && /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.Badge, { color: "blue", size: "xs", children: "Read-only" }),
|
|
1311
1332
|
ds.timeoutMs && /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
|
|
1312
1333
|
ds.timeoutMs / 1e3,
|
|
1313
1334
|
"s timeout"
|
|
1314
1335
|
] })
|
|
1315
1336
|
] }),
|
|
1316
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-2 text-xs text-
|
|
1337
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-2 text-xs text-slate-500 dark:text-slate-400", children: [
|
|
1317
1338
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
1318
1339
|
labels.dialect,
|
|
1319
1340
|
": ",
|
|
1320
1341
|
dialectLabel
|
|
1321
1342
|
] }),
|
|
1322
|
-
ds.slug && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "truncate text-
|
|
1343
|
+
ds.slug && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "truncate text-slate-400 dark:text-slate-500", children: [
|
|
1323
1344
|
"/",
|
|
1324
1345
|
ds.slug
|
|
1325
1346
|
] })
|
|
@@ -1329,7 +1350,7 @@ function DatasourcesPageView({
|
|
|
1329
1350
|
);
|
|
1330
1351
|
}) }),
|
|
1331
1352
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1332
|
-
|
|
1353
|
+
chunkLVK7VXW7_js.DatasourceModal,
|
|
1333
1354
|
{
|
|
1334
1355
|
open: modalOpen,
|
|
1335
1356
|
onClose: () => setModalOpen(false),
|
|
@@ -1342,9 +1363,9 @@ function DatasourcesPageView({
|
|
|
1342
1363
|
function DashboardPageView({ labels, appLogo }) {
|
|
1343
1364
|
const hero = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full text-center", children: [
|
|
1344
1365
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-center mb-6", children: appLogo }),
|
|
1345
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-3 text-base text-
|
|
1366
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-3 text-base text-slate-600 dark:text-slate-300", children: labels.subtitle })
|
|
1346
1367
|
] });
|
|
1347
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1368
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.ManagementPageLayout, { hero, content: null });
|
|
1348
1369
|
}
|
|
1349
1370
|
function AgentsIndexPageView({ labels }) {
|
|
1350
1371
|
const Link = chunkS7KHTUHA_js.useLink();
|
|
@@ -1358,7 +1379,7 @@ function AgentsIndexPageView({ labels }) {
|
|
|
1358
1379
|
const filteredTiles = searchTerm.trim() ? allTiles.filter((tile) => tile.title.toLowerCase().includes(searchTerm.trim().toLowerCase())) : allTiles;
|
|
1359
1380
|
const isEmpty = allTiles.length === 0;
|
|
1360
1381
|
const hero = /* @__PURE__ */ jsxRuntime.jsx(
|
|
1361
|
-
|
|
1382
|
+
chunkGCYYGSHU_js.HeroSection,
|
|
1362
1383
|
{
|
|
1363
1384
|
icon: /* @__PURE__ */ jsxRuntime.jsx(outline.CpuChipIcon, { className: "h-5 w-5" }),
|
|
1364
1385
|
label: labels.title,
|
|
@@ -1367,33 +1388,35 @@ function AgentsIndexPageView({ labels }) {
|
|
|
1367
1388
|
gradient: "from-violet-500 to-indigo-700"
|
|
1368
1389
|
}
|
|
1369
1390
|
);
|
|
1370
|
-
const
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
searchTerm,
|
|
1374
|
-
onSearchChange: setSearchTerm,
|
|
1375
|
-
placeholder: labels.searchPlaceholder ?? labels.title
|
|
1376
|
-
}
|
|
1377
|
-
) : void 0;
|
|
1378
|
-
const content = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4", children: filteredTiles.map((tile) => {
|
|
1379
|
-
const Icon = tile.icon;
|
|
1380
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Link, { href: tile.href, className: "block focus:outline-none", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1381
|
-
chunkK4M4B6ME_js.EntityCard,
|
|
1391
|
+
const content = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1392
|
+
!isEmpty && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1393
|
+
chunkGCYYGSHU_js.SearchBar,
|
|
1382
1394
|
{
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-slate-500 dark:text-slate-400", children: tile.subtitle })
|
|
1395
|
+
searchTerm,
|
|
1396
|
+
onSearchChange: setSearchTerm,
|
|
1397
|
+
placeholder: labels.searchPlaceholder ?? labels.title
|
|
1387
1398
|
}
|
|
1388
|
-
)
|
|
1389
|
-
|
|
1390
|
-
|
|
1399
|
+
),
|
|
1400
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4", children: filteredTiles.map((tile) => {
|
|
1401
|
+
const Icon = tile.icon;
|
|
1402
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Link, { href: tile.href, className: "block focus:outline-none", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1403
|
+
chunkGCYYGSHU_js.EntityCard,
|
|
1404
|
+
{
|
|
1405
|
+
accentGradient: tile.gradient,
|
|
1406
|
+
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" }) }),
|
|
1407
|
+
title: tile.title,
|
|
1408
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-slate-500 dark:text-slate-400", children: tile.subtitle })
|
|
1409
|
+
}
|
|
1410
|
+
) }, tile.id);
|
|
1411
|
+
}) })
|
|
1412
|
+
] });
|
|
1413
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.ManagementPageLayout, { hero, content });
|
|
1391
1414
|
}
|
|
1392
1415
|
function WorkflowsPageView({ labels, workflows, onCreate, onUpdateMeta, onPublish }) {
|
|
1393
1416
|
const selectedWorkflow = workflows[0] ?? null;
|
|
1394
1417
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6", children: [
|
|
1395
1418
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1396
|
-
|
|
1419
|
+
chunkGCYYGSHU_js.SectionHeader,
|
|
1397
1420
|
{
|
|
1398
1421
|
icon: /* @__PURE__ */ jsxRuntime.jsx(outline.RectangleStackIcon, { className: "h-5 w-5 text-white" }),
|
|
1399
1422
|
title: labels.title,
|
|
@@ -1402,9 +1425,9 @@ function WorkflowsPageView({ labels, workflows, onCreate, onUpdateMeta, onPublis
|
|
|
1402
1425
|
}
|
|
1403
1426
|
),
|
|
1404
1427
|
/* @__PURE__ */ jsxRuntime.jsxs("section", { className: "liquid-surface rounded-2xl p-4 space-y-3", children: [
|
|
1405
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1428
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.Text, { className: "font-semibold text-slate-900 dark:text-slate-100", children: labels.add }),
|
|
1406
1429
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1407
|
-
|
|
1430
|
+
chunkGCYYGSHU_js.Form,
|
|
1408
1431
|
{
|
|
1409
1432
|
onSubmit: (event) => {
|
|
1410
1433
|
event.preventDefault();
|
|
@@ -1415,32 +1438,32 @@ function WorkflowsPageView({ labels, workflows, onCreate, onUpdateMeta, onPublis
|
|
|
1415
1438
|
onCreate({ name, description });
|
|
1416
1439
|
event.currentTarget.reset();
|
|
1417
1440
|
},
|
|
1418
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1419
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1420
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1421
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1441
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(chunkGCYYGSHU_js.FormGrid, { children: [
|
|
1442
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.FormInput, { name: "name", label: labels.workflowName, placeholder: labels.workflowNamePlaceholder, required: true }),
|
|
1443
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.FormTextarea, { name: "description", label: labels.description, placeholder: labels.workflowDescriptionPlaceholder, rows: 3 }),
|
|
1444
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.FormActionsRow, { children: /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.Button, { type: "submit", children: labels.create }) })
|
|
1422
1445
|
] })
|
|
1423
1446
|
}
|
|
1424
1447
|
)
|
|
1425
1448
|
] }),
|
|
1426
1449
|
/* @__PURE__ */ jsxRuntime.jsxs("section", { className: "liquid-surface rounded-2xl p-4 space-y-3", children: [
|
|
1427
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1428
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1429
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1430
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1431
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1432
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1433
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1434
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1450
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.Text, { className: "font-semibold text-slate-900 dark:text-slate-100", children: labels.registry }),
|
|
1451
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkGCYYGSHU_js.Table, { children: [
|
|
1452
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.TableHead, { children: /* @__PURE__ */ jsxRuntime.jsxs(chunkGCYYGSHU_js.TableRow, { children: [
|
|
1453
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.TableHeader, { children: labels.name }),
|
|
1454
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.TableHeader, { children: labels.description }),
|
|
1455
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.TableHeader, { children: labels.version }),
|
|
1456
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.TableHeader, { children: labels.status }),
|
|
1457
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.TableHeader, { children: labels.actions })
|
|
1435
1458
|
] }) }),
|
|
1436
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1437
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1438
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1439
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1440
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1441
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1459
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.TableBody, { children: workflows.map((workflow) => /* @__PURE__ */ jsxRuntime.jsxs(chunkGCYYGSHU_js.TableRow, { children: [
|
|
1460
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.TableCell, { children: workflow.name }),
|
|
1461
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.TableCell, { children: workflow.description }),
|
|
1462
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.TableCell, { children: String(workflow.version) }),
|
|
1463
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.TableCell, { children: /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.Badge, { children: workflow.isDraft ? labels.statusDraft : labels.statusPublished }) }),
|
|
1464
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.TableCell, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
1442
1465
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1443
|
-
|
|
1466
|
+
chunkGCYYGSHU_js.Form,
|
|
1444
1467
|
{
|
|
1445
1468
|
onSubmit: (event) => {
|
|
1446
1469
|
event.preventDefault();
|
|
@@ -1450,17 +1473,17 @@ function WorkflowsPageView({ labels, workflows, onCreate, onUpdateMeta, onPublis
|
|
|
1450
1473
|
description: workflow.description ?? ""
|
|
1451
1474
|
});
|
|
1452
1475
|
},
|
|
1453
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1476
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.InlineForm, { children: /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.Button, { type: "submit", outline: true, children: labels.saveMeta }) })
|
|
1454
1477
|
}
|
|
1455
1478
|
),
|
|
1456
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1479
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.Button, { type: "button", color: "sky", onClick: () => onPublish(workflow.id), children: labels.publish })
|
|
1457
1480
|
] }) })
|
|
1458
1481
|
] }, workflow.id)) })
|
|
1459
1482
|
] })
|
|
1460
1483
|
] }),
|
|
1461
1484
|
/* @__PURE__ */ jsxRuntime.jsxs("section", { className: "liquid-surface rounded-2xl p-4 space-y-3", children: [
|
|
1462
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1463
|
-
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(
|
|
1485
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.Text, { className: "font-semibold text-slate-900 dark:text-slate-100", children: labels.workspace }),
|
|
1486
|
+
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(chunkMUOTTGCX_js.WorkflowWorkspace, { graph: chunk3T2WGL47_js.adaptWorkflowGraphToUi(selectedWorkflow.graph) }) }) : /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.Text, { children: labels.empty })
|
|
1464
1487
|
] })
|
|
1465
1488
|
] });
|
|
1466
1489
|
}
|
|
@@ -1509,15 +1532,15 @@ function WorkflowRunsPageView({ labels, runs, loading, onCancel, onReplay, onVie
|
|
|
1509
1532
|
});
|
|
1510
1533
|
const isEmpty = allRuns.length === 0;
|
|
1511
1534
|
const hero = /* @__PURE__ */ jsxRuntime.jsx(
|
|
1512
|
-
|
|
1535
|
+
chunkGCYYGSHU_js.HeroSection,
|
|
1513
1536
|
{
|
|
1514
1537
|
icon: /* @__PURE__ */ jsxRuntime.jsx(outline.ClockIcon, { className: "h-5 w-5" }),
|
|
1515
1538
|
label: labels.title,
|
|
1516
1539
|
title: labels.title,
|
|
1517
1540
|
subtitle: labels.subtitle,
|
|
1518
1541
|
gradient: "from-indigo-500 to-sky-700",
|
|
1519
|
-
toolbar: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-48", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1520
|
-
|
|
1542
|
+
toolbar: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full sm:w-48", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1543
|
+
chunkGCYYGSHU_js.FormSelect,
|
|
1521
1544
|
{
|
|
1522
1545
|
name: "statusFilter",
|
|
1523
1546
|
label: labels.filterStatus,
|
|
@@ -1528,45 +1551,47 @@ function WorkflowRunsPageView({ labels, runs, loading, onCancel, onReplay, onVie
|
|
|
1528
1551
|
) })
|
|
1529
1552
|
}
|
|
1530
1553
|
);
|
|
1531
|
-
const
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
children: [
|
|
1554
|
-
/* @__PURE__ */ jsxRuntime.jsxs("dl", { className: "mt-1 grid grid-cols-2 gap-1 text-xs text-slate-500 dark:text-slate-400", children: [
|
|
1555
|
-
/* @__PURE__ */ jsxRuntime.jsx("dt", { children: labels.duration }),
|
|
1556
|
-
/* @__PURE__ */ jsxRuntime.jsx("dd", { className: "text-right", children: chunk3T2WGL47_js.formatDurationMs(run.totalDurationMs) }),
|
|
1557
|
-
/* @__PURE__ */ jsxRuntime.jsx("dt", { children: labels.triggeredBy }),
|
|
1558
|
-
/* @__PURE__ */ jsxRuntime.jsx("dd", { className: "text-right truncate", children: run.triggeredBy || "\u2014" })
|
|
1554
|
+
const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.PageLoadingState, {}) : filteredRuns.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.PageEmptyState, { title: labels.empty, message: labels.subtitle, iconName: "folder-open" }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1555
|
+
!isEmpty && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1556
|
+
chunkGCYYGSHU_js.SearchBar,
|
|
1557
|
+
{
|
|
1558
|
+
searchTerm,
|
|
1559
|
+
onSearchChange: setSearchTerm,
|
|
1560
|
+
placeholder: labels.searchPlaceholder ?? labels.title
|
|
1561
|
+
}
|
|
1562
|
+
),
|
|
1563
|
+
/* @__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(
|
|
1564
|
+
chunkGCYYGSHU_js.EntityCard,
|
|
1565
|
+
{
|
|
1566
|
+
accentGradient: "from-indigo-500 to-sky-700",
|
|
1567
|
+
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" }) }),
|
|
1568
|
+
title: run.id.slice(0, 8),
|
|
1569
|
+
subtitle: `${labels.startedAt}: ${new Date(run.createdAt).toLocaleString()}`,
|
|
1570
|
+
status: /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.Badge, { color: BADGE_COLOR[run.status] ?? "zinc", children: statusLabelFor(run.status) }),
|
|
1571
|
+
footer: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-2", children: [
|
|
1572
|
+
onView && /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.Button, { type: "button", size: "sm", outline: true, onClick: () => onView(run), children: labels.view }),
|
|
1573
|
+
onViewTimeline && labels.timeline && /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.Button, { type: "button", size: "sm", outline: true, onClick: () => onViewTimeline(run), children: labels.timeline }),
|
|
1574
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.Button, { type: "button", size: "sm", outline: true, onClick: () => onReplay(run), children: labels.replay }),
|
|
1575
|
+
run.status === "running" && /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.Button, { type: "button", size: "sm", color: "rose", onClick: () => onCancel(run), children: labels.cancel })
|
|
1559
1576
|
] }),
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1577
|
+
children: [
|
|
1578
|
+
/* @__PURE__ */ jsxRuntime.jsxs("dl", { className: "mt-1 grid grid-cols-2 gap-1 text-xs text-slate-500 dark:text-slate-400", children: [
|
|
1579
|
+
/* @__PURE__ */ jsxRuntime.jsx("dt", { children: labels.duration }),
|
|
1580
|
+
/* @__PURE__ */ jsxRuntime.jsx("dd", { className: "text-right", children: chunk3T2WGL47_js.formatDurationMs(run.totalDurationMs) }),
|
|
1581
|
+
/* @__PURE__ */ jsxRuntime.jsx("dt", { children: labels.triggeredBy }),
|
|
1582
|
+
/* @__PURE__ */ jsxRuntime.jsx("dd", { className: "text-right truncate", children: run.triggeredBy || "\u2014" })
|
|
1583
|
+
] }),
|
|
1584
|
+
run.error && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 line-clamp-2 text-xs text-rose-600 dark:text-rose-400", children: run.error })
|
|
1585
|
+
]
|
|
1586
|
+
},
|
|
1587
|
+
run.id
|
|
1588
|
+
)) })
|
|
1589
|
+
] });
|
|
1590
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.ManagementPageLayout, { hero, content });
|
|
1566
1591
|
}
|
|
1567
1592
|
function RunTimelinePageView({ labels, entries, loading, runId }) {
|
|
1568
1593
|
const hero = /* @__PURE__ */ jsxRuntime.jsx(
|
|
1569
|
-
|
|
1594
|
+
chunkGCYYGSHU_js.HeroSection,
|
|
1570
1595
|
{
|
|
1571
1596
|
icon: /* @__PURE__ */ jsxRuntime.jsx(outline.ClockIcon, { className: "h-5 w-5" }),
|
|
1572
1597
|
label: labels.title,
|
|
@@ -1576,23 +1601,23 @@ function RunTimelinePageView({ labels, entries, loading, runId }) {
|
|
|
1576
1601
|
}
|
|
1577
1602
|
);
|
|
1578
1603
|
if (loading) {
|
|
1579
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1604
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.ManagementPageLayout, { hero, content: /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.PageLoadingState, {}) });
|
|
1580
1605
|
}
|
|
1581
1606
|
if (entries.length === 0) {
|
|
1582
1607
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1583
|
-
|
|
1608
|
+
chunkGCYYGSHU_js.ManagementPageLayout,
|
|
1584
1609
|
{
|
|
1585
1610
|
hero,
|
|
1586
|
-
content: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1611
|
+
content: /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.PageEmptyState, { title: labels.empty ?? "", message: "", iconName: "folder-open" })
|
|
1587
1612
|
}
|
|
1588
1613
|
);
|
|
1589
1614
|
}
|
|
1590
1615
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1591
|
-
|
|
1616
|
+
chunkGCYYGSHU_js.ManagementPageLayout,
|
|
1592
1617
|
{
|
|
1593
1618
|
hero,
|
|
1594
1619
|
content: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1595
|
-
|
|
1620
|
+
chunk6ZMTJSQF_js.ExecutionTimelinePanel,
|
|
1596
1621
|
{
|
|
1597
1622
|
entries,
|
|
1598
1623
|
labels
|
|
@@ -1677,16 +1702,8 @@ function ConnectionsPageView({
|
|
|
1677
1702
|
const allConnections = connections;
|
|
1678
1703
|
const filteredConnections = searchTerm.trim() ? allConnections.filter((conn) => conn.name.toLowerCase().includes(searchTerm.trim().toLowerCase())) : allConnections;
|
|
1679
1704
|
const isEmpty = allConnections.length === 0;
|
|
1680
|
-
const summary = !isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1681
|
-
chunkK4M4B6ME_js.SearchBar,
|
|
1682
|
-
{
|
|
1683
|
-
searchTerm,
|
|
1684
|
-
onSearchChange: setSearchTerm,
|
|
1685
|
-
placeholder: labels.searchPlaceholder ?? labels.title
|
|
1686
|
-
}
|
|
1687
|
-
) : void 0;
|
|
1688
1705
|
const hero = /* @__PURE__ */ jsxRuntime.jsx(
|
|
1689
|
-
|
|
1706
|
+
chunkGCYYGSHU_js.HeroSection,
|
|
1690
1707
|
{
|
|
1691
1708
|
icon: /* @__PURE__ */ jsxRuntime.jsx(outline.LinkIcon, { className: "h-5 w-5" }),
|
|
1692
1709
|
label: labels.title,
|
|
@@ -1694,7 +1711,7 @@ function ConnectionsPageView({
|
|
|
1694
1711
|
subtitle: labels.subtitle,
|
|
1695
1712
|
gradient: "from-sky-500 to-indigo-600",
|
|
1696
1713
|
toolbar: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1697
|
-
|
|
1714
|
+
chunkGCYYGSHU_js.CreateActionButton,
|
|
1698
1715
|
{
|
|
1699
1716
|
mode: "desktop",
|
|
1700
1717
|
label: labels.add,
|
|
@@ -1705,7 +1722,7 @@ function ConnectionsPageView({
|
|
|
1705
1722
|
}
|
|
1706
1723
|
);
|
|
1707
1724
|
const mobileAction = /* @__PURE__ */ jsxRuntime.jsx(
|
|
1708
|
-
|
|
1725
|
+
chunkGCYYGSHU_js.CreateActionButton,
|
|
1709
1726
|
{
|
|
1710
1727
|
mode: "mobile",
|
|
1711
1728
|
label: labels.add,
|
|
@@ -1713,42 +1730,52 @@ function ConnectionsPageView({
|
|
|
1713
1730
|
accent: "sky"
|
|
1714
1731
|
}
|
|
1715
1732
|
);
|
|
1716
|
-
const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1733
|
+
const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.PageLoadingState, {}) : isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.PageEmptyState, { title: labels.empty, message: labels.subtitle, iconName: "folder-open" }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1734
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1735
|
+
chunkGCYYGSHU_js.SearchBar,
|
|
1736
|
+
{
|
|
1737
|
+
searchTerm,
|
|
1738
|
+
onSearchChange: setSearchTerm,
|
|
1739
|
+
placeholder: labels.searchPlaceholder ?? labels.title
|
|
1740
|
+
}
|
|
1741
|
+
),
|
|
1742
|
+
/* @__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(
|
|
1743
|
+
chunkGCYYGSHU_js.EntityCard,
|
|
1744
|
+
{
|
|
1745
|
+
accentGradient: "from-sky-500 to-indigo-600",
|
|
1746
|
+
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" }) }),
|
|
1747
|
+
title: conn.name,
|
|
1748
|
+
subtitle: providerLabel(conn.providerSlug),
|
|
1749
|
+
status: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-1", children: [
|
|
1750
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.Badge, { color: conn.enabled ? "emerald" : "zinc", children: conn.enabled ? labels.enable : labels.disable }),
|
|
1751
|
+
conn.credentialRef ? /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.Badge, { color: "indigo", children: "Secret set" }) : /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.Badge, { color: "amber", children: "No secret" })
|
|
1752
|
+
] }),
|
|
1753
|
+
footer: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-2", children: [
|
|
1754
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.Button, { type: "button", size: "sm", outline: true, onClick: () => setEditing(conn), children: labels.edit }),
|
|
1755
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1756
|
+
chunkGCYYGSHU_js.Button,
|
|
1757
|
+
{
|
|
1758
|
+
type: "button",
|
|
1759
|
+
size: "sm",
|
|
1760
|
+
color: "rose",
|
|
1761
|
+
onClick: async () => {
|
|
1762
|
+
if (window.confirm(labels.deleteConfirm)) await onDelete(conn);
|
|
1763
|
+
},
|
|
1764
|
+
children: labels.delete
|
|
1765
|
+
}
|
|
1766
|
+
)
|
|
1767
|
+
] }),
|
|
1768
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("dl", { className: "mt-1 space-y-0.5 text-xs text-slate-500 dark:text-slate-400", children: [
|
|
1769
|
+
conn.region && /* @__PURE__ */ jsxRuntime.jsx(Row, { label: "Region", value: conn.region }),
|
|
1770
|
+
conn.endpoint && /* @__PURE__ */ jsxRuntime.jsx(Row, { label: "Endpoint", value: conn.endpoint }),
|
|
1771
|
+
conn.modelFilter && conn.modelFilter.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(Row, { label: "Models", value: conn.modelFilter.join(", ") })
|
|
1772
|
+
] })
|
|
1773
|
+
},
|
|
1774
|
+
conn.id
|
|
1775
|
+
)) })
|
|
1776
|
+
] });
|
|
1750
1777
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1751
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1778
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.ManagementPageLayout, { hero, content, mobileAction }),
|
|
1752
1779
|
createOpen && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1753
1780
|
ConnectionEditor,
|
|
1754
1781
|
{
|
|
@@ -1862,7 +1889,7 @@ function ConnectionEditor({
|
|
|
1862
1889
|
return preset.exampleModels?.join(", ") ?? "";
|
|
1863
1890
|
}, [preset]);
|
|
1864
1891
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1865
|
-
|
|
1892
|
+
chunkGCYYGSHU_js.GlassModal,
|
|
1866
1893
|
{
|
|
1867
1894
|
open: true,
|
|
1868
1895
|
onClose,
|
|
@@ -1875,9 +1902,9 @@ function ConnectionEditor({
|
|
|
1875
1902
|
void handleSubmit();
|
|
1876
1903
|
},
|
|
1877
1904
|
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
1878
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1905
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkGCYYGSHU_js.FormGrid, { children: [
|
|
1879
1906
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1880
|
-
|
|
1907
|
+
chunkGCYYGSHU_js.FormSelect,
|
|
1881
1908
|
{
|
|
1882
1909
|
label: "Provider",
|
|
1883
1910
|
value: value.providerSlug,
|
|
@@ -1888,7 +1915,7 @@ function ConnectionEditor({
|
|
|
1888
1915
|
}
|
|
1889
1916
|
),
|
|
1890
1917
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1891
|
-
|
|
1918
|
+
chunkGCYYGSHU_js.FormInput,
|
|
1892
1919
|
{
|
|
1893
1920
|
label: "Display name",
|
|
1894
1921
|
required: true,
|
|
@@ -1898,7 +1925,7 @@ function ConnectionEditor({
|
|
|
1898
1925
|
}
|
|
1899
1926
|
),
|
|
1900
1927
|
preset.needsRegion && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1901
|
-
|
|
1928
|
+
chunkGCYYGSHU_js.FormInput,
|
|
1902
1929
|
{
|
|
1903
1930
|
label: "Region",
|
|
1904
1931
|
value: value.region,
|
|
@@ -1907,7 +1934,7 @@ function ConnectionEditor({
|
|
|
1907
1934
|
}
|
|
1908
1935
|
),
|
|
1909
1936
|
preset.needsEndpoint && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1910
|
-
|
|
1937
|
+
chunkGCYYGSHU_js.FormInput,
|
|
1911
1938
|
{
|
|
1912
1939
|
label: "Endpoint URL",
|
|
1913
1940
|
value: value.endpoint,
|
|
@@ -1917,7 +1944,7 @@ function ConnectionEditor({
|
|
|
1917
1944
|
)
|
|
1918
1945
|
] }),
|
|
1919
1946
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1920
|
-
|
|
1947
|
+
chunkGCYYGSHU_js.FormInput,
|
|
1921
1948
|
{
|
|
1922
1949
|
label: value.credentialRef ? "Rotate API key (leave blank to keep current)" : "API key",
|
|
1923
1950
|
type: "password",
|
|
@@ -1928,7 +1955,7 @@ function ConnectionEditor({
|
|
|
1928
1955
|
}
|
|
1929
1956
|
),
|
|
1930
1957
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1931
|
-
|
|
1958
|
+
chunkGCYYGSHU_js.FormInput,
|
|
1932
1959
|
{
|
|
1933
1960
|
label: "Model filter (comma-separated, optional)",
|
|
1934
1961
|
value: value.modelFilter,
|
|
@@ -1940,7 +1967,7 @@ function ConnectionEditor({
|
|
|
1940
1967
|
/* @__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: [
|
|
1941
1968
|
/* @__PURE__ */ jsxRuntime.jsx("summary", { className: "cursor-pointer font-medium text-slate-700 dark:text-slate-200", children: "Advanced config (JSON)" }),
|
|
1942
1969
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-3", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1943
|
-
|
|
1970
|
+
chunkGCYYGSHU_js.FormTextarea,
|
|
1944
1971
|
{
|
|
1945
1972
|
rows: 4,
|
|
1946
1973
|
value: value.configJson,
|
|
@@ -2003,14 +2030,6 @@ function CredentialsPageView({ labels, credentials, loading, onCreate, onRotate,
|
|
|
2003
2030
|
const allCredentials = credentials;
|
|
2004
2031
|
const filteredCredentials = searchTerm.trim() ? allCredentials.filter((secret) => secret.name.toLowerCase().includes(searchTerm.trim().toLowerCase())) : allCredentials;
|
|
2005
2032
|
const isEmpty = allCredentials.length === 0;
|
|
2006
|
-
const summary = !isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
2007
|
-
chunkK4M4B6ME_js.SearchBar,
|
|
2008
|
-
{
|
|
2009
|
-
searchTerm,
|
|
2010
|
-
onSearchChange: setSearchTerm,
|
|
2011
|
-
placeholder: labels.searchPlaceholder ?? labels.title
|
|
2012
|
-
}
|
|
2013
|
-
) : void 0;
|
|
2014
2033
|
const typeOptions = [
|
|
2015
2034
|
{ value: "generic", label: labels.typeGeneric },
|
|
2016
2035
|
{ value: "api_key", label: labels.typeApiKey },
|
|
@@ -2018,7 +2037,7 @@ function CredentialsPageView({ labels, credentials, loading, onCreate, onRotate,
|
|
|
2018
2037
|
{ value: "password", label: labels.typePassword }
|
|
2019
2038
|
];
|
|
2020
2039
|
const hero = /* @__PURE__ */ jsxRuntime.jsx(
|
|
2021
|
-
|
|
2040
|
+
chunkGCYYGSHU_js.HeroSection,
|
|
2022
2041
|
{
|
|
2023
2042
|
icon: /* @__PURE__ */ jsxRuntime.jsx(outline.KeyIcon, { className: "h-5 w-5" }),
|
|
2024
2043
|
label: labels.title,
|
|
@@ -2026,7 +2045,7 @@ function CredentialsPageView({ labels, credentials, loading, onCreate, onRotate,
|
|
|
2026
2045
|
subtitle: labels.subtitle,
|
|
2027
2046
|
gradient: "from-rose-500 to-orange-600",
|
|
2028
2047
|
toolbar: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2029
|
-
|
|
2048
|
+
chunkGCYYGSHU_js.CreateActionButton,
|
|
2030
2049
|
{
|
|
2031
2050
|
mode: "desktop",
|
|
2032
2051
|
label: labels.addCredential,
|
|
@@ -2037,7 +2056,7 @@ function CredentialsPageView({ labels, credentials, loading, onCreate, onRotate,
|
|
|
2037
2056
|
}
|
|
2038
2057
|
);
|
|
2039
2058
|
const mobileAction = /* @__PURE__ */ jsxRuntime.jsx(
|
|
2040
|
-
|
|
2059
|
+
chunkGCYYGSHU_js.CreateActionButton,
|
|
2041
2060
|
{
|
|
2042
2061
|
mode: "mobile",
|
|
2043
2062
|
label: labels.addCredential,
|
|
@@ -2045,54 +2064,64 @@ function CredentialsPageView({ labels, credentials, loading, onCreate, onRotate,
|
|
|
2045
2064
|
accent: "rose"
|
|
2046
2065
|
}
|
|
2047
2066
|
);
|
|
2048
|
-
const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2067
|
+
const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.PageLoadingState, {}) : isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.PageEmptyState, { title: labels.empty, message: labels.subtitle, iconName: "folder-open" }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2068
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2069
|
+
chunkGCYYGSHU_js.SearchBar,
|
|
2070
|
+
{
|
|
2071
|
+
searchTerm,
|
|
2072
|
+
onSearchChange: setSearchTerm,
|
|
2073
|
+
placeholder: labels.searchPlaceholder ?? labels.title
|
|
2074
|
+
}
|
|
2075
|
+
),
|
|
2076
|
+
/* @__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(
|
|
2077
|
+
chunkGCYYGSHU_js.EntityCard,
|
|
2078
|
+
{
|
|
2079
|
+
accentGradient: "from-rose-500 to-orange-700",
|
|
2080
|
+
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" }) }),
|
|
2081
|
+
title: secret.name,
|
|
2082
|
+
subtitle: secret.secretType,
|
|
2083
|
+
status: /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.Badge, { color: secret.disabled ? "zinc" : "emerald", children: secret.disabled ? labels.disable : "Active" }),
|
|
2084
|
+
footer: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-2", children: [
|
|
2085
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.CopyableId, { id: secret.secretId }),
|
|
2086
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-2", children: [
|
|
2087
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkGCYYGSHU_js.Button, { type: "button", size: "sm", outline: true, onClick: () => setRotateFor(secret), children: [
|
|
2088
|
+
/* @__PURE__ */ jsxRuntime.jsx(outline.ArrowPathIcon, { className: "mr-1 h-3.5 w-3.5" }),
|
|
2089
|
+
labels.rotate
|
|
2090
|
+
] }),
|
|
2091
|
+
!secret.disabled && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2092
|
+
chunkGCYYGSHU_js.Button,
|
|
2093
|
+
{
|
|
2094
|
+
type: "button",
|
|
2095
|
+
size: "sm",
|
|
2096
|
+
color: "rose",
|
|
2097
|
+
onClick: () => {
|
|
2098
|
+
if (window.confirm(labels.disableConfirm)) onDisable(secret);
|
|
2099
|
+
},
|
|
2100
|
+
children: [
|
|
2101
|
+
/* @__PURE__ */ jsxRuntime.jsx(outline.TrashIcon, { className: "mr-1 h-3.5 w-3.5" }),
|
|
2102
|
+
labels.disable
|
|
2103
|
+
]
|
|
2104
|
+
}
|
|
2105
|
+
)
|
|
2106
|
+
] })
|
|
2107
|
+
] }),
|
|
2108
|
+
children: [
|
|
2109
|
+
secret.description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-xs text-slate-500 dark:text-slate-400", children: secret.description }),
|
|
2110
|
+
/* @__PURE__ */ jsxRuntime.jsxs("dl", { className: "mt-2 grid grid-cols-2 gap-1 text-xs text-slate-500 dark:text-slate-400", children: [
|
|
2111
|
+
/* @__PURE__ */ jsxRuntime.jsx("dt", { children: labels.createdAt }),
|
|
2112
|
+
/* @__PURE__ */ jsxRuntime.jsx("dd", { className: "text-right", children: new Date(secret.createdAt).toLocaleDateString() }),
|
|
2113
|
+
/* @__PURE__ */ jsxRuntime.jsx("dt", { children: labels.expiresAt }),
|
|
2114
|
+
/* @__PURE__ */ jsxRuntime.jsx("dd", { className: "text-right", children: secret.expiresAt ? new Date(secret.expiresAt).toLocaleDateString() : labels.neverExpires })
|
|
2115
|
+
] })
|
|
2116
|
+
]
|
|
2117
|
+
},
|
|
2118
|
+
secret.secretId
|
|
2119
|
+
)) })
|
|
2120
|
+
] });
|
|
2092
2121
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2093
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2122
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.ManagementPageLayout, { hero, content, mobileAction }),
|
|
2094
2123
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2095
|
-
|
|
2124
|
+
chunkGCYYGSHU_js.GlassModal,
|
|
2096
2125
|
{
|
|
2097
2126
|
open: createOpen,
|
|
2098
2127
|
onClose: () => setCreateOpen(false),
|
|
@@ -2110,16 +2139,16 @@ function CredentialsPageView({ labels, credentials, loading, onCreate, onRotate,
|
|
|
2110
2139
|
onCreate({ name, value, secretType, description });
|
|
2111
2140
|
setCreateOpen(false);
|
|
2112
2141
|
},
|
|
2113
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2114
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2115
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2116
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2117
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2142
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(chunkGCYYGSHU_js.FormGrid, { children: [
|
|
2143
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.FormInput, { name: "name", label: labels.name, placeholder: labels.namePlaceholder, required: true }),
|
|
2144
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.FormSelect, { name: "secretType", label: labels.type, options: typeOptions, defaultValue: "generic" }),
|
|
2145
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.FormInput, { name: "value", label: labels.value, placeholder: labels.valuePlaceholder, required: true, type: "password" }),
|
|
2146
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.FormTextarea, { name: "description", label: labels.description, placeholder: labels.descriptionPlaceholder, rows: 2 })
|
|
2118
2147
|
] })
|
|
2119
2148
|
}
|
|
2120
2149
|
),
|
|
2121
2150
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2122
|
-
|
|
2151
|
+
chunkGCYYGSHU_js.GlassModal,
|
|
2123
2152
|
{
|
|
2124
2153
|
open: rotateFor !== null,
|
|
2125
2154
|
onClose: () => setRotateFor(null),
|
|
@@ -2134,7 +2163,7 @@ function CredentialsPageView({ labels, credentials, loading, onCreate, onRotate,
|
|
|
2134
2163
|
onRotate(rotateFor, value);
|
|
2135
2164
|
setRotateFor(null);
|
|
2136
2165
|
},
|
|
2137
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2166
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.FormGrid, { children: /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.FormInput, { name: "value", label: labels.value, placeholder: labels.valuePlaceholder, required: true, type: "password" }) })
|
|
2138
2167
|
}
|
|
2139
2168
|
)
|
|
2140
2169
|
] });
|
|
@@ -2142,31 +2171,31 @@ function CredentialsPageView({ labels, credentials, loading, onCreate, onRotate,
|
|
|
2142
2171
|
|
|
2143
2172
|
Object.defineProperty(exports, "RolesPageView", {
|
|
2144
2173
|
enumerable: true,
|
|
2145
|
-
get: function () { return
|
|
2174
|
+
get: function () { return chunkMUOTTGCX_js.RolesPageView; }
|
|
2146
2175
|
});
|
|
2147
2176
|
Object.defineProperty(exports, "UsersPageView", {
|
|
2148
2177
|
enumerable: true,
|
|
2149
|
-
get: function () { return
|
|
2178
|
+
get: function () { return chunkMUOTTGCX_js.UsersPageView; }
|
|
2150
2179
|
});
|
|
2151
2180
|
Object.defineProperty(exports, "DIALECT_CATEGORIES", {
|
|
2152
2181
|
enumerable: true,
|
|
2153
|
-
get: function () { return
|
|
2182
|
+
get: function () { return chunkLVK7VXW7_js.DIALECT_CATEGORIES; }
|
|
2154
2183
|
});
|
|
2155
2184
|
Object.defineProperty(exports, "DatasourceFormModal", {
|
|
2156
2185
|
enumerable: true,
|
|
2157
|
-
get: function () { return
|
|
2186
|
+
get: function () { return chunkLVK7VXW7_js.DatasourceFormModal; }
|
|
2158
2187
|
});
|
|
2159
2188
|
Object.defineProperty(exports, "DatasourceModal", {
|
|
2160
2189
|
enumerable: true,
|
|
2161
|
-
get: function () { return
|
|
2190
|
+
get: function () { return chunkLVK7VXW7_js.DatasourceModal; }
|
|
2162
2191
|
});
|
|
2163
2192
|
Object.defineProperty(exports, "findCategory", {
|
|
2164
2193
|
enumerable: true,
|
|
2165
|
-
get: function () { return
|
|
2194
|
+
get: function () { return chunkLVK7VXW7_js.findCategory; }
|
|
2166
2195
|
});
|
|
2167
2196
|
Object.defineProperty(exports, "findDialect", {
|
|
2168
2197
|
enumerable: true,
|
|
2169
|
-
get: function () { return
|
|
2198
|
+
get: function () { return chunkLVK7VXW7_js.findDialect; }
|
|
2170
2199
|
});
|
|
2171
2200
|
exports.AgentsConfigPageView = AgentsConfigPageView;
|
|
2172
2201
|
exports.AgentsIndexPageView = AgentsIndexPageView;
|