@burdenoff/microfe-botmanor 2026.1117.1 → 2026.1118.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/BotlitRoutes.js +59 -55
- package/dist/botlit/BotlitRoutes.js.map +1 -1
- package/dist/botlit/components/AgentA2APanel.d.ts +13 -0
- package/dist/botlit/components/AgentA2APanel.js +149 -0
- package/dist/botlit/components/AgentA2APanel.js.map +1 -0
- package/dist/botlit/components/BotAgentsPanel.d.ts +15 -0
- package/dist/botlit/components/BotAgentsPanel.js +341 -0
- package/dist/botlit/components/BotAgentsPanel.js.map +1 -0
- package/dist/botlit/components/BotFormFields.d.ts +4 -0
- package/dist/botlit/components/BotFormFields.js +108 -74
- package/dist/botlit/components/BotFormFields.js.map +1 -1
- package/dist/botlit/components/BotRoutingSummary.d.ts +13 -0
- package/dist/botlit/components/BotRoutingSummary.js +126 -0
- package/dist/botlit/components/BotRoutingSummary.js.map +1 -0
- package/dist/botlit/components/BotVersionHistoryPanel.d.ts +8 -0
- package/dist/botlit/components/BotVersionHistoryPanel.js +172 -0
- package/dist/botlit/components/BotVersionHistoryPanel.js.map +1 -0
- package/dist/botlit/components/CreateFromTemplate.d.ts +12 -0
- package/dist/botlit/components/CreateFromTemplate.js +129 -0
- package/dist/botlit/components/CreateFromTemplate.js.map +1 -0
- package/dist/botlit/components/EntityTags.d.ts +24 -0
- package/dist/botlit/components/EntityTags.js +72 -0
- package/dist/botlit/components/EntityTags.js.map +1 -0
- package/dist/botlit/components/GuardrailPoliciesPanel.d.ts +10 -0
- package/dist/botlit/components/GuardrailPoliciesPanel.js +91 -0
- package/dist/botlit/components/GuardrailPoliciesPanel.js.map +1 -0
- package/dist/botlit/hooks/useA2AConnections.d.ts +21 -0
- package/dist/botlit/hooks/useA2AConnections.js +82 -0
- package/dist/botlit/hooks/useA2AConnections.js.map +1 -0
- package/dist/botlit/hooks/useAgentTestChat.d.ts +29 -0
- package/dist/botlit/hooks/useAgentTestChat.js +35 -0
- package/dist/botlit/hooks/useAgentTestChat.js.map +1 -0
- package/dist/botlit/hooks/useAgents.d.ts +3 -0
- package/dist/botlit/hooks/useAgents.js +4 -0
- package/dist/botlit/hooks/useAgents.js.map +1 -1
- package/dist/botlit/hooks/useBotAgents.d.ts +22 -1
- package/dist/botlit/hooks/useBotAgents.js +46 -12
- package/dist/botlit/hooks/useBotAgents.js.map +1 -1
- package/dist/botlit/hooks/useBotVersions.d.ts +25 -0
- package/dist/botlit/hooks/useBotVersions.js +69 -0
- package/dist/botlit/hooks/useBotVersions.js.map +1 -0
- package/dist/botlit/hooks/useBots.d.ts +3 -0
- package/dist/botlit/hooks/useBots.js +4 -0
- package/dist/botlit/hooks/useBots.js.map +1 -1
- package/dist/botlit/hooks/useLLMProviders.js +40 -32
- package/dist/botlit/hooks/useLLMProviders.js.map +1 -1
- package/dist/botlit/hooks/useTemplates.d.ts +19 -0
- package/dist/botlit/hooks/useTemplates.js +71 -0
- package/dist/botlit/hooks/useTemplates.js.map +1 -0
- package/dist/botlit/pages/AgentBuilderPage.js +388 -347
- package/dist/botlit/pages/AgentBuilderPage.js.map +1 -1
- package/dist/botlit/pages/AgentDetailPage.js +237 -247
- package/dist/botlit/pages/AgentDetailPage.js.map +1 -1
- package/dist/botlit/pages/AgentTestChatPage.d.ts +2 -0
- package/dist/botlit/pages/AgentTestChatPage.js +176 -0
- package/dist/botlit/pages/AgentTestChatPage.js.map +1 -0
- package/dist/botlit/pages/AgentsListPage.js +2 -2
- package/dist/botlit/pages/AgentsListPage.js.map +1 -1
- package/dist/botlit/pages/BotDetailPage.js +398 -447
- package/dist/botlit/pages/BotDetailPage.js.map +1 -1
- package/dist/botlit/pages/ChatPage.js +19 -12
- package/dist/botlit/pages/ChatPage.js.map +1 -1
- package/dist/botlit/pages/SettingsPage.d.ts +7 -0
- package/dist/botlit/pages/SettingsPage.js +120 -85
- package/dist/botlit/pages/SettingsPage.js.map +1 -1
- package/dist/botlit/pages/index.d.ts +1 -0
- package/dist/botlit/utils/botRouting.d.ts +42 -0
- package/dist/botlit/utils/botRouting.js +52 -0
- package/dist/botlit/utils/botRouting.js.map +1 -0
- package/dist/generated/wspace-operations.js +41 -43
- package/dist/generated/wspace-operations.js.map +1 -1
- package/package.json +10 -12
|
@@ -8,27 +8,28 @@ 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
10
|
import { useBotmanorCan as ee } from "../permissions/useBotmanorPermissions.js";
|
|
11
|
-
import { FormField as p, Input as m, Textarea as
|
|
12
|
-
import { useAgent as
|
|
13
|
-
import { useBot as
|
|
14
|
-
import { useLinkAgentToBot as
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
11
|
+
import { FormField as p, Input as m, Textarea as te } from "../components/Input.js";
|
|
12
|
+
import { useAgent as h, useCreateAgent as ne, useUpdateAgent as re } from "../hooks/useAgents.js";
|
|
13
|
+
import { useBot as ie, useUpdateBot as ae } from "../hooks/useBots.js";
|
|
14
|
+
import { useLinkAgentToBot as oe } from "../hooks/useBotAgents.js";
|
|
15
|
+
import { CreateFromTemplate as se } from "../components/CreateFromTemplate.js";
|
|
16
|
+
import { useKnowledgeBases as ce } from "../hooks/useKnowledgeBases.js";
|
|
17
|
+
import { useLLMModels as le, useLLMProviders as ue } from "../hooks/useLLMProviders.js";
|
|
18
|
+
import { useMCPServers as de } from "../hooks/useMCPServers.js";
|
|
19
|
+
import { AGENT_DEFAULTS as g, AGENT_FIELD_MESSAGES as fe, AGENT_FIELD_TAB as pe, AGENT_MAX_CONCURRENT_RANGE as _, AGENT_MAX_TOKENS_RANGE as v, AGENT_TEMPERATURE_RANGE as y, OFFERED_CAPABILITIES as me, agentSlugFor as he, capabilityWarnings as ge, parseNumberField as b, validateAgentForm as _e } from "../utils/agentSettings.js";
|
|
19
20
|
import "../permissions/index.js";
|
|
20
|
-
import { cn as
|
|
21
|
-
import { configuredAnswerModels as
|
|
22
|
-
import { slugify as
|
|
23
|
-
import { toUnion as
|
|
24
|
-
import { useMemo as
|
|
25
|
-
import { PagePurpose as
|
|
26
|
-
import { jsx as
|
|
27
|
-
import { useParams as
|
|
28
|
-
import { AlertTriangle as
|
|
29
|
-
import { toast as
|
|
21
|
+
import { cn as ve } from "../utils/cn.js";
|
|
22
|
+
import { configuredAnswerModels as ye } from "../utils/embedding-models.js";
|
|
23
|
+
import { slugify as be } from "../utils/botIdentity.js";
|
|
24
|
+
import { toUnion as x } from "../utils/unions.js";
|
|
25
|
+
import { useMemo as xe, useRef as Se, useState as S } from "react";
|
|
26
|
+
import { PagePurpose as Ce } from "@burdenoff/fe-libs/ui";
|
|
27
|
+
import { jsx as C, jsxs as w } from "react/jsx-runtime";
|
|
28
|
+
import { useParams as T } from "react-router";
|
|
29
|
+
import { AlertTriangle as E, ArrowLeft as we, Brain as Te, Save as Ee, Settings as De, Sparkles as Oe, Wrench as ke } from "lucide-react";
|
|
30
|
+
import { toast as D } from "sonner";
|
|
30
31
|
// src/botlit/pages/AgentBuilderPage.tsx
|
|
31
|
-
var
|
|
32
|
+
var O = [
|
|
32
33
|
"MCP_TOOLS",
|
|
33
34
|
"RAG",
|
|
34
35
|
"REASONING",
|
|
@@ -37,19 +38,19 @@ var k = [
|
|
|
37
38
|
"CODE_EXECUTION",
|
|
38
39
|
"A2A",
|
|
39
40
|
"WEB_BROWSING"
|
|
40
|
-
],
|
|
41
|
+
], Ae = [
|
|
41
42
|
"ASSISTANT",
|
|
42
43
|
"ANALYST",
|
|
43
44
|
"AUTOMATION",
|
|
44
45
|
"SPECIALIST"
|
|
45
46
|
];
|
|
46
|
-
function
|
|
47
|
+
function je(e) {
|
|
47
48
|
return e.flatMap((e) => {
|
|
48
|
-
let t =
|
|
49
|
+
let t = O.find((t) => t === e);
|
|
49
50
|
return t ? [t] : [];
|
|
50
51
|
});
|
|
51
52
|
}
|
|
52
|
-
var
|
|
53
|
+
var k = "🤖", Me = [
|
|
53
54
|
{
|
|
54
55
|
emoji: "🤖",
|
|
55
56
|
key: "robot",
|
|
@@ -110,19 +111,20 @@ var A = "🤖", Ae = [
|
|
|
110
111
|
key: "rocket",
|
|
111
112
|
label: "Rocket"
|
|
112
113
|
}
|
|
113
|
-
],
|
|
114
|
+
], A = "You are a helpful AI assistant. Be concise, accurate, and friendly.", j = [
|
|
114
115
|
"basics",
|
|
115
116
|
"prompt",
|
|
116
117
|
"model",
|
|
117
118
|
"tools"
|
|
118
119
|
];
|
|
119
|
-
function
|
|
120
|
+
function Ne(e) {
|
|
120
121
|
return e ? {
|
|
121
122
|
name: e.name,
|
|
122
123
|
slug: e.slug,
|
|
123
124
|
description: e.description ?? "",
|
|
124
|
-
avatar: e.avatar ||
|
|
125
|
+
avatar: e.avatar || k,
|
|
125
126
|
type: e.type || "ASSISTANT",
|
|
127
|
+
visibility: x(e.visibility, Pe, "PRIVATE"),
|
|
126
128
|
systemPrompt: e.systemPrompt ?? "",
|
|
127
129
|
temperature: e.temperature == null ? "" : String(e.temperature),
|
|
128
130
|
maxTokens: e.maxTokens == null ? "" : String(e.maxTokens),
|
|
@@ -135,9 +137,10 @@ function je(e) {
|
|
|
135
137
|
name: "",
|
|
136
138
|
slug: "",
|
|
137
139
|
description: "",
|
|
138
|
-
avatar:
|
|
140
|
+
avatar: k,
|
|
139
141
|
type: "ASSISTANT",
|
|
140
|
-
|
|
142
|
+
visibility: "PRIVATE",
|
|
143
|
+
systemPrompt: A,
|
|
141
144
|
temperature: "",
|
|
142
145
|
maxTokens: "",
|
|
143
146
|
maxConcurrentExecutions: "",
|
|
@@ -147,263 +150,275 @@ function je(e) {
|
|
|
147
150
|
mcpConnectionIds: []
|
|
148
151
|
};
|
|
149
152
|
}
|
|
150
|
-
var
|
|
151
|
-
|
|
152
|
-
|
|
153
|
+
var Pe = [
|
|
154
|
+
"PRIVATE",
|
|
155
|
+
"WORKSPACE",
|
|
156
|
+
"PUBLIC"
|
|
157
|
+
], Fe = "flex h-10 w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm", M = () => {
|
|
158
|
+
let r = e(), { agentId: i, botId: a } = T(), { navigateTo: o } = t(), { data: s, loading: l, error: f, refetch: ee } = h(i);
|
|
159
|
+
return i ? l ? /* @__PURE__ */ C(n, {
|
|
153
160
|
title: r("botlit.agentBuilder.editTitle", "Edit Agent"),
|
|
154
|
-
children: /* @__PURE__ */
|
|
161
|
+
children: /* @__PURE__ */ C("div", {
|
|
155
162
|
role: "status",
|
|
156
163
|
"aria-busy": "true",
|
|
157
164
|
"aria-label": r("botlit.common.loading", "Loading..."),
|
|
158
165
|
className: "h-96 bg-bg-sunken motion-safe:animate-vc-shimmer rounded-lg"
|
|
159
166
|
})
|
|
160
|
-
}) : f ? /* @__PURE__ */
|
|
167
|
+
}) : f ? /* @__PURE__ */ C(n, {
|
|
161
168
|
title: r("botlit.agentBuilder.editTitle", "Edit Agent"),
|
|
162
|
-
children: /* @__PURE__ */
|
|
169
|
+
children: /* @__PURE__ */ C(d, {
|
|
163
170
|
resource: r("botlit.agentBuilder.resource", "this agent"),
|
|
164
171
|
error: f,
|
|
165
172
|
onRetry: () => void ee()
|
|
166
173
|
})
|
|
167
|
-
}) : s ? /* @__PURE__ */
|
|
174
|
+
}) : s ? /* @__PURE__ */ C(N, {
|
|
168
175
|
agent: s,
|
|
169
176
|
botId: a
|
|
170
|
-
}, s.id) : /* @__PURE__ */
|
|
177
|
+
}, s.id) : /* @__PURE__ */ C(n, {
|
|
171
178
|
title: r("botlit.agentDetail.notFound.title", "Agent Not Found"),
|
|
172
|
-
children: /* @__PURE__ */
|
|
179
|
+
children: /* @__PURE__ */ C(u, {
|
|
173
180
|
illustration: "empty-agents",
|
|
174
181
|
title: r("botlit.agentDetail.notFound.title", "Agent Not Found"),
|
|
175
182
|
description: r("botlit.agentDetail.notFound.description", "The agent you're looking for doesn't exist."),
|
|
176
|
-
action: /* @__PURE__ */
|
|
183
|
+
action: /* @__PURE__ */ C(c, {
|
|
177
184
|
onClick: () => o(a ? `bots/${a}/agents` : "agents"),
|
|
178
185
|
children: r("botlit.agentDetail.notFound.backAction", "Back to Agents")
|
|
179
186
|
})
|
|
180
187
|
})
|
|
181
|
-
}) : /* @__PURE__ */
|
|
182
|
-
},
|
|
183
|
-
let
|
|
184
|
-
capabilities:
|
|
185
|
-
mcpServerCount:
|
|
186
|
-
knowledgeBaseCount:
|
|
187
|
-
}),
|
|
188
|
+
}) : /* @__PURE__ */ C(N, { botId: a });
|
|
189
|
+
}, N = ({ agent: u, botId: h }) => {
|
|
190
|
+
let T = e(), { navigateTo: O, workspaceId: k } = t(), A = !!u, M = h ? `bots/${h}/agents` : "agents", N = u ? `${M}/${u.id}` : M, [P, F] = S(() => Ne(u)), [I, Le] = S("basics"), [L, Re] = S(!1), ze = Se({}), [Be, Ve] = ne(), [He, Ue] = re(), [We] = oe(), [Ge] = ae(), { data: Ke, loading: qe, error: R, refetch: Je } = ie(h), Ye = ee(), z = Ve.loading || Ue.loading, B = !!h && !u, { data: V, loading: Xe, error: Ze, refetch: Qe } = ue(), { data: $e, loading: et, error: tt, refetch: nt } = le(), H = Xe || et, U = Ze || tt, W = ye($e ?? [], V ?? []), { data: G, loading: rt, error: it, refetch: at } = ce(), { data: ot, loading: st, error: ct, refetch: lt } = de(), K = xe(() => _e(P), [P]), ut = Object.keys(K).length, dt = (e) => L && Object.keys(K).some((t) => pe[t] === e), q = ge({
|
|
191
|
+
capabilities: P.capabilities,
|
|
192
|
+
mcpServerCount: P.mcpConnectionIds.length,
|
|
193
|
+
knowledgeBaseCount: P.knowledgeBaseIds.length
|
|
194
|
+
}), ft = P.llmModelId === "", J = (e, t) => F((n) => ({
|
|
188
195
|
...n,
|
|
189
196
|
[e]: t
|
|
190
|
-
})), Y = (e, t) =>
|
|
197
|
+
})), Y = (e, t) => F((n) => ({
|
|
191
198
|
...n,
|
|
192
199
|
[e]: n[e].includes(t) ? n[e].filter((e) => e !== t) : [...n[e], t]
|
|
193
200
|
})), X = (e) => {
|
|
194
201
|
let t = L ? K[e] : void 0;
|
|
195
|
-
if (t) return
|
|
202
|
+
if (t) return T(`botlit.agentBuilder.errors.${t}`, fe[t]);
|
|
196
203
|
}, Z = (e) => `agent-form-${e}`, Q = (e) => {
|
|
197
|
-
|
|
198
|
-
},
|
|
199
|
-
let n =
|
|
200
|
-
r !== void 0 && (e.preventDefault(), Q(
|
|
201
|
-
},
|
|
204
|
+
Le(e), ze.current[e]?.focus();
|
|
205
|
+
}, pt = (e, t) => {
|
|
206
|
+
let n = j.length - 1, r = e.key === "ArrowRight" ? (t + 1) % j.length : e.key === "ArrowLeft" ? (t - 1 + j.length) % j.length : e.key === "Home" ? 0 : e.key === "End" ? n : void 0;
|
|
207
|
+
r !== void 0 && (e.preventDefault(), Q(j[r]));
|
|
208
|
+
}, mt = [
|
|
202
209
|
{
|
|
203
210
|
id: "basics",
|
|
204
|
-
label:
|
|
205
|
-
icon: /* @__PURE__ */
|
|
211
|
+
label: T("botlit.agentBuilder.tabs.basics", "Basic Info"),
|
|
212
|
+
icon: /* @__PURE__ */ C(Oe, { size: 18 })
|
|
206
213
|
},
|
|
207
214
|
{
|
|
208
215
|
id: "prompt",
|
|
209
|
-
label:
|
|
210
|
-
icon: /* @__PURE__ */
|
|
216
|
+
label: T("botlit.agentBuilder.tabs.prompt", "Prompt"),
|
|
217
|
+
icon: /* @__PURE__ */ C(Te, { size: 18 })
|
|
211
218
|
},
|
|
212
219
|
{
|
|
213
220
|
id: "model",
|
|
214
|
-
label:
|
|
215
|
-
icon: /* @__PURE__ */
|
|
221
|
+
label: T("botlit.agentBuilder.tabs.model", "LLM Model"),
|
|
222
|
+
icon: /* @__PURE__ */ C(De, { size: 18 })
|
|
216
223
|
},
|
|
217
224
|
{
|
|
218
225
|
id: "tools",
|
|
219
|
-
label:
|
|
220
|
-
icon: /* @__PURE__ */
|
|
226
|
+
label: T("botlit.agentBuilder.tabs.tools", "Tools & Knowledge"),
|
|
227
|
+
icon: /* @__PURE__ */ C(ke, { size: 18 })
|
|
221
228
|
}
|
|
222
|
-
],
|
|
223
|
-
if (e.preventDefault(), z || B &&
|
|
229
|
+
], ht = async (e) => {
|
|
230
|
+
if (e.preventDefault(), z || B && qe) return;
|
|
224
231
|
if (B && R) {
|
|
225
|
-
|
|
232
|
+
D.error(T("botlit.agentBuilder.botUnavailable", "The bot could not be read, so the agent cannot be linked to it yet. Try again."));
|
|
226
233
|
return;
|
|
227
234
|
}
|
|
228
|
-
if (!
|
|
229
|
-
|
|
235
|
+
if (!k) {
|
|
236
|
+
D.error(T("botlit.agentBuilder.noWorkspace", "No workspace is selected yet. Wait for it to load, or pick a workspace, then save again."));
|
|
230
237
|
return;
|
|
231
238
|
}
|
|
232
|
-
if (
|
|
233
|
-
|
|
234
|
-
let e =
|
|
239
|
+
if (ut > 0) {
|
|
240
|
+
Re(!0);
|
|
241
|
+
let e = j.find((e) => Object.keys(K).some((t) => pe[t] === e));
|
|
235
242
|
e && Q(e);
|
|
236
243
|
return;
|
|
237
244
|
}
|
|
238
|
-
let t =
|
|
239
|
-
if (
|
|
245
|
+
let t = P.llmModelId !== (u?.llmModelId ?? "");
|
|
246
|
+
if (P.llmModelId && t) {
|
|
240
247
|
if (H) {
|
|
241
|
-
|
|
248
|
+
D.error(T("botlit.agentBuilder.modelLoading", "The model list is still loading. Try again in a moment.")), Q("model");
|
|
242
249
|
return;
|
|
243
250
|
}
|
|
244
|
-
if (U || !W.some((e) => e.id ===
|
|
245
|
-
|
|
251
|
+
if (U || !W.some((e) => e.id === P.llmModelId)) {
|
|
252
|
+
D.error(T("botlit.agentBuilder.modelUnavailable", "Choose an active answer model from the available catalog.")), Q("model");
|
|
246
253
|
return;
|
|
247
254
|
}
|
|
248
255
|
}
|
|
249
|
-
let n =
|
|
256
|
+
let n = P.name.trim(), r = he(n, P.slug), i = b(P.temperature), a = b(P.maxTokens), o = b(P.maxConcurrentExecutions), s = P.description.trim(), c = x(P.type, Ae, "ASSISTANT"), l = je(P.capabilities);
|
|
250
257
|
try {
|
|
251
258
|
if (u) {
|
|
252
|
-
await
|
|
259
|
+
await He({
|
|
253
260
|
agentId: u.id,
|
|
254
261
|
input: {
|
|
255
262
|
name: n,
|
|
256
263
|
slug: r,
|
|
257
264
|
description: s === "" ? null : s,
|
|
258
|
-
avatar:
|
|
259
|
-
systemPrompt:
|
|
265
|
+
avatar: P.avatar,
|
|
266
|
+
systemPrompt: P.systemPrompt.trim(),
|
|
260
267
|
temperature: i ?? null,
|
|
261
268
|
maxTokens: a ?? null,
|
|
262
269
|
maxConcurrentExecutions: o ?? null,
|
|
263
270
|
capabilities: l,
|
|
264
|
-
llmModelId:
|
|
265
|
-
knowledgeBaseIds:
|
|
266
|
-
mcpConnectionIds:
|
|
267
|
-
type: c
|
|
271
|
+
llmModelId: P.llmModelId === "" ? null : P.llmModelId,
|
|
272
|
+
knowledgeBaseIds: P.knowledgeBaseIds,
|
|
273
|
+
mcpConnectionIds: P.mcpConnectionIds,
|
|
274
|
+
type: c,
|
|
275
|
+
visibility: P.visibility
|
|
268
276
|
}
|
|
269
|
-
}),
|
|
277
|
+
}), D.success(T("botlit.agentBuilder.updated", "Agent \"{{name}}\" updated successfully", { name: n })), O(N);
|
|
270
278
|
return;
|
|
271
279
|
}
|
|
272
|
-
let e = await
|
|
273
|
-
workspaceId:
|
|
280
|
+
let e = await Be({
|
|
281
|
+
workspaceId: k,
|
|
274
282
|
name: n,
|
|
275
283
|
slug: r,
|
|
276
284
|
type: c,
|
|
277
285
|
description: s === "" ? void 0 : s,
|
|
278
|
-
avatar:
|
|
279
|
-
systemPrompt:
|
|
286
|
+
avatar: P.avatar,
|
|
287
|
+
systemPrompt: P.systemPrompt.trim(),
|
|
280
288
|
temperature: i,
|
|
281
289
|
maxTokens: a,
|
|
282
290
|
maxConcurrentExecutions: o,
|
|
283
291
|
capabilities: l,
|
|
284
|
-
llmModelId:
|
|
285
|
-
knowledgeBaseIds:
|
|
286
|
-
mcpConnectionIds:
|
|
292
|
+
llmModelId: P.llmModelId === "" ? void 0 : P.llmModelId,
|
|
293
|
+
knowledgeBaseIds: P.knowledgeBaseIds,
|
|
294
|
+
mcpConnectionIds: P.mcpConnectionIds,
|
|
295
|
+
visibility: P.visibility
|
|
287
296
|
});
|
|
288
|
-
if (
|
|
289
|
-
if (!
|
|
290
|
-
|
|
297
|
+
if (D.success(T("botlit.agentBuilder.created", "Agent \"{{name}}\" created successfully", { name: n })), h) {
|
|
298
|
+
if (!Ye(f.APP_AGENT_CREATE)) {
|
|
299
|
+
D.error(T("botlit.agentBuilder.linkNotAllowed", "The agent was created, but you are not allowed to link agents to bots, so it is not linked.")), O(`agents/${e.id}`);
|
|
291
300
|
return;
|
|
292
301
|
}
|
|
293
302
|
try {
|
|
294
|
-
await
|
|
295
|
-
botId:
|
|
303
|
+
await We({
|
|
304
|
+
botId: h,
|
|
296
305
|
agentId: e.id
|
|
297
306
|
});
|
|
298
307
|
} catch (t) {
|
|
299
|
-
|
|
308
|
+
D.error(t instanceof Error ? T("botlit.agentBuilder.linkFailed", "The agent was created but could not be linked to the bot: {{message}}", { message: t.message }) : T("botlit.agentBuilder.linkFailedShort", "The agent was created but could not be linked to the bot")), O(`agents/${e.id}`);
|
|
300
309
|
return;
|
|
301
310
|
}
|
|
302
|
-
if (
|
|
303
|
-
await
|
|
304
|
-
botId:
|
|
311
|
+
if (Ke && !Ke.defaultAgentId && Ye(f.APP_UPDATE)) try {
|
|
312
|
+
await Ge({
|
|
313
|
+
botId: h,
|
|
305
314
|
input: { defaultAgentId: e.id }
|
|
306
315
|
});
|
|
307
316
|
} catch (e) {
|
|
308
|
-
|
|
317
|
+
D.error(e instanceof Error ? T("botlit.agentBuilder.defaultFailed", "The agent was linked, but it could not be set as the bot default: {{message}}", { message: e.message }) : T("botlit.agentBuilder.defaultFailedShort", "The agent was linked, but it could not be set as the bot default"));
|
|
309
318
|
}
|
|
310
|
-
|
|
319
|
+
O(`bots/${h}/agents`);
|
|
311
320
|
return;
|
|
312
321
|
}
|
|
313
|
-
|
|
322
|
+
O(`agents/${e.id}`);
|
|
314
323
|
} catch (e) {
|
|
315
|
-
|
|
324
|
+
D.error(e instanceof Error ? e.message : T("botlit.agentBuilder.saveFailed", "Failed to save agent"));
|
|
316
325
|
}
|
|
317
|
-
},
|
|
326
|
+
}, gt = A ? T("botlit.agentBuilder.save", "Save Changes") : T("botlit.agentBuilder.create", "Create Agent"), _t = (e) => {
|
|
318
327
|
switch (e) {
|
|
319
|
-
case "mcpToolsNeedsServer": return
|
|
320
|
-
case "ragNeedsKnowledgeBase": return
|
|
321
|
-
case "serversNeedMcpTools": return
|
|
322
|
-
case "knowledgeBasesNeedRag": return
|
|
328
|
+
case "mcpToolsNeedsServer": return T("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.");
|
|
329
|
+
case "ragNeedsKnowledgeBase": return T("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.");
|
|
330
|
+
case "serversNeedMcpTools": return T("botlit.agentBuilder.warnings.serversNeedMcpTools", "MCP servers are attached but MCP Tools is off, so the agent ignores them. Turn MCP Tools on or detach the servers.");
|
|
331
|
+
case "knowledgeBasesNeedRag": return T("botlit.agentBuilder.warnings.knowledgeBasesNeedRag", "Knowledge bases are attached but RAG is off, so the agent ignores them. Turn RAG on or detach them.");
|
|
323
332
|
}
|
|
324
|
-
},
|
|
333
|
+
}, vt = {
|
|
325
334
|
MCP_TOOLS: {
|
|
326
|
-
label:
|
|
327
|
-
description:
|
|
335
|
+
label: T("botlit.agentBuilder.capabilities.mcpTools", "MCP Tools"),
|
|
336
|
+
description: T("botlit.agentBuilder.capabilities.mcpToolsDescription", "Let the agent call the tools of the MCP servers attached below.")
|
|
328
337
|
},
|
|
329
338
|
RAG: {
|
|
330
|
-
label:
|
|
331
|
-
description:
|
|
339
|
+
label: T("botlit.agentBuilder.capabilities.rag", "RAG"),
|
|
340
|
+
description: T("botlit.agentBuilder.capabilities.ragDescription", "Answer from the knowledge bases attached below (retrieval-augmented generation).")
|
|
332
341
|
},
|
|
333
342
|
A2A: {
|
|
334
|
-
label:
|
|
335
|
-
description:
|
|
343
|
+
label: T("botlit.agentBuilder.capabilities.a2a", "Agent delegation"),
|
|
344
|
+
description: T("botlit.agentBuilder.capabilities.a2aDescription", "Let the agent hand sub-tasks to other agents it is connected to.")
|
|
336
345
|
}
|
|
337
|
-
},
|
|
346
|
+
}, yt = P.capabilities.filter((e) => !me.includes(e)), bt = new Set(G.map((e) => e.id)), xt = new Set(ot.map((e) => e.id)), St = P.knowledgeBaseIds.filter((e) => !bt.has(e)), $ = G.filter((e) => P.knowledgeBaseIds.includes(e.id) && e.indexStatus !== "READY"), Ct = P.mcpConnectionIds.filter((e) => !xt.has(e)), wt = P.llmModelId !== "" && !H && !U && !W.some((e) => e.id === P.llmModelId);
|
|
338
347
|
return /* @__PURE__ */ w(n, {
|
|
339
|
-
title:
|
|
340
|
-
leading: /* @__PURE__ */
|
|
348
|
+
title: A ? T("botlit.agentBuilder.editTitle", "Edit Agent") : T("botlit.agentBuilder.createTitle", "Create New Agent"),
|
|
349
|
+
leading: /* @__PURE__ */ C(c, {
|
|
341
350
|
variant: "ghost",
|
|
342
351
|
size: "icon",
|
|
343
|
-
"aria-label":
|
|
344
|
-
onClick: () =>
|
|
345
|
-
children: /* @__PURE__ */
|
|
352
|
+
"aria-label": T("botlit.agentBuilder.back", "Back"),
|
|
353
|
+
onClick: () => O(N),
|
|
354
|
+
children: /* @__PURE__ */ C(we, {
|
|
346
355
|
size: 20,
|
|
347
356
|
"aria-hidden": "true"
|
|
348
357
|
})
|
|
349
358
|
}),
|
|
350
|
-
actions: /* @__PURE__ */
|
|
359
|
+
actions: /* @__PURE__ */ w("div", {
|
|
351
360
|
className: "flex gap-2",
|
|
352
|
-
children: [/* @__PURE__ */
|
|
361
|
+
children: [/* @__PURE__ */ C(c, {
|
|
353
362
|
variant: "outline",
|
|
354
|
-
onClick: () =>
|
|
355
|
-
children:
|
|
356
|
-
}), /* @__PURE__ */
|
|
363
|
+
onClick: () => O(N),
|
|
364
|
+
children: T("botlit.common.cancel", "Cancel")
|
|
365
|
+
}), /* @__PURE__ */ C(c, {
|
|
357
366
|
type: "submit",
|
|
358
367
|
form: "agent-builder-form",
|
|
359
|
-
leftIcon: /* @__PURE__ */
|
|
360
|
-
isLoading: z || B &&
|
|
361
|
-
children:
|
|
368
|
+
leftIcon: /* @__PURE__ */ C(Ee, { size: 16 }),
|
|
369
|
+
isLoading: z || B && qe,
|
|
370
|
+
children: gt
|
|
362
371
|
})]
|
|
363
372
|
}),
|
|
364
|
-
children: /* @__PURE__ */
|
|
373
|
+
children: [!u && !h && /* @__PURE__ */ C("div", {
|
|
374
|
+
className: "mx-auto mb-6 max-w-4xl",
|
|
375
|
+
children: /* @__PURE__ */ C(se, {
|
|
376
|
+
kind: "agent",
|
|
377
|
+
onCreated: (e) => O(`agents/${e}`)
|
|
378
|
+
})
|
|
379
|
+
}), /* @__PURE__ */ w("form", {
|
|
365
380
|
id: "agent-builder-form",
|
|
366
|
-
onSubmit: (e) => void
|
|
381
|
+
onSubmit: (e) => void ht(e),
|
|
367
382
|
noValidate: !0,
|
|
368
383
|
className: "max-w-4xl mx-auto",
|
|
369
384
|
children: [
|
|
370
|
-
/* @__PURE__ */
|
|
385
|
+
/* @__PURE__ */ C(Ce, {
|
|
371
386
|
className: "mb-6",
|
|
372
|
-
icon: /* @__PURE__ */
|
|
373
|
-
children:
|
|
387
|
+
icon: /* @__PURE__ */ C(Oe, { size: 18 }),
|
|
388
|
+
children: T("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
389
|
}),
|
|
375
|
-
B && R && /* @__PURE__ */
|
|
390
|
+
B && R && /* @__PURE__ */ C("div", {
|
|
376
391
|
role: "alert",
|
|
377
392
|
className: "mb-4",
|
|
378
|
-
children: /* @__PURE__ */
|
|
379
|
-
resource:
|
|
393
|
+
children: /* @__PURE__ */ C(d, {
|
|
394
|
+
resource: T("botlit.agentBuilder.botResource", "this bot"),
|
|
380
395
|
error: R,
|
|
381
|
-
onRetry: () => void
|
|
396
|
+
onRetry: () => void Je()
|
|
382
397
|
})
|
|
383
398
|
}),
|
|
384
|
-
!
|
|
399
|
+
!k && /* @__PURE__ */ C("p", {
|
|
385
400
|
role: "status",
|
|
386
401
|
className: "mb-4 text-sm text-text-secondary",
|
|
387
|
-
children:
|
|
402
|
+
children: T("botlit.agentBuilder.noWorkspace", "No workspace is selected yet. Wait for it to load, or pick a workspace, then save again.")
|
|
388
403
|
}),
|
|
389
|
-
L &&
|
|
404
|
+
L && ut > 0 && /* @__PURE__ */ w("div", {
|
|
390
405
|
role: "alert",
|
|
391
406
|
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
|
-
children: [/* @__PURE__ */
|
|
407
|
+
children: [/* @__PURE__ */ C(E, {
|
|
393
408
|
size: 16,
|
|
394
409
|
className: "mt-0.5 text-status-error-text",
|
|
395
410
|
"aria-hidden": "true"
|
|
396
|
-
}), /* @__PURE__ */
|
|
411
|
+
}), /* @__PURE__ */ C("p", { children: T("botlit.agentBuilder.errorSummary", "Fix the highlighted fields before saving. Tabs with a problem are marked.") })]
|
|
397
412
|
}),
|
|
398
|
-
/* @__PURE__ */
|
|
413
|
+
/* @__PURE__ */ C("div", {
|
|
399
414
|
role: "tablist",
|
|
400
|
-
"aria-label":
|
|
415
|
+
"aria-label": T("botlit.agentBuilder.stepsLabel", "Agent setup steps"),
|
|
401
416
|
className: "mb-8 flex flex-wrap items-center gap-2",
|
|
402
|
-
children:
|
|
403
|
-
let n = I === e.id, r =
|
|
404
|
-
return /* @__PURE__ */
|
|
417
|
+
children: mt.map((e, t) => {
|
|
418
|
+
let n = I === e.id, r = dt(e.id);
|
|
419
|
+
return /* @__PURE__ */ w("button", {
|
|
405
420
|
ref: (t) => {
|
|
406
|
-
|
|
421
|
+
ze.current[e.id] = t;
|
|
407
422
|
},
|
|
408
423
|
type: "button",
|
|
409
424
|
role: "tab",
|
|
@@ -411,136 +426,162 @@ var Me = "flex h-10 w-full rounded-md border border-border-default bg-bg-surface
|
|
|
411
426
|
"aria-selected": n,
|
|
412
427
|
"aria-controls": `agent-panel-${e.id}`,
|
|
413
428
|
tabIndex: n ? 0 : -1,
|
|
414
|
-
onClick: () =>
|
|
415
|
-
onKeyDown: (e) =>
|
|
416
|
-
className:
|
|
429
|
+
onClick: () => Le(e.id),
|
|
430
|
+
onKeyDown: (e) => pt(e, t),
|
|
431
|
+
className: ve("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
432
|
children: [
|
|
418
433
|
e.icon,
|
|
419
|
-
/* @__PURE__ */
|
|
434
|
+
/* @__PURE__ */ C("span", {
|
|
420
435
|
className: "font-medium",
|
|
421
436
|
children: e.label
|
|
422
437
|
}),
|
|
423
|
-
r && /* @__PURE__ */
|
|
438
|
+
r && /* @__PURE__ */ w("span", {
|
|
424
439
|
className: "text-status-error-text",
|
|
425
|
-
children: [/* @__PURE__ */
|
|
440
|
+
children: [/* @__PURE__ */ C(E, {
|
|
426
441
|
size: 14,
|
|
427
442
|
"aria-hidden": "true"
|
|
428
|
-
}), /* @__PURE__ */
|
|
443
|
+
}), /* @__PURE__ */ C("span", {
|
|
429
444
|
className: "sr-only",
|
|
430
|
-
children:
|
|
445
|
+
children: T("botlit.agentBuilder.tabHasProblem", "This step has a problem")
|
|
431
446
|
})]
|
|
432
447
|
})
|
|
433
448
|
]
|
|
434
449
|
}, e.id);
|
|
435
450
|
})
|
|
436
451
|
}),
|
|
437
|
-
/* @__PURE__ */
|
|
452
|
+
/* @__PURE__ */ w("div", {
|
|
438
453
|
className: "space-y-6",
|
|
439
454
|
children: [
|
|
440
|
-
/* @__PURE__ */
|
|
455
|
+
/* @__PURE__ */ C("div", {
|
|
441
456
|
role: "tabpanel",
|
|
442
457
|
id: "agent-panel-basics",
|
|
443
458
|
"aria-labelledby": "agent-tab-basics",
|
|
444
459
|
hidden: I !== "basics",
|
|
445
|
-
children: /* @__PURE__ */
|
|
460
|
+
children: /* @__PURE__ */ w(r, {
|
|
446
461
|
treatment: "glass",
|
|
447
462
|
glow: !0,
|
|
448
|
-
children: [/* @__PURE__ */
|
|
463
|
+
children: [/* @__PURE__ */ w(o, { children: [/* @__PURE__ */ C(s, { children: T("botlit.agentBuilder.basics.title", "Basic Information") }), /* @__PURE__ */ C(a, { children: T("botlit.agentBuilder.basics.description", "Set up the agent's identity and purpose") })] }), /* @__PURE__ */ w(i, {
|
|
449
464
|
className: "space-y-6",
|
|
450
465
|
children: [
|
|
451
|
-
/* @__PURE__ */
|
|
466
|
+
/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("p", {
|
|
452
467
|
className: "mb-2 text-sm font-medium",
|
|
453
|
-
children:
|
|
454
|
-
}), /* @__PURE__ */
|
|
455
|
-
value:
|
|
468
|
+
children: T("botlit.agentBuilder.avatar", "Avatar")
|
|
469
|
+
}), /* @__PURE__ */ C(l, {
|
|
470
|
+
value: P.avatar,
|
|
456
471
|
onChange: (e) => J("avatar", e),
|
|
457
|
-
choices:
|
|
458
|
-
groupLabel:
|
|
459
|
-
optionLabel: (e) =>
|
|
460
|
-
currentLabel:
|
|
472
|
+
choices: Me,
|
|
473
|
+
groupLabel: T("botlit.agentBuilder.avatar", "Avatar"),
|
|
474
|
+
optionLabel: (e) => T(`botlit.agentBuilder.avatars.${e.key}`, e.label),
|
|
475
|
+
currentLabel: T("botlit.agentBuilder.avatars.current", "Current avatar")
|
|
461
476
|
})] }),
|
|
462
|
-
/* @__PURE__ */
|
|
463
|
-
label:
|
|
477
|
+
/* @__PURE__ */ C(p, {
|
|
478
|
+
label: T("botlit.agentBuilder.name", "Agent Name"),
|
|
464
479
|
required: !0,
|
|
465
480
|
htmlFor: Z("name"),
|
|
466
481
|
error: X("name"),
|
|
467
|
-
children: /* @__PURE__ */
|
|
482
|
+
children: /* @__PURE__ */ C(m, {
|
|
468
483
|
id: Z("name"),
|
|
469
484
|
required: !0,
|
|
470
485
|
"aria-invalid": X("name") ? !0 : void 0,
|
|
471
486
|
"aria-describedby": X("name") ? `${Z("name")}-error` : void 0,
|
|
472
487
|
maxLength: 120,
|
|
473
|
-
placeholder:
|
|
474
|
-
value:
|
|
488
|
+
placeholder: T("botlit.agentBuilder.namePlaceholder", "e.g., Customer Support Agent"),
|
|
489
|
+
value: P.name,
|
|
475
490
|
onChange: (e) => J("name", e.target.value)
|
|
476
491
|
})
|
|
477
492
|
}),
|
|
478
|
-
/* @__PURE__ */
|
|
479
|
-
label:
|
|
493
|
+
/* @__PURE__ */ C(p, {
|
|
494
|
+
label: T("botlit.agentBuilder.slug", "Slug"),
|
|
480
495
|
htmlFor: Z("slug"),
|
|
481
496
|
error: X("slug"),
|
|
482
|
-
description:
|
|
483
|
-
children: /* @__PURE__ */
|
|
497
|
+
description: P.slug.trim() === "" && be(P.name) !== "" ? T("botlit.agentBuilder.slugDerived", "Will be saved as \"{{slug}}\".", { slug: be(P.name) }) : T("botlit.agentBuilder.slugHelp", "URL-friendly identifier. Leave empty to build it from the name."),
|
|
498
|
+
children: /* @__PURE__ */ C(m, {
|
|
484
499
|
id: Z("slug"),
|
|
485
500
|
"aria-invalid": X("slug") ? !0 : void 0,
|
|
486
501
|
"aria-describedby": X("slug") ? `${Z("slug")}-error` : `${Z("slug")}-description`,
|
|
487
502
|
placeholder: "customer-support-agent",
|
|
488
|
-
value:
|
|
503
|
+
value: P.slug,
|
|
489
504
|
onChange: (e) => J("slug", e.target.value)
|
|
490
505
|
})
|
|
491
506
|
}),
|
|
492
|
-
/* @__PURE__ */
|
|
493
|
-
label:
|
|
507
|
+
/* @__PURE__ */ C(p, {
|
|
508
|
+
label: T("botlit.agentBuilder.descriptionLabel", "Description"),
|
|
494
509
|
htmlFor: Z("description"),
|
|
495
|
-
children: /* @__PURE__ */
|
|
510
|
+
children: /* @__PURE__ */ C(te, {
|
|
496
511
|
id: Z("description"),
|
|
497
|
-
placeholder:
|
|
498
|
-
value:
|
|
512
|
+
placeholder: T("botlit.agentBuilder.descriptionPlaceholder", "Describe what this agent does..."),
|
|
513
|
+
value: P.description,
|
|
499
514
|
onChange: (e) => J("description", e.target.value),
|
|
500
515
|
rows: 3
|
|
501
516
|
})
|
|
502
517
|
}),
|
|
503
|
-
/* @__PURE__ */
|
|
504
|
-
|
|
518
|
+
/* @__PURE__ */ C(p, {
|
|
519
|
+
label: T("botlit.agentBuilder.visibilityLabel", "Visibility"),
|
|
520
|
+
htmlFor: Z("visibility"),
|
|
521
|
+
description: T("botlit.agentBuilder.visibilityHelp", "Private: only you. Workspace: everyone in this workspace. Public: shareable outside it."),
|
|
522
|
+
children: /* @__PURE__ */ w("select", {
|
|
523
|
+
id: Z("visibility"),
|
|
524
|
+
"aria-describedby": `${Z("visibility")}-description`,
|
|
525
|
+
className: Fe,
|
|
526
|
+
value: P.visibility,
|
|
527
|
+
onChange: (e) => J("visibility", x(e.target.value, Pe, "PRIVATE")),
|
|
528
|
+
children: [
|
|
529
|
+
/* @__PURE__ */ C("option", {
|
|
530
|
+
value: "PRIVATE",
|
|
531
|
+
children: T("botlit.agentBuilder.visibility.private", "Private")
|
|
532
|
+
}),
|
|
533
|
+
/* @__PURE__ */ C("option", {
|
|
534
|
+
value: "WORKSPACE",
|
|
535
|
+
children: T("botlit.agentBuilder.visibility.workspace", "Workspace")
|
|
536
|
+
}),
|
|
537
|
+
/* @__PURE__ */ C("option", {
|
|
538
|
+
value: "PUBLIC",
|
|
539
|
+
children: T("botlit.agentBuilder.visibility.public", "Public")
|
|
540
|
+
})
|
|
541
|
+
]
|
|
542
|
+
})
|
|
543
|
+
}),
|
|
544
|
+
/* @__PURE__ */ w("fieldset", { children: [
|
|
545
|
+
/* @__PURE__ */ C("legend", {
|
|
505
546
|
className: "mb-1 text-sm font-medium",
|
|
506
|
-
children:
|
|
547
|
+
children: T("botlit.agentBuilder.capabilitiesLabel", "Capabilities")
|
|
507
548
|
}),
|
|
508
|
-
/* @__PURE__ */
|
|
549
|
+
/* @__PURE__ */ C("p", {
|
|
509
550
|
className: "mb-3 text-xs text-text-secondary",
|
|
510
|
-
children:
|
|
551
|
+
children: T("botlit.agentBuilder.capabilitiesHelp", "Capabilities are off until you turn them on. Each one only does something once what it needs is attached on the Tools & Knowledge tab.")
|
|
511
552
|
}),
|
|
512
|
-
/* @__PURE__ */
|
|
553
|
+
/* @__PURE__ */ C("div", {
|
|
513
554
|
className: "grid grid-cols-1 gap-3 md:grid-cols-3",
|
|
514
|
-
children:
|
|
555
|
+
children: me.map((e) => /* @__PURE__ */ w("label", {
|
|
515
556
|
className: "flex cursor-pointer items-start gap-3 rounded-lg border border-border-subtle p-3 hover:bg-accent",
|
|
516
|
-
children: [/* @__PURE__ */
|
|
557
|
+
children: [/* @__PURE__ */ C("input", {
|
|
517
558
|
type: "checkbox",
|
|
518
559
|
className: "mt-0.5 h-4 w-4 rounded border-border-default",
|
|
519
|
-
checked:
|
|
560
|
+
checked: P.capabilities.includes(e),
|
|
520
561
|
onChange: () => Y("capabilities", e)
|
|
521
|
-
}), /* @__PURE__ */
|
|
562
|
+
}), /* @__PURE__ */ w("span", { children: [/* @__PURE__ */ C("span", {
|
|
522
563
|
className: "block text-sm font-medium",
|
|
523
|
-
children:
|
|
524
|
-
}), /* @__PURE__ */
|
|
564
|
+
children: vt[e].label
|
|
565
|
+
}), /* @__PURE__ */ C("span", {
|
|
525
566
|
className: "block text-xs text-text-secondary",
|
|
526
|
-
children:
|
|
567
|
+
children: vt[e].description
|
|
527
568
|
})] })]
|
|
528
569
|
}, e))
|
|
529
570
|
}),
|
|
530
|
-
|
|
571
|
+
yt.length > 0 && /* @__PURE__ */ C("p", {
|
|
531
572
|
className: "mt-3 text-xs text-text-secondary",
|
|
532
|
-
children:
|
|
573
|
+
children: T("botlit.agentBuilder.unusedCapabilities", "This agent also carries {{names}}. They are kept as saved but have no effect yet.", { names: yt.join(", ") })
|
|
533
574
|
}),
|
|
534
|
-
q.length > 0 && /* @__PURE__ */
|
|
575
|
+
q.length > 0 && /* @__PURE__ */ C("ul", {
|
|
535
576
|
role: "status",
|
|
536
577
|
className: "mt-3 space-y-1 text-sm text-status-warning-text",
|
|
537
|
-
children: q.map((e) => /* @__PURE__ */
|
|
578
|
+
children: q.map((e) => /* @__PURE__ */ w("li", {
|
|
538
579
|
className: "flex items-start gap-2",
|
|
539
|
-
children: [/* @__PURE__ */
|
|
580
|
+
children: [/* @__PURE__ */ C(E, {
|
|
540
581
|
size: 14,
|
|
541
582
|
className: "mt-0.5 shrink-0",
|
|
542
583
|
"aria-hidden": "true"
|
|
543
|
-
}),
|
|
584
|
+
}), _t(e)]
|
|
544
585
|
}, e))
|
|
545
586
|
})
|
|
546
587
|
] })
|
|
@@ -548,99 +589,99 @@ var Me = "flex h-10 w-full rounded-md border border-border-default bg-bg-surface
|
|
|
548
589
|
})]
|
|
549
590
|
})
|
|
550
591
|
}),
|
|
551
|
-
/* @__PURE__ */
|
|
592
|
+
/* @__PURE__ */ C("div", {
|
|
552
593
|
role: "tabpanel",
|
|
553
594
|
id: "agent-panel-prompt",
|
|
554
595
|
"aria-labelledby": "agent-tab-prompt",
|
|
555
596
|
hidden: I !== "prompt",
|
|
556
|
-
children: /* @__PURE__ */
|
|
597
|
+
children: /* @__PURE__ */ w(r, {
|
|
557
598
|
treatment: "glass",
|
|
558
599
|
glow: !0,
|
|
559
|
-
children: [/* @__PURE__ */
|
|
600
|
+
children: [/* @__PURE__ */ w(o, { children: [/* @__PURE__ */ C(s, { children: T("botlit.agentBuilder.prompt.title", "Prompt Configuration") }), /* @__PURE__ */ C(a, { children: T("botlit.agentBuilder.prompt.description", "Define how the agent communicates and behaves") })] }), /* @__PURE__ */ w(i, {
|
|
560
601
|
className: "space-y-6",
|
|
561
|
-
children: [/* @__PURE__ */
|
|
562
|
-
label:
|
|
602
|
+
children: [/* @__PURE__ */ C(p, {
|
|
603
|
+
label: T("botlit.agentBuilder.systemPrompt", "System Prompt"),
|
|
563
604
|
required: !0,
|
|
564
605
|
htmlFor: Z("prompt"),
|
|
565
606
|
error: X("systemPrompt"),
|
|
566
|
-
description:
|
|
567
|
-
children: /* @__PURE__ */
|
|
607
|
+
description: T("botlit.agentBuilder.systemPromptHelp", "The core instructions that define the agent's behavior"),
|
|
608
|
+
children: /* @__PURE__ */ C(te, {
|
|
568
609
|
id: Z("prompt"),
|
|
569
610
|
required: !0,
|
|
570
611
|
"aria-invalid": X("systemPrompt") ? !0 : void 0,
|
|
571
612
|
"aria-describedby": X("systemPrompt") ? `${Z("prompt")}-error` : `${Z("prompt")}-description`,
|
|
572
|
-
placeholder:
|
|
573
|
-
value:
|
|
613
|
+
placeholder: T("botlit.agentBuilder.systemPromptPlaceholder", "You are a helpful assistant..."),
|
|
614
|
+
value: P.systemPrompt,
|
|
574
615
|
onChange: (e) => J("systemPrompt", e.target.value),
|
|
575
616
|
rows: 8,
|
|
576
617
|
className: "font-mono text-sm"
|
|
577
618
|
})
|
|
578
|
-
}), /* @__PURE__ */
|
|
619
|
+
}), /* @__PURE__ */ w("div", {
|
|
579
620
|
className: "grid grid-cols-1 gap-4 md:grid-cols-3",
|
|
580
621
|
children: [
|
|
581
|
-
/* @__PURE__ */
|
|
582
|
-
label:
|
|
622
|
+
/* @__PURE__ */ C(p, {
|
|
623
|
+
label: T("botlit.agentBuilder.temperature", "Temperature"),
|
|
583
624
|
htmlFor: Z("temperature"),
|
|
584
625
|
error: X("temperature"),
|
|
585
|
-
description:
|
|
586
|
-
min:
|
|
587
|
-
max:
|
|
588
|
-
default:
|
|
626
|
+
description: T("botlit.agentBuilder.temperatureHelp", "Randomness, {{min}} to {{max}}. 0 is the most predictable. Empty uses {{default}}.", {
|
|
627
|
+
min: y.min,
|
|
628
|
+
max: y.max,
|
|
629
|
+
default: g.temperature
|
|
589
630
|
}),
|
|
590
|
-
children: /* @__PURE__ */
|
|
631
|
+
children: /* @__PURE__ */ C(m, {
|
|
591
632
|
id: Z("temperature"),
|
|
592
633
|
type: "number",
|
|
593
634
|
step: "0.1",
|
|
594
|
-
min:
|
|
595
|
-
max:
|
|
596
|
-
placeholder: String(
|
|
635
|
+
min: y.min,
|
|
636
|
+
max: y.max,
|
|
637
|
+
placeholder: String(g.temperature),
|
|
597
638
|
"aria-invalid": X("temperature") ? !0 : void 0,
|
|
598
639
|
"aria-describedby": X("temperature") ? `${Z("temperature")}-error` : `${Z("temperature")}-description`,
|
|
599
|
-
value:
|
|
640
|
+
value: P.temperature,
|
|
600
641
|
onChange: (e) => J("temperature", e.target.value)
|
|
601
642
|
})
|
|
602
643
|
}),
|
|
603
|
-
/* @__PURE__ */
|
|
604
|
-
label:
|
|
644
|
+
/* @__PURE__ */ C(p, {
|
|
645
|
+
label: T("botlit.agentBuilder.maxTokens", "Max Tokens"),
|
|
605
646
|
htmlFor: Z("max-tokens"),
|
|
606
647
|
error: X("maxTokens"),
|
|
607
|
-
description:
|
|
608
|
-
min:
|
|
609
|
-
max:
|
|
610
|
-
default:
|
|
648
|
+
description: T("botlit.agentBuilder.maxTokensHelp", "Maximum response length, {{min}} to {{max}}. Empty uses {{default}}.", {
|
|
649
|
+
min: v.min,
|
|
650
|
+
max: v.max,
|
|
651
|
+
default: g.maxTokens
|
|
611
652
|
}),
|
|
612
|
-
children: /* @__PURE__ */
|
|
653
|
+
children: /* @__PURE__ */ C(m, {
|
|
613
654
|
id: Z("max-tokens"),
|
|
614
655
|
type: "number",
|
|
615
656
|
step: "1",
|
|
616
|
-
min:
|
|
617
|
-
max:
|
|
618
|
-
placeholder: String(
|
|
657
|
+
min: v.min,
|
|
658
|
+
max: v.max,
|
|
659
|
+
placeholder: String(g.maxTokens),
|
|
619
660
|
"aria-invalid": X("maxTokens") ? !0 : void 0,
|
|
620
661
|
"aria-describedby": X("maxTokens") ? `${Z("max-tokens")}-error` : `${Z("max-tokens")}-description`,
|
|
621
|
-
value:
|
|
662
|
+
value: P.maxTokens,
|
|
622
663
|
onChange: (e) => J("maxTokens", e.target.value)
|
|
623
664
|
})
|
|
624
665
|
}),
|
|
625
|
-
/* @__PURE__ */
|
|
626
|
-
label:
|
|
666
|
+
/* @__PURE__ */ C(p, {
|
|
667
|
+
label: T("botlit.agentBuilder.maxConcurrent", "Max Concurrent Runs"),
|
|
627
668
|
htmlFor: Z("max-concurrent"),
|
|
628
669
|
error: X("maxConcurrentExecutions"),
|
|
629
|
-
description:
|
|
630
|
-
min:
|
|
631
|
-
max:
|
|
632
|
-
default:
|
|
670
|
+
description: T("botlit.agentBuilder.maxConcurrentHelp", "How many runs can happen at once, {{min}} to {{max}}. Empty uses {{default}}.", {
|
|
671
|
+
min: _.min,
|
|
672
|
+
max: _.max,
|
|
673
|
+
default: g.maxConcurrentExecutions
|
|
633
674
|
}),
|
|
634
|
-
children: /* @__PURE__ */
|
|
675
|
+
children: /* @__PURE__ */ C(m, {
|
|
635
676
|
id: Z("max-concurrent"),
|
|
636
677
|
type: "number",
|
|
637
678
|
step: "1",
|
|
638
|
-
min:
|
|
639
|
-
max:
|
|
640
|
-
placeholder: String(
|
|
679
|
+
min: _.min,
|
|
680
|
+
max: _.max,
|
|
681
|
+
placeholder: String(g.maxConcurrentExecutions),
|
|
641
682
|
"aria-invalid": X("maxConcurrentExecutions") ? !0 : void 0,
|
|
642
683
|
"aria-describedby": X("maxConcurrentExecutions") ? `${Z("max-concurrent")}-error` : `${Z("max-concurrent")}-description`,
|
|
643
|
-
value:
|
|
684
|
+
value: P.maxConcurrentExecutions,
|
|
644
685
|
onChange: (e) => J("maxConcurrentExecutions", e.target.value)
|
|
645
686
|
})
|
|
646
687
|
})
|
|
@@ -649,54 +690,54 @@ var Me = "flex h-10 w-full rounded-md border border-border-default bg-bg-surface
|
|
|
649
690
|
})]
|
|
650
691
|
})
|
|
651
692
|
}),
|
|
652
|
-
/* @__PURE__ */
|
|
693
|
+
/* @__PURE__ */ C("div", {
|
|
653
694
|
role: "tabpanel",
|
|
654
695
|
id: "agent-panel-model",
|
|
655
696
|
"aria-labelledby": "agent-tab-model",
|
|
656
697
|
hidden: I !== "model",
|
|
657
|
-
children: /* @__PURE__ */
|
|
698
|
+
children: /* @__PURE__ */ w(r, {
|
|
658
699
|
treatment: "glass",
|
|
659
700
|
glow: !0,
|
|
660
|
-
children: [/* @__PURE__ */
|
|
701
|
+
children: [/* @__PURE__ */ w(o, { children: [/* @__PURE__ */ C(s, { children: T("botlit.agentBuilder.model.title", "LLM Configuration") }), /* @__PURE__ */ C(a, { children: T("botlit.agentBuilder.model.description", "Select the LLM model for this agent") })] }), /* @__PURE__ */ w(i, {
|
|
661
702
|
className: "space-y-6",
|
|
662
703
|
children: [
|
|
663
|
-
/* @__PURE__ */
|
|
664
|
-
label:
|
|
704
|
+
/* @__PURE__ */ w(p, {
|
|
705
|
+
label: T("botlit.agentBuilder.model.label", "LLM Model"),
|
|
665
706
|
htmlFor: Z("model"),
|
|
666
|
-
description:
|
|
707
|
+
description: T("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
708
|
children: [
|
|
668
|
-
H && /* @__PURE__ */
|
|
709
|
+
H && /* @__PURE__ */ C("p", {
|
|
669
710
|
role: "status",
|
|
670
|
-
children:
|
|
711
|
+
children: T("botlit.agentBuilder.model.loading", "Loading answer models…")
|
|
671
712
|
}),
|
|
672
|
-
U && /* @__PURE__ */
|
|
713
|
+
U && /* @__PURE__ */ w("div", {
|
|
673
714
|
role: "alert",
|
|
674
|
-
children: [/* @__PURE__ */
|
|
715
|
+
children: [/* @__PURE__ */ C("p", { children: T("botlit.agentBuilder.model.loadFailed", "Could not load answer models.") }), /* @__PURE__ */ C(c, {
|
|
675
716
|
type: "button",
|
|
676
717
|
variant: "secondary",
|
|
677
718
|
onClick: () => {
|
|
678
|
-
|
|
719
|
+
nt(), Qe();
|
|
679
720
|
},
|
|
680
|
-
children:
|
|
721
|
+
children: T("botlit.agentBuilder.model.retry", "Retry model catalog")
|
|
681
722
|
})]
|
|
682
723
|
}),
|
|
683
|
-
/* @__PURE__ */
|
|
724
|
+
/* @__PURE__ */ w("select", {
|
|
684
725
|
id: Z("model"),
|
|
685
726
|
"aria-describedby": `${Z("model")}-description`,
|
|
686
727
|
disabled: H || !!U,
|
|
687
|
-
className:
|
|
688
|
-
value:
|
|
728
|
+
className: Fe,
|
|
729
|
+
value: P.llmModelId,
|
|
689
730
|
onChange: (e) => J("llmModelId", e.target.value),
|
|
690
731
|
children: [
|
|
691
|
-
/* @__PURE__ */
|
|
732
|
+
/* @__PURE__ */ C("option", {
|
|
692
733
|
value: "",
|
|
693
|
-
children:
|
|
734
|
+
children: T("botlit.agentBuilder.model.none", "Select a model...")
|
|
694
735
|
}),
|
|
695
|
-
|
|
696
|
-
value:
|
|
697
|
-
children:
|
|
736
|
+
wt && /* @__PURE__ */ C("option", {
|
|
737
|
+
value: P.llmModelId,
|
|
738
|
+
children: T("botlit.agentBuilder.model.unavailable", "Unavailable model ({{id}})", { id: P.llmModelId })
|
|
698
739
|
}),
|
|
699
|
-
W.map((e) => /* @__PURE__ */
|
|
740
|
+
W.map((e) => /* @__PURE__ */ w("option", {
|
|
700
741
|
value: e.id,
|
|
701
742
|
children: [
|
|
702
743
|
e.name,
|
|
@@ -709,34 +750,34 @@ var Me = "flex h-10 w-full rounded-md border border-border-default bg-bg-surface
|
|
|
709
750
|
})
|
|
710
751
|
]
|
|
711
752
|
}),
|
|
712
|
-
|
|
753
|
+
ft && !H && !U && /* @__PURE__ */ w("div", {
|
|
713
754
|
role: "status",
|
|
714
755
|
className: "flex items-start gap-2 rounded-lg border border-status-warning-border bg-status-warning-bg-subtle p-3 text-sm",
|
|
715
|
-
children: [/* @__PURE__ */
|
|
756
|
+
children: [/* @__PURE__ */ C(E, {
|
|
716
757
|
size: 16,
|
|
717
758
|
className: "mt-0.5 shrink-0 text-status-warning-text",
|
|
718
759
|
"aria-hidden": "true"
|
|
719
|
-
}), /* @__PURE__ */
|
|
760
|
+
}), /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("p", { children: W.length === 0 ? T("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.") : T("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__ */ C(c, {
|
|
720
761
|
type: "button",
|
|
721
762
|
variant: "ghost",
|
|
722
763
|
className: "px-0",
|
|
723
|
-
onClick: () =>
|
|
724
|
-
children:
|
|
764
|
+
onClick: () => O("settings"),
|
|
765
|
+
children: T("botlit.agentBuilder.model.openSettings", "Open Settings")
|
|
725
766
|
})] })]
|
|
726
767
|
}),
|
|
727
|
-
/* @__PURE__ */
|
|
768
|
+
/* @__PURE__ */ w("div", {
|
|
728
769
|
className: "rounded-lg bg-bg-sunken p-4",
|
|
729
|
-
children: [/* @__PURE__ */
|
|
770
|
+
children: [/* @__PURE__ */ C("h4", {
|
|
730
771
|
className: "mb-2 text-sm font-medium",
|
|
731
|
-
children:
|
|
732
|
-
}), /* @__PURE__ */
|
|
772
|
+
children: T("botlit.agentBuilder.model.providers", "Available Providers")
|
|
773
|
+
}), /* @__PURE__ */ w("div", {
|
|
733
774
|
className: "grid grid-cols-2 gap-2",
|
|
734
|
-
children: [V?.map((e) => /* @__PURE__ */
|
|
775
|
+
children: [V?.map((e) => /* @__PURE__ */ w("div", {
|
|
735
776
|
className: "text-sm",
|
|
736
|
-
children: [/* @__PURE__ */
|
|
777
|
+
children: [/* @__PURE__ */ C("span", {
|
|
737
778
|
className: "font-medium",
|
|
738
779
|
children: e.name
|
|
739
|
-
}), /* @__PURE__ */
|
|
780
|
+
}), /* @__PURE__ */ w("span", {
|
|
740
781
|
className: "ml-2 text-text-secondary",
|
|
741
782
|
children: [
|
|
742
783
|
"(",
|
|
@@ -744,9 +785,9 @@ var Me = "flex h-10 w-full rounded-md border border-border-default bg-bg-surface
|
|
|
744
785
|
")"
|
|
745
786
|
]
|
|
746
787
|
})]
|
|
747
|
-
}, e.id)), !H && !U && !V?.length && /* @__PURE__ */
|
|
788
|
+
}, e.id)), !H && !U && !V?.length && /* @__PURE__ */ C("p", {
|
|
748
789
|
className: "text-sm text-text-secondary",
|
|
749
|
-
children:
|
|
790
|
+
children: T("botlit.agentBuilder.model.noProviders", "No providers configured")
|
|
750
791
|
})]
|
|
751
792
|
})]
|
|
752
793
|
})
|
|
@@ -754,89 +795,89 @@ var Me = "flex h-10 w-full rounded-md border border-border-default bg-bg-surface
|
|
|
754
795
|
})]
|
|
755
796
|
})
|
|
756
797
|
}),
|
|
757
|
-
/* @__PURE__ */
|
|
798
|
+
/* @__PURE__ */ C("div", {
|
|
758
799
|
role: "tabpanel",
|
|
759
800
|
id: "agent-panel-tools",
|
|
760
801
|
"aria-labelledby": "agent-tab-tools",
|
|
761
802
|
hidden: I !== "tools",
|
|
762
|
-
children: /* @__PURE__ */
|
|
803
|
+
children: /* @__PURE__ */ w("div", {
|
|
763
804
|
className: "space-y-6",
|
|
764
805
|
children: [
|
|
765
|
-
/* @__PURE__ */
|
|
806
|
+
/* @__PURE__ */ w(r, {
|
|
766
807
|
treatment: "glass",
|
|
767
808
|
glow: !0,
|
|
768
|
-
children: [/* @__PURE__ */
|
|
809
|
+
children: [/* @__PURE__ */ w(o, { children: [/* @__PURE__ */ w(s, {
|
|
769
810
|
className: "flex items-center gap-2",
|
|
770
|
-
children: [/* @__PURE__ */
|
|
811
|
+
children: [/* @__PURE__ */ C(ke, {
|
|
771
812
|
size: 18,
|
|
772
813
|
"aria-hidden": "true"
|
|
773
|
-
}),
|
|
774
|
-
}), /* @__PURE__ */
|
|
775
|
-
legend:
|
|
776
|
-
items:
|
|
814
|
+
}), T("botlit.agentBuilder.tools.title", "MCP servers")]
|
|
815
|
+
}), /* @__PURE__ */ C(a, { children: T("botlit.agentBuilder.tools.description", "The tools of the servers you attach are available to the agent when MCP Tools is on.") })] }), /* @__PURE__ */ C(i, { children: /* @__PURE__ */ C(Ie, {
|
|
816
|
+
legend: T("botlit.agentBuilder.tools.legend", "MCP servers attached to this agent"),
|
|
817
|
+
items: ot.map((e) => ({
|
|
777
818
|
id: e.id,
|
|
778
819
|
name: e.name,
|
|
779
820
|
detail: e.status
|
|
780
821
|
})),
|
|
781
|
-
selected:
|
|
782
|
-
missing:
|
|
783
|
-
loading:
|
|
784
|
-
error:
|
|
785
|
-
onRetry: () => void
|
|
822
|
+
selected: P.mcpConnectionIds,
|
|
823
|
+
missing: Ct,
|
|
824
|
+
loading: st,
|
|
825
|
+
error: ct,
|
|
826
|
+
onRetry: () => void lt(),
|
|
786
827
|
onToggle: (e) => Y("mcpConnectionIds", e),
|
|
787
|
-
emptyText:
|
|
788
|
-
resource:
|
|
828
|
+
emptyText: T("botlit.agentBuilder.tools.empty", "No MCP servers in this workspace yet. Add one on the MCP Servers page."),
|
|
829
|
+
resource: T("botlit.agentBuilder.tools.resource", "MCP servers")
|
|
789
830
|
}) })]
|
|
790
831
|
}),
|
|
791
|
-
/* @__PURE__ */
|
|
832
|
+
/* @__PURE__ */ w(r, {
|
|
792
833
|
treatment: "glass",
|
|
793
834
|
glow: !0,
|
|
794
|
-
children: [/* @__PURE__ */
|
|
835
|
+
children: [/* @__PURE__ */ w(o, { children: [/* @__PURE__ */ w(s, {
|
|
795
836
|
className: "flex items-center gap-2",
|
|
796
|
-
children: [/* @__PURE__ */
|
|
837
|
+
children: [/* @__PURE__ */ C(Te, {
|
|
797
838
|
size: 18,
|
|
798
839
|
"aria-hidden": "true"
|
|
799
|
-
}),
|
|
800
|
-
}), /* @__PURE__ */
|
|
801
|
-
legend:
|
|
840
|
+
}), T("botlit.agentBuilder.knowledge.title", "Knowledge bases")]
|
|
841
|
+
}), /* @__PURE__ */ C(a, { children: T("botlit.agentBuilder.knowledge.description", "The agent answers from the knowledge bases you attach when RAG is on.") })] }), /* @__PURE__ */ C(i, { children: /* @__PURE__ */ C(Ie, {
|
|
842
|
+
legend: T("botlit.agentBuilder.knowledge.legend", "Knowledge bases attached to this agent"),
|
|
802
843
|
items: G.map((e) => ({
|
|
803
844
|
id: e.id,
|
|
804
845
|
name: e.name,
|
|
805
846
|
detail: e.indexStatus
|
|
806
847
|
})),
|
|
807
|
-
selected:
|
|
808
|
-
missing:
|
|
809
|
-
loading:
|
|
810
|
-
error:
|
|
811
|
-
onRetry: () => void
|
|
848
|
+
selected: P.knowledgeBaseIds,
|
|
849
|
+
missing: St,
|
|
850
|
+
loading: rt,
|
|
851
|
+
error: it,
|
|
852
|
+
onRetry: () => void at(),
|
|
812
853
|
onToggle: (e) => Y("knowledgeBaseIds", e),
|
|
813
|
-
emptyText:
|
|
814
|
-
resource:
|
|
854
|
+
emptyText: T("botlit.agentBuilder.knowledge.empty", "No knowledge bases in this workspace yet. Create one on the Knowledge Bases page."),
|
|
855
|
+
resource: T("botlit.agentBuilder.knowledge.resource", "knowledge bases")
|
|
815
856
|
}) })]
|
|
816
857
|
}),
|
|
817
|
-
q.length > 0 && /* @__PURE__ */
|
|
858
|
+
q.length > 0 && /* @__PURE__ */ C("ul", {
|
|
818
859
|
role: "status",
|
|
819
860
|
className: "space-y-1 text-sm text-status-warning-text",
|
|
820
|
-
children: q.map((e) => /* @__PURE__ */
|
|
861
|
+
children: q.map((e) => /* @__PURE__ */ w("li", {
|
|
821
862
|
className: "flex items-start gap-2",
|
|
822
|
-
children: [/* @__PURE__ */
|
|
863
|
+
children: [/* @__PURE__ */ C(E, {
|
|
823
864
|
size: 14,
|
|
824
865
|
className: "mt-0.5 shrink-0",
|
|
825
866
|
"aria-hidden": "true"
|
|
826
|
-
}),
|
|
867
|
+
}), _t(e)]
|
|
827
868
|
}, e))
|
|
828
869
|
}),
|
|
829
|
-
|
|
870
|
+
$.length > 0 && /* @__PURE__ */ C("ul", {
|
|
830
871
|
role: "status",
|
|
831
872
|
"data-testid": "builder-knowledge-not-ready",
|
|
832
873
|
className: "space-y-1 text-sm text-status-warning-text",
|
|
833
|
-
children:
|
|
874
|
+
children: $.map((e) => /* @__PURE__ */ w("li", {
|
|
834
875
|
className: "flex items-start gap-2",
|
|
835
|
-
children: [/* @__PURE__ */
|
|
876
|
+
children: [/* @__PURE__ */ C(E, {
|
|
836
877
|
size: 14,
|
|
837
878
|
className: "mt-0.5 shrink-0",
|
|
838
879
|
"aria-hidden": "true"
|
|
839
|
-
}),
|
|
880
|
+
}), T("botlit.agentBuilder.knowledge.notReady", "\"{{name}}\" is {{status}}. An agent with RAG on cannot answer until it is ready.", {
|
|
840
881
|
name: e.name,
|
|
841
882
|
status: e.indexStatus.toLowerCase()
|
|
842
883
|
})]
|
|
@@ -845,80 +886,80 @@ var Me = "flex h-10 w-full rounded-md border border-border-default bg-bg-surface
|
|
|
845
886
|
]
|
|
846
887
|
})
|
|
847
888
|
}),
|
|
848
|
-
/* @__PURE__ */
|
|
889
|
+
/* @__PURE__ */ w("div", {
|
|
849
890
|
className: "flex justify-between pt-6",
|
|
850
|
-
children: [/* @__PURE__ */
|
|
891
|
+
children: [/* @__PURE__ */ C(c, {
|
|
851
892
|
type: "button",
|
|
852
893
|
variant: "outline",
|
|
853
|
-
onClick: () => Q(
|
|
854
|
-
disabled: I ===
|
|
855
|
-
children:
|
|
856
|
-
}), I ===
|
|
894
|
+
onClick: () => Q(j[Math.max(0, j.indexOf(I) - 1)]),
|
|
895
|
+
disabled: I === j[0],
|
|
896
|
+
children: T("botlit.agentBuilder.previous", "Previous")
|
|
897
|
+
}), I === j[j.length - 1] ? /* @__PURE__ */ C(c, {
|
|
857
898
|
type: "submit",
|
|
858
|
-
leftIcon: /* @__PURE__ */
|
|
899
|
+
leftIcon: /* @__PURE__ */ C(Ee, { size: 16 }),
|
|
859
900
|
isLoading: z,
|
|
860
|
-
children:
|
|
861
|
-
}) : /* @__PURE__ */
|
|
901
|
+
children: gt
|
|
902
|
+
}, "submit") : /* @__PURE__ */ C(c, {
|
|
862
903
|
type: "button",
|
|
863
|
-
onClick: () => Q(
|
|
864
|
-
children:
|
|
865
|
-
})]
|
|
904
|
+
onClick: () => Q(j[j.indexOf(I) + 1]),
|
|
905
|
+
children: T("botlit.agentBuilder.next", "Next")
|
|
906
|
+
}, "next")]
|
|
866
907
|
})
|
|
867
908
|
]
|
|
868
909
|
})
|
|
869
910
|
]
|
|
870
|
-
})
|
|
911
|
+
})]
|
|
871
912
|
});
|
|
872
|
-
},
|
|
913
|
+
}, Ie = ({ legend: t, items: n, selected: r, missing: i, loading: a, error: o, onRetry: s, onToggle: c, emptyText: l, resource: u }) => {
|
|
873
914
|
let f = e();
|
|
874
|
-
return a ? /* @__PURE__ */
|
|
915
|
+
return a ? /* @__PURE__ */ C("p", {
|
|
875
916
|
role: "status",
|
|
876
917
|
"aria-busy": "true",
|
|
877
918
|
className: "text-sm text-text-secondary",
|
|
878
919
|
children: f("botlit.agentBuilder.attachments.loading", "Loading {{resource}}…", { resource: u })
|
|
879
|
-
}) : o ? /* @__PURE__ */
|
|
920
|
+
}) : o ? /* @__PURE__ */ C(d, {
|
|
880
921
|
resource: u,
|
|
881
922
|
error: o,
|
|
882
923
|
onRetry: s
|
|
883
|
-
}) : n.length === 0 && i.length === 0 ? /* @__PURE__ */
|
|
924
|
+
}) : n.length === 0 && i.length === 0 ? /* @__PURE__ */ C("p", {
|
|
884
925
|
className: "text-sm text-text-secondary",
|
|
885
926
|
children: l
|
|
886
|
-
}) : /* @__PURE__ */
|
|
927
|
+
}) : /* @__PURE__ */ w("fieldset", { children: [/* @__PURE__ */ C("legend", {
|
|
887
928
|
className: "sr-only",
|
|
888
929
|
children: t
|
|
889
|
-
}), /* @__PURE__ */
|
|
930
|
+
}), /* @__PURE__ */ w("ul", {
|
|
890
931
|
className: "grid grid-cols-1 gap-2 md:grid-cols-2",
|
|
891
|
-
children: [n.map((e) => /* @__PURE__ */
|
|
932
|
+
children: [n.map((e) => /* @__PURE__ */ C("li", { children: /* @__PURE__ */ w("label", {
|
|
892
933
|
className: "flex cursor-pointer items-start gap-3 rounded-lg border border-border-subtle p-3 hover:bg-accent",
|
|
893
|
-
children: [/* @__PURE__ */
|
|
934
|
+
children: [/* @__PURE__ */ C("input", {
|
|
894
935
|
type: "checkbox",
|
|
895
936
|
className: "mt-0.5 h-4 w-4 rounded border-border-default",
|
|
896
937
|
checked: r.includes(e.id),
|
|
897
938
|
onChange: () => c(e.id)
|
|
898
|
-
}), /* @__PURE__ */
|
|
939
|
+
}), /* @__PURE__ */ w("span", { children: [/* @__PURE__ */ C("span", {
|
|
899
940
|
className: "block text-sm font-medium",
|
|
900
941
|
children: e.name
|
|
901
|
-
}), e.detail && /* @__PURE__ */
|
|
942
|
+
}), e.detail && /* @__PURE__ */ C("span", {
|
|
902
943
|
className: "block text-xs text-text-secondary",
|
|
903
944
|
children: e.detail
|
|
904
945
|
})] })]
|
|
905
|
-
}) }, e.id)), i.map((e) => /* @__PURE__ */
|
|
946
|
+
}) }, e.id)), i.map((e) => /* @__PURE__ */ C("li", { children: /* @__PURE__ */ w("label", {
|
|
906
947
|
className: "flex cursor-pointer items-start gap-3 rounded-lg border border-status-warning-border p-3",
|
|
907
|
-
children: [/* @__PURE__ */
|
|
948
|
+
children: [/* @__PURE__ */ C("input", {
|
|
908
949
|
type: "checkbox",
|
|
909
950
|
className: "mt-0.5 h-4 w-4 rounded border-border-default",
|
|
910
951
|
checked: !0,
|
|
911
952
|
onChange: () => c(e)
|
|
912
|
-
}), /* @__PURE__ */
|
|
913
|
-
/* @__PURE__ */
|
|
953
|
+
}), /* @__PURE__ */ w("span", { children: [
|
|
954
|
+
/* @__PURE__ */ C("span", {
|
|
914
955
|
className: "block text-sm font-medium",
|
|
915
956
|
children: f("botlit.agentBuilder.attachments.missing", "No longer available")
|
|
916
957
|
}),
|
|
917
|
-
/* @__PURE__ */
|
|
958
|
+
/* @__PURE__ */ C("span", {
|
|
918
959
|
className: "block font-mono text-xs text-text-secondary",
|
|
919
960
|
children: e
|
|
920
961
|
}),
|
|
921
|
-
/* @__PURE__ */
|
|
962
|
+
/* @__PURE__ */ C("span", {
|
|
922
963
|
className: "block text-xs text-text-secondary",
|
|
923
964
|
children: f("botlit.agentBuilder.attachments.missingHelp", "Untick to remove it from this agent.")
|
|
924
965
|
})
|
|
@@ -926,6 +967,6 @@ var Me = "flex h-10 w-full rounded-md border border-border-default bg-bg-surface
|
|
|
926
967
|
}) }, e))]
|
|
927
968
|
})] });
|
|
928
969
|
};
|
|
929
|
-
export {
|
|
970
|
+
export { M as AgentBuilderPage };
|
|
930
971
|
|
|
931
972
|
//# sourceMappingURL=AgentBuilderPage.js.map
|