@burdenoff/microfe-botmanor 2026.1127.1 → 2026.1127.3

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