@burdenoff/microfe-botmanor 2026.1115.1 → 2026.1116.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/dist/botlit/components/BotFormFields.js +66 -87
  2. package/dist/botlit/components/BotFormFields.js.map +1 -1
  3. package/dist/botlit/components/EmojiPicker.d.ts +20 -0
  4. package/dist/botlit/components/EmojiPicker.js +42 -0
  5. package/dist/botlit/components/EmojiPicker.js.map +1 -0
  6. package/dist/botlit/components/PageLayout.d.ts +5 -0
  7. package/dist/botlit/components/PageLayout.js +23 -14
  8. package/dist/botlit/components/PageLayout.js.map +1 -1
  9. package/dist/botlit/components/index.d.ts +1 -0
  10. package/dist/botlit/hooks/internal/allPages.d.ts +2 -0
  11. package/dist/botlit/hooks/internal/allPages.js +25 -0
  12. package/dist/botlit/hooks/internal/allPages.js.map +1 -0
  13. package/dist/botlit/hooks/useAgents.d.ts +24 -3
  14. package/dist/botlit/hooks/useAgents.js +158 -109
  15. package/dist/botlit/hooks/useAgents.js.map +1 -1
  16. package/dist/botlit/hooks/useBotAgents.d.ts +23 -0
  17. package/dist/botlit/hooks/useBotAgents.js +69 -0
  18. package/dist/botlit/hooks/useBotAgents.js.map +1 -0
  19. package/dist/botlit/hooks/useBots.js +2 -2
  20. package/dist/botlit/hooks/useBots.js.map +1 -1
  21. package/dist/botlit/hooks/useKnowledgeBases.js +40 -44
  22. package/dist/botlit/hooks/useKnowledgeBases.js.map +1 -1
  23. package/dist/botlit/hooks/useMCPServers.js +53 -57
  24. package/dist/botlit/hooks/useMCPServers.js.map +1 -1
  25. package/dist/botlit/pages/AgentBuilderPage.js +832 -425
  26. package/dist/botlit/pages/AgentBuilderPage.js.map +1 -1
  27. package/dist/botlit/pages/AgentDetailPage.js +407 -325
  28. package/dist/botlit/pages/AgentDetailPage.js.map +1 -1
  29. package/dist/botlit/pages/AgentsListPage.js +487 -291
  30. package/dist/botlit/pages/AgentsListPage.js.map +1 -1
  31. package/dist/botlit/pages/BotDetailPage.js +247 -257
  32. package/dist/botlit/pages/BotDetailPage.js.map +1 -1
  33. package/dist/botlit/pages/BotsListPage.js +2 -2
  34. package/dist/botlit/pages/BotsListPage.js.map +1 -1
  35. package/dist/botlit/types/index.d.ts +4 -1
  36. package/dist/botlit/utils/agentDelete.d.ts +5 -0
  37. package/dist/botlit/utils/agentDelete.js +15 -0
  38. package/dist/botlit/utils/agentDelete.js.map +1 -0
  39. package/dist/botlit/utils/agentSettings.d.ts +77 -0
  40. package/dist/botlit/utils/agentSettings.js +78 -0
  41. package/dist/botlit/utils/agentSettings.js.map +1 -0
  42. package/dist/generated/wspace-operations.d.ts +4 -0
  43. package/dist/generated/wspace-operations.js.map +1 -1
  44. package/dist/generated/wspace-types.d.ts +43 -0
  45. package/dist/generated/wspace-types.js.map +1 -1
  46. package/package.json +1 -1
@@ -23,39 +23,39 @@ import { BotChannelsTab as _e } from "./BotChannelsTab.js";
23
23
  import "../permissions/index.js";
24
24
  import { Suspense as ve, lazy as v, useEffect as y, useState as b } from "react";
25
25
  import { GlassCard as ye, NextSteps as be, PagePurpose as xe } from "@burdenoff/fe-libs/ui";
26
- import { Fragment as Se, jsx as x, jsxs as S } from "react/jsx-runtime";
27
- import { Link as Ce, useParams as we, useSearchParams as Te } from "react-router";
28
- import { isQuotaExhaustedError as Ee } from "@burdenoff/fe-libs/shared/utils";
29
- import { ArrowLeft as C, BarChart3 as De, Bot as w, Edit as Oe, GitBranch as ke, Layers as T, MessageSquare as E, Radio as D, Save as O, Shield as k, ShieldCheck as Ae, Trash2 as je, Workflow as A } from "lucide-react";
30
- import { toast as j } from "sonner";
26
+ import { Fragment as x, jsx as S, jsxs as C } from "react/jsx-runtime";
27
+ import { Link as Se, useParams as Ce, useSearchParams as we } from "react-router";
28
+ import { isQuotaExhaustedError as Te } from "@burdenoff/fe-libs/shared/utils";
29
+ import { ArrowLeft as w, BarChart3 as Ee, Bot as T, Edit as De, GitBranch as Oe, Layers as E, MessageSquare as D, Radio as O, Save as k, Shield as A, ShieldCheck as ke, Trash2 as Ae, Workflow as j } from "lucide-react";
30
+ import { toast as M } from "sonner";
31
31
  // src/botlit/pages/BotDetailPage.tsx
32
- var Me = v(() => import("./BotWorkflowTab.js").then((e) => ({ default: e.BotWorkflowTab }))), M = {
32
+ var je = v(() => import("./BotWorkflowTab.js").then((e) => ({ default: e.BotWorkflowTab }))), N = {
33
33
  key: "activate",
34
34
  target: "ACTIVE",
35
35
  variant: "default",
36
36
  confirm: !1
37
- }, N = {
37
+ }, P = {
38
38
  key: "resume",
39
39
  target: "ACTIVE",
40
40
  variant: "default",
41
41
  confirm: !1
42
- }, P = {
42
+ }, F = {
43
43
  key: "pause",
44
44
  target: "PAUSED",
45
45
  variant: "outline",
46
46
  confirm: !0
47
- }, F = {
47
+ }, I = {
48
48
  key: "archive",
49
49
  target: "ARCHIVED",
50
50
  variant: "outline",
51
51
  confirm: !0
52
- }, Ne = {
53
- DRAFT: [M, F],
54
- ACTIVE: [P, F],
55
- PAUSED: [N, F],
56
- ARCHIVED: [M]
57
- }, Pe = "ASSISTANT";
58
- function Fe(e) {
52
+ }, Me = {
53
+ DRAFT: [N, I],
54
+ ACTIVE: [F, I],
55
+ PAUSED: [P, I],
56
+ ARCHIVED: [N]
57
+ }, Ne = "ASSISTANT";
58
+ function Pe(e) {
59
59
  return {
60
60
  name: e.name,
61
61
  slug: e.slug,
@@ -67,7 +67,7 @@ function Fe(e) {
67
67
  defaultAgentId: e.defaultAgentId ?? ""
68
68
  };
69
69
  }
70
- var I = [
70
+ var L = [
71
71
  "overview",
72
72
  "workflow",
73
73
  "routing",
@@ -77,23 +77,23 @@ var I = [
77
77
  "aiOperations",
78
78
  "releases"
79
79
  ];
80
- function Ie(e) {
80
+ function Fe(e) {
81
81
  if (e.get("code") && e.get("state")) return "channels";
82
82
  let t = e.get("tab");
83
- return I.find((e) => e === t) ?? "overview";
83
+ return L.find((e) => e === t) ?? "overview";
84
84
  }
85
- var L = ({ isNew: m, isEditing: h }) => {
86
- let v = e(), { botId: M } = we(), [N] = Te(), P = te(), { navigateTo: F, getPath: I, workspaceId: L, navigate: R } = ue(), { data: z, loading: Le, error: B, refetch: V } = ie(m ? void 0 : M), { data: H } = ce(), [Re, ze] = ae(), [U, Be] = se(), [Ve, He] = oe(), [W, G] = b(() => Ie(N)), [K, q] = b(p), [Ue, We] = b(p), [Ge, Ke] = b(!1), [qe, J] = b(!1), [Je, Ye] = b(!1), Y = me(K.name, K.slug), Xe = Object.keys(Y).length > 0, X = !qe && JSON.stringify(K) !== JSON.stringify(Ue), Ze = !!(m || h), Qe = () => {
87
- R ? R("/billing") : window.location.assign("/billing");
85
+ var R = ({ isNew: m, isEditing: h }) => {
86
+ let v = e(), { botId: N } = Ce(), [P] = we(), F = te(), { navigateTo: I, getPath: L, workspaceId: R, navigate: z } = ue(), { data: B, loading: Ie, error: Le, refetch: V } = ie(m ? void 0 : N), { data: H } = ce(), [Re, ze] = ae(), [U, Be] = se(), [Ve, He] = oe(), [W, G] = b(() => Fe(P)), [K, q] = b(p), [Ue, We] = b(p), [Ge, Ke] = b(!1), [qe, J] = b(!1), [Je, Ye] = b(!1), Y = me(K.name, K.slug), Xe = Object.keys(Y).length > 0, X = !qe && JSON.stringify(K) !== JSON.stringify(Ue), Ze = !!(m || h), Qe = () => {
87
+ z ? z("/billing") : window.location.assign("/billing");
88
88
  };
89
89
  y(() => {
90
- if (z && !m) {
91
- let e = Fe(z);
90
+ if (B && !m) {
91
+ let e = Pe(B);
92
92
  q(e), We(e);
93
93
  }
94
- }, [z, m]), y(() => {
95
- if (M && z?.name) return he(M, z.name), () => ge(M);
96
- }, [M, z?.name]), y(() => {
94
+ }, [B, m]), y(() => {
95
+ if (N && B?.name) return he(N, B.name), () => ge(N);
96
+ }, [N, B?.name]), y(() => {
97
97
  if (!Ze || !X) return;
98
98
  let e = (e) => {
99
99
  e.preventDefault(), e.returnValue = "";
@@ -106,35 +106,35 @@ var L = ({ isNew: m, isEditing: h }) => {
106
106
  message: v("botlit.botDetail.discard.message", "You have unsaved changes. If you leave now they will be lost."),
107
107
  confirmLabel: v("botlit.botDetail.discard.confirm", "Discard"),
108
108
  cancelLabel: v("botlit.botDetail.discard.keepEditing", "Keep editing")
109
- })) && (J(!0), F(e));
109
+ })) && (J(!0), I(e));
110
110
  }, $e = async () => {
111
- if (Ke(!0), Xe || !L) return;
111
+ if (Ke(!0), Xe || !R) return;
112
112
  let e = K.name.trim();
113
113
  try {
114
114
  let t = await Re({
115
- workspaceId: L,
115
+ workspaceId: R,
116
116
  name: e,
117
117
  slug: K.slug.trim() || _(e),
118
- type: Pe,
118
+ type: Ne,
119
119
  routingStrategy: K.routingStrategy,
120
120
  description: K.description || void 0,
121
121
  icon: K.icon || void 0
122
122
  });
123
- J(!0), j.success(v("botlit.botDetail.create.success", "Bot \"{{name}}\" created successfully", { name: e })), t?.id && F(`bots/${t.id}?tab=workflow`);
123
+ J(!0), M.success(v("botlit.botDetail.create.success", "Bot \"{{name}}\" created successfully", { name: e })), t?.id && I(`bots/${t.id}?tab=workflow`);
124
124
  } catch (e) {
125
- if (Ee(e)) {
125
+ if (Te(e)) {
126
126
  Ye(!0);
127
127
  return;
128
128
  }
129
129
  let t = e instanceof Error ? e.message : v("botlit.botDetail.create.error", "Failed to create bot");
130
- j.error(t);
130
+ M.error(t);
131
131
  }
132
132
  }, et = async () => {
133
- if (Ke(!0), !M || Xe) return;
133
+ if (Ke(!0), !N || Xe) return;
134
134
  let e = K.name.trim();
135
135
  try {
136
136
  await U({
137
- botId: M,
137
+ botId: N,
138
138
  input: {
139
139
  name: e,
140
140
  slug: K.slug.trim() || _(e),
@@ -145,52 +145,52 @@ var L = ({ isNew: m, isEditing: h }) => {
145
145
  fallbackMessage: K.fallbackMessage || null,
146
146
  defaultAgentId: K.defaultAgentId || null
147
147
  }
148
- }), J(!0), await V(), j.success(v("botlit.botDetail.update.success", "Bot \"{{name}}\" updated successfully", { name: e })), h && F(`bots/${M}`);
148
+ }), J(!0), await V(), M.success(v("botlit.botDetail.update.success", "Bot \"{{name}}\" updated successfully", { name: e })), h && I(`bots/${N}`);
149
149
  } catch (e) {
150
150
  let t = e instanceof Error ? e.message : v("botlit.botDetail.update.error", "Failed to update bot");
151
- j.error(t);
151
+ M.error(t);
152
152
  }
153
153
  };
154
154
  if (m) {
155
- let e = L ? null : v("botlit.botDetail.createPage.waitingWorkspace", "Waiting for your workspace to load…");
156
- return /* @__PURE__ */ S(Se, { children: [/* @__PURE__ */ x(t, {
155
+ let e = R ? null : v("botlit.botDetail.createPage.waitingWorkspace", "Waiting for your workspace to load…");
156
+ return /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S(t, {
157
157
  title: v("botlit.botDetail.createPage.title", "Create New Bot"),
158
158
  description: v("botlit.botDetail.createPage.description", "Set up a new AI-powered bot"),
159
- actions: /* @__PURE__ */ S("div", {
159
+ actions: /* @__PURE__ */ C("div", {
160
160
  className: "flex gap-2",
161
- children: [/* @__PURE__ */ x(s, {
161
+ children: [/* @__PURE__ */ S(s, {
162
162
  variant: "outline",
163
163
  type: "button",
164
164
  onClick: () => void Z("bots"),
165
165
  children: v("botlit.common.cancel", "Cancel")
166
- }), /* @__PURE__ */ x(s, {
166
+ }), /* @__PURE__ */ S(s, {
167
167
  type: "submit",
168
168
  form: "bot-create-form",
169
- leftIcon: /* @__PURE__ */ x(O, { size: 16 }),
169
+ leftIcon: /* @__PURE__ */ S(k, { size: 16 }),
170
170
  isLoading: ze.loading,
171
171
  disabled: !!e,
172
172
  "aria-describedby": e ? "bot-create-blocked" : void 0,
173
173
  children: v("botlit.botDetail.createPage.actions.createBot", "Create Bot")
174
174
  })]
175
175
  }),
176
- children: /* @__PURE__ */ x(n, {
176
+ children: /* @__PURE__ */ S(n, {
177
177
  className: "max-w-2xl",
178
- children: /* @__PURE__ */ x(r, {
178
+ children: /* @__PURE__ */ S(r, {
179
179
  className: "pt-6",
180
- children: /* @__PURE__ */ S("form", {
180
+ children: /* @__PURE__ */ C("form", {
181
181
  id: "bot-create-form",
182
182
  noValidate: !0,
183
183
  onSubmit: (e) => {
184
184
  e.preventDefault(), $e();
185
185
  },
186
- children: [/* @__PURE__ */ x(f, {
186
+ children: [/* @__PURE__ */ S(f, {
187
187
  idPrefix: "bot-create",
188
188
  mode: "create",
189
189
  value: K,
190
190
  onChange: q,
191
191
  errors: Y,
192
192
  showErrors: Ge
193
- }), e && /* @__PURE__ */ x("p", {
193
+ }), e && /* @__PURE__ */ S("p", {
194
194
  id: "bot-create-blocked",
195
195
  role: "status",
196
196
  className: "mt-4 text-sm text-text-secondary",
@@ -199,7 +199,7 @@ var L = ({ isNew: m, isEditing: h }) => {
199
199
  })
200
200
  })
201
201
  })
202
- }), /* @__PURE__ */ x(le, {
202
+ }), /* @__PURE__ */ S(le, {
203
203
  open: Je,
204
204
  title: v("botlit.usage.botQuota.title", "Bot Limit Reached"),
205
205
  description: v("botlit.usage.botQuota.description", "You have reached the number of bots allowed on your current plan."),
@@ -207,76 +207,74 @@ var L = ({ isNew: m, isEditing: h }) => {
207
207
  onViewBilling: Qe
208
208
  })] });
209
209
  }
210
- if (Le) return /* @__PURE__ */ x(t, {
210
+ if (Ie) return /* @__PURE__ */ S(t, {
211
211
  title: v("botlit.common.loading", "Loading..."),
212
- children: /* @__PURE__ */ x("div", {
212
+ children: /* @__PURE__ */ S("div", {
213
213
  role: "status",
214
214
  "aria-busy": "true",
215
215
  "aria-label": v("botlit.common.loading", "Loading"),
216
216
  className: "h-96 bg-bg-sunken motion-safe:animate-vc-shimmer rounded-lg"
217
217
  })
218
218
  });
219
- if (B) return /* @__PURE__ */ x(t, {
219
+ if (Le) return /* @__PURE__ */ S(t, {
220
220
  title: v("botlit.botDetail.loadError.title", "Bot unavailable"),
221
- children: /* @__PURE__ */ x(re, {
221
+ children: /* @__PURE__ */ S(re, {
222
222
  resource: v("botlit.botDetail.resource", "this bot"),
223
- error: B,
223
+ error: Le,
224
224
  onRetry: () => void V()
225
225
  })
226
226
  });
227
- if (!z) return /* @__PURE__ */ x(t, {
227
+ if (!B) return /* @__PURE__ */ S(t, {
228
228
  title: v("botlit.botDetail.notFound.title", "Bot Not Found"),
229
- children: /* @__PURE__ */ x(ne, {
229
+ children: /* @__PURE__ */ S(ne, {
230
230
  illustration: "empty-agents",
231
231
  title: v("botlit.botDetail.notFound.title", "Bot Not Found"),
232
232
  description: v("botlit.botDetail.notFound.description", "The bot you're looking for doesn't exist."),
233
- action: /* @__PURE__ */ x(s, {
234
- onClick: () => F("bots"),
233
+ action: /* @__PURE__ */ S(s, {
234
+ onClick: () => I("bots"),
235
235
  children: v("botlit.botDetail.notFound.backAction", "Back to Bots")
236
236
  })
237
237
  })
238
238
  });
239
- if (h && z) return /* @__PURE__ */ x(t, {
240
- title: /* @__PURE__ */ S("div", {
241
- className: "flex items-center gap-3",
242
- children: [/* @__PURE__ */ x(s, {
243
- variant: "ghost",
244
- size: "icon",
245
- type: "button",
246
- "aria-label": v("botlit.common.back", "Back"),
247
- onClick: () => void Z(`bots/${M}`),
248
- children: /* @__PURE__ */ x(C, {
249
- size: 20,
250
- "aria-hidden": "true"
251
- })
252
- }), /* @__PURE__ */ x("span", { children: v("botlit.botDetail.editPage.title", "Edit Bot") })]
239
+ if (h && B) return /* @__PURE__ */ S(t, {
240
+ leading: /* @__PURE__ */ S(s, {
241
+ variant: "ghost",
242
+ size: "icon",
243
+ type: "button",
244
+ "aria-label": v("botlit.common.back", "Back"),
245
+ onClick: () => void Z(`bots/${N}`),
246
+ children: /* @__PURE__ */ S(w, {
247
+ size: 20,
248
+ "aria-hidden": "true"
249
+ })
253
250
  }),
254
- actions: /* @__PURE__ */ S("div", {
251
+ title: v("botlit.botDetail.editPage.title", "Edit Bot"),
252
+ actions: /* @__PURE__ */ C("div", {
255
253
  className: "flex gap-2",
256
- children: [/* @__PURE__ */ x(s, {
254
+ children: [/* @__PURE__ */ S(s, {
257
255
  variant: "outline",
258
256
  type: "button",
259
- onClick: () => void Z(`bots/${M}`),
257
+ onClick: () => void Z(`bots/${N}`),
260
258
  children: v("botlit.common.cancel", "Cancel")
261
- }), /* @__PURE__ */ x(s, {
259
+ }), /* @__PURE__ */ S(s, {
262
260
  type: "submit",
263
261
  form: "bot-edit-form",
264
- leftIcon: /* @__PURE__ */ x(O, { size: 16 }),
262
+ leftIcon: /* @__PURE__ */ S(k, { size: 16 }),
265
263
  isLoading: Be.loading,
266
264
  children: v("botlit.botDetail.editPage.actions.saveChanges", "Save Changes")
267
265
  })]
268
266
  }),
269
- children: /* @__PURE__ */ x(n, {
267
+ children: /* @__PURE__ */ S(n, {
270
268
  className: "max-w-2xl",
271
- children: /* @__PURE__ */ x(r, {
269
+ children: /* @__PURE__ */ S(r, {
272
270
  className: "pt-6",
273
- children: /* @__PURE__ */ x("form", {
271
+ children: /* @__PURE__ */ S("form", {
274
272
  id: "bot-edit-form",
275
273
  noValidate: !0,
276
274
  onSubmit: (e) => {
277
275
  e.preventDefault(), et();
278
276
  },
279
- children: /* @__PURE__ */ x(f, {
277
+ children: /* @__PURE__ */ S(f, {
280
278
  idPrefix: "bot-edit",
281
279
  mode: "edit",
282
280
  value: K,
@@ -317,8 +315,8 @@ var L = ({ isNew: m, isEditing: h }) => {
317
315
  };
318
316
  }
319
317
  }, tt = async (e) => {
320
- if (!M) return;
321
- let t = Q(e.key, z.name);
318
+ if (!N) return;
319
+ let t = Q(e.key, B.name);
322
320
  if (!e.confirm || await g({
323
321
  title: t.confirmTitle ?? t.label,
324
322
  message: t.confirmMessage ?? t.label,
@@ -326,137 +324,129 @@ var L = ({ isNew: m, isEditing: h }) => {
326
324
  cancelLabel: v("botlit.common.cancel", "Cancel")
327
325
  })) try {
328
326
  await U({
329
- botId: M,
327
+ botId: N,
330
328
  input: { status: e.target }
331
- }), await V(), j.success(t.success);
329
+ }), await V(), M.success(t.success);
332
330
  } catch (e) {
333
- j.error(e instanceof Error ? e.message : t.error);
331
+ M.error(e instanceof Error ? e.message : t.error);
334
332
  }
335
333
  }, nt = [
336
334
  {
337
335
  id: "overview",
338
336
  label: v("botlit.botDetail.tabs.overview", "Overview"),
339
- icon: /* @__PURE__ */ x(De, { size: 16 })
337
+ icon: /* @__PURE__ */ S(Ee, { size: 16 })
340
338
  },
341
339
  {
342
340
  id: "workflow",
343
341
  label: v("botlit.botDetail.tabs.workflow", "Workflow"),
344
- icon: /* @__PURE__ */ x(A, { size: 16 })
342
+ icon: /* @__PURE__ */ S(j, { size: 16 })
345
343
  },
346
344
  {
347
345
  id: "routing",
348
346
  label: v("botlit.botDetail.tabs.routing", "Routing"),
349
- icon: /* @__PURE__ */ x(ke, { size: 16 })
347
+ icon: /* @__PURE__ */ S(Oe, { size: 16 })
350
348
  },
351
349
  {
352
350
  id: "agents",
353
351
  label: v("botlit.botDetail.tabs.agents", "Agents"),
354
- icon: /* @__PURE__ */ x(w, { size: 16 })
352
+ icon: /* @__PURE__ */ S(T, { size: 16 })
355
353
  },
356
354
  {
357
355
  id: "channels",
358
356
  label: v("botlit.botDetail.tabs.channels", "Channels"),
359
- icon: /* @__PURE__ */ x(D, { size: 16 })
357
+ icon: /* @__PURE__ */ S(O, { size: 16 })
360
358
  },
361
359
  {
362
360
  id: "guardrails",
363
361
  label: v("botlit.botDetail.tabs.guardrails", "Guardrails"),
364
- icon: /* @__PURE__ */ x(k, { size: 16 })
362
+ icon: /* @__PURE__ */ S(A, { size: 16 })
365
363
  },
366
364
  {
367
365
  id: "aiOperations",
368
366
  label: v("botlit.botDetail.tabs.aiOperations", "AI Operations"),
369
- icon: /* @__PURE__ */ x(Ae, { size: 16 })
367
+ icon: /* @__PURE__ */ S(ke, { size: 16 })
370
368
  },
371
369
  {
372
370
  id: "releases",
373
371
  label: v("botlit.botDetail.tabs.releases", "Releases"),
374
- icon: /* @__PURE__ */ x(T, { size: 16 })
372
+ icon: /* @__PURE__ */ S(E, { size: 16 })
375
373
  }
376
- ], $ = z.defaultAgentId ? H?.find((e) => e.id === z.defaultAgentId) : null;
377
- return /* @__PURE__ */ x(t, {
378
- title: /* @__PURE__ */ S("div", {
379
- className: "flex items-center gap-3",
380
- children: [
381
- /* @__PURE__ */ x(s, {
382
- variant: "ghost",
383
- size: "icon",
384
- onClick: () => F("bots"),
385
- children: /* @__PURE__ */ x(C, { size: 20 })
386
- }),
387
- /* @__PURE__ */ x("span", {
388
- className: "text-3xl",
389
- children: z.icon
390
- }),
391
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ S("div", {
392
- className: "flex items-center gap-2",
393
- children: [
394
- /* @__PURE__ */ x("span", { children: z.name }),
395
- /* @__PURE__ */ x(l, { status: z.status }),
396
- /* @__PURE__ */ x(c, {
397
- variant: "outline",
398
- children: z.slug
399
- })
400
- ]
401
- }), /* @__PURE__ */ x("p", {
402
- className: "text-sm font-normal text-text-secondary",
403
- children: z.description
404
- })] })
405
- ]
406
- }),
407
- actions: /* @__PURE__ */ S("div", {
374
+ ], $ = B.defaultAgentId ? H?.find((e) => e.id === B.defaultAgentId) : null;
375
+ return /* @__PURE__ */ S(t, {
376
+ leading: /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S(s, {
377
+ variant: "ghost",
378
+ size: "icon",
379
+ type: "button",
380
+ "aria-label": v("botlit.botDetail.backToBots", "Back to Bots"),
381
+ onClick: () => I("bots"),
382
+ children: /* @__PURE__ */ S(w, {
383
+ size: 20,
384
+ "aria-hidden": "true"
385
+ })
386
+ }), /* @__PURE__ */ S("span", {
387
+ className: "text-3xl",
388
+ "aria-hidden": "true",
389
+ children: B.icon
390
+ })] }),
391
+ title: B.name,
392
+ meta: /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S(l, { status: B.status }), /* @__PURE__ */ S(c, {
393
+ variant: "outline",
394
+ children: B.slug
395
+ })] }),
396
+ description: B.description,
397
+ actions: /* @__PURE__ */ C("div", {
408
398
  className: "flex gap-2",
409
399
  children: [
410
- /* @__PURE__ */ x(d, {
400
+ /* @__PURE__ */ S(d, {
411
401
  permission: u.APP_UPDATE,
412
- children: (Ne[z.status] ?? []).map((e) => /* @__PURE__ */ x(s, {
402
+ children: (Me[B.status] ?? []).map((e) => /* @__PURE__ */ S(s, {
413
403
  variant: e.variant,
414
404
  isLoading: Be.loading,
415
405
  onClick: () => void tt(e),
416
- children: Q(e.key, z.name).label
406
+ children: Q(e.key, B.name).label
417
407
  }, e.key))
418
408
  }),
419
- /* @__PURE__ */ x(d, {
409
+ /* @__PURE__ */ S(d, {
420
410
  permission: u.APP_UPDATE,
421
- children: /* @__PURE__ */ x(s, {
411
+ children: /* @__PURE__ */ S(s, {
422
412
  variant: "outline",
423
- leftIcon: /* @__PURE__ */ x(Oe, { size: 16 }),
424
- onClick: () => F(`bots/${M}/edit`),
413
+ leftIcon: /* @__PURE__ */ S(De, { size: 16 }),
414
+ onClick: () => I(`bots/${N}/edit`),
425
415
  children: v("botlit.botDetail.actions.editBot", "Edit Bot")
426
416
  })
427
417
  }),
428
- /* @__PURE__ */ x(d, {
418
+ /* @__PURE__ */ S(d, {
429
419
  permission: u.AGENT_EXECUTE,
430
- children: /* @__PURE__ */ x(s, {
420
+ children: /* @__PURE__ */ S(s, {
431
421
  variant: "outline",
432
- leftIcon: /* @__PURE__ */ x(E, { size: 16 }),
422
+ leftIcon: /* @__PURE__ */ S(D, { size: 16 }),
433
423
  onClick: () => {
434
- let e = z?.defaultAgentId;
435
- F(e ? `chat/${e}` : "chat");
424
+ let e = B?.defaultAgentId;
425
+ I(e ? `chat/${e}` : "chat");
436
426
  },
437
427
  children: v("botlit.botDetail.actions.testBot", "Test Bot")
438
428
  })
439
429
  }),
440
- /* @__PURE__ */ x(d, {
430
+ /* @__PURE__ */ S(d, {
441
431
  permission: u.APP_DELETE,
442
- children: /* @__PURE__ */ x(s, {
432
+ children: /* @__PURE__ */ S(s, {
443
433
  variant: "destructive",
444
- leftIcon: /* @__PURE__ */ x(je, { size: 16 }),
434
+ leftIcon: /* @__PURE__ */ S(Ae, { size: 16 }),
445
435
  isLoading: He.loading,
446
436
  onClick: async () => {
447
- if (M && await g({
437
+ if (N && await g({
448
438
  title: v("botlit.botsList.delete.title", "Delete bot?"),
449
- message: v("botlit.botsList.delete.confirm", "Are you sure you want to delete \"{{name}}\"? Its channels will stop answering and this cannot be undone.", { name: z.name }),
439
+ message: v("botlit.botsList.delete.confirm", "Are you sure you want to delete \"{{name}}\"? Its channels will stop answering and this cannot be undone.", { name: B.name }),
450
440
  confirmLabel: v("botlit.common.delete", "Delete"),
451
441
  cancelLabel: v("botlit.common.cancel", "Cancel")
452
442
  })) try {
453
- if (!await Ve(M)) {
454
- j.error(v("botlit.botsList.delete.notDeleted", "The bot could not be deleted."));
443
+ if (!await Ve(N)) {
444
+ M.error(v("botlit.botsList.delete.notDeleted", "The bot could not be deleted."));
455
445
  return;
456
446
  }
457
- j.success(v("botlit.botsList.delete.success", "Bot \"{{name}}\" deleted successfully", { name: z.name })), F("bots");
447
+ M.success(v("botlit.botsList.delete.success", "Bot \"{{name}}\" deleted successfully", { name: B.name })), I("bots");
458
448
  } catch (e) {
459
- j.error(e instanceof Error ? e.message : v("botlit.botDetail.delete.error", "Failed to delete bot"));
449
+ M.error(e instanceof Error ? e.message : v("botlit.botDetail.delete.error", "Failed to delete bot"));
460
450
  }
461
451
  },
462
452
  children: v("botlit.common.delete", "Delete")
@@ -464,165 +454,165 @@ var L = ({ isNew: m, isEditing: h }) => {
464
454
  })
465
455
  ]
466
456
  }),
467
- children: /* @__PURE__ */ S("div", {
457
+ children: /* @__PURE__ */ C("div", {
468
458
  className: "space-y-6",
469
459
  children: [
470
- /* @__PURE__ */ x(xe, {
471
- icon: /* @__PURE__ */ x(w, { size: 18 }),
460
+ /* @__PURE__ */ S(xe, {
461
+ icon: /* @__PURE__ */ S(T, { size: 18 }),
472
462
  children: v("botlit.botDetail.purpose", "This is everything that makes up a single bot — the agent that answers, how requests are routed, which channels it is live on, its guardrails and its release history. Use the tabs to wire it up: assign a default agent, connect a channel and activate it so real users can start chatting.")
473
463
  }),
474
- /* @__PURE__ */ x("div", {
464
+ /* @__PURE__ */ S("div", {
475
465
  className: "flex gap-1 border-b border-border-subtle overflow-x-auto",
476
- children: nt.map((e) => /* @__PURE__ */ S("button", {
466
+ children: nt.map((e) => /* @__PURE__ */ C("button", {
477
467
  onClick: () => G(e.id),
478
468
  className: pe("flex items-center gap-2 px-4 py-2 text-sm font-medium border-b-2 transition-colors whitespace-nowrap", W === e.id ? "border-primary text-primary" : "border-transparent text-text-secondary hover:text-text-primary"),
479
469
  children: [e.icon, e.label]
480
470
  }, e.id))
481
471
  }),
482
- W === "overview" && /* @__PURE__ */ S("div", {
472
+ W === "overview" && /* @__PURE__ */ C("div", {
483
473
  className: "space-y-6",
484
- children: [/* @__PURE__ */ x(be, {
485
- storageKey: `botlit-bot-${M}`,
474
+ children: [/* @__PURE__ */ S(be, {
475
+ storageKey: `botlit-bot-${N}`,
486
476
  steps: [
487
477
  {
488
478
  id: "workflow",
489
479
  label: v("botlit.botDetail.nextSteps.workflow", "Design the workflow"),
490
480
  description: v("botlit.botDetail.nextSteps.workflowDesc", "Lay out what the bot does on the FluidGrids canvas."),
491
- icon: /* @__PURE__ */ x(A, { size: 16 }),
481
+ icon: /* @__PURE__ */ S(j, { size: 16 }),
492
482
  onClick: () => G("workflow"),
493
- done: !!z.workflowId
483
+ done: !!B.workflowId
494
484
  },
495
485
  {
496
486
  id: "agent",
497
487
  label: v("botlit.botDetail.nextSteps.agent", "Assign a default agent"),
498
488
  description: v("botlit.botDetail.nextSteps.agentDesc", "Choose which agent answers when this bot is messaged."),
499
- icon: /* @__PURE__ */ x(w, { size: 16 }),
489
+ icon: /* @__PURE__ */ S(T, { size: 16 }),
500
490
  onClick: () => G("agents"),
501
- done: !!z.defaultAgentId
491
+ done: !!B.defaultAgentId
502
492
  },
503
493
  {
504
494
  id: "channel",
505
495
  label: v("botlit.botDetail.nextSteps.channel", "Connect a channel"),
506
496
  description: v("botlit.botDetail.nextSteps.channelDesc", "Put the bot on Slack, a web widget or another channel."),
507
- icon: /* @__PURE__ */ x(D, { size: 16 }),
497
+ icon: /* @__PURE__ */ S(O, { size: 16 }),
508
498
  onClick: () => G("channels")
509
499
  },
510
500
  {
511
501
  id: "test",
512
502
  label: v("botlit.botDetail.nextSteps.test", "Test the bot"),
513
503
  description: v("botlit.botDetail.nextSteps.testDesc", "Send a message to check the experience end to end."),
514
- icon: /* @__PURE__ */ x(E, { size: 16 }),
504
+ icon: /* @__PURE__ */ S(D, { size: 16 }),
515
505
  onClick: () => {
516
- let e = z?.defaultAgentId;
517
- F(e ? `chat/${e}` : "chat");
506
+ let e = B?.defaultAgentId;
507
+ I(e ? `chat/${e}` : "chat");
518
508
  }
519
509
  },
520
510
  {
521
511
  id: "activate",
522
512
  label: v("botlit.botDetail.nextSteps.activate", "Activate the bot"),
523
513
  description: v("botlit.botDetail.nextSteps.activateDesc", "Make it live so it starts handling conversations."),
524
- icon: /* @__PURE__ */ x(k, { size: 16 }),
525
- onClick: () => F(`bots/${M}/edit`),
526
- done: z.status === "ACTIVE"
514
+ icon: /* @__PURE__ */ S(A, { size: 16 }),
515
+ onClick: () => I(`bots/${N}/edit`),
516
+ done: B.status === "ACTIVE"
527
517
  }
528
518
  ]
529
- }), /* @__PURE__ */ S("div", {
519
+ }), /* @__PURE__ */ C("div", {
530
520
  className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
531
521
  children: [
532
- /* @__PURE__ */ S(n, { children: [/* @__PURE__ */ x(a, { children: /* @__PURE__ */ x(o, { children: "Details" }) }), /* @__PURE__ */ S(r, {
522
+ /* @__PURE__ */ C(n, { children: [/* @__PURE__ */ S(a, { children: /* @__PURE__ */ S(o, { children: "Details" }) }), /* @__PURE__ */ C(r, {
533
523
  className: "space-y-4",
534
524
  children: [
535
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
525
+ /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
536
526
  className: "text-sm text-text-secondary",
537
527
  children: "Status"
538
- }), /* @__PURE__ */ x(l, { status: z.status })] }),
539
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
528
+ }), /* @__PURE__ */ S(l, { status: B.status })] }),
529
+ /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
540
530
  className: "text-sm text-text-secondary",
541
531
  children: "Visibility"
542
- }), /* @__PURE__ */ x(c, {
532
+ }), /* @__PURE__ */ S(c, {
543
533
  variant: "outline",
544
- children: z.visibility
534
+ children: B.visibility
545
535
  })] }),
546
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
536
+ /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
547
537
  className: "text-sm text-text-secondary",
548
538
  children: "Routing Strategy"
549
- }), /* @__PURE__ */ x(c, {
539
+ }), /* @__PURE__ */ S(c, {
550
540
  variant: "outline",
551
- children: z.routingStrategy
541
+ children: B.routingStrategy
552
542
  })] }),
553
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
543
+ /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
554
544
  className: "text-sm text-text-secondary",
555
545
  children: "Default Agent"
556
- }), /* @__PURE__ */ x("p", {
546
+ }), /* @__PURE__ */ S("p", {
557
547
  className: "font-medium",
558
- children: z.defaultAgentId ? "1 agent assigned" : "No agents"
548
+ children: B.defaultAgentId ? "1 agent assigned" : "No agents"
559
549
  })] }),
560
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
550
+ /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
561
551
  className: "text-sm text-text-secondary",
562
552
  children: "Channels"
563
- }), /* @__PURE__ */ x("p", {
553
+ }), /* @__PURE__ */ S("p", {
564
554
  className: "font-medium",
565
555
  children: "0 channels"
566
556
  })] }),
567
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
557
+ /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
568
558
  className: "text-sm text-text-secondary",
569
559
  children: "Created"
570
- }), /* @__PURE__ */ x("p", {
560
+ }), /* @__PURE__ */ S("p", {
571
561
  className: "font-medium",
572
- children: fe(z.createdAt)
562
+ children: fe(B.createdAt)
573
563
  })] }),
574
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
564
+ /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
575
565
  className: "text-sm text-text-secondary",
576
566
  children: "Executions"
577
- }), /* @__PURE__ */ x("p", {
567
+ }), /* @__PURE__ */ S("p", {
578
568
  className: "font-medium",
579
- children: de(z.executionCount)
569
+ children: de(B.executionCount)
580
570
  })] })
581
571
  ]
582
572
  })] }),
583
- /* @__PURE__ */ S(ye, {
573
+ /* @__PURE__ */ C(ye, {
584
574
  treatment: "glass",
585
575
  glow: !0,
586
576
  className: "lg:col-span-2 p-6",
587
- children: [/* @__PURE__ */ S("div", {
577
+ children: [/* @__PURE__ */ C("div", {
588
578
  className: "mb-4 flex flex-row items-center justify-between",
589
- children: [/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("h3", {
579
+ children: [/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("h3", {
590
580
  className: "text-lg font-semibold tracking-tight text-text-primary",
591
581
  children: "Default Agent"
592
- }), /* @__PURE__ */ x("p", {
582
+ }), /* @__PURE__ */ S("p", {
593
583
  className: "text-sm text-text-secondary",
594
584
  children: "Agent configured for this bot"
595
- })] }), /* @__PURE__ */ x(s, {
585
+ })] }), /* @__PURE__ */ S(s, {
596
586
  size: "sm",
597
587
  variant: "outline",
598
588
  onClick: () => G("agents"),
599
589
  children: "Manage"
600
590
  })]
601
- }), /* @__PURE__ */ x("div", { children: $ ? /* @__PURE__ */ x("div", {
591
+ }), /* @__PURE__ */ S("div", { children: $ ? /* @__PURE__ */ S("div", {
602
592
  className: "space-y-3",
603
- children: /* @__PURE__ */ S(Ce, {
604
- to: I(`agents/${$.id}`),
593
+ children: /* @__PURE__ */ C(Se, {
594
+ to: L(`agents/${$.id}`),
605
595
  className: "flex items-center justify-between p-3 rounded-lg border border-border-subtle hover:bg-accent transition-colors",
606
- children: [/* @__PURE__ */ S("div", {
596
+ children: [/* @__PURE__ */ C("div", {
607
597
  className: "flex items-center gap-3",
608
- children: [/* @__PURE__ */ x("span", {
598
+ children: [/* @__PURE__ */ S("span", {
609
599
  className: "text-2xl",
610
600
  children: "🤖"
611
- }), /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
601
+ }), /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
612
602
  className: "font-medium text-text-primary",
613
603
  children: $.name
614
- }), /* @__PURE__ */ x("p", {
604
+ }), /* @__PURE__ */ S("p", {
615
605
  className: "text-xs text-text-secondary",
616
606
  children: "Default Agent"
617
607
  })] })]
618
- }), /* @__PURE__ */ x(l, { status: $.status })]
608
+ }), /* @__PURE__ */ S(l, { status: $.status })]
619
609
  })
620
- }) : /* @__PURE__ */ S("div", {
610
+ }) : /* @__PURE__ */ C("div", {
621
611
  className: "text-center py-8 text-text-secondary",
622
612
  children: [
623
- /* @__PURE__ */ x(w, { className: "h-8 w-8 mx-auto mb-2 opacity-50" }),
624
- /* @__PURE__ */ x("p", { children: "No default agent assigned" }),
625
- /* @__PURE__ */ x(s, {
613
+ /* @__PURE__ */ S(T, { className: "h-8 w-8 mx-auto mb-2 opacity-50" }),
614
+ /* @__PURE__ */ S("p", { children: "No default agent assigned" }),
615
+ /* @__PURE__ */ S(s, {
626
616
  size: "sm",
627
617
  className: "mt-3",
628
618
  onClick: () => G("agents"),
@@ -631,11 +621,11 @@ var L = ({ isNew: m, isEditing: h }) => {
631
621
  ]
632
622
  }) })]
633
623
  }),
634
- (z.tagIds || []).length > 0 && /* @__PURE__ */ S(n, {
624
+ (B.tagIds || []).length > 0 && /* @__PURE__ */ C(n, {
635
625
  className: "lg:col-span-3",
636
- children: [/* @__PURE__ */ x(a, { children: /* @__PURE__ */ x(o, { children: "Tags" }) }), /* @__PURE__ */ x(r, { children: /* @__PURE__ */ x("div", {
626
+ children: [/* @__PURE__ */ S(a, { children: /* @__PURE__ */ S(o, { children: "Tags" }) }), /* @__PURE__ */ S(r, { children: /* @__PURE__ */ S("div", {
637
627
  className: "flex flex-wrap gap-2",
638
- children: (z.tagIds || []).map((e) => /* @__PURE__ */ x(c, {
628
+ children: (B.tagIds || []).map((e) => /* @__PURE__ */ S(c, {
639
629
  variant: "outline",
640
630
  children: e
641
631
  }, e))
@@ -644,122 +634,122 @@ var L = ({ isNew: m, isEditing: h }) => {
644
634
  ]
645
635
  })]
646
636
  }),
647
- W === "workflow" && M && /* @__PURE__ */ x(ve, {
648
- fallback: /* @__PURE__ */ x("div", { className: "h-64 bg-bg-sunken motion-safe:animate-vc-shimmer rounded-lg" }),
649
- children: /* @__PURE__ */ x(Me, {
650
- botId: M,
651
- botName: z.name,
652
- workflowId: z.workflowId,
637
+ W === "workflow" && N && /* @__PURE__ */ S(ve, {
638
+ fallback: /* @__PURE__ */ S("div", { className: "h-64 bg-bg-sunken motion-safe:animate-vc-shimmer rounded-lg" }),
639
+ children: /* @__PURE__ */ S(je, {
640
+ botId: N,
641
+ botName: B.name,
642
+ workflowId: B.workflowId,
653
643
  onWorkflowChanged: async () => {
654
644
  await V();
655
645
  }
656
646
  })
657
647
  }),
658
- W === "routing" && /* @__PURE__ */ S("div", {
648
+ W === "routing" && /* @__PURE__ */ C("div", {
659
649
  className: "space-y-6",
660
- children: [/* @__PURE__ */ S(n, { children: [/* @__PURE__ */ S(a, { children: [/* @__PURE__ */ x(o, { children: "Routing Configuration" }), /* @__PURE__ */ x(i, { children: "How requests are routed to agents" })] }), /* @__PURE__ */ x(r, {
650
+ children: [/* @__PURE__ */ C(n, { children: [/* @__PURE__ */ C(a, { children: [/* @__PURE__ */ S(o, { children: "Routing Configuration" }), /* @__PURE__ */ S(i, { children: "How requests are routed to agents" })] }), /* @__PURE__ */ S(r, {
661
651
  className: "space-y-4",
662
- children: /* @__PURE__ */ S("div", {
652
+ children: /* @__PURE__ */ C("div", {
663
653
  className: "grid grid-cols-2 gap-4",
664
- children: [/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
654
+ children: [/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
665
655
  className: "text-sm text-text-secondary",
666
656
  children: "Strategy"
667
- }), /* @__PURE__ */ x(c, {
657
+ }), /* @__PURE__ */ S(c, {
668
658
  variant: "outline",
669
659
  className: "mt-1",
670
- children: z.routingStrategy
671
- })] }), z.defaultAgentId && /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
660
+ children: B.routingStrategy
661
+ })] }), B.defaultAgentId && /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
672
662
  className: "text-sm text-text-secondary",
673
663
  children: "Default Agent"
674
- }), /* @__PURE__ */ x("p", {
664
+ }), /* @__PURE__ */ S("p", {
675
665
  className: "font-mono text-sm mt-1",
676
- children: z.defaultAgentId
666
+ children: B.defaultAgentId
677
667
  })] })]
678
668
  })
679
- })] }), /* @__PURE__ */ S(n, { children: [/* @__PURE__ */ S(a, { children: [/* @__PURE__ */ x(o, { children: "Routing Rules" }), /* @__PURE__ */ x(i, { children: "No routing rules configured" })] }), /* @__PURE__ */ x(r, { children: /* @__PURE__ */ x("p", {
669
+ })] }), /* @__PURE__ */ C(n, { children: [/* @__PURE__ */ C(a, { children: [/* @__PURE__ */ S(o, { children: "Routing Rules" }), /* @__PURE__ */ S(i, { children: "No routing rules configured" })] }), /* @__PURE__ */ S(r, { children: /* @__PURE__ */ S("p", {
680
670
  className: "text-text-secondary",
681
671
  children: "No routing rules configured. Routing rules will be available in a future update."
682
672
  }) })] })]
683
673
  }),
684
- W === "agents" && /* @__PURE__ */ S(n, { children: [/* @__PURE__ */ S(a, { children: [/* @__PURE__ */ x(o, { children: "Default Agent" }), /* @__PURE__ */ x(i, { children: "Select the default agent for this bot" })] }), /* @__PURE__ */ S(r, {
674
+ W === "agents" && /* @__PURE__ */ C(n, { children: [/* @__PURE__ */ C(a, { children: [/* @__PURE__ */ S(o, { children: "Default Agent" }), /* @__PURE__ */ S(i, { children: "Select the default agent for this bot" })] }), /* @__PURE__ */ C(r, {
685
675
  className: "space-y-4",
686
676
  children: [
687
- $ && /* @__PURE__ */ S("div", {
677
+ $ && /* @__PURE__ */ C("div", {
688
678
  className: "flex items-center justify-between p-4 border border-border-subtle rounded-lg",
689
- children: [/* @__PURE__ */ S("div", {
679
+ children: [/* @__PURE__ */ C("div", {
690
680
  className: "flex items-center gap-3",
691
- children: [/* @__PURE__ */ x("span", {
681
+ children: [/* @__PURE__ */ S("span", {
692
682
  className: "text-2xl",
693
683
  children: "🤖"
694
- }), /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
684
+ }), /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
695
685
  className: "font-medium",
696
686
  children: $.name
697
- }), /* @__PURE__ */ x(c, {
687
+ }), /* @__PURE__ */ S(c, {
698
688
  variant: "success",
699
689
  children: "Default"
700
690
  })] })]
701
- }), /* @__PURE__ */ x(l, { status: $.status })]
691
+ }), /* @__PURE__ */ S(l, { status: $.status })]
702
692
  }),
703
- /* @__PURE__ */ x("div", {
693
+ /* @__PURE__ */ S("div", {
704
694
  className: "flex items-center gap-3",
705
- children: /* @__PURE__ */ S("select", {
695
+ children: /* @__PURE__ */ C("select", {
706
696
  className: "flex h-10 flex-1 rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm",
707
- value: z.defaultAgentId || "",
708
- disabled: !P(u.APP_UPDATE),
697
+ value: B.defaultAgentId || "",
698
+ disabled: !F(u.APP_UPDATE),
709
699
  onChange: async (e) => {
710
- if (M) try {
700
+ if (N) try {
711
701
  await U({
712
- botId: M,
702
+ botId: N,
713
703
  input: { defaultAgentId: e.target.value || null }
714
- }), j.success(e.target.value ? "Default agent assigned" : "Default agent removed");
704
+ }), M.success(e.target.value ? "Default agent assigned" : "Default agent removed");
715
705
  } catch (e) {
716
706
  let t = e instanceof Error ? e.message : "Failed to assign agent";
717
- j.error(t);
707
+ M.error(t);
718
708
  }
719
709
  },
720
- children: [/* @__PURE__ */ x("option", {
710
+ children: [/* @__PURE__ */ S("option", {
721
711
  value: "",
722
712
  children: "No default agent"
723
- }), H?.map((e) => /* @__PURE__ */ x("option", {
713
+ }), H?.map((e) => /* @__PURE__ */ S("option", {
724
714
  value: e.id,
725
715
  children: e.name
726
716
  }, e.id))]
727
717
  })
728
718
  }),
729
- !$ && !H?.length && /* @__PURE__ */ S("div", {
719
+ !$ && !H?.length && /* @__PURE__ */ C("div", {
730
720
  className: "text-center py-8 text-text-secondary",
731
- children: [/* @__PURE__ */ x(w, { className: "h-8 w-8 mx-auto mb-2 opacity-50" }), /* @__PURE__ */ x("p", { children: "No agents available. Create an agent first." })]
721
+ children: [/* @__PURE__ */ S(T, { className: "h-8 w-8 mx-auto mb-2 opacity-50" }), /* @__PURE__ */ S("p", { children: "No agents available. Create an agent first." })]
732
722
  })
733
723
  ]
734
724
  })] }),
735
- W === "channels" && M && /* @__PURE__ */ x(_e, {
736
- botId: M,
737
- botName: z.name
725
+ W === "channels" && N && /* @__PURE__ */ S(_e, {
726
+ botId: N,
727
+ botName: B.name
738
728
  }),
739
- W === "aiOperations" && M && /* @__PURE__ */ x(ee, {
729
+ W === "aiOperations" && N && /* @__PURE__ */ S(ee, {
740
730
  filter: {
741
731
  subjectType: "APP",
742
- subjectId: M
732
+ subjectId: N
743
733
  },
744
734
  description: v("botlit.botDetail.aiOperationsDescription", "What the supervisor flagged for this bot — drift, evidence and the recommended action.")
745
735
  }),
746
- W === "guardrails" && /* @__PURE__ */ S(n, { children: [/* @__PURE__ */ S(a, { children: [/* @__PURE__ */ x(o, { children: "Policy Bindings" }), /* @__PURE__ */ x(i, { children: "Guardrails and policies attached to this bot" })] }), /* @__PURE__ */ x(r, { children: /* @__PURE__ */ S("div", {
736
+ W === "guardrails" && /* @__PURE__ */ C(n, { children: [/* @__PURE__ */ C(a, { children: [/* @__PURE__ */ S(o, { children: "Policy Bindings" }), /* @__PURE__ */ S(i, { children: "Guardrails and policies attached to this bot" })] }), /* @__PURE__ */ S(r, { children: /* @__PURE__ */ C("div", {
747
737
  className: "text-center py-8 text-text-secondary",
748
738
  children: [
749
- /* @__PURE__ */ x(k, { className: "h-8 w-8 mx-auto mb-2 opacity-50" }),
750
- /* @__PURE__ */ x("p", { children: "Not configured" }),
751
- /* @__PURE__ */ x("p", {
739
+ /* @__PURE__ */ S(A, { className: "h-8 w-8 mx-auto mb-2 opacity-50" }),
740
+ /* @__PURE__ */ S("p", { children: "Not configured" }),
741
+ /* @__PURE__ */ S("p", {
752
742
  className: "text-sm mt-1",
753
743
  children: "Policy bindings will be available in a future update."
754
744
  })
755
745
  ]
756
746
  }) })] }),
757
- W === "releases" && /* @__PURE__ */ S(n, { children: [/* @__PURE__ */ S(a, { children: [/* @__PURE__ */ x(o, { children: "Release Tracks" }), /* @__PURE__ */ x(i, { children: "Version deployments across environments" })] }), /* @__PURE__ */ x(r, { children: /* @__PURE__ */ S("div", {
747
+ W === "releases" && /* @__PURE__ */ C(n, { children: [/* @__PURE__ */ C(a, { children: [/* @__PURE__ */ S(o, { children: "Release Tracks" }), /* @__PURE__ */ S(i, { children: "Version deployments across environments" })] }), /* @__PURE__ */ S(r, { children: /* @__PURE__ */ C("div", {
758
748
  className: "text-center py-8 text-text-secondary",
759
749
  children: [
760
- /* @__PURE__ */ x(T, { className: "h-8 w-8 mx-auto mb-2 opacity-50" }),
761
- /* @__PURE__ */ x("p", { children: "Not configured" }),
762
- /* @__PURE__ */ x("p", {
750
+ /* @__PURE__ */ S(E, { className: "h-8 w-8 mx-auto mb-2 opacity-50" }),
751
+ /* @__PURE__ */ S("p", { children: "Not configured" }),
752
+ /* @__PURE__ */ S("p", {
763
753
  className: "text-sm mt-1",
764
754
  children: "Release tracks will be available in a future update."
765
755
  })
@@ -769,6 +759,6 @@ var L = ({ isNew: m, isEditing: h }) => {
769
759
  })
770
760
  });
771
761
  };
772
- export { L as BotDetailPage };
762
+ export { R as BotDetailPage };
773
763
 
774
764
  //# sourceMappingURL=BotDetailPage.js.map