@burdenoff/microfe-botmanor 2026.1118.8 → 2026.1119.2

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