@burdenoff/microfe-botmanor 2026.1008.1 → 2026.1013.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/botlit/components/AssistantRuntimeSetupPanel.js +1 -1
- package/dist/botlit/components/AssistantRuntimeSetupPanel.js.map +1 -1
- package/dist/botlit/components/ModelRegistrationPanel.js +174 -0
- package/dist/botlit/components/ModelRegistrationPanel.js.map +1 -0
- package/dist/botlit/hooks/internal/workspaceGateway.js +1 -1
- package/dist/botlit/hooks/useAssistantRuntimeSetup.js +2 -2
- package/dist/botlit/hooks/useAssistantRuntimeSetup.js.map +1 -1
- package/dist/botlit/hooks/useLLMProviders.js +94 -50
- package/dist/botlit/hooks/useLLMProviders.js.map +1 -1
- package/dist/botlit/pages/AgentBuilderPage.js +206 -183
- package/dist/botlit/pages/AgentBuilderPage.js.map +1 -1
- package/dist/botlit/pages/KnowledgeBaseDetailPage.js +162 -145
- package/dist/botlit/pages/KnowledgeBaseDetailPage.js.map +1 -1
- package/dist/botlit/pages/SettingsPage.js +129 -66
- package/dist/botlit/pages/SettingsPage.js.map +1 -1
- package/dist/botlit/utils/embedding-models.js +36 -0
- package/dist/botlit/utils/embedding-models.js.map +1 -0
- package/dist/generated/wspace-operations.js +58 -36
- package/dist/generated/wspace-operations.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
import { useBotlit as e } from "../providers/BotlitProvider.js";
|
|
2
2
|
import { useBots as t } from "../hooks/useBots.js";
|
|
3
|
-
import { useAgent as
|
|
4
|
-
import { useLLMModels as
|
|
5
|
-
import { cn as
|
|
6
|
-
import { PageLayout as
|
|
7
|
-
import { Card as
|
|
8
|
-
import { Button as
|
|
9
|
-
import { FormField as
|
|
10
|
-
import { toUnion as
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
3
|
+
import { useAgent as ee, useCreateAgent as te, useUpdateAgent as ne } from "../hooks/useAgents.js";
|
|
4
|
+
import { useLLMModels as n, useLLMProviders as re } from "../hooks/useLLMProviders.js";
|
|
5
|
+
import { cn as r } from "../utils/cn.js";
|
|
6
|
+
import { PageLayout as i } from "../components/PageLayout.js";
|
|
7
|
+
import { Card as a, CardContent as o, CardDescription as s, CardHeader as c, CardTitle as l } from "../components/Card.js";
|
|
8
|
+
import { Button as u } from "../components/Button.js";
|
|
9
|
+
import { FormField as d, Input as f, Textarea as p } from "../components/Input.js";
|
|
10
|
+
import { toUnion as m } from "../utils/unions.js";
|
|
11
|
+
import { configuredAnswerModels as h } from "../utils/embedding-models.js";
|
|
12
|
+
import { useEffect as g, useState as _ } from "react";
|
|
13
|
+
import { PagePurpose as ie } from "@burdenoff/fe-libs/ui";
|
|
14
|
+
import { jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
15
|
+
import { useParams as ae } from "react-router";
|
|
16
|
+
import { ArrowLeft as oe, Brain as se, Save as b, Settings as x, Sparkles as S, Wrench as C } from "lucide-react";
|
|
17
|
+
import { toast as w } from "sonner";
|
|
17
18
|
//#region src/botlit/pages/AgentBuilderPage.tsx
|
|
18
|
-
var
|
|
19
|
+
var T = [
|
|
19
20
|
"MCP_TOOLS",
|
|
20
21
|
"RAG",
|
|
21
22
|
"REASONING",
|
|
@@ -24,23 +25,23 @@ var M = [
|
|
|
24
25
|
"CODE_EXECUTION",
|
|
25
26
|
"A2A",
|
|
26
27
|
"WEB_BROWSING"
|
|
27
|
-
],
|
|
28
|
+
], E = [
|
|
28
29
|
"ASSISTANT",
|
|
29
30
|
"ANALYST",
|
|
30
31
|
"AUTOMATION",
|
|
31
32
|
"SPECIALIST"
|
|
32
33
|
];
|
|
33
|
-
function
|
|
34
|
+
function D(e) {
|
|
34
35
|
return e.flatMap((e) => {
|
|
35
|
-
let t =
|
|
36
|
+
let t = T.find((t) => t === e);
|
|
36
37
|
return t ? [t] : [];
|
|
37
38
|
});
|
|
38
39
|
}
|
|
39
|
-
function
|
|
40
|
-
return
|
|
40
|
+
function O(e) {
|
|
41
|
+
return m(e, E, "ASSISTANT");
|
|
41
42
|
}
|
|
42
|
-
var
|
|
43
|
-
let { agentId:
|
|
43
|
+
var k = () => {
|
|
44
|
+
let { agentId: m } = ae(), { navigateTo: T, workspaceId: E } = e(), { data: k } = ee(m), { data: A } = t(), { data: j, loading: ce, error: M, refetch: N } = re(), { data: P, loading: F, error: I, refetch: L } = n(), R = ce || F, z = M || I, B = h(P ?? [], j ?? []), [V, H] = te(), [U, W] = ne(), G = !!m, [K, q] = _(0), [J, Y] = _({
|
|
44
45
|
name: "",
|
|
45
46
|
slug: "",
|
|
46
47
|
description: "",
|
|
@@ -54,10 +55,10 @@ var I = () => {
|
|
|
54
55
|
capabilities: ["MCP_TOOLS", "REASONING"],
|
|
55
56
|
llmModelId: ""
|
|
56
57
|
});
|
|
57
|
-
|
|
58
|
-
if (
|
|
59
|
-
let e =
|
|
60
|
-
|
|
58
|
+
g(() => {
|
|
59
|
+
if (k) {
|
|
60
|
+
let e = k;
|
|
61
|
+
Y({
|
|
61
62
|
name: e.name,
|
|
62
63
|
slug: e.slug,
|
|
63
64
|
description: e.description || "",
|
|
@@ -72,29 +73,29 @@ var I = () => {
|
|
|
72
73
|
llmModelId: e.llmModelId || ""
|
|
73
74
|
});
|
|
74
75
|
}
|
|
75
|
-
}, [
|
|
76
|
-
let
|
|
76
|
+
}, [k]);
|
|
77
|
+
let X = [
|
|
77
78
|
{
|
|
78
79
|
id: 0,
|
|
79
80
|
label: "Basic Info",
|
|
80
|
-
icon: /* @__PURE__ */ S
|
|
81
|
+
icon: /* @__PURE__ */ v(S, { size: 18 })
|
|
81
82
|
},
|
|
82
83
|
{
|
|
83
84
|
id: 1,
|
|
84
85
|
label: "Prompt",
|
|
85
|
-
icon: /* @__PURE__ */
|
|
86
|
+
icon: /* @__PURE__ */ v(se, { size: 18 })
|
|
86
87
|
},
|
|
87
88
|
{
|
|
88
89
|
id: 2,
|
|
89
90
|
label: "LLM Model",
|
|
90
|
-
icon: /* @__PURE__ */
|
|
91
|
+
icon: /* @__PURE__ */ v(x, { size: 18 })
|
|
91
92
|
},
|
|
92
93
|
{
|
|
93
94
|
id: 3,
|
|
94
95
|
label: "Tools & Knowledge",
|
|
95
|
-
icon: /* @__PURE__ */
|
|
96
|
+
icon: /* @__PURE__ */ v(C, { size: 18 })
|
|
96
97
|
}
|
|
97
|
-
],
|
|
98
|
+
], le = [
|
|
98
99
|
"🤖",
|
|
99
100
|
"🧠",
|
|
100
101
|
"💡",
|
|
@@ -107,7 +108,7 @@ var I = () => {
|
|
|
107
108
|
"⚡",
|
|
108
109
|
"🌟",
|
|
109
110
|
"🚀"
|
|
110
|
-
],
|
|
111
|
+
], ue = [
|
|
111
112
|
{
|
|
112
113
|
key: "MCP_TOOLS",
|
|
113
114
|
label: "MCP Tools",
|
|
@@ -148,167 +149,171 @@ var I = () => {
|
|
|
148
149
|
label: "Web Browsing",
|
|
149
150
|
description: "Browse the web"
|
|
150
151
|
}
|
|
151
|
-
],
|
|
152
|
-
|
|
152
|
+
], de = (e) => {
|
|
153
|
+
Y((t) => ({
|
|
153
154
|
...t,
|
|
154
155
|
capabilities: t.capabilities.includes(e) ? t.capabilities.filter((t) => t !== e) : [...t.capabilities, e]
|
|
155
156
|
}));
|
|
156
157
|
}, Z = async () => {
|
|
157
|
-
|
|
158
|
+
if (J.llmModelId && (R || z || !B.some((e) => e.id === J.llmModelId))) {
|
|
159
|
+
w.error("Choose an active answer model from the available catalog.");
|
|
160
|
+
return;
|
|
161
|
+
}
|
|
162
|
+
let e = J.slug || J.name.toLowerCase().replace(/\s+/g, "-");
|
|
158
163
|
try {
|
|
159
|
-
if (
|
|
160
|
-
agentId:
|
|
164
|
+
if (G && m) await U({
|
|
165
|
+
agentId: m,
|
|
161
166
|
input: {
|
|
162
|
-
name:
|
|
167
|
+
name: J.name,
|
|
163
168
|
slug: e,
|
|
164
|
-
description:
|
|
165
|
-
systemPrompt:
|
|
166
|
-
temperature: parseFloat(
|
|
167
|
-
maxTokens: parseInt(
|
|
168
|
-
capabilities:
|
|
169
|
-
llmModelId:
|
|
170
|
-
type:
|
|
169
|
+
description: J.description || void 0,
|
|
170
|
+
systemPrompt: J.systemPrompt,
|
|
171
|
+
temperature: parseFloat(J.temperature) || .7,
|
|
172
|
+
maxTokens: parseInt(J.maxTokens) || 2048,
|
|
173
|
+
capabilities: D(J.capabilities),
|
|
174
|
+
llmModelId: J.llmModelId || void 0,
|
|
175
|
+
type: O(J.type)
|
|
171
176
|
}
|
|
172
|
-
}),
|
|
177
|
+
}), w.success(`Agent "${J.name}" updated successfully`), T(`agents/${m}`);
|
|
173
178
|
else {
|
|
174
|
-
if (!
|
|
175
|
-
let t = await
|
|
176
|
-
workspaceId:
|
|
177
|
-
name:
|
|
179
|
+
if (!E) return;
|
|
180
|
+
let t = await V({
|
|
181
|
+
workspaceId: E,
|
|
182
|
+
name: J.name,
|
|
178
183
|
slug: e,
|
|
179
|
-
type:
|
|
180
|
-
systemPrompt:
|
|
181
|
-
temperature: parseFloat(
|
|
182
|
-
maxTokens: parseInt(
|
|
183
|
-
capabilities:
|
|
184
|
-
llmModelId:
|
|
185
|
-
description:
|
|
184
|
+
type: O(J.type),
|
|
185
|
+
systemPrompt: J.systemPrompt,
|
|
186
|
+
temperature: parseFloat(J.temperature) || .7,
|
|
187
|
+
maxTokens: parseInt(J.maxTokens) || 2048,
|
|
188
|
+
capabilities: D(J.capabilities),
|
|
189
|
+
llmModelId: J.llmModelId || void 0,
|
|
190
|
+
description: J.description || void 0
|
|
186
191
|
});
|
|
187
|
-
|
|
192
|
+
w.success(`Agent "${J.name}" created successfully`), t?.id && T(`agents/${t.id}`);
|
|
188
193
|
}
|
|
189
194
|
} catch (e) {
|
|
190
195
|
let t = e instanceof Error ? e.message : "Failed to save agent";
|
|
191
|
-
|
|
196
|
+
w.error(t);
|
|
192
197
|
}
|
|
193
|
-
}, Q =
|
|
194
|
-
return /* @__PURE__ */
|
|
195
|
-
title: /* @__PURE__ */
|
|
198
|
+
}, Q = H.loading, $ = W.loading;
|
|
199
|
+
return /* @__PURE__ */ y(i, {
|
|
200
|
+
title: /* @__PURE__ */ y("div", {
|
|
196
201
|
className: "flex items-center gap-3",
|
|
197
|
-
children: [/* @__PURE__ */
|
|
202
|
+
children: [/* @__PURE__ */ v(u, {
|
|
198
203
|
variant: "ghost",
|
|
199
204
|
size: "icon",
|
|
200
|
-
onClick: () =>
|
|
201
|
-
children: /* @__PURE__ */
|
|
202
|
-
}), /* @__PURE__ */
|
|
205
|
+
onClick: () => T(m ? `agents/${m}` : "agents"),
|
|
206
|
+
children: /* @__PURE__ */ v(oe, { size: 20 })
|
|
207
|
+
}), /* @__PURE__ */ v("span", { children: G ? "Edit Agent" : "Create New Agent" })]
|
|
203
208
|
}),
|
|
204
|
-
actions: /* @__PURE__ */
|
|
209
|
+
actions: /* @__PURE__ */ y("div", {
|
|
205
210
|
className: "flex gap-2",
|
|
206
|
-
children: [/* @__PURE__ */
|
|
211
|
+
children: [/* @__PURE__ */ v(u, {
|
|
207
212
|
variant: "outline",
|
|
208
|
-
onClick: () =>
|
|
213
|
+
onClick: () => T(m ? `agents/${m}` : "agents"),
|
|
209
214
|
children: "Cancel"
|
|
210
|
-
}), /* @__PURE__ */
|
|
211
|
-
leftIcon: /* @__PURE__ */
|
|
215
|
+
}), /* @__PURE__ */ v(u, {
|
|
216
|
+
leftIcon: /* @__PURE__ */ v(b, { size: 16 }),
|
|
212
217
|
onClick: Z,
|
|
213
218
|
isLoading: Q || $,
|
|
214
|
-
disabled: !
|
|
215
|
-
children:
|
|
219
|
+
disabled: !J.name || !J.systemPrompt,
|
|
220
|
+
children: G ? "Save Changes" : "Create Agent"
|
|
216
221
|
})]
|
|
217
222
|
}),
|
|
218
|
-
children: [/* @__PURE__ */
|
|
223
|
+
children: [/* @__PURE__ */ y("div", {
|
|
219
224
|
className: "max-w-4xl mx-auto",
|
|
220
225
|
children: [
|
|
221
|
-
/* @__PURE__ */
|
|
226
|
+
/* @__PURE__ */ v(ie, {
|
|
222
227
|
className: "mb-6",
|
|
223
|
-
icon: /* @__PURE__ */ S
|
|
228
|
+
icon: /* @__PURE__ */ v(S, { size: 18 }),
|
|
224
229
|
children: "This guided builder walks you through everything an agent needs — its identity and system prompt, the model and parameters it runs on, and the tools and knowledge it can reach. Work through the steps, then create the agent and test it in chat. You can come back and edit any step later."
|
|
225
230
|
}),
|
|
226
|
-
/* @__PURE__ */
|
|
231
|
+
/* @__PURE__ */ v("div", {
|
|
227
232
|
className: "flex items-center justify-between mb-8",
|
|
228
|
-
children:
|
|
229
|
-
onClick: () =>
|
|
230
|
-
className:
|
|
231
|
-
children: [e.icon, /* @__PURE__ */
|
|
233
|
+
children: X.map((e) => /* @__PURE__ */ y("button", {
|
|
234
|
+
onClick: () => q(e.id),
|
|
235
|
+
className: r("flex items-center gap-2 px-4 py-2 rounded-lg transition-colors", K === e.id ? "bg-action-primary-bg text-action-primary-text" : "bg-bg-sunken text-text-secondary hover:bg-accent"),
|
|
236
|
+
children: [e.icon, /* @__PURE__ */ v("span", {
|
|
232
237
|
className: "font-medium",
|
|
233
238
|
children: e.label
|
|
234
239
|
})]
|
|
235
240
|
}, e.id))
|
|
236
241
|
}),
|
|
237
|
-
/* @__PURE__ */
|
|
242
|
+
/* @__PURE__ */ y("div", {
|
|
238
243
|
className: "space-y-6",
|
|
239
244
|
children: [
|
|
240
|
-
|
|
245
|
+
K === 0 && /* @__PURE__ */ y(a, {
|
|
241
246
|
treatment: "glass",
|
|
242
247
|
glow: !0,
|
|
243
|
-
children: [/* @__PURE__ */
|
|
248
|
+
children: [/* @__PURE__ */ y(c, { children: [/* @__PURE__ */ v(l, { children: "Basic Information" }), /* @__PURE__ */ v(s, { children: "Set up the agent's identity and purpose" })] }), /* @__PURE__ */ y(o, {
|
|
244
249
|
className: "space-y-6",
|
|
245
250
|
children: [
|
|
246
|
-
/* @__PURE__ */
|
|
251
|
+
/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
|
|
247
252
|
className: "text-sm font-medium",
|
|
248
253
|
children: "Avatar"
|
|
249
|
-
}), /* @__PURE__ */
|
|
254
|
+
}), /* @__PURE__ */ v("div", {
|
|
250
255
|
className: "flex gap-2 mt-2 flex-wrap",
|
|
251
|
-
children:
|
|
252
|
-
onClick: () =>
|
|
253
|
-
...
|
|
256
|
+
children: le.map((e) => /* @__PURE__ */ v("button", {
|
|
257
|
+
onClick: () => Y({
|
|
258
|
+
...J,
|
|
254
259
|
avatar: e
|
|
255
260
|
}),
|
|
256
|
-
className:
|
|
261
|
+
className: r("text-3xl p-2 rounded-lg border-2 transition-colors", J.avatar === e ? "border-primary bg-action-primary-bg/10" : "border-border-subtle hover:border-primary/50"),
|
|
257
262
|
children: e
|
|
258
263
|
}, e))
|
|
259
264
|
})] }),
|
|
260
|
-
/* @__PURE__ */
|
|
265
|
+
/* @__PURE__ */ v(d, {
|
|
261
266
|
label: "Agent Name",
|
|
262
267
|
required: !0,
|
|
263
|
-
children: /* @__PURE__ */
|
|
268
|
+
children: /* @__PURE__ */ v(f, {
|
|
264
269
|
placeholder: "e.g., Customer Support Agent",
|
|
265
|
-
value:
|
|
266
|
-
onChange: (e) =>
|
|
267
|
-
...
|
|
270
|
+
value: J.name,
|
|
271
|
+
onChange: (e) => Y({
|
|
272
|
+
...J,
|
|
268
273
|
name: e.target.value
|
|
269
274
|
})
|
|
270
275
|
})
|
|
271
276
|
}),
|
|
272
|
-
/* @__PURE__ */
|
|
277
|
+
/* @__PURE__ */ v(d, {
|
|
273
278
|
label: "Slug",
|
|
274
279
|
description: "URL-friendly identifier",
|
|
275
|
-
children: /* @__PURE__ */
|
|
280
|
+
children: /* @__PURE__ */ v(f, {
|
|
276
281
|
placeholder: "customer-support-agent",
|
|
277
|
-
value:
|
|
278
|
-
onChange: (e) =>
|
|
279
|
-
...
|
|
282
|
+
value: J.slug,
|
|
283
|
+
onChange: (e) => Y({
|
|
284
|
+
...J,
|
|
280
285
|
slug: e.target.value
|
|
281
286
|
})
|
|
282
287
|
})
|
|
283
288
|
}),
|
|
284
|
-
/* @__PURE__ */
|
|
289
|
+
/* @__PURE__ */ v(d, {
|
|
285
290
|
label: "Description",
|
|
286
|
-
children: /* @__PURE__ */
|
|
291
|
+
children: /* @__PURE__ */ v(p, {
|
|
287
292
|
placeholder: "Describe what this agent does...",
|
|
288
|
-
value:
|
|
289
|
-
onChange: (e) =>
|
|
290
|
-
...
|
|
293
|
+
value: J.description,
|
|
294
|
+
onChange: (e) => Y({
|
|
295
|
+
...J,
|
|
291
296
|
description: e.target.value
|
|
292
297
|
}),
|
|
293
298
|
rows: 3
|
|
294
299
|
})
|
|
295
300
|
}),
|
|
296
|
-
/* @__PURE__ */
|
|
301
|
+
/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
|
|
297
302
|
className: "text-sm font-medium mb-2 block",
|
|
298
303
|
children: "Capabilities"
|
|
299
|
-
}), /* @__PURE__ */
|
|
304
|
+
}), /* @__PURE__ */ v("div", {
|
|
300
305
|
className: "grid grid-cols-2 md:grid-cols-3 gap-3",
|
|
301
|
-
children:
|
|
306
|
+
children: ue.map((e) => /* @__PURE__ */ y("label", {
|
|
302
307
|
className: "flex items-start gap-3 p-3 border border-border-subtle rounded-lg cursor-pointer hover:bg-accent",
|
|
303
|
-
children: [/* @__PURE__ */
|
|
308
|
+
children: [/* @__PURE__ */ v("input", {
|
|
304
309
|
type: "checkbox",
|
|
305
310
|
className: "h-4 w-4 rounded border-border-default mt-0.5",
|
|
306
|
-
checked:
|
|
307
|
-
onChange: () =>
|
|
308
|
-
}), /* @__PURE__ */
|
|
311
|
+
checked: J.capabilities.includes(e.key),
|
|
312
|
+
onChange: () => de(e.key)
|
|
313
|
+
}), /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
|
|
309
314
|
className: "font-medium text-sm",
|
|
310
315
|
children: e.label
|
|
311
|
-
}), /* @__PURE__ */
|
|
316
|
+
}), /* @__PURE__ */ v("p", {
|
|
312
317
|
className: "text-xs text-text-secondary",
|
|
313
318
|
children: e.description
|
|
314
319
|
})] })]
|
|
@@ -317,51 +322,51 @@ var I = () => {
|
|
|
317
322
|
]
|
|
318
323
|
})]
|
|
319
324
|
}),
|
|
320
|
-
|
|
325
|
+
K === 1 && /* @__PURE__ */ y(a, {
|
|
321
326
|
treatment: "glass",
|
|
322
327
|
glow: !0,
|
|
323
|
-
children: [/* @__PURE__ */
|
|
328
|
+
children: [/* @__PURE__ */ y(c, { children: [/* @__PURE__ */ v(l, { children: "Prompt Configuration" }), /* @__PURE__ */ v(s, { children: "Define how the agent communicates and behaves" })] }), /* @__PURE__ */ y(o, {
|
|
324
329
|
className: "space-y-6",
|
|
325
|
-
children: [/* @__PURE__ */
|
|
330
|
+
children: [/* @__PURE__ */ v(d, {
|
|
326
331
|
label: "System Prompt",
|
|
327
332
|
required: !0,
|
|
328
333
|
description: "The core instructions that define the agent's behavior",
|
|
329
|
-
children: /* @__PURE__ */
|
|
334
|
+
children: /* @__PURE__ */ v(p, {
|
|
330
335
|
placeholder: "You are a helpful assistant...",
|
|
331
|
-
value:
|
|
332
|
-
onChange: (e) =>
|
|
333
|
-
...
|
|
336
|
+
value: J.systemPrompt,
|
|
337
|
+
onChange: (e) => Y({
|
|
338
|
+
...J,
|
|
334
339
|
systemPrompt: e.target.value
|
|
335
340
|
}),
|
|
336
341
|
rows: 8,
|
|
337
342
|
className: "font-mono text-sm"
|
|
338
343
|
})
|
|
339
|
-
}), /* @__PURE__ */
|
|
344
|
+
}), /* @__PURE__ */ y("div", {
|
|
340
345
|
className: "grid grid-cols-2 gap-4",
|
|
341
|
-
children: [/* @__PURE__ */
|
|
346
|
+
children: [/* @__PURE__ */ v(d, {
|
|
342
347
|
label: "Temperature",
|
|
343
348
|
description: "Controls randomness (0-2)",
|
|
344
|
-
children: /* @__PURE__ */
|
|
349
|
+
children: /* @__PURE__ */ v(f, {
|
|
345
350
|
type: "number",
|
|
346
351
|
step: "0.1",
|
|
347
352
|
min: "0",
|
|
348
353
|
max: "2",
|
|
349
|
-
value:
|
|
350
|
-
onChange: (e) =>
|
|
351
|
-
...
|
|
354
|
+
value: J.temperature,
|
|
355
|
+
onChange: (e) => Y({
|
|
356
|
+
...J,
|
|
352
357
|
temperature: e.target.value
|
|
353
358
|
})
|
|
354
359
|
})
|
|
355
|
-
}), /* @__PURE__ */
|
|
360
|
+
}), /* @__PURE__ */ v(d, {
|
|
356
361
|
label: "Max Tokens",
|
|
357
362
|
description: "Maximum response length",
|
|
358
|
-
children: /* @__PURE__ */
|
|
363
|
+
children: /* @__PURE__ */ v(f, {
|
|
359
364
|
type: "number",
|
|
360
365
|
step: "256",
|
|
361
366
|
min: "1",
|
|
362
|
-
value:
|
|
363
|
-
onChange: (e) =>
|
|
364
|
-
...
|
|
367
|
+
value: J.maxTokens,
|
|
368
|
+
onChange: (e) => Y({
|
|
369
|
+
...J,
|
|
365
370
|
maxTokens: e.target.value
|
|
366
371
|
})
|
|
367
372
|
})
|
|
@@ -369,49 +374,67 @@ var I = () => {
|
|
|
369
374
|
})]
|
|
370
375
|
})]
|
|
371
376
|
}),
|
|
372
|
-
|
|
377
|
+
K === 2 && /* @__PURE__ */ y(a, {
|
|
373
378
|
treatment: "glass",
|
|
374
379
|
glow: !0,
|
|
375
|
-
children: [/* @__PURE__ */
|
|
380
|
+
children: [/* @__PURE__ */ y(c, { children: [/* @__PURE__ */ v(l, { children: "LLM Configuration" }), /* @__PURE__ */ v(s, { children: "Select the LLM model for this agent" })] }), /* @__PURE__ */ y(o, {
|
|
376
381
|
className: "space-y-6",
|
|
377
382
|
children: [
|
|
378
|
-
/* @__PURE__ */
|
|
383
|
+
/* @__PURE__ */ y(d, {
|
|
379
384
|
label: "LLM Model",
|
|
380
385
|
description: "Select a model for this agent",
|
|
381
|
-
children:
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
...q,
|
|
386
|
-
llmModelId: e.target.value
|
|
386
|
+
children: [
|
|
387
|
+
R && /* @__PURE__ */ v("p", {
|
|
388
|
+
role: "status",
|
|
389
|
+
children: "Loading answer models…"
|
|
387
390
|
}),
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
children: "
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
"
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
391
|
+
z && /* @__PURE__ */ y("div", {
|
|
392
|
+
role: "alert",
|
|
393
|
+
children: [/* @__PURE__ */ v("p", { children: "Could not load answer models." }), /* @__PURE__ */ v(u, {
|
|
394
|
+
variant: "secondary",
|
|
395
|
+
onClick: () => {
|
|
396
|
+
L(), N();
|
|
397
|
+
},
|
|
398
|
+
children: "Retry model catalog"
|
|
399
|
+
})]
|
|
400
|
+
}),
|
|
401
|
+
/* @__PURE__ */ y("select", {
|
|
402
|
+
"aria-label": "LLM Model",
|
|
403
|
+
disabled: R || !!z,
|
|
404
|
+
className: "flex h-10 w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm",
|
|
405
|
+
value: J.llmModelId,
|
|
406
|
+
onChange: (e) => Y({
|
|
407
|
+
...J,
|
|
408
|
+
llmModelId: e.target.value
|
|
409
|
+
}),
|
|
410
|
+
children: [/* @__PURE__ */ v("option", {
|
|
411
|
+
value: "",
|
|
412
|
+
children: "Select a model..."
|
|
413
|
+
}), B.map((e) => /* @__PURE__ */ y("option", {
|
|
414
|
+
value: e.id,
|
|
415
|
+
children: [
|
|
416
|
+
e.name,
|
|
417
|
+
" (",
|
|
418
|
+
e.modelId,
|
|
419
|
+
")"
|
|
420
|
+
]
|
|
421
|
+
}, e.id))]
|
|
422
|
+
})
|
|
423
|
+
]
|
|
401
424
|
}),
|
|
402
|
-
/* @__PURE__ */
|
|
425
|
+
/* @__PURE__ */ y("div", {
|
|
403
426
|
className: "p-4 bg-bg-sunken rounded-lg",
|
|
404
|
-
children: [/* @__PURE__ */
|
|
427
|
+
children: [/* @__PURE__ */ v("h4", {
|
|
405
428
|
className: "text-sm font-medium mb-2",
|
|
406
429
|
children: "Available Providers"
|
|
407
|
-
}), /* @__PURE__ */
|
|
430
|
+
}), /* @__PURE__ */ y("div", {
|
|
408
431
|
className: "grid grid-cols-2 gap-2",
|
|
409
|
-
children: [
|
|
432
|
+
children: [j?.map((e) => /* @__PURE__ */ y("div", {
|
|
410
433
|
className: "text-sm",
|
|
411
|
-
children: [/* @__PURE__ */
|
|
434
|
+
children: [/* @__PURE__ */ v("span", {
|
|
412
435
|
className: "font-medium",
|
|
413
436
|
children: e.name
|
|
414
|
-
}), /* @__PURE__ */
|
|
437
|
+
}), /* @__PURE__ */ y("span", {
|
|
415
438
|
className: "text-text-secondary ml-2",
|
|
416
439
|
children: [
|
|
417
440
|
"(",
|
|
@@ -419,36 +442,36 @@ var I = () => {
|
|
|
419
442
|
")"
|
|
420
443
|
]
|
|
421
444
|
})]
|
|
422
|
-
}, e.id)), !R?.length && /* @__PURE__ */
|
|
445
|
+
}, e.id)), !R && !z && !j?.length && /* @__PURE__ */ v("p", {
|
|
423
446
|
className: "text-sm text-text-secondary",
|
|
424
447
|
children: "No providers configured"
|
|
425
448
|
})]
|
|
426
449
|
})]
|
|
427
450
|
}),
|
|
428
|
-
!z
|
|
451
|
+
!R && !z && !B.length && /* @__PURE__ */ v("p", {
|
|
429
452
|
className: "text-sm text-text-secondary",
|
|
430
453
|
children: "No models available. Configure a provider and add models in Settings."
|
|
431
454
|
})
|
|
432
455
|
]
|
|
433
456
|
})]
|
|
434
457
|
}),
|
|
435
|
-
|
|
458
|
+
K === 3 && /* @__PURE__ */ v("div", {
|
|
436
459
|
className: "space-y-6",
|
|
437
|
-
children: /* @__PURE__ */
|
|
460
|
+
children: /* @__PURE__ */ y(a, {
|
|
438
461
|
treatment: "glass",
|
|
439
462
|
glow: !0,
|
|
440
|
-
children: [/* @__PURE__ */
|
|
463
|
+
children: [/* @__PURE__ */ y(c, { children: [/* @__PURE__ */ y(l, {
|
|
441
464
|
className: "flex items-center gap-2",
|
|
442
|
-
children: [/* @__PURE__ */
|
|
443
|
-
}), /* @__PURE__ */
|
|
465
|
+
children: [/* @__PURE__ */ v(C, { size: 18 }), "Tools & Knowledge"]
|
|
466
|
+
}), /* @__PURE__ */ v(s, { children: "Configure tools and knowledge bases for this agent" })] }), /* @__PURE__ */ v(o, { children: /* @__PURE__ */ y("div", {
|
|
444
467
|
className: "text-center py-12 text-text-secondary",
|
|
445
468
|
children: [
|
|
446
|
-
/* @__PURE__ */
|
|
447
|
-
/* @__PURE__ */
|
|
469
|
+
/* @__PURE__ */ v(C, { className: "h-10 w-10 mx-auto mb-3 opacity-50" }),
|
|
470
|
+
/* @__PURE__ */ v("p", {
|
|
448
471
|
className: "font-medium",
|
|
449
472
|
children: "Tools & Knowledge coming soon"
|
|
450
473
|
}),
|
|
451
|
-
/* @__PURE__ */
|
|
474
|
+
/* @__PURE__ */ v("p", {
|
|
452
475
|
className: "text-sm mt-2",
|
|
453
476
|
children: "MCP tool connections and knowledge base bindings will be configurable here in a future update."
|
|
454
477
|
})
|
|
@@ -456,31 +479,31 @@ var I = () => {
|
|
|
456
479
|
}) })]
|
|
457
480
|
})
|
|
458
481
|
}),
|
|
459
|
-
/* @__PURE__ */
|
|
482
|
+
/* @__PURE__ */ y("div", {
|
|
460
483
|
className: "flex justify-between pt-6",
|
|
461
|
-
children: [/* @__PURE__ */
|
|
484
|
+
children: [/* @__PURE__ */ v(u, {
|
|
462
485
|
variant: "outline",
|
|
463
|
-
onClick: () =>
|
|
464
|
-
disabled:
|
|
486
|
+
onClick: () => q(Math.max(0, K - 1)),
|
|
487
|
+
disabled: K === 0,
|
|
465
488
|
children: "Previous"
|
|
466
|
-
}),
|
|
467
|
-
onClick: () => K
|
|
489
|
+
}), K < X.length - 1 ? /* @__PURE__ */ v(u, {
|
|
490
|
+
onClick: () => q(K + 1),
|
|
468
491
|
children: "Next"
|
|
469
|
-
}) : /* @__PURE__ */
|
|
470
|
-
leftIcon: /* @__PURE__ */
|
|
492
|
+
}) : /* @__PURE__ */ v(u, {
|
|
493
|
+
leftIcon: /* @__PURE__ */ v(b, { size: 16 }),
|
|
471
494
|
onClick: Z,
|
|
472
495
|
isLoading: Q || $,
|
|
473
|
-
disabled: !
|
|
474
|
-
children:
|
|
496
|
+
disabled: !J.name || !J.systemPrompt,
|
|
497
|
+
children: G ? "Save Changes" : "Create Agent"
|
|
475
498
|
})]
|
|
476
499
|
})
|
|
477
500
|
]
|
|
478
501
|
})
|
|
479
502
|
]
|
|
480
|
-
}),
|
|
503
|
+
}), A && A.length > 0 && null]
|
|
481
504
|
});
|
|
482
505
|
};
|
|
483
506
|
//#endregion
|
|
484
|
-
export {
|
|
507
|
+
export { k as AgentBuilderPage };
|
|
485
508
|
|
|
486
509
|
//# sourceMappingURL=AgentBuilderPage.js.map
|