@burdenoff/microfe-botmanor 2026.1116.1 → 2026.1117.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/hooks/internal/workspaceGateway.js +33 -32
- package/dist/botlit/hooks/internal/workspaceGateway.js.map +1 -1
- package/dist/botlit/hooks/useAgents.d.ts +3 -1
- package/dist/botlit/hooks/useAgents.js +5 -4
- package/dist/botlit/hooks/useAgents.js.map +1 -1
- package/dist/botlit/hooks/useBotAgents.d.ts +12 -0
- package/dist/botlit/hooks/useBotAgents.js +54 -28
- package/dist/botlit/hooks/useBotAgents.js.map +1 -1
- package/dist/botlit/hooks/useKnowledgeBases.d.ts +13 -0
- package/dist/botlit/hooks/useKnowledgeBases.js +76 -53
- package/dist/botlit/hooks/useKnowledgeBases.js.map +1 -1
- package/dist/botlit/pages/AgentBuilderPage.js +229 -213
- package/dist/botlit/pages/AgentBuilderPage.js.map +1 -1
- package/dist/botlit/pages/AgentDetailPage.js +408 -379
- package/dist/botlit/pages/AgentDetailPage.js.map +1 -1
- package/dist/botlit/pages/KnowledgeBaseDetailPage.js +519 -265
- package/dist/botlit/pages/KnowledgeBaseDetailPage.js.map +1 -1
- package/dist/botlit/pages/KnowledgeBasesPage.js +269 -130
- package/dist/botlit/pages/KnowledgeBasesPage.js.map +1 -1
- package/dist/botlit/utils/kbDelete.d.ts +5 -0
- package/dist/botlit/utils/kbDelete.js +11 -0
- package/dist/botlit/utils/kbDelete.js.map +1 -0
- package/dist/botlit/utils/kbSettings.d.ts +41 -0
- package/dist/botlit/utils/kbSettings.js +60 -0
- package/dist/botlit/utils/kbSettings.js.map +1 -0
- package/dist/generated/wspace-operations.d.ts +71 -0
- package/dist/generated/wspace-operations.js +60 -48
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/generated/wspace-types.d.ts +23 -0
- package/dist/generated/wspace-types.js.map +1 -1
- package/package.json +1 -1
|
@@ -7,8 +7,8 @@ import { EmojiPicker as l } from "../components/EmojiPicker.js";
|
|
|
7
7
|
import { EmptyState as u } from "../components/EmptyState.js";
|
|
8
8
|
import { ErrorState as d } from "../components/ErrorState.js";
|
|
9
9
|
import { BOTMANOR_PERMISSIONS as f } from "../permissions/botmanorPermissions.js";
|
|
10
|
-
import { useBotmanorCan as
|
|
11
|
-
import { FormField as
|
|
10
|
+
import { useBotmanorCan as ee } from "../permissions/useBotmanorPermissions.js";
|
|
11
|
+
import { FormField as p, Input as m, Textarea as h } from "../components/Input.js";
|
|
12
12
|
import { useAgent as g, useCreateAgent as te, useUpdateAgent as ne } from "../hooks/useAgents.js";
|
|
13
13
|
import { useBot as re, useUpdateBot as ie } from "../hooks/useBots.js";
|
|
14
14
|
import { useLinkAgentToBot as ae } from "../hooks/useBotAgents.js";
|
|
@@ -25,10 +25,10 @@ import { useMemo as ye, useRef as be, useState as C } from "react";
|
|
|
25
25
|
import { PagePurpose as xe } from "@burdenoff/fe-libs/ui";
|
|
26
26
|
import { jsx as w, jsxs as T } from "react/jsx-runtime";
|
|
27
27
|
import { useParams as E } from "react-router";
|
|
28
|
-
import { AlertTriangle as D, ArrowLeft as Se, Brain as Ce, Save as we, Settings as Te, Sparkles as Ee, Wrench as
|
|
29
|
-
import { toast as
|
|
28
|
+
import { AlertTriangle as D, ArrowLeft as Se, Brain as Ce, Save as we, Settings as Te, Sparkles as Ee, Wrench as De } from "lucide-react";
|
|
29
|
+
import { toast as O } from "sonner";
|
|
30
30
|
// src/botlit/pages/AgentBuilderPage.tsx
|
|
31
|
-
var
|
|
31
|
+
var k = [
|
|
32
32
|
"MCP_TOOLS",
|
|
33
33
|
"RAG",
|
|
34
34
|
"REASONING",
|
|
@@ -37,19 +37,19 @@ var A = [
|
|
|
37
37
|
"CODE_EXECUTION",
|
|
38
38
|
"A2A",
|
|
39
39
|
"WEB_BROWSING"
|
|
40
|
-
],
|
|
40
|
+
], Oe = [
|
|
41
41
|
"ASSISTANT",
|
|
42
42
|
"ANALYST",
|
|
43
43
|
"AUTOMATION",
|
|
44
44
|
"SPECIALIST"
|
|
45
45
|
];
|
|
46
|
-
function
|
|
46
|
+
function ke(e) {
|
|
47
47
|
return e.flatMap((e) => {
|
|
48
|
-
let t =
|
|
48
|
+
let t = k.find((t) => t === e);
|
|
49
49
|
return t ? [t] : [];
|
|
50
50
|
});
|
|
51
51
|
}
|
|
52
|
-
var
|
|
52
|
+
var A = "🤖", Ae = [
|
|
53
53
|
{
|
|
54
54
|
emoji: "🤖",
|
|
55
55
|
key: "robot",
|
|
@@ -110,18 +110,18 @@ var j = "🤖", ke = [
|
|
|
110
110
|
key: "rocket",
|
|
111
111
|
label: "Rocket"
|
|
112
112
|
}
|
|
113
|
-
],
|
|
113
|
+
], j = "You are a helpful AI assistant. Be concise, accurate, and friendly.", M = [
|
|
114
114
|
"basics",
|
|
115
115
|
"prompt",
|
|
116
116
|
"model",
|
|
117
117
|
"tools"
|
|
118
118
|
];
|
|
119
|
-
function
|
|
119
|
+
function je(e) {
|
|
120
120
|
return e ? {
|
|
121
121
|
name: e.name,
|
|
122
122
|
slug: e.slug,
|
|
123
123
|
description: e.description ?? "",
|
|
124
|
-
avatar: e.avatar ||
|
|
124
|
+
avatar: e.avatar || A,
|
|
125
125
|
type: e.type || "ASSISTANT",
|
|
126
126
|
systemPrompt: e.systemPrompt ?? "",
|
|
127
127
|
temperature: e.temperature == null ? "" : String(e.temperature),
|
|
@@ -135,9 +135,9 @@ function Ae(e) {
|
|
|
135
135
|
name: "",
|
|
136
136
|
slug: "",
|
|
137
137
|
description: "",
|
|
138
|
-
avatar:
|
|
138
|
+
avatar: A,
|
|
139
139
|
type: "ASSISTANT",
|
|
140
|
-
systemPrompt:
|
|
140
|
+
systemPrompt: j,
|
|
141
141
|
temperature: "",
|
|
142
142
|
maxTokens: "",
|
|
143
143
|
maxConcurrentExecutions: "",
|
|
@@ -147,8 +147,8 @@ function Ae(e) {
|
|
|
147
147
|
mcpConnectionIds: []
|
|
148
148
|
};
|
|
149
149
|
}
|
|
150
|
-
var
|
|
151
|
-
let r = e(), { agentId: i, botId: a } = E(), { navigateTo: o } = t(), { data: s, loading: l, error: f, refetch:
|
|
150
|
+
var Me = "flex h-10 w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm", N = () => {
|
|
151
|
+
let r = e(), { agentId: i, botId: a } = E(), { navigateTo: o } = t(), { data: s, loading: l, error: f, refetch: ee } = g(i);
|
|
152
152
|
return i ? l ? /* @__PURE__ */ w(n, {
|
|
153
153
|
title: r("botlit.agentBuilder.editTitle", "Edit Agent"),
|
|
154
154
|
children: /* @__PURE__ */ w("div", {
|
|
@@ -162,9 +162,9 @@ var je = "flex h-10 w-full rounded-md border border-border-default bg-bg-surface
|
|
|
162
162
|
children: /* @__PURE__ */ w(d, {
|
|
163
163
|
resource: r("botlit.agentBuilder.resource", "this agent"),
|
|
164
164
|
error: f,
|
|
165
|
-
onRetry: () => void
|
|
165
|
+
onRetry: () => void ee()
|
|
166
166
|
})
|
|
167
|
-
}) : s ? /* @__PURE__ */ w(
|
|
167
|
+
}) : s ? /* @__PURE__ */ w(P, {
|
|
168
168
|
agent: s,
|
|
169
169
|
botId: a
|
|
170
170
|
}, s.id) : /* @__PURE__ */ w(n, {
|
|
@@ -178,27 +178,27 @@ var je = "flex h-10 w-full rounded-md border border-border-default bg-bg-surface
|
|
|
178
178
|
children: r("botlit.agentDetail.notFound.backAction", "Back to Agents")
|
|
179
179
|
})
|
|
180
180
|
})
|
|
181
|
-
}) : /* @__PURE__ */ w(
|
|
182
|
-
},
|
|
183
|
-
let E = e(), { navigateTo:
|
|
184
|
-
capabilities:
|
|
185
|
-
mcpServerCount:
|
|
186
|
-
knowledgeBaseCount:
|
|
187
|
-
}),
|
|
181
|
+
}) : /* @__PURE__ */ w(P, { botId: a });
|
|
182
|
+
}, P = ({ agent: u, botId: g }) => {
|
|
183
|
+
let E = e(), { navigateTo: k, workspaceId: A } = t(), j = !!u, N = g ? `bots/${g}/agents` : "agents", P = u ? `${N}/${u.id}` : N, [F, Pe] = C(() => je(u)), [I, Fe] = C("basics"), [L, Ie] = C(!1), Le = be({}), [Re, ze] = te(), [Be, Ve] = ne(), [He] = ae(), [Ue] = ie(), { data: We, loading: Ge, error: R, refetch: Ke } = re(g), qe = ee(), z = ze.loading || Ve.loading, B = !!g && !u, { data: V, loading: Je, error: Ye, refetch: Xe } = ce(), { data: Ze, loading: Qe, error: $e, refetch: et } = se(), H = Je || Qe, U = Ye || $e, W = ge(Ze ?? [], V ?? []), { data: G, loading: tt, error: nt, refetch: rt } = oe(), { data: it, loading: at, error: ot, refetch: st } = le(), K = ye(() => me(F), [F]), ct = Object.keys(K).length, lt = (e) => L && Object.keys(K).some((t) => v[t] === e), q = pe({
|
|
184
|
+
capabilities: F.capabilities,
|
|
185
|
+
mcpServerCount: F.mcpConnectionIds.length,
|
|
186
|
+
knowledgeBaseCount: F.knowledgeBaseIds.length
|
|
187
|
+
}), ut = F.llmModelId === "", J = (e, t) => Pe((n) => ({
|
|
188
188
|
...n,
|
|
189
189
|
[e]: t
|
|
190
|
-
})),
|
|
190
|
+
})), Y = (e, t) => Pe((n) => ({
|
|
191
191
|
...n,
|
|
192
192
|
[e]: n[e].includes(t) ? n[e].filter((e) => e !== t) : [...n[e], t]
|
|
193
|
-
})),
|
|
194
|
-
let t =
|
|
193
|
+
})), X = (e) => {
|
|
194
|
+
let t = L ? K[e] : void 0;
|
|
195
195
|
if (t) return E(`botlit.agentBuilder.errors.${t}`, ue[t]);
|
|
196
|
-
},
|
|
197
|
-
|
|
198
|
-
},
|
|
199
|
-
let n =
|
|
200
|
-
r !== void 0 && (e.preventDefault(),
|
|
201
|
-
},
|
|
196
|
+
}, Z = (e) => `agent-form-${e}`, Q = (e) => {
|
|
197
|
+
Fe(e), Le.current[e]?.focus();
|
|
198
|
+
}, dt = (e, t) => {
|
|
199
|
+
let n = M.length - 1, r = e.key === "ArrowRight" ? (t + 1) % M.length : e.key === "ArrowLeft" ? (t - 1 + M.length) % M.length : e.key === "Home" ? 0 : e.key === "End" ? n : void 0;
|
|
200
|
+
r !== void 0 && (e.preventDefault(), Q(M[r]));
|
|
201
|
+
}, ft = [
|
|
202
202
|
{
|
|
203
203
|
id: "basics",
|
|
204
204
|
label: E("botlit.agentBuilder.tabs.basics", "Basic Info"),
|
|
@@ -217,104 +217,104 @@ var je = "flex h-10 w-full rounded-md border border-border-default bg-bg-surface
|
|
|
217
217
|
{
|
|
218
218
|
id: "tools",
|
|
219
219
|
label: E("botlit.agentBuilder.tabs.tools", "Tools & Knowledge"),
|
|
220
|
-
icon: /* @__PURE__ */ w(
|
|
220
|
+
icon: /* @__PURE__ */ w(De, { size: 18 })
|
|
221
221
|
}
|
|
222
|
-
],
|
|
223
|
-
if (e.preventDefault(),
|
|
224
|
-
if (
|
|
225
|
-
|
|
222
|
+
], pt = async (e) => {
|
|
223
|
+
if (e.preventDefault(), z || B && Ge) return;
|
|
224
|
+
if (B && R) {
|
|
225
|
+
O.error(E("botlit.agentBuilder.botUnavailable", "The bot could not be read, so the agent cannot be linked to it yet. Try again."));
|
|
226
226
|
return;
|
|
227
227
|
}
|
|
228
|
-
if (!
|
|
229
|
-
|
|
228
|
+
if (!A) {
|
|
229
|
+
O.error(E("botlit.agentBuilder.noWorkspace", "No workspace is selected yet. Wait for it to load, or pick a workspace, then save again."));
|
|
230
230
|
return;
|
|
231
231
|
}
|
|
232
|
-
if (
|
|
233
|
-
|
|
234
|
-
let e =
|
|
235
|
-
e &&
|
|
232
|
+
if (ct > 0) {
|
|
233
|
+
Ie(!0);
|
|
234
|
+
let e = M.find((e) => Object.keys(K).some((t) => v[t] === e));
|
|
235
|
+
e && Q(e);
|
|
236
236
|
return;
|
|
237
237
|
}
|
|
238
|
-
let t =
|
|
239
|
-
if (
|
|
240
|
-
if (
|
|
241
|
-
|
|
238
|
+
let t = F.llmModelId !== (u?.llmModelId ?? "");
|
|
239
|
+
if (F.llmModelId && t) {
|
|
240
|
+
if (H) {
|
|
241
|
+
O.error(E("botlit.agentBuilder.modelLoading", "The model list is still loading. Try again in a moment.")), Q("model");
|
|
242
242
|
return;
|
|
243
243
|
}
|
|
244
|
-
if (
|
|
245
|
-
|
|
244
|
+
if (U || !W.some((e) => e.id === F.llmModelId)) {
|
|
245
|
+
O.error(E("botlit.agentBuilder.modelUnavailable", "Choose an active answer model from the available catalog.")), Q("model");
|
|
246
246
|
return;
|
|
247
247
|
}
|
|
248
248
|
}
|
|
249
|
-
let n =
|
|
249
|
+
let n = F.name.trim(), r = fe(n, F.slug), i = S(F.temperature), a = S(F.maxTokens), o = S(F.maxConcurrentExecutions), s = F.description.trim(), c = ve(F.type, Oe, "ASSISTANT"), l = ke(F.capabilities);
|
|
250
250
|
try {
|
|
251
251
|
if (u) {
|
|
252
|
-
await
|
|
252
|
+
await Be({
|
|
253
253
|
agentId: u.id,
|
|
254
254
|
input: {
|
|
255
255
|
name: n,
|
|
256
256
|
slug: r,
|
|
257
257
|
description: s === "" ? null : s,
|
|
258
|
-
avatar:
|
|
259
|
-
systemPrompt:
|
|
258
|
+
avatar: F.avatar,
|
|
259
|
+
systemPrompt: F.systemPrompt.trim(),
|
|
260
260
|
temperature: i ?? null,
|
|
261
261
|
maxTokens: a ?? null,
|
|
262
262
|
maxConcurrentExecutions: o ?? null,
|
|
263
263
|
capabilities: l,
|
|
264
|
-
llmModelId:
|
|
265
|
-
knowledgeBaseIds:
|
|
266
|
-
mcpConnectionIds:
|
|
264
|
+
llmModelId: F.llmModelId === "" ? null : F.llmModelId,
|
|
265
|
+
knowledgeBaseIds: F.knowledgeBaseIds,
|
|
266
|
+
mcpConnectionIds: F.mcpConnectionIds,
|
|
267
267
|
type: c
|
|
268
268
|
}
|
|
269
|
-
}),
|
|
269
|
+
}), O.success(E("botlit.agentBuilder.updated", "Agent \"{{name}}\" updated successfully", { name: n })), k(P);
|
|
270
270
|
return;
|
|
271
271
|
}
|
|
272
|
-
let e = await
|
|
273
|
-
workspaceId:
|
|
272
|
+
let e = await Re({
|
|
273
|
+
workspaceId: A,
|
|
274
274
|
name: n,
|
|
275
275
|
slug: r,
|
|
276
276
|
type: c,
|
|
277
277
|
description: s === "" ? void 0 : s,
|
|
278
|
-
avatar:
|
|
279
|
-
systemPrompt:
|
|
278
|
+
avatar: F.avatar,
|
|
279
|
+
systemPrompt: F.systemPrompt.trim(),
|
|
280
280
|
temperature: i,
|
|
281
281
|
maxTokens: a,
|
|
282
282
|
maxConcurrentExecutions: o,
|
|
283
283
|
capabilities: l,
|
|
284
|
-
llmModelId:
|
|
285
|
-
knowledgeBaseIds:
|
|
286
|
-
mcpConnectionIds:
|
|
284
|
+
llmModelId: F.llmModelId === "" ? void 0 : F.llmModelId,
|
|
285
|
+
knowledgeBaseIds: F.knowledgeBaseIds,
|
|
286
|
+
mcpConnectionIds: F.mcpConnectionIds
|
|
287
287
|
});
|
|
288
|
-
if (
|
|
289
|
-
if (!
|
|
290
|
-
|
|
288
|
+
if (O.success(E("botlit.agentBuilder.created", "Agent \"{{name}}\" created successfully", { name: n })), g) {
|
|
289
|
+
if (!qe(f.APP_AGENT_CREATE)) {
|
|
290
|
+
O.error(E("botlit.agentBuilder.linkNotAllowed", "The agent was created, but you are not allowed to link agents to bots, so it is not linked.")), k(`agents/${e.id}`);
|
|
291
291
|
return;
|
|
292
292
|
}
|
|
293
293
|
try {
|
|
294
|
-
await
|
|
294
|
+
await He({
|
|
295
295
|
botId: g,
|
|
296
296
|
agentId: e.id
|
|
297
297
|
});
|
|
298
298
|
} catch (t) {
|
|
299
|
-
|
|
299
|
+
O.error(t instanceof Error ? E("botlit.agentBuilder.linkFailed", "The agent was created but could not be linked to the bot: {{message}}", { message: t.message }) : E("botlit.agentBuilder.linkFailedShort", "The agent was created but could not be linked to the bot")), k(`agents/${e.id}`);
|
|
300
300
|
return;
|
|
301
301
|
}
|
|
302
|
-
if (
|
|
303
|
-
await
|
|
302
|
+
if (We && !We.defaultAgentId && qe(f.APP_UPDATE)) try {
|
|
303
|
+
await Ue({
|
|
304
304
|
botId: g,
|
|
305
305
|
input: { defaultAgentId: e.id }
|
|
306
306
|
});
|
|
307
307
|
} catch (e) {
|
|
308
|
-
|
|
308
|
+
O.error(e instanceof Error ? E("botlit.agentBuilder.defaultFailed", "The agent was linked, but it could not be set as the bot default: {{message}}", { message: e.message }) : E("botlit.agentBuilder.defaultFailedShort", "The agent was linked, but it could not be set as the bot default"));
|
|
309
309
|
}
|
|
310
|
-
|
|
310
|
+
k(`bots/${g}/agents`);
|
|
311
311
|
return;
|
|
312
312
|
}
|
|
313
|
-
|
|
313
|
+
k(`agents/${e.id}`);
|
|
314
314
|
} catch (e) {
|
|
315
|
-
|
|
315
|
+
O.error(e instanceof Error ? e.message : E("botlit.agentBuilder.saveFailed", "Failed to save agent"));
|
|
316
316
|
}
|
|
317
|
-
},
|
|
317
|
+
}, $ = j ? E("botlit.agentBuilder.save", "Save Changes") : E("botlit.agentBuilder.create", "Create Agent"), mt = (e) => {
|
|
318
318
|
switch (e) {
|
|
319
319
|
case "mcpToolsNeedsServer": return E("botlit.agentBuilder.warnings.mcpToolsNeedsServer", "MCP Tools is on but no MCP server is attached, so the agent has no tools. Attach a server on the Tools & Knowledge tab or turn it off.");
|
|
320
320
|
case "ragNeedsKnowledgeBase": return E("botlit.agentBuilder.warnings.ragNeedsKnowledgeBase", "RAG is on but no knowledge base is attached, so nothing is retrieved. Attach a knowledge base or turn it off.");
|
|
@@ -334,14 +334,14 @@ var je = "flex h-10 w-full rounded-md border border-border-default bg-bg-surface
|
|
|
334
334
|
label: E("botlit.agentBuilder.capabilities.a2a", "Agent delegation"),
|
|
335
335
|
description: E("botlit.agentBuilder.capabilities.a2aDescription", "Let the agent hand sub-tasks to other agents it is connected to.")
|
|
336
336
|
}
|
|
337
|
-
}, gt =
|
|
337
|
+
}, gt = F.capabilities.filter((e) => !de.includes(e)), _t = new Set(G.map((e) => e.id)), vt = new Set(it.map((e) => e.id)), yt = F.knowledgeBaseIds.filter((e) => !_t.has(e)), bt = G.filter((e) => F.knowledgeBaseIds.includes(e.id) && e.indexStatus !== "READY"), xt = F.mcpConnectionIds.filter((e) => !vt.has(e)), St = F.llmModelId !== "" && !H && !U && !W.some((e) => e.id === F.llmModelId);
|
|
338
338
|
return /* @__PURE__ */ w(n, {
|
|
339
|
-
title:
|
|
339
|
+
title: j ? E("botlit.agentBuilder.editTitle", "Edit Agent") : E("botlit.agentBuilder.createTitle", "Create New Agent"),
|
|
340
340
|
leading: /* @__PURE__ */ w(c, {
|
|
341
341
|
variant: "ghost",
|
|
342
342
|
size: "icon",
|
|
343
343
|
"aria-label": E("botlit.agentBuilder.back", "Back"),
|
|
344
|
-
onClick: () =>
|
|
344
|
+
onClick: () => k(P),
|
|
345
345
|
children: /* @__PURE__ */ w(Se, {
|
|
346
346
|
size: 20,
|
|
347
347
|
"aria-hidden": "true"
|
|
@@ -351,19 +351,19 @@ var je = "flex h-10 w-full rounded-md border border-border-default bg-bg-surface
|
|
|
351
351
|
className: "flex gap-2",
|
|
352
352
|
children: [/* @__PURE__ */ w(c, {
|
|
353
353
|
variant: "outline",
|
|
354
|
-
onClick: () =>
|
|
354
|
+
onClick: () => k(P),
|
|
355
355
|
children: E("botlit.common.cancel", "Cancel")
|
|
356
356
|
}), /* @__PURE__ */ w(c, {
|
|
357
357
|
type: "submit",
|
|
358
358
|
form: "agent-builder-form",
|
|
359
359
|
leftIcon: /* @__PURE__ */ w(we, { size: 16 }),
|
|
360
|
-
isLoading:
|
|
361
|
-
children:
|
|
360
|
+
isLoading: z || B && Ge,
|
|
361
|
+
children: $
|
|
362
362
|
})]
|
|
363
363
|
}),
|
|
364
364
|
children: /* @__PURE__ */ T("form", {
|
|
365
365
|
id: "agent-builder-form",
|
|
366
|
-
onSubmit: (e) => void
|
|
366
|
+
onSubmit: (e) => void pt(e),
|
|
367
367
|
noValidate: !0,
|
|
368
368
|
className: "max-w-4xl mx-auto",
|
|
369
369
|
children: [
|
|
@@ -372,21 +372,21 @@ var je = "flex h-10 w-full rounded-md border border-border-default bg-bg-surface
|
|
|
372
372
|
icon: /* @__PURE__ */ w(Ee, { size: 18 }),
|
|
373
373
|
children: E("botlit.agentBuilder.purpose", "This guided builder walks you through everything an agent needs: its identity and system prompt, the model and settings it runs on, and the tools and knowledge it can reach. Work through the steps, then save the agent and test it in chat. You can come back and edit any step later.")
|
|
374
374
|
}),
|
|
375
|
-
|
|
375
|
+
B && R && /* @__PURE__ */ w("div", {
|
|
376
376
|
role: "alert",
|
|
377
377
|
className: "mb-4",
|
|
378
378
|
children: /* @__PURE__ */ w(d, {
|
|
379
379
|
resource: E("botlit.agentBuilder.botResource", "this bot"),
|
|
380
|
-
error:
|
|
381
|
-
onRetry: () => void
|
|
380
|
+
error: R,
|
|
381
|
+
onRetry: () => void Ke()
|
|
382
382
|
})
|
|
383
383
|
}),
|
|
384
|
-
!
|
|
384
|
+
!A && /* @__PURE__ */ w("p", {
|
|
385
385
|
role: "status",
|
|
386
386
|
className: "mb-4 text-sm text-text-secondary",
|
|
387
387
|
children: E("botlit.agentBuilder.noWorkspace", "No workspace is selected yet. Wait for it to load, or pick a workspace, then save again.")
|
|
388
388
|
}),
|
|
389
|
-
|
|
389
|
+
L && ct > 0 && /* @__PURE__ */ T("div", {
|
|
390
390
|
role: "alert",
|
|
391
391
|
className: "mb-4 flex items-start gap-2 rounded-lg border border-status-error-border bg-status-error-bg-subtle p-3 text-sm text-text-primary",
|
|
392
392
|
children: [/* @__PURE__ */ w(D, {
|
|
@@ -399,11 +399,11 @@ var je = "flex h-10 w-full rounded-md border border-border-default bg-bg-surface
|
|
|
399
399
|
role: "tablist",
|
|
400
400
|
"aria-label": E("botlit.agentBuilder.stepsLabel", "Agent setup steps"),
|
|
401
401
|
className: "mb-8 flex flex-wrap items-center gap-2",
|
|
402
|
-
children:
|
|
403
|
-
let n =
|
|
402
|
+
children: ft.map((e, t) => {
|
|
403
|
+
let n = I === e.id, r = lt(e.id);
|
|
404
404
|
return /* @__PURE__ */ T("button", {
|
|
405
405
|
ref: (t) => {
|
|
406
|
-
|
|
406
|
+
Le.current[e.id] = t;
|
|
407
407
|
},
|
|
408
408
|
type: "button",
|
|
409
409
|
role: "tab",
|
|
@@ -411,8 +411,8 @@ var je = "flex h-10 w-full rounded-md border border-border-default bg-bg-surface
|
|
|
411
411
|
"aria-selected": n,
|
|
412
412
|
"aria-controls": `agent-panel-${e.id}`,
|
|
413
413
|
tabIndex: n ? 0 : -1,
|
|
414
|
-
onClick: () =>
|
|
415
|
-
onKeyDown: (e) =>
|
|
414
|
+
onClick: () => Fe(e.id),
|
|
415
|
+
onKeyDown: (e) => dt(e, t),
|
|
416
416
|
className: he("flex items-center gap-2 rounded-lg px-4 py-2 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary", n ? "bg-action-primary-bg text-action-primary-text" : "bg-bg-sunken text-text-secondary hover:bg-accent", r && "ring-2 ring-status-error-border"),
|
|
417
417
|
children: [
|
|
418
418
|
e.icon,
|
|
@@ -441,7 +441,7 @@ var je = "flex h-10 w-full rounded-md border border-border-default bg-bg-surface
|
|
|
441
441
|
role: "tabpanel",
|
|
442
442
|
id: "agent-panel-basics",
|
|
443
443
|
"aria-labelledby": "agent-tab-basics",
|
|
444
|
-
hidden:
|
|
444
|
+
hidden: I !== "basics",
|
|
445
445
|
children: /* @__PURE__ */ T(r, {
|
|
446
446
|
treatment: "glass",
|
|
447
447
|
glow: !0,
|
|
@@ -452,51 +452,51 @@ var je = "flex h-10 w-full rounded-md border border-border-default bg-bg-surface
|
|
|
452
452
|
className: "mb-2 text-sm font-medium",
|
|
453
453
|
children: E("botlit.agentBuilder.avatar", "Avatar")
|
|
454
454
|
}), /* @__PURE__ */ w(l, {
|
|
455
|
-
value:
|
|
456
|
-
onChange: (e) =>
|
|
457
|
-
choices:
|
|
455
|
+
value: F.avatar,
|
|
456
|
+
onChange: (e) => J("avatar", e),
|
|
457
|
+
choices: Ae,
|
|
458
458
|
groupLabel: E("botlit.agentBuilder.avatar", "Avatar"),
|
|
459
459
|
optionLabel: (e) => E(`botlit.agentBuilder.avatars.${e.key}`, e.label),
|
|
460
460
|
currentLabel: E("botlit.agentBuilder.avatars.current", "Current avatar")
|
|
461
461
|
})] }),
|
|
462
|
-
/* @__PURE__ */ w(
|
|
462
|
+
/* @__PURE__ */ w(p, {
|
|
463
463
|
label: E("botlit.agentBuilder.name", "Agent Name"),
|
|
464
464
|
required: !0,
|
|
465
|
-
htmlFor:
|
|
466
|
-
error:
|
|
467
|
-
children: /* @__PURE__ */ w(
|
|
468
|
-
id:
|
|
465
|
+
htmlFor: Z("name"),
|
|
466
|
+
error: X("name"),
|
|
467
|
+
children: /* @__PURE__ */ w(m, {
|
|
468
|
+
id: Z("name"),
|
|
469
469
|
required: !0,
|
|
470
|
-
"aria-invalid":
|
|
471
|
-
"aria-describedby":
|
|
470
|
+
"aria-invalid": X("name") ? !0 : void 0,
|
|
471
|
+
"aria-describedby": X("name") ? `${Z("name")}-error` : void 0,
|
|
472
472
|
maxLength: 120,
|
|
473
473
|
placeholder: E("botlit.agentBuilder.namePlaceholder", "e.g., Customer Support Agent"),
|
|
474
|
-
value:
|
|
475
|
-
onChange: (e) =>
|
|
474
|
+
value: F.name,
|
|
475
|
+
onChange: (e) => J("name", e.target.value)
|
|
476
476
|
})
|
|
477
477
|
}),
|
|
478
|
-
/* @__PURE__ */ w(
|
|
478
|
+
/* @__PURE__ */ w(p, {
|
|
479
479
|
label: E("botlit.agentBuilder.slug", "Slug"),
|
|
480
|
-
htmlFor:
|
|
481
|
-
error:
|
|
482
|
-
description:
|
|
483
|
-
children: /* @__PURE__ */ w(
|
|
484
|
-
id:
|
|
485
|
-
"aria-invalid":
|
|
486
|
-
"aria-describedby":
|
|
480
|
+
htmlFor: Z("slug"),
|
|
481
|
+
error: X("slug"),
|
|
482
|
+
description: F.slug.trim() === "" && _e(F.name) !== "" ? E("botlit.agentBuilder.slugDerived", "Will be saved as \"{{slug}}\".", { slug: _e(F.name) }) : E("botlit.agentBuilder.slugHelp", "URL-friendly identifier. Leave empty to build it from the name."),
|
|
483
|
+
children: /* @__PURE__ */ w(m, {
|
|
484
|
+
id: Z("slug"),
|
|
485
|
+
"aria-invalid": X("slug") ? !0 : void 0,
|
|
486
|
+
"aria-describedby": X("slug") ? `${Z("slug")}-error` : `${Z("slug")}-description`,
|
|
487
487
|
placeholder: "customer-support-agent",
|
|
488
|
-
value:
|
|
489
|
-
onChange: (e) =>
|
|
488
|
+
value: F.slug,
|
|
489
|
+
onChange: (e) => J("slug", e.target.value)
|
|
490
490
|
})
|
|
491
491
|
}),
|
|
492
|
-
/* @__PURE__ */ w(
|
|
492
|
+
/* @__PURE__ */ w(p, {
|
|
493
493
|
label: E("botlit.agentBuilder.descriptionLabel", "Description"),
|
|
494
|
-
htmlFor:
|
|
495
|
-
children: /* @__PURE__ */ w(
|
|
496
|
-
id:
|
|
494
|
+
htmlFor: Z("description"),
|
|
495
|
+
children: /* @__PURE__ */ w(h, {
|
|
496
|
+
id: Z("description"),
|
|
497
497
|
placeholder: E("botlit.agentBuilder.descriptionPlaceholder", "Describe what this agent does..."),
|
|
498
|
-
value:
|
|
499
|
-
onChange: (e) =>
|
|
498
|
+
value: F.description,
|
|
499
|
+
onChange: (e) => J("description", e.target.value),
|
|
500
500
|
rows: 3
|
|
501
501
|
})
|
|
502
502
|
}),
|
|
@@ -516,8 +516,8 @@ var je = "flex h-10 w-full rounded-md border border-border-default bg-bg-surface
|
|
|
516
516
|
children: [/* @__PURE__ */ w("input", {
|
|
517
517
|
type: "checkbox",
|
|
518
518
|
className: "mt-0.5 h-4 w-4 rounded border-border-default",
|
|
519
|
-
checked:
|
|
520
|
-
onChange: () =>
|
|
519
|
+
checked: F.capabilities.includes(e),
|
|
520
|
+
onChange: () => Y("capabilities", e)
|
|
521
521
|
}), /* @__PURE__ */ T("span", { children: [/* @__PURE__ */ w("span", {
|
|
522
522
|
className: "block text-sm font-medium",
|
|
523
523
|
children: ht[e].label
|
|
@@ -531,10 +531,10 @@ var je = "flex h-10 w-full rounded-md border border-border-default bg-bg-surface
|
|
|
531
531
|
className: "mt-3 text-xs text-text-secondary",
|
|
532
532
|
children: E("botlit.agentBuilder.unusedCapabilities", "This agent also carries {{names}}. They are kept as saved but have no effect yet.", { names: gt.join(", ") })
|
|
533
533
|
}),
|
|
534
|
-
|
|
534
|
+
q.length > 0 && /* @__PURE__ */ w("ul", {
|
|
535
535
|
role: "status",
|
|
536
536
|
className: "mt-3 space-y-1 text-sm text-status-warning-text",
|
|
537
|
-
children:
|
|
537
|
+
children: q.map((e) => /* @__PURE__ */ T("li", {
|
|
538
538
|
className: "flex items-start gap-2",
|
|
539
539
|
children: [/* @__PURE__ */ w(D, {
|
|
540
540
|
size: 14,
|
|
@@ -552,96 +552,96 @@ var je = "flex h-10 w-full rounded-md border border-border-default bg-bg-surface
|
|
|
552
552
|
role: "tabpanel",
|
|
553
553
|
id: "agent-panel-prompt",
|
|
554
554
|
"aria-labelledby": "agent-tab-prompt",
|
|
555
|
-
hidden:
|
|
555
|
+
hidden: I !== "prompt",
|
|
556
556
|
children: /* @__PURE__ */ T(r, {
|
|
557
557
|
treatment: "glass",
|
|
558
558
|
glow: !0,
|
|
559
559
|
children: [/* @__PURE__ */ T(o, { children: [/* @__PURE__ */ w(s, { children: E("botlit.agentBuilder.prompt.title", "Prompt Configuration") }), /* @__PURE__ */ w(a, { children: E("botlit.agentBuilder.prompt.description", "Define how the agent communicates and behaves") })] }), /* @__PURE__ */ T(i, {
|
|
560
560
|
className: "space-y-6",
|
|
561
|
-
children: [/* @__PURE__ */ w(
|
|
561
|
+
children: [/* @__PURE__ */ w(p, {
|
|
562
562
|
label: E("botlit.agentBuilder.systemPrompt", "System Prompt"),
|
|
563
563
|
required: !0,
|
|
564
|
-
htmlFor:
|
|
565
|
-
error:
|
|
564
|
+
htmlFor: Z("prompt"),
|
|
565
|
+
error: X("systemPrompt"),
|
|
566
566
|
description: E("botlit.agentBuilder.systemPromptHelp", "The core instructions that define the agent's behavior"),
|
|
567
|
-
children: /* @__PURE__ */ w(
|
|
568
|
-
id:
|
|
567
|
+
children: /* @__PURE__ */ w(h, {
|
|
568
|
+
id: Z("prompt"),
|
|
569
569
|
required: !0,
|
|
570
|
-
"aria-invalid":
|
|
571
|
-
"aria-describedby":
|
|
570
|
+
"aria-invalid": X("systemPrompt") ? !0 : void 0,
|
|
571
|
+
"aria-describedby": X("systemPrompt") ? `${Z("prompt")}-error` : `${Z("prompt")}-description`,
|
|
572
572
|
placeholder: E("botlit.agentBuilder.systemPromptPlaceholder", "You are a helpful assistant..."),
|
|
573
|
-
value:
|
|
574
|
-
onChange: (e) =>
|
|
573
|
+
value: F.systemPrompt,
|
|
574
|
+
onChange: (e) => J("systemPrompt", e.target.value),
|
|
575
575
|
rows: 8,
|
|
576
576
|
className: "font-mono text-sm"
|
|
577
577
|
})
|
|
578
578
|
}), /* @__PURE__ */ T("div", {
|
|
579
579
|
className: "grid grid-cols-1 gap-4 md:grid-cols-3",
|
|
580
580
|
children: [
|
|
581
|
-
/* @__PURE__ */ w(
|
|
581
|
+
/* @__PURE__ */ w(p, {
|
|
582
582
|
label: E("botlit.agentBuilder.temperature", "Temperature"),
|
|
583
|
-
htmlFor:
|
|
584
|
-
error:
|
|
583
|
+
htmlFor: Z("temperature"),
|
|
584
|
+
error: X("temperature"),
|
|
585
585
|
description: E("botlit.agentBuilder.temperatureHelp", "Randomness, {{min}} to {{max}}. 0 is the most predictable. Empty uses {{default}}.", {
|
|
586
586
|
min: x.min,
|
|
587
587
|
max: x.max,
|
|
588
588
|
default: _.temperature
|
|
589
589
|
}),
|
|
590
|
-
children: /* @__PURE__ */ w(
|
|
591
|
-
id:
|
|
590
|
+
children: /* @__PURE__ */ w(m, {
|
|
591
|
+
id: Z("temperature"),
|
|
592
592
|
type: "number",
|
|
593
593
|
step: "0.1",
|
|
594
594
|
min: x.min,
|
|
595
595
|
max: x.max,
|
|
596
596
|
placeholder: String(_.temperature),
|
|
597
|
-
"aria-invalid":
|
|
598
|
-
"aria-describedby":
|
|
599
|
-
value:
|
|
600
|
-
onChange: (e) =>
|
|
597
|
+
"aria-invalid": X("temperature") ? !0 : void 0,
|
|
598
|
+
"aria-describedby": X("temperature") ? `${Z("temperature")}-error` : `${Z("temperature")}-description`,
|
|
599
|
+
value: F.temperature,
|
|
600
|
+
onChange: (e) => J("temperature", e.target.value)
|
|
601
601
|
})
|
|
602
602
|
}),
|
|
603
|
-
/* @__PURE__ */ w(
|
|
603
|
+
/* @__PURE__ */ w(p, {
|
|
604
604
|
label: E("botlit.agentBuilder.maxTokens", "Max Tokens"),
|
|
605
|
-
htmlFor:
|
|
606
|
-
error:
|
|
605
|
+
htmlFor: Z("max-tokens"),
|
|
606
|
+
error: X("maxTokens"),
|
|
607
607
|
description: E("botlit.agentBuilder.maxTokensHelp", "Maximum response length, {{min}} to {{max}}. Empty uses {{default}}.", {
|
|
608
608
|
min: b.min,
|
|
609
609
|
max: b.max,
|
|
610
610
|
default: _.maxTokens
|
|
611
611
|
}),
|
|
612
|
-
children: /* @__PURE__ */ w(
|
|
613
|
-
id:
|
|
612
|
+
children: /* @__PURE__ */ w(m, {
|
|
613
|
+
id: Z("max-tokens"),
|
|
614
614
|
type: "number",
|
|
615
615
|
step: "1",
|
|
616
616
|
min: b.min,
|
|
617
617
|
max: b.max,
|
|
618
618
|
placeholder: String(_.maxTokens),
|
|
619
|
-
"aria-invalid":
|
|
620
|
-
"aria-describedby":
|
|
621
|
-
value:
|
|
622
|
-
onChange: (e) =>
|
|
619
|
+
"aria-invalid": X("maxTokens") ? !0 : void 0,
|
|
620
|
+
"aria-describedby": X("maxTokens") ? `${Z("max-tokens")}-error` : `${Z("max-tokens")}-description`,
|
|
621
|
+
value: F.maxTokens,
|
|
622
|
+
onChange: (e) => J("maxTokens", e.target.value)
|
|
623
623
|
})
|
|
624
624
|
}),
|
|
625
|
-
/* @__PURE__ */ w(
|
|
625
|
+
/* @__PURE__ */ w(p, {
|
|
626
626
|
label: E("botlit.agentBuilder.maxConcurrent", "Max Concurrent Runs"),
|
|
627
|
-
htmlFor:
|
|
628
|
-
error:
|
|
627
|
+
htmlFor: Z("max-concurrent"),
|
|
628
|
+
error: X("maxConcurrentExecutions"),
|
|
629
629
|
description: E("botlit.agentBuilder.maxConcurrentHelp", "How many runs can happen at once, {{min}} to {{max}}. Empty uses {{default}}.", {
|
|
630
630
|
min: y.min,
|
|
631
631
|
max: y.max,
|
|
632
632
|
default: _.maxConcurrentExecutions
|
|
633
633
|
}),
|
|
634
|
-
children: /* @__PURE__ */ w(
|
|
635
|
-
id:
|
|
634
|
+
children: /* @__PURE__ */ w(m, {
|
|
635
|
+
id: Z("max-concurrent"),
|
|
636
636
|
type: "number",
|
|
637
637
|
step: "1",
|
|
638
638
|
min: y.min,
|
|
639
639
|
max: y.max,
|
|
640
640
|
placeholder: String(_.maxConcurrentExecutions),
|
|
641
|
-
"aria-invalid":
|
|
642
|
-
"aria-describedby":
|
|
643
|
-
value:
|
|
644
|
-
onChange: (e) =>
|
|
641
|
+
"aria-invalid": X("maxConcurrentExecutions") ? !0 : void 0,
|
|
642
|
+
"aria-describedby": X("maxConcurrentExecutions") ? `${Z("max-concurrent")}-error` : `${Z("max-concurrent")}-description`,
|
|
643
|
+
value: F.maxConcurrentExecutions,
|
|
644
|
+
onChange: (e) => J("maxConcurrentExecutions", e.target.value)
|
|
645
645
|
})
|
|
646
646
|
})
|
|
647
647
|
]
|
|
@@ -653,50 +653,50 @@ var je = "flex h-10 w-full rounded-md border border-border-default bg-bg-surface
|
|
|
653
653
|
role: "tabpanel",
|
|
654
654
|
id: "agent-panel-model",
|
|
655
655
|
"aria-labelledby": "agent-tab-model",
|
|
656
|
-
hidden:
|
|
656
|
+
hidden: I !== "model",
|
|
657
657
|
children: /* @__PURE__ */ T(r, {
|
|
658
658
|
treatment: "glass",
|
|
659
659
|
glow: !0,
|
|
660
660
|
children: [/* @__PURE__ */ T(o, { children: [/* @__PURE__ */ w(s, { children: E("botlit.agentBuilder.model.title", "LLM Configuration") }), /* @__PURE__ */ w(a, { children: E("botlit.agentBuilder.model.description", "Select the LLM model for this agent") })] }), /* @__PURE__ */ T(i, {
|
|
661
661
|
className: "space-y-6",
|
|
662
662
|
children: [
|
|
663
|
-
/* @__PURE__ */ T(
|
|
663
|
+
/* @__PURE__ */ T(p, {
|
|
664
664
|
label: E("botlit.agentBuilder.model.label", "LLM Model"),
|
|
665
|
-
htmlFor:
|
|
665
|
+
htmlFor: Z("model"),
|
|
666
666
|
description: E("botlit.agentBuilder.model.help", "An agent needs a model before it can go live. You can save it as a draft without one and test it in chat once a model is set."),
|
|
667
667
|
children: [
|
|
668
|
-
|
|
668
|
+
H && /* @__PURE__ */ w("p", {
|
|
669
669
|
role: "status",
|
|
670
670
|
children: E("botlit.agentBuilder.model.loading", "Loading answer models…")
|
|
671
671
|
}),
|
|
672
|
-
|
|
672
|
+
U && /* @__PURE__ */ T("div", {
|
|
673
673
|
role: "alert",
|
|
674
674
|
children: [/* @__PURE__ */ w("p", { children: E("botlit.agentBuilder.model.loadFailed", "Could not load answer models.") }), /* @__PURE__ */ w(c, {
|
|
675
675
|
type: "button",
|
|
676
676
|
variant: "secondary",
|
|
677
677
|
onClick: () => {
|
|
678
|
-
|
|
678
|
+
et(), Xe();
|
|
679
679
|
},
|
|
680
680
|
children: E("botlit.agentBuilder.model.retry", "Retry model catalog")
|
|
681
681
|
})]
|
|
682
682
|
}),
|
|
683
683
|
/* @__PURE__ */ T("select", {
|
|
684
|
-
id:
|
|
685
|
-
"aria-describedby": `${
|
|
686
|
-
disabled:
|
|
687
|
-
className:
|
|
688
|
-
value:
|
|
689
|
-
onChange: (e) =>
|
|
684
|
+
id: Z("model"),
|
|
685
|
+
"aria-describedby": `${Z("model")}-description`,
|
|
686
|
+
disabled: H || !!U,
|
|
687
|
+
className: Me,
|
|
688
|
+
value: F.llmModelId,
|
|
689
|
+
onChange: (e) => J("llmModelId", e.target.value),
|
|
690
690
|
children: [
|
|
691
691
|
/* @__PURE__ */ w("option", {
|
|
692
692
|
value: "",
|
|
693
693
|
children: E("botlit.agentBuilder.model.none", "Select a model...")
|
|
694
694
|
}),
|
|
695
|
-
|
|
696
|
-
value:
|
|
697
|
-
children: E("botlit.agentBuilder.model.unavailable", "Unavailable model ({{id}})", { id:
|
|
695
|
+
St && /* @__PURE__ */ w("option", {
|
|
696
|
+
value: F.llmModelId,
|
|
697
|
+
children: E("botlit.agentBuilder.model.unavailable", "Unavailable model ({{id}})", { id: F.llmModelId })
|
|
698
698
|
}),
|
|
699
|
-
|
|
699
|
+
W.map((e) => /* @__PURE__ */ T("option", {
|
|
700
700
|
value: e.id,
|
|
701
701
|
children: [
|
|
702
702
|
e.name,
|
|
@@ -709,18 +709,18 @@ var je = "flex h-10 w-full rounded-md border border-border-default bg-bg-surface
|
|
|
709
709
|
})
|
|
710
710
|
]
|
|
711
711
|
}),
|
|
712
|
-
|
|
712
|
+
ut && !H && !U && /* @__PURE__ */ T("div", {
|
|
713
713
|
role: "status",
|
|
714
714
|
className: "flex items-start gap-2 rounded-lg border border-status-warning-border bg-status-warning-bg-subtle p-3 text-sm",
|
|
715
715
|
children: [/* @__PURE__ */ w(D, {
|
|
716
716
|
size: 16,
|
|
717
717
|
className: "mt-0.5 shrink-0 text-status-warning-text",
|
|
718
718
|
"aria-hidden": "true"
|
|
719
|
-
}), /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", { children:
|
|
719
|
+
}), /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", { children: W.length === 0 ? E("botlit.agentBuilder.model.noneConfigured", "No provider or model is configured in this workspace yet, so this agent cannot go live. Add a provider and a model in Settings first.") : E("botlit.agentBuilder.model.noneChosen", "No model is chosen. The agent can be saved as a draft, but it cannot go live until it has one.") }), W.length === 0 && /* @__PURE__ */ w(c, {
|
|
720
720
|
type: "button",
|
|
721
721
|
variant: "ghost",
|
|
722
722
|
className: "px-0",
|
|
723
|
-
onClick: () =>
|
|
723
|
+
onClick: () => k("settings"),
|
|
724
724
|
children: E("botlit.agentBuilder.model.openSettings", "Open Settings")
|
|
725
725
|
})] })]
|
|
726
726
|
}),
|
|
@@ -731,7 +731,7 @@ var je = "flex h-10 w-full rounded-md border border-border-default bg-bg-surface
|
|
|
731
731
|
children: E("botlit.agentBuilder.model.providers", "Available Providers")
|
|
732
732
|
}), /* @__PURE__ */ T("div", {
|
|
733
733
|
className: "grid grid-cols-2 gap-2",
|
|
734
|
-
children: [
|
|
734
|
+
children: [V?.map((e) => /* @__PURE__ */ T("div", {
|
|
735
735
|
className: "text-sm",
|
|
736
736
|
children: [/* @__PURE__ */ w("span", {
|
|
737
737
|
className: "font-medium",
|
|
@@ -744,7 +744,7 @@ var je = "flex h-10 w-full rounded-md border border-border-default bg-bg-surface
|
|
|
744
744
|
")"
|
|
745
745
|
]
|
|
746
746
|
})]
|
|
747
|
-
}, e.id)), !
|
|
747
|
+
}, e.id)), !H && !U && !V?.length && /* @__PURE__ */ w("p", {
|
|
748
748
|
className: "text-sm text-text-secondary",
|
|
749
749
|
children: E("botlit.agentBuilder.model.noProviders", "No providers configured")
|
|
750
750
|
})]
|
|
@@ -758,7 +758,7 @@ var je = "flex h-10 w-full rounded-md border border-border-default bg-bg-surface
|
|
|
758
758
|
role: "tabpanel",
|
|
759
759
|
id: "agent-panel-tools",
|
|
760
760
|
"aria-labelledby": "agent-tab-tools",
|
|
761
|
-
hidden:
|
|
761
|
+
hidden: I !== "tools",
|
|
762
762
|
children: /* @__PURE__ */ T("div", {
|
|
763
763
|
className: "space-y-6",
|
|
764
764
|
children: [
|
|
@@ -767,23 +767,23 @@ var je = "flex h-10 w-full rounded-md border border-border-default bg-bg-surface
|
|
|
767
767
|
glow: !0,
|
|
768
768
|
children: [/* @__PURE__ */ T(o, { children: [/* @__PURE__ */ T(s, {
|
|
769
769
|
className: "flex items-center gap-2",
|
|
770
|
-
children: [/* @__PURE__ */ w(
|
|
770
|
+
children: [/* @__PURE__ */ w(De, {
|
|
771
771
|
size: 18,
|
|
772
772
|
"aria-hidden": "true"
|
|
773
773
|
}), E("botlit.agentBuilder.tools.title", "MCP servers")]
|
|
774
|
-
}), /* @__PURE__ */ w(a, { children: E("botlit.agentBuilder.tools.description", "The tools of the servers you attach are available to the agent when MCP Tools is on.") })] }), /* @__PURE__ */ w(i, { children: /* @__PURE__ */ w(
|
|
774
|
+
}), /* @__PURE__ */ w(a, { children: E("botlit.agentBuilder.tools.description", "The tools of the servers you attach are available to the agent when MCP Tools is on.") })] }), /* @__PURE__ */ w(i, { children: /* @__PURE__ */ w(Ne, {
|
|
775
775
|
legend: E("botlit.agentBuilder.tools.legend", "MCP servers attached to this agent"),
|
|
776
|
-
items:
|
|
776
|
+
items: it.map((e) => ({
|
|
777
777
|
id: e.id,
|
|
778
778
|
name: e.name,
|
|
779
779
|
detail: e.status
|
|
780
780
|
})),
|
|
781
|
-
selected:
|
|
782
|
-
missing:
|
|
783
|
-
loading:
|
|
784
|
-
error:
|
|
785
|
-
onRetry: () => void
|
|
786
|
-
onToggle: (e) =>
|
|
781
|
+
selected: F.mcpConnectionIds,
|
|
782
|
+
missing: xt,
|
|
783
|
+
loading: at,
|
|
784
|
+
error: ot,
|
|
785
|
+
onRetry: () => void st(),
|
|
786
|
+
onToggle: (e) => Y("mcpConnectionIds", e),
|
|
787
787
|
emptyText: E("botlit.agentBuilder.tools.empty", "No MCP servers in this workspace yet. Add one on the MCP Servers page."),
|
|
788
788
|
resource: E("botlit.agentBuilder.tools.resource", "MCP servers")
|
|
789
789
|
}) })]
|
|
@@ -797,27 +797,27 @@ var je = "flex h-10 w-full rounded-md border border-border-default bg-bg-surface
|
|
|
797
797
|
size: 18,
|
|
798
798
|
"aria-hidden": "true"
|
|
799
799
|
}), E("botlit.agentBuilder.knowledge.title", "Knowledge bases")]
|
|
800
|
-
}), /* @__PURE__ */ w(a, { children: E("botlit.agentBuilder.knowledge.description", "The agent answers from the knowledge bases you attach when RAG is on.") })] }), /* @__PURE__ */ w(i, { children: /* @__PURE__ */ w(
|
|
800
|
+
}), /* @__PURE__ */ w(a, { children: E("botlit.agentBuilder.knowledge.description", "The agent answers from the knowledge bases you attach when RAG is on.") })] }), /* @__PURE__ */ w(i, { children: /* @__PURE__ */ w(Ne, {
|
|
801
801
|
legend: E("botlit.agentBuilder.knowledge.legend", "Knowledge bases attached to this agent"),
|
|
802
|
-
items:
|
|
802
|
+
items: G.map((e) => ({
|
|
803
803
|
id: e.id,
|
|
804
804
|
name: e.name,
|
|
805
805
|
detail: e.indexStatus
|
|
806
806
|
})),
|
|
807
|
-
selected:
|
|
807
|
+
selected: F.knowledgeBaseIds,
|
|
808
808
|
missing: yt,
|
|
809
|
-
loading:
|
|
810
|
-
error:
|
|
811
|
-
onRetry: () => void
|
|
812
|
-
onToggle: (e) =>
|
|
809
|
+
loading: tt,
|
|
810
|
+
error: nt,
|
|
811
|
+
onRetry: () => void rt(),
|
|
812
|
+
onToggle: (e) => Y("knowledgeBaseIds", e),
|
|
813
813
|
emptyText: E("botlit.agentBuilder.knowledge.empty", "No knowledge bases in this workspace yet. Create one on the Knowledge Bases page."),
|
|
814
814
|
resource: E("botlit.agentBuilder.knowledge.resource", "knowledge bases")
|
|
815
815
|
}) })]
|
|
816
816
|
}),
|
|
817
|
-
|
|
817
|
+
q.length > 0 && /* @__PURE__ */ w("ul", {
|
|
818
818
|
role: "status",
|
|
819
819
|
className: "space-y-1 text-sm text-status-warning-text",
|
|
820
|
-
children:
|
|
820
|
+
children: q.map((e) => /* @__PURE__ */ T("li", {
|
|
821
821
|
className: "flex items-start gap-2",
|
|
822
822
|
children: [/* @__PURE__ */ w(D, {
|
|
823
823
|
size: 14,
|
|
@@ -825,6 +825,22 @@ var je = "flex h-10 w-full rounded-md border border-border-default bg-bg-surface
|
|
|
825
825
|
"aria-hidden": "true"
|
|
826
826
|
}), mt(e)]
|
|
827
827
|
}, e))
|
|
828
|
+
}),
|
|
829
|
+
bt.length > 0 && /* @__PURE__ */ w("ul", {
|
|
830
|
+
role: "status",
|
|
831
|
+
"data-testid": "builder-knowledge-not-ready",
|
|
832
|
+
className: "space-y-1 text-sm text-status-warning-text",
|
|
833
|
+
children: bt.map((e) => /* @__PURE__ */ T("li", {
|
|
834
|
+
className: "flex items-start gap-2",
|
|
835
|
+
children: [/* @__PURE__ */ w(D, {
|
|
836
|
+
size: 14,
|
|
837
|
+
className: "mt-0.5 shrink-0",
|
|
838
|
+
"aria-hidden": "true"
|
|
839
|
+
}), E("botlit.agentBuilder.knowledge.notReady", "\"{{name}}\" is {{status}}. An agent with RAG on cannot answer until it is ready.", {
|
|
840
|
+
name: e.name,
|
|
841
|
+
status: e.indexStatus.toLowerCase()
|
|
842
|
+
})]
|
|
843
|
+
}, e.id))
|
|
828
844
|
})
|
|
829
845
|
]
|
|
830
846
|
})
|
|
@@ -834,17 +850,17 @@ var je = "flex h-10 w-full rounded-md border border-border-default bg-bg-surface
|
|
|
834
850
|
children: [/* @__PURE__ */ w(c, {
|
|
835
851
|
type: "button",
|
|
836
852
|
variant: "outline",
|
|
837
|
-
onClick: () =>
|
|
838
|
-
disabled:
|
|
853
|
+
onClick: () => Q(M[Math.max(0, M.indexOf(I) - 1)]),
|
|
854
|
+
disabled: I === M[0],
|
|
839
855
|
children: E("botlit.agentBuilder.previous", "Previous")
|
|
840
|
-
}),
|
|
856
|
+
}), I === M[M.length - 1] ? /* @__PURE__ */ w(c, {
|
|
841
857
|
type: "submit",
|
|
842
858
|
leftIcon: /* @__PURE__ */ w(we, { size: 16 }),
|
|
843
|
-
isLoading:
|
|
844
|
-
children:
|
|
859
|
+
isLoading: z,
|
|
860
|
+
children: $
|
|
845
861
|
}) : /* @__PURE__ */ w(c, {
|
|
846
862
|
type: "button",
|
|
847
|
-
onClick: () =>
|
|
863
|
+
onClick: () => Q(M[M.indexOf(I) + 1]),
|
|
848
864
|
children: E("botlit.agentBuilder.next", "Next")
|
|
849
865
|
})]
|
|
850
866
|
})
|
|
@@ -853,7 +869,7 @@ var je = "flex h-10 w-full rounded-md border border-border-default bg-bg-surface
|
|
|
853
869
|
]
|
|
854
870
|
})
|
|
855
871
|
});
|
|
856
|
-
},
|
|
872
|
+
}, Ne = ({ legend: t, items: n, selected: r, missing: i, loading: a, error: o, onRetry: s, onToggle: c, emptyText: l, resource: u }) => {
|
|
857
873
|
let f = e();
|
|
858
874
|
return a ? /* @__PURE__ */ w("p", {
|
|
859
875
|
role: "status",
|
|
@@ -910,6 +926,6 @@ var je = "flex h-10 w-full rounded-md border border-border-default bg-bg-surface
|
|
|
910
926
|
}) }, e))]
|
|
911
927
|
})] });
|
|
912
928
|
};
|
|
913
|
-
export {
|
|
929
|
+
export { N as AgentBuilderPage };
|
|
914
930
|
|
|
915
931
|
//# sourceMappingURL=AgentBuilderPage.js.map
|