@burdenoff/microfe-botmanor 2026.813.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 (160) hide show
  1. package/README.md +12 -0
  2. package/dist/botlit/BotlitRoutes.js +357 -0
  3. package/dist/botlit/BotlitRoutes.js.map +1 -0
  4. package/dist/botlit/BotmanorRoot.js +12 -0
  5. package/dist/botlit/BotmanorRoot.js.map +1 -0
  6. package/dist/botlit/BotmanorRootInner.js +101 -0
  7. package/dist/botlit/BotmanorRootInner.js.map +1 -0
  8. package/dist/botlit/components/Badge.js +39 -0
  9. package/dist/botlit/components/Badge.js.map +1 -0
  10. package/dist/botlit/components/Button.js +46 -0
  11. package/dist/botlit/components/Button.js.map +1 -0
  12. package/dist/botlit/components/Card.js +31 -0
  13. package/dist/botlit/components/Card.js.map +1 -0
  14. package/dist/botlit/components/ChannelSelectorSheet.js +130 -0
  15. package/dist/botlit/components/ChannelSelectorSheet.js.map +1 -0
  16. package/dist/botlit/components/EmptyState.js +35 -0
  17. package/dist/botlit/components/EmptyState.js.map +1 -0
  18. package/dist/botlit/components/ErrorState.js +33 -0
  19. package/dist/botlit/components/ErrorState.js.map +1 -0
  20. package/dist/botlit/components/Input.js +59 -0
  21. package/dist/botlit/components/Input.js.map +1 -0
  22. package/dist/botlit/components/PageLayout.js +34 -0
  23. package/dist/botlit/components/PageLayout.js.map +1 -0
  24. package/dist/botlit/components/QuotaExhaustedDialog.js +20 -0
  25. package/dist/botlit/components/QuotaExhaustedDialog.js.map +1 -0
  26. package/dist/botlit/components/RouteLoader.js +52 -0
  27. package/dist/botlit/components/RouteLoader.js.map +1 -0
  28. package/dist/botlit/components/VersionHistoryPanel.js +144 -0
  29. package/dist/botlit/components/VersionHistoryPanel.js.map +1 -0
  30. package/dist/botlit/components/WorkspaceRequired.js +70 -0
  31. package/dist/botlit/components/WorkspaceRequired.js.map +1 -0
  32. package/dist/botlit/hooks/index.js +16 -0
  33. package/dist/botlit/hooks/internal/mutationInput.js +16 -0
  34. package/dist/botlit/hooks/internal/mutationInput.js.map +1 -0
  35. package/dist/botlit/hooks/internal/workspaceGateway.js +99 -0
  36. package/dist/botlit/hooks/internal/workspaceGateway.js.map +1 -0
  37. package/dist/botlit/hooks/useA2A.js +184 -0
  38. package/dist/botlit/hooks/useA2A.js.map +1 -0
  39. package/dist/botlit/hooks/useAgents.js +469 -0
  40. package/dist/botlit/hooks/useAgents.js.map +1 -0
  41. package/dist/botlit/hooks/useBots.js +306 -0
  42. package/dist/botlit/hooks/useBots.js.map +1 -0
  43. package/dist/botlit/hooks/useBuckets.js +119 -0
  44. package/dist/botlit/hooks/useBuckets.js.map +1 -0
  45. package/dist/botlit/hooks/useChannels.js +213 -0
  46. package/dist/botlit/hooks/useChannels.js.map +1 -0
  47. package/dist/botlit/hooks/useConversations.js +64 -0
  48. package/dist/botlit/hooks/useConversations.js.map +1 -0
  49. package/dist/botlit/hooks/useExecutions.js +86 -0
  50. package/dist/botlit/hooks/useExecutions.js.map +1 -0
  51. package/dist/botlit/hooks/useKnowledgeBases.js +113 -0
  52. package/dist/botlit/hooks/useKnowledgeBases.js.map +1 -0
  53. package/dist/botlit/hooks/useLLMProviders.js +83 -0
  54. package/dist/botlit/hooks/useLLMProviders.js.map +1 -0
  55. package/dist/botlit/hooks/useMCPServers.js +134 -0
  56. package/dist/botlit/hooks/useMCPServers.js.map +1 -0
  57. package/dist/botlit/hooks/usePolicies.js +120 -0
  58. package/dist/botlit/hooks/usePolicies.js.map +1 -0
  59. package/dist/botlit/hooks/usePromptTemplates.js +161 -0
  60. package/dist/botlit/hooks/usePromptTemplates.js.map +1 -0
  61. package/dist/botlit/hooks/useRetrievalProfiles.js +146 -0
  62. package/dist/botlit/hooks/useRetrievalProfiles.js.map +1 -0
  63. package/dist/botlit/hooks/useSkills.js +132 -0
  64. package/dist/botlit/hooks/useSkills.js.map +1 -0
  65. package/dist/botlit/hooks/useStore.js +167 -0
  66. package/dist/botlit/hooks/useStore.js.map +1 -0
  67. package/dist/botlit/hooks/useUserPlatformConnection.js +172 -0
  68. package/dist/botlit/hooks/useUserPlatformConnection.js.map +1 -0
  69. package/dist/botlit/index.js +11 -0
  70. package/dist/botlit/pages/A2AAgentDetailPage.js +589 -0
  71. package/dist/botlit/pages/A2AAgentDetailPage.js.map +1 -0
  72. package/dist/botlit/pages/A2ARegistryPage.js +240 -0
  73. package/dist/botlit/pages/A2ARegistryPage.js.map +1 -0
  74. package/dist/botlit/pages/AgentBuilderPage.js +486 -0
  75. package/dist/botlit/pages/AgentBuilderPage.js.map +1 -0
  76. package/dist/botlit/pages/AgentDetailPage.js +517 -0
  77. package/dist/botlit/pages/AgentDetailPage.js.map +1 -0
  78. package/dist/botlit/pages/AgentsListPage.js +294 -0
  79. package/dist/botlit/pages/AgentsListPage.js.map +1 -0
  80. package/dist/botlit/pages/BotChannelsTab.js +530 -0
  81. package/dist/botlit/pages/BotChannelsTab.js.map +1 -0
  82. package/dist/botlit/pages/BotDetailPage.js +872 -0
  83. package/dist/botlit/pages/BotDetailPage.js.map +1 -0
  84. package/dist/botlit/pages/BotWorkflowTab.js +229 -0
  85. package/dist/botlit/pages/BotWorkflowTab.js.map +1 -0
  86. package/dist/botlit/pages/BotsListPage.js +313 -0
  87. package/dist/botlit/pages/BotsListPage.js.map +1 -0
  88. package/dist/botlit/pages/BucketsPage.js +604 -0
  89. package/dist/botlit/pages/BucketsPage.js.map +1 -0
  90. package/dist/botlit/pages/ChannelDetailPage.js +955 -0
  91. package/dist/botlit/pages/ChannelDetailPage.js.map +1 -0
  92. package/dist/botlit/pages/ChannelRoutesPage.js +218 -0
  93. package/dist/botlit/pages/ChannelRoutesPage.js.map +1 -0
  94. package/dist/botlit/pages/ChannelsPage.js +304 -0
  95. package/dist/botlit/pages/ChannelsPage.js.map +1 -0
  96. package/dist/botlit/pages/ChatPage.js +247 -0
  97. package/dist/botlit/pages/ChatPage.js.map +1 -0
  98. package/dist/botlit/pages/DashboardPage.js +318 -0
  99. package/dist/botlit/pages/DashboardPage.js.map +1 -0
  100. package/dist/botlit/pages/ExecutionDetailPage.js +313 -0
  101. package/dist/botlit/pages/ExecutionDetailPage.js.map +1 -0
  102. package/dist/botlit/pages/ExecutionsPage.js +294 -0
  103. package/dist/botlit/pages/ExecutionsPage.js.map +1 -0
  104. package/dist/botlit/pages/InstalledPackagesPage.js +619 -0
  105. package/dist/botlit/pages/InstalledPackagesPage.js.map +1 -0
  106. package/dist/botlit/pages/KnowledgeBaseDetailPage.js +473 -0
  107. package/dist/botlit/pages/KnowledgeBaseDetailPage.js.map +1 -0
  108. package/dist/botlit/pages/KnowledgeBasesPage.js +150 -0
  109. package/dist/botlit/pages/KnowledgeBasesPage.js.map +1 -0
  110. package/dist/botlit/pages/MCPServerDetailPage.js +550 -0
  111. package/dist/botlit/pages/MCPServerDetailPage.js.map +1 -0
  112. package/dist/botlit/pages/MCPServersPage.js +321 -0
  113. package/dist/botlit/pages/MCPServersPage.js.map +1 -0
  114. package/dist/botlit/pages/PoliciesPage.js +224 -0
  115. package/dist/botlit/pages/PoliciesPage.js.map +1 -0
  116. package/dist/botlit/pages/PolicyDetailPage.js +861 -0
  117. package/dist/botlit/pages/PolicyDetailPage.js.map +1 -0
  118. package/dist/botlit/pages/PromptStudioPage.js +236 -0
  119. package/dist/botlit/pages/PromptStudioPage.js.map +1 -0
  120. package/dist/botlit/pages/PromptTemplateDetailPage.js +812 -0
  121. package/dist/botlit/pages/PromptTemplateDetailPage.js.map +1 -0
  122. package/dist/botlit/pages/PromptTemplatesPage.js +269 -0
  123. package/dist/botlit/pages/PromptTemplatesPage.js.map +1 -0
  124. package/dist/botlit/pages/RetrievalProfileDetailPage.js +559 -0
  125. package/dist/botlit/pages/RetrievalProfileDetailPage.js.map +1 -0
  126. package/dist/botlit/pages/RetrievalProfilesPage.js +219 -0
  127. package/dist/botlit/pages/RetrievalProfilesPage.js.map +1 -0
  128. package/dist/botlit/pages/SettingsPage.js +655 -0
  129. package/dist/botlit/pages/SettingsPage.js.map +1 -0
  130. package/dist/botlit/pages/SkillDetailPage.js +778 -0
  131. package/dist/botlit/pages/SkillDetailPage.js.map +1 -0
  132. package/dist/botlit/pages/SkillsPage.js +206 -0
  133. package/dist/botlit/pages/SkillsPage.js.map +1 -0
  134. package/dist/botlit/pages/StorePackageDetailPage.js +462 -0
  135. package/dist/botlit/pages/StorePackageDetailPage.js.map +1 -0
  136. package/dist/botlit/pages/StorePage.js +315 -0
  137. package/dist/botlit/pages/StorePage.js.map +1 -0
  138. package/dist/botlit/providers/BotlitProvider.js +93 -0
  139. package/dist/botlit/providers/BotlitProvider.js.map +1 -0
  140. package/dist/botlit/store/botlitStore.js +101 -0
  141. package/dist/botlit/store/botlitStore.js.map +1 -0
  142. package/dist/botlit/utils/cn.js +10 -0
  143. package/dist/botlit/utils/cn.js.map +1 -0
  144. package/dist/botlit/utils/formatters.js +37 -0
  145. package/dist/botlit/utils/formatters.js.map +1 -0
  146. package/dist/botlit/utils/navigation.js +9 -0
  147. package/dist/botlit/utils/navigation.js.map +1 -0
  148. package/dist/botlit/utils/unions.js +14 -0
  149. package/dist/botlit/utils/unions.js.map +1 -0
  150. package/dist/generated/global-operations.js +66 -0
  151. package/dist/generated/global-operations.js.map +1 -0
  152. package/dist/generated/global-types.js +8 -0
  153. package/dist/generated/global-types.js.map +1 -0
  154. package/dist/generated/wspace-operations.js +1591 -0
  155. package/dist/generated/wspace-operations.js.map +1 -0
  156. package/dist/generated/wspace-types.js +12 -0
  157. package/dist/generated/wspace-types.js.map +1 -0
  158. package/dist/index.js +13 -0
  159. package/dist/utils/nativeBridge.js +2 -0
  160. package/package.json +133 -0
@@ -0,0 +1,872 @@
1
+ import { useBotlit as e } from "../providers/BotlitProvider.js";
2
+ import { useBot as t, useCreateBot as n, useDeleteBot as ee, useUpdateBot as te } from "../hooks/useBots.js";
3
+ import { useAgents as r } from "../hooks/useAgents.js";
4
+ import { cn as ne } from "../utils/cn.js";
5
+ import { formatNumber as re, formatRelativeTime as ie } from "../utils/formatters.js";
6
+ import { PageLayout as i } from "../components/PageLayout.js";
7
+ import { Card as a, CardContent as o, CardDescription as s, CardHeader as c, CardTitle as l } from "../components/Card.js";
8
+ import { Button as u } from "../components/Button.js";
9
+ import { Badge as d, StatusBadge as f } from "../components/Badge.js";
10
+ import { EmptyState as ae } from "../components/EmptyState.js";
11
+ import { FormField as p, Input as m, Textarea as h } from "../components/Input.js";
12
+ import { toUnion as g } from "../utils/unions.js";
13
+ import { QuotaExhaustedDialog as oe } from "../components/QuotaExhaustedDialog.js";
14
+ import { BotChannelsTab as se } from "./BotChannelsTab.js";
15
+ import { Suspense as ce, lazy as _, useEffect as le, useState as v } from "react";
16
+ import { GlassCard as y, NextSteps as ue, PagePurpose as de } from "@burdenoff/fe-libs/ui";
17
+ import { Fragment as fe, jsx as b, jsxs as x } from "react/jsx-runtime";
18
+ import { Link as pe, useParams as me, useSearchParams as he } from "react-router";
19
+ import { isQuotaExhaustedError as ge } from "@burdenoff/fe-libs/shared/utils";
20
+ import { ArrowLeft as S, BarChart3 as _e, Bot as C, Edit as ve, GitBranch as ye, Layers as w, MessageSquare as T, Radio as E, Save as D, Shield as O, Trash2 as be, Workflow as k } from "lucide-react";
21
+ import { useI18n as A } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
22
+ import { toast as j } from "sonner";
23
+ //#region src/botlit/pages/BotDetailPage.tsx
24
+ var M = _(() => import("./BotWorkflowTab.js").then((e) => ({ default: e.BotWorkflowTab }))), N = [
25
+ "SINGLE",
26
+ "ROUND_ROBIN",
27
+ "INTELLIGENT",
28
+ "CUSTOM"
29
+ ], xe = "ASSISTANT", P = {
30
+ name: "",
31
+ slug: "",
32
+ description: "",
33
+ icon: "🤖",
34
+ routingStrategy: "SINGLE",
35
+ welcomeMessage: "",
36
+ fallbackMessage: "",
37
+ defaultAgentId: ""
38
+ };
39
+ function Se(e) {
40
+ return {
41
+ name: e.name,
42
+ slug: e.slug,
43
+ description: e.description ?? "",
44
+ icon: e.icon || P.icon,
45
+ routingStrategy: g(e.routingStrategy, N, "SINGLE"),
46
+ welcomeMessage: e.welcomeMessage ?? "",
47
+ fallbackMessage: e.fallbackMessage ?? "",
48
+ defaultAgentId: e.defaultAgentId ?? ""
49
+ };
50
+ }
51
+ var F = [
52
+ "overview",
53
+ "workflow",
54
+ "routing",
55
+ "agents",
56
+ "channels",
57
+ "guardrails",
58
+ "releases"
59
+ ];
60
+ function Ce(e) {
61
+ if (e.get("code") && e.get("state")) return "channels";
62
+ let t = e.get("tab");
63
+ return F.find((e) => e === t) ?? "overview";
64
+ }
65
+ var I = ({ isNew: _, isEditing: F }) => {
66
+ let { t: I } = A(), L = (e, t) => {
67
+ let n = I(e);
68
+ return n === e ? t : n;
69
+ }, { botId: R } = me(), [we] = he(), { navigateTo: z, getPath: Te, workspaceId: B, navigate: V } = e(), { data: H, loading: Ee, refetch: U } = t(_ ? void 0 : R), { data: W } = r(), [De, Oe] = n(), [G, K] = te(), [ke, Ae] = ee(), [q, J] = v(() => Ce(we)), [Y, X] = v(P), [je, Z] = v(!1), Q = () => {
70
+ if (V) {
71
+ V("/billing");
72
+ return;
73
+ }
74
+ window.location.assign("/billing");
75
+ };
76
+ le(() => {
77
+ H && !_ && X(Se(H));
78
+ }, [H, _]);
79
+ let Me = async () => {
80
+ if (!(!Y.name || !B)) try {
81
+ let e = await De({
82
+ workspaceId: B,
83
+ name: Y.name,
84
+ slug: Y.slug || Y.name.toLowerCase().replace(/\s+/g, "-"),
85
+ type: xe,
86
+ routingStrategy: Y.routingStrategy,
87
+ description: Y.description || void 0,
88
+ icon: Y.icon || void 0
89
+ });
90
+ j.success(`${L("botlit.botDetail.create.successPrefix", "Bot")} "${Y.name}" ${L("botlit.botDetail.create.successSuffix", "created successfully")}`), e?.id && z(`bots/${e.id}?tab=workflow`);
91
+ } catch (e) {
92
+ if (ge(e)) {
93
+ Z(!0);
94
+ return;
95
+ }
96
+ let t = e instanceof Error ? e.message : L("botlit.botDetail.create.error", "Failed to create bot");
97
+ j.error(t);
98
+ }
99
+ }, Ne = async () => {
100
+ if (R) try {
101
+ await G({
102
+ botId: R,
103
+ input: {
104
+ name: Y.name,
105
+ slug: Y.slug,
106
+ description: Y.description || null,
107
+ icon: Y.icon || null,
108
+ routingStrategy: Y.routingStrategy,
109
+ welcomeMessage: Y.welcomeMessage || null,
110
+ fallbackMessage: Y.fallbackMessage || null,
111
+ defaultAgentId: Y.defaultAgentId || null
112
+ }
113
+ }), await U(), j.success(`${L("botlit.botDetail.update.successPrefix", "Bot")} "${Y.name}" ${L("botlit.botDetail.update.successSuffix", "updated successfully")}`), F && z(`bots/${R}`);
114
+ } catch (e) {
115
+ let t = e instanceof Error ? e.message : L("botlit.botDetail.update.error", "Failed to update bot");
116
+ j.error(t);
117
+ }
118
+ };
119
+ if (_) return /* @__PURE__ */ x(fe, { children: [/* @__PURE__ */ b(i, {
120
+ title: L("botlit.botDetail.createPage.title", "Create New Bot"),
121
+ description: L("botlit.botDetail.createPage.description", "Set up a new AI-powered bot"),
122
+ actions: /* @__PURE__ */ x("div", {
123
+ className: "flex gap-2",
124
+ children: [/* @__PURE__ */ b(u, {
125
+ variant: "outline",
126
+ onClick: () => z("bots"),
127
+ children: L("botlit.common.cancel", "Cancel")
128
+ }), /* @__PURE__ */ b(u, {
129
+ leftIcon: /* @__PURE__ */ b(D, { size: 16 }),
130
+ onClick: Me,
131
+ isLoading: Oe.loading,
132
+ disabled: !Y.name || !B,
133
+ children: L("botlit.botDetail.createPage.actions.createBot", "Create Bot")
134
+ })]
135
+ }),
136
+ children: /* @__PURE__ */ b(a, {
137
+ className: "max-w-2xl",
138
+ children: /* @__PURE__ */ x(o, {
139
+ className: "pt-6 space-y-6",
140
+ children: [
141
+ /* @__PURE__ */ x("div", {
142
+ className: "flex items-center gap-4",
143
+ children: [/* @__PURE__ */ b("button", {
144
+ className: "text-5xl p-4 rounded-lg border-2 border-dashed border-border-subtle hover:border-primary transition-colors",
145
+ onClick: () => {
146
+ let e = [
147
+ "🤖",
148
+ "💼",
149
+ "🎧",
150
+ "📊",
151
+ "🎯",
152
+ "🔧",
153
+ "📚",
154
+ "💡",
155
+ "🚀",
156
+ "âš¡"
157
+ ], t = e.indexOf(Y.icon);
158
+ X({
159
+ ...Y,
160
+ icon: e[(t + 1) % e.length]
161
+ });
162
+ },
163
+ children: Y.icon
164
+ }), /* @__PURE__ */ b("p", {
165
+ className: "text-sm text-text-secondary",
166
+ children: L("botlit.botDetail.form.clickToChangeIcon", "Click to change icon")
167
+ })]
168
+ }),
169
+ /* @__PURE__ */ b(p, {
170
+ label: L("botlit.botDetail.form.botName", "Bot Name"),
171
+ required: !0,
172
+ htmlFor: "name",
173
+ children: /* @__PURE__ */ b(m, {
174
+ id: "name",
175
+ placeholder: L("botlit.botDetail.form.botNamePlaceholder", "e.g., Customer Support Bot"),
176
+ value: Y.name,
177
+ onChange: (e) => X({
178
+ ...Y,
179
+ name: e.target.value
180
+ })
181
+ })
182
+ }),
183
+ /* @__PURE__ */ b(p, {
184
+ label: L("botlit.botDetail.form.slug", "Slug"),
185
+ htmlFor: "slug",
186
+ children: /* @__PURE__ */ b(m, {
187
+ id: "slug",
188
+ placeholder: L("botlit.botDetail.form.slugPlaceholder", "customer-support-bot"),
189
+ value: Y.slug,
190
+ onChange: (e) => X({
191
+ ...Y,
192
+ slug: e.target.value
193
+ })
194
+ })
195
+ }),
196
+ /* @__PURE__ */ b(p, {
197
+ label: L("botlit.botDetail.form.description", "Description"),
198
+ htmlFor: "description",
199
+ children: /* @__PURE__ */ b(h, {
200
+ id: "description",
201
+ placeholder: L("botlit.botDetail.form.descriptionPlaceholder", "Describe what this bot does..."),
202
+ value: Y.description,
203
+ onChange: (e) => X({
204
+ ...Y,
205
+ description: e.target.value
206
+ }),
207
+ rows: 4
208
+ })
209
+ }),
210
+ /* @__PURE__ */ b(p, {
211
+ label: L("botlit.botDetail.form.routingStrategy", "Routing Strategy"),
212
+ children: /* @__PURE__ */ x("select", {
213
+ className: "flex h-10 w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm",
214
+ value: Y.routingStrategy,
215
+ onChange: (e) => X({
216
+ ...Y,
217
+ routingStrategy: g(e.target.value, N, "SINGLE")
218
+ }),
219
+ children: [
220
+ /* @__PURE__ */ b("option", {
221
+ value: "SINGLE",
222
+ children: L("botlit.botDetail.routing.single", "Single")
223
+ }),
224
+ /* @__PURE__ */ b("option", {
225
+ value: "ROUND_ROBIN",
226
+ children: L("botlit.botDetail.routing.roundRobin", "Round Robin")
227
+ }),
228
+ /* @__PURE__ */ b("option", {
229
+ value: "INTELLIGENT",
230
+ children: L("botlit.botDetail.routing.intelligent", "Intelligent")
231
+ }),
232
+ /* @__PURE__ */ b("option", {
233
+ value: "CUSTOM",
234
+ children: L("botlit.botDetail.routing.custom", "Custom")
235
+ })
236
+ ]
237
+ })
238
+ })
239
+ ]
240
+ })
241
+ })
242
+ }), /* @__PURE__ */ b(oe, {
243
+ open: je,
244
+ title: L("botlit.usage.botQuota.title", "Bot Limit Reached"),
245
+ description: L("botlit.usage.botQuota.description", "You have reached the number of bots allowed on your current plan."),
246
+ onClose: () => Z(!1),
247
+ onViewBilling: Q
248
+ })] });
249
+ if (Ee) return /* @__PURE__ */ b(i, {
250
+ title: L("botlit.common.loading", "Loading..."),
251
+ children: /* @__PURE__ */ b("div", { className: "h-96 bg-bg-sunken motion-safe:animate-vc-shimmer rounded-lg" })
252
+ });
253
+ if (!H) return /* @__PURE__ */ b(i, {
254
+ title: L("botlit.botDetail.notFound.title", "Bot Not Found"),
255
+ children: /* @__PURE__ */ b(ae, {
256
+ illustration: "empty-agents",
257
+ title: L("botlit.botDetail.notFound.title", "Bot Not Found"),
258
+ description: L("botlit.botDetail.notFound.description", "The bot you're looking for doesn't exist."),
259
+ action: /* @__PURE__ */ b(u, {
260
+ onClick: () => z("bots"),
261
+ children: L("botlit.botDetail.notFound.backAction", "Back to Bots")
262
+ })
263
+ })
264
+ });
265
+ if (F && H) return /* @__PURE__ */ b(i, {
266
+ title: /* @__PURE__ */ x("div", {
267
+ className: "flex items-center gap-3",
268
+ children: [/* @__PURE__ */ b(u, {
269
+ variant: "ghost",
270
+ size: "icon",
271
+ onClick: () => z(`bots/${R}`),
272
+ children: /* @__PURE__ */ b(S, { size: 20 })
273
+ }), /* @__PURE__ */ b("span", { children: L("botlit.botDetail.editPage.title", "Edit Bot") })]
274
+ }),
275
+ actions: /* @__PURE__ */ x("div", {
276
+ className: "flex gap-2",
277
+ children: [/* @__PURE__ */ b(u, {
278
+ variant: "outline",
279
+ onClick: () => z(`bots/${R}`),
280
+ children: L("botlit.common.cancel", "Cancel")
281
+ }), /* @__PURE__ */ b(u, {
282
+ leftIcon: /* @__PURE__ */ b(D, { size: 16 }),
283
+ onClick: Ne,
284
+ isLoading: K.loading,
285
+ disabled: !Y.name,
286
+ children: L("botlit.botDetail.editPage.actions.saveChanges", "Save Changes")
287
+ })]
288
+ }),
289
+ children: /* @__PURE__ */ b(a, {
290
+ className: "max-w-2xl",
291
+ children: /* @__PURE__ */ x(o, {
292
+ className: "pt-6 space-y-6",
293
+ children: [
294
+ /* @__PURE__ */ x("div", {
295
+ className: "flex items-center gap-4",
296
+ children: [/* @__PURE__ */ b("button", {
297
+ className: "text-5xl p-4 rounded-lg border-2 border-dashed border-border-subtle hover:border-primary transition-colors",
298
+ onClick: () => {
299
+ let e = [
300
+ "🤖",
301
+ "💼",
302
+ "🎧",
303
+ "📊",
304
+ "🎯",
305
+ "🔧",
306
+ "📚",
307
+ "💡",
308
+ "🚀",
309
+ "âš¡"
310
+ ], t = Y.icon, n = e.indexOf(t);
311
+ X({
312
+ ...Y,
313
+ icon: e[(n + 1) % e.length]
314
+ });
315
+ },
316
+ children: Y.icon
317
+ }), /* @__PURE__ */ b("p", {
318
+ className: "text-sm text-text-secondary",
319
+ children: L("botlit.botDetail.form.clickToChangeIcon", "Click to change icon")
320
+ })]
321
+ }),
322
+ /* @__PURE__ */ b(p, {
323
+ label: L("botlit.botDetail.form.botName", "Bot Name"),
324
+ required: !0,
325
+ htmlFor: "edit-name",
326
+ children: /* @__PURE__ */ b(m, {
327
+ id: "edit-name",
328
+ placeholder: L("botlit.botDetail.form.botNamePlaceholder", "e.g., Customer Support Bot"),
329
+ value: Y.name,
330
+ onChange: (e) => X({
331
+ ...Y,
332
+ name: e.target.value
333
+ })
334
+ })
335
+ }),
336
+ /* @__PURE__ */ b(p, {
337
+ label: L("botlit.botDetail.form.slug", "Slug"),
338
+ htmlFor: "edit-slug",
339
+ children: /* @__PURE__ */ b(m, {
340
+ id: "edit-slug",
341
+ placeholder: L("botlit.botDetail.form.slugPlaceholder", "customer-support-bot"),
342
+ value: Y.slug,
343
+ onChange: (e) => X({
344
+ ...Y,
345
+ slug: e.target.value
346
+ })
347
+ })
348
+ }),
349
+ /* @__PURE__ */ b(p, {
350
+ label: L("botlit.botDetail.form.description", "Description"),
351
+ htmlFor: "edit-description",
352
+ children: /* @__PURE__ */ b(h, {
353
+ id: "edit-description",
354
+ placeholder: L("botlit.botDetail.form.descriptionPlaceholder", "Describe what this bot does..."),
355
+ value: Y.description,
356
+ onChange: (e) => X({
357
+ ...Y,
358
+ description: e.target.value
359
+ }),
360
+ rows: 4
361
+ })
362
+ }),
363
+ /* @__PURE__ */ b(p, {
364
+ label: L("botlit.botDetail.form.routingStrategy", "Routing Strategy"),
365
+ children: /* @__PURE__ */ x("select", {
366
+ className: "flex h-10 w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm",
367
+ value: Y.routingStrategy,
368
+ onChange: (e) => X({
369
+ ...Y,
370
+ routingStrategy: g(e.target.value, N, "SINGLE")
371
+ }),
372
+ children: [
373
+ /* @__PURE__ */ b("option", {
374
+ value: "SINGLE",
375
+ children: L("botlit.botDetail.routing.single", "Single")
376
+ }),
377
+ /* @__PURE__ */ b("option", {
378
+ value: "ROUND_ROBIN",
379
+ children: L("botlit.botDetail.routing.roundRobin", "Round Robin")
380
+ }),
381
+ /* @__PURE__ */ b("option", {
382
+ value: "INTELLIGENT",
383
+ children: L("botlit.botDetail.routing.intelligent", "Intelligent")
384
+ }),
385
+ /* @__PURE__ */ b("option", {
386
+ value: "CUSTOM",
387
+ children: L("botlit.botDetail.routing.custom", "Custom")
388
+ })
389
+ ]
390
+ })
391
+ }),
392
+ /* @__PURE__ */ b(p, {
393
+ label: L("botlit.botDetail.form.welcomeMessage", "Welcome Message"),
394
+ htmlFor: "edit-welcome",
395
+ children: /* @__PURE__ */ b(h, {
396
+ id: "edit-welcome",
397
+ placeholder: L("botlit.botDetail.form.welcomeMessagePlaceholder", "Welcome message shown to users..."),
398
+ value: Y.welcomeMessage,
399
+ onChange: (e) => X({
400
+ ...Y,
401
+ welcomeMessage: e.target.value
402
+ }),
403
+ rows: 3
404
+ })
405
+ }),
406
+ /* @__PURE__ */ b(p, {
407
+ label: L("botlit.botDetail.form.fallbackMessage", "Fallback Message"),
408
+ htmlFor: "edit-fallback",
409
+ children: /* @__PURE__ */ b(m, {
410
+ id: "edit-fallback",
411
+ placeholder: L("botlit.botDetail.form.fallbackMessagePlaceholder", "Message when agent can't respond..."),
412
+ value: Y.fallbackMessage,
413
+ onChange: (e) => X({
414
+ ...Y,
415
+ fallbackMessage: e.target.value
416
+ })
417
+ })
418
+ }),
419
+ /* @__PURE__ */ b(p, {
420
+ label: L("botlit.botDetail.form.defaultAgent", "Default Agent"),
421
+ children: /* @__PURE__ */ x("select", {
422
+ className: "flex h-10 w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm",
423
+ value: Y.defaultAgentId,
424
+ onChange: (e) => X({
425
+ ...Y,
426
+ defaultAgentId: e.target.value
427
+ }),
428
+ children: [/* @__PURE__ */ b("option", {
429
+ value: "",
430
+ children: L("botlit.botDetail.form.noDefaultAgent", "No default agent")
431
+ }), W?.map((e) => /* @__PURE__ */ b("option", {
432
+ value: e.id,
433
+ children: e.name
434
+ }, e.id))]
435
+ })
436
+ })
437
+ ]
438
+ })
439
+ })
440
+ });
441
+ let Pe = [
442
+ {
443
+ id: "overview",
444
+ label: L("botlit.botDetail.tabs.overview", "Overview"),
445
+ icon: /* @__PURE__ */ b(_e, { size: 16 })
446
+ },
447
+ {
448
+ id: "workflow",
449
+ label: L("botlit.botDetail.tabs.workflow", "Workflow"),
450
+ icon: /* @__PURE__ */ b(k, { size: 16 })
451
+ },
452
+ {
453
+ id: "routing",
454
+ label: L("botlit.botDetail.tabs.routing", "Routing"),
455
+ icon: /* @__PURE__ */ b(ye, { size: 16 })
456
+ },
457
+ {
458
+ id: "agents",
459
+ label: L("botlit.botDetail.tabs.agents", "Agents"),
460
+ icon: /* @__PURE__ */ b(C, { size: 16 })
461
+ },
462
+ {
463
+ id: "channels",
464
+ label: L("botlit.botDetail.tabs.channels", "Channels"),
465
+ icon: /* @__PURE__ */ b(E, { size: 16 })
466
+ },
467
+ {
468
+ id: "guardrails",
469
+ label: L("botlit.botDetail.tabs.guardrails", "Guardrails"),
470
+ icon: /* @__PURE__ */ b(O, { size: 16 })
471
+ },
472
+ {
473
+ id: "releases",
474
+ label: L("botlit.botDetail.tabs.releases", "Releases"),
475
+ icon: /* @__PURE__ */ b(w, { size: 16 })
476
+ }
477
+ ], $ = H.defaultAgentId ? W?.find((e) => e.id === H.defaultAgentId) : null;
478
+ return /* @__PURE__ */ b(i, {
479
+ title: /* @__PURE__ */ x("div", {
480
+ className: "flex items-center gap-3",
481
+ children: [
482
+ /* @__PURE__ */ b(u, {
483
+ variant: "ghost",
484
+ size: "icon",
485
+ onClick: () => z("bots"),
486
+ children: /* @__PURE__ */ b(S, { size: 20 })
487
+ }),
488
+ /* @__PURE__ */ b("span", {
489
+ className: "text-3xl",
490
+ children: H.icon
491
+ }),
492
+ /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ x("div", {
493
+ className: "flex items-center gap-2",
494
+ children: [
495
+ /* @__PURE__ */ b("span", { children: H.name }),
496
+ /* @__PURE__ */ b(f, { status: H.status }),
497
+ /* @__PURE__ */ b(d, {
498
+ variant: "outline",
499
+ children: H.slug
500
+ })
501
+ ]
502
+ }), /* @__PURE__ */ b("p", {
503
+ className: "text-sm font-normal text-text-secondary",
504
+ children: H.description
505
+ })] })
506
+ ]
507
+ }),
508
+ actions: /* @__PURE__ */ x("div", {
509
+ className: "flex gap-2",
510
+ children: [
511
+ H.status === "DRAFT" || H.status === "ARCHIVED" ? /* @__PURE__ */ b(u, {
512
+ variant: "default",
513
+ isLoading: K.loading,
514
+ onClick: async () => {
515
+ try {
516
+ if (!R) return;
517
+ await G({
518
+ botId: R,
519
+ input: { status: "ACTIVE" }
520
+ }), await U(), j.success(`${L("botlit.botDetail.activate.successPrefix", "Bot")} "${H.name}" ${L("botlit.botDetail.activate.successSuffix", "activated")}`);
521
+ } catch (e) {
522
+ j.error(e instanceof Error ? e.message : L("botlit.botDetail.activate.error", "Failed to activate bot"));
523
+ }
524
+ },
525
+ children: L("botlit.botDetail.actions.activate", "Activate")
526
+ }) : /* @__PURE__ */ b(u, {
527
+ variant: "outline",
528
+ isLoading: K.loading,
529
+ onClick: async () => {
530
+ try {
531
+ if (!R) return;
532
+ await G({
533
+ botId: R,
534
+ input: { status: "DRAFT" }
535
+ }), await U(), j.success(`${L("botlit.botDetail.deactivate.successPrefix", "Bot")} "${H.name}" ${L("botlit.botDetail.deactivate.successSuffix", "deactivated")}`);
536
+ } catch (e) {
537
+ j.error(e instanceof Error ? e.message : L("botlit.botDetail.deactivate.error", "Failed to deactivate bot"));
538
+ }
539
+ },
540
+ children: L("botlit.botDetail.actions.deactivate", "Deactivate")
541
+ }),
542
+ /* @__PURE__ */ b(u, {
543
+ variant: "outline",
544
+ leftIcon: /* @__PURE__ */ b(ve, { size: 16 }),
545
+ onClick: () => z(`bots/${R}/edit`),
546
+ children: L("botlit.botDetail.actions.editBot", "Edit Bot")
547
+ }),
548
+ /* @__PURE__ */ b(u, {
549
+ variant: "outline",
550
+ leftIcon: /* @__PURE__ */ b(T, { size: 16 }),
551
+ onClick: () => {
552
+ let e = H?.defaultAgentId;
553
+ z(e ? `chat/${e}` : "chat");
554
+ },
555
+ children: L("botlit.botDetail.actions.testBot", "Test Bot")
556
+ }),
557
+ /* @__PURE__ */ b(u, {
558
+ variant: "destructive",
559
+ leftIcon: /* @__PURE__ */ b(be, { size: 16 }),
560
+ isLoading: Ae.loading,
561
+ onClick: async () => {
562
+ if (R && confirm(`${L("botlit.botDetail.delete.confirmPrefix", "Are you sure you want to delete")} "${H.name}"? ${L("botlit.botDetail.delete.confirmSuffix", "This action cannot be undone.")}`)) try {
563
+ await ke(R), j.success(`${L("botlit.botDetail.delete.successPrefix", "Bot")} "${H.name}" ${L("botlit.botDetail.delete.successSuffix", "deleted successfully")}`), z("bots");
564
+ } catch (e) {
565
+ j.error(e instanceof Error ? e.message : L("botlit.botDetail.delete.error", "Failed to delete bot"));
566
+ }
567
+ },
568
+ children: L("botlit.common.delete", "Delete")
569
+ })
570
+ ]
571
+ }),
572
+ children: /* @__PURE__ */ x("div", {
573
+ className: "space-y-6",
574
+ children: [
575
+ /* @__PURE__ */ b(de, {
576
+ icon: /* @__PURE__ */ b(C, { size: 18 }),
577
+ children: L("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.")
578
+ }),
579
+ /* @__PURE__ */ b("div", {
580
+ className: "flex gap-1 border-b border-border-subtle overflow-x-auto",
581
+ children: Pe.map((e) => /* @__PURE__ */ x("button", {
582
+ onClick: () => J(e.id),
583
+ className: ne("flex items-center gap-2 px-4 py-2 text-sm font-medium border-b-2 transition-colors whitespace-nowrap", q === e.id ? "border-primary text-primary" : "border-transparent text-text-secondary hover:text-text-primary"),
584
+ children: [e.icon, e.label]
585
+ }, e.id))
586
+ }),
587
+ q === "overview" && /* @__PURE__ */ x("div", {
588
+ className: "space-y-6",
589
+ children: [/* @__PURE__ */ b(ue, {
590
+ storageKey: `botlit-bot-${R}`,
591
+ steps: [
592
+ {
593
+ id: "workflow",
594
+ label: L("botlit.botDetail.nextSteps.workflow", "Design the workflow"),
595
+ description: L("botlit.botDetail.nextSteps.workflowDesc", "Lay out what the bot does on the FluidGrids canvas."),
596
+ icon: /* @__PURE__ */ b(k, { size: 16 }),
597
+ onClick: () => J("workflow"),
598
+ done: !!H.workflowId
599
+ },
600
+ {
601
+ id: "agent",
602
+ label: L("botlit.botDetail.nextSteps.agent", "Assign a default agent"),
603
+ description: L("botlit.botDetail.nextSteps.agentDesc", "Choose which agent answers when this bot is messaged."),
604
+ icon: /* @__PURE__ */ b(C, { size: 16 }),
605
+ onClick: () => J("agents"),
606
+ done: !!H.defaultAgentId
607
+ },
608
+ {
609
+ id: "channel",
610
+ label: L("botlit.botDetail.nextSteps.channel", "Connect a channel"),
611
+ description: L("botlit.botDetail.nextSteps.channelDesc", "Put the bot on Slack, a web widget or another channel."),
612
+ icon: /* @__PURE__ */ b(E, { size: 16 }),
613
+ onClick: () => J("channels")
614
+ },
615
+ {
616
+ id: "test",
617
+ label: L("botlit.botDetail.nextSteps.test", "Test the bot"),
618
+ description: L("botlit.botDetail.nextSteps.testDesc", "Send a message to check the experience end to end."),
619
+ icon: /* @__PURE__ */ b(T, { size: 16 }),
620
+ onClick: () => {
621
+ let e = H?.defaultAgentId;
622
+ z(e ? `chat/${e}` : "chat");
623
+ }
624
+ },
625
+ {
626
+ id: "activate",
627
+ label: L("botlit.botDetail.nextSteps.activate", "Activate the bot"),
628
+ description: L("botlit.botDetail.nextSteps.activateDesc", "Make it live so it starts handling conversations."),
629
+ icon: /* @__PURE__ */ b(O, { size: 16 }),
630
+ onClick: () => z(`bots/${R}/edit`),
631
+ done: H.status === "ACTIVE"
632
+ }
633
+ ]
634
+ }), /* @__PURE__ */ x("div", {
635
+ className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
636
+ children: [
637
+ /* @__PURE__ */ x(a, { children: [/* @__PURE__ */ b(c, { children: /* @__PURE__ */ b(l, { children: "Details" }) }), /* @__PURE__ */ x(o, {
638
+ className: "space-y-4",
639
+ children: [
640
+ /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
641
+ className: "text-sm text-text-secondary",
642
+ children: "Status"
643
+ }), /* @__PURE__ */ b(f, { status: H.status })] }),
644
+ /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
645
+ className: "text-sm text-text-secondary",
646
+ children: "Visibility"
647
+ }), /* @__PURE__ */ b(d, {
648
+ variant: "outline",
649
+ children: H.visibility
650
+ })] }),
651
+ /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
652
+ className: "text-sm text-text-secondary",
653
+ children: "Routing Strategy"
654
+ }), /* @__PURE__ */ b(d, {
655
+ variant: "outline",
656
+ children: H.routingStrategy
657
+ })] }),
658
+ /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
659
+ className: "text-sm text-text-secondary",
660
+ children: "Default Agent"
661
+ }), /* @__PURE__ */ b("p", {
662
+ className: "font-medium",
663
+ children: H.defaultAgentId ? "1 agent assigned" : "No agents"
664
+ })] }),
665
+ /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
666
+ className: "text-sm text-text-secondary",
667
+ children: "Channels"
668
+ }), /* @__PURE__ */ b("p", {
669
+ className: "font-medium",
670
+ children: "0 channels"
671
+ })] }),
672
+ /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
673
+ className: "text-sm text-text-secondary",
674
+ children: "Created"
675
+ }), /* @__PURE__ */ b("p", {
676
+ className: "font-medium",
677
+ children: ie(H.createdAt)
678
+ })] }),
679
+ /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
680
+ className: "text-sm text-text-secondary",
681
+ children: "Executions"
682
+ }), /* @__PURE__ */ b("p", {
683
+ className: "font-medium",
684
+ children: re(H.executionCount)
685
+ })] })
686
+ ]
687
+ })] }),
688
+ /* @__PURE__ */ x(y, {
689
+ treatment: "glass",
690
+ glow: !0,
691
+ className: "lg:col-span-2 p-6",
692
+ children: [/* @__PURE__ */ x("div", {
693
+ className: "mb-4 flex flex-row items-center justify-between",
694
+ children: [/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("h3", {
695
+ className: "text-lg font-semibold tracking-tight text-text-primary",
696
+ children: "Default Agent"
697
+ }), /* @__PURE__ */ b("p", {
698
+ className: "text-sm text-text-secondary",
699
+ children: "Agent configured for this bot"
700
+ })] }), /* @__PURE__ */ b(u, {
701
+ size: "sm",
702
+ variant: "outline",
703
+ onClick: () => J("agents"),
704
+ children: "Manage"
705
+ })]
706
+ }), /* @__PURE__ */ b("div", { children: $ ? /* @__PURE__ */ b("div", {
707
+ className: "space-y-3",
708
+ children: /* @__PURE__ */ x(pe, {
709
+ to: Te(`agents/${$.id}`),
710
+ className: "flex items-center justify-between p-3 rounded-lg border border-border-subtle hover:bg-accent transition-colors",
711
+ children: [/* @__PURE__ */ x("div", {
712
+ className: "flex items-center gap-3",
713
+ children: [/* @__PURE__ */ b("span", {
714
+ className: "text-2xl",
715
+ children: "🤖"
716
+ }), /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
717
+ className: "font-medium text-text-primary",
718
+ children: $.name
719
+ }), /* @__PURE__ */ b("p", {
720
+ className: "text-xs text-text-secondary",
721
+ children: "Default Agent"
722
+ })] })]
723
+ }), /* @__PURE__ */ b(f, { status: $.status })]
724
+ })
725
+ }) : /* @__PURE__ */ x("div", {
726
+ className: "text-center py-8 text-text-secondary",
727
+ children: [
728
+ /* @__PURE__ */ b(C, { className: "h-8 w-8 mx-auto mb-2 opacity-50" }),
729
+ /* @__PURE__ */ b("p", { children: "No default agent assigned" }),
730
+ /* @__PURE__ */ b(u, {
731
+ size: "sm",
732
+ className: "mt-3",
733
+ onClick: () => J("agents"),
734
+ children: "Assign Agent"
735
+ })
736
+ ]
737
+ }) })]
738
+ }),
739
+ (H.tagIds || []).length > 0 && /* @__PURE__ */ x(a, {
740
+ className: "lg:col-span-3",
741
+ children: [/* @__PURE__ */ b(c, { children: /* @__PURE__ */ b(l, { children: "Tags" }) }), /* @__PURE__ */ b(o, { children: /* @__PURE__ */ b("div", {
742
+ className: "flex flex-wrap gap-2",
743
+ children: (H.tagIds || []).map((e) => /* @__PURE__ */ b(d, {
744
+ variant: "outline",
745
+ children: e
746
+ }, e))
747
+ }) })]
748
+ })
749
+ ]
750
+ })]
751
+ }),
752
+ q === "workflow" && R && /* @__PURE__ */ b(ce, {
753
+ fallback: /* @__PURE__ */ b("div", { className: "h-64 bg-bg-sunken motion-safe:animate-vc-shimmer rounded-lg" }),
754
+ children: /* @__PURE__ */ b(M, {
755
+ botId: R,
756
+ botName: H.name,
757
+ workflowId: H.workflowId,
758
+ onWorkflowChanged: async () => {
759
+ await U();
760
+ }
761
+ })
762
+ }),
763
+ q === "routing" && /* @__PURE__ */ x("div", {
764
+ className: "space-y-6",
765
+ children: [/* @__PURE__ */ x(a, { children: [/* @__PURE__ */ x(c, { children: [/* @__PURE__ */ b(l, { children: "Routing Configuration" }), /* @__PURE__ */ b(s, { children: "How requests are routed to agents" })] }), /* @__PURE__ */ b(o, {
766
+ className: "space-y-4",
767
+ children: /* @__PURE__ */ x("div", {
768
+ className: "grid grid-cols-2 gap-4",
769
+ children: [/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
770
+ className: "text-sm text-text-secondary",
771
+ children: "Strategy"
772
+ }), /* @__PURE__ */ b(d, {
773
+ variant: "outline",
774
+ className: "mt-1",
775
+ children: H.routingStrategy
776
+ })] }), H.defaultAgentId && /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
777
+ className: "text-sm text-text-secondary",
778
+ children: "Default Agent"
779
+ }), /* @__PURE__ */ b("p", {
780
+ className: "font-mono text-sm mt-1",
781
+ children: H.defaultAgentId
782
+ })] })]
783
+ })
784
+ })] }), /* @__PURE__ */ x(a, { children: [/* @__PURE__ */ x(c, { children: [/* @__PURE__ */ b(l, { children: "Routing Rules" }), /* @__PURE__ */ b(s, { children: "No routing rules configured" })] }), /* @__PURE__ */ b(o, { children: /* @__PURE__ */ b("p", {
785
+ className: "text-text-secondary",
786
+ children: "No routing rules configured. Routing rules will be available in a future update."
787
+ }) })] })]
788
+ }),
789
+ q === "agents" && /* @__PURE__ */ x(a, { children: [/* @__PURE__ */ x(c, { children: [/* @__PURE__ */ b(l, { children: "Default Agent" }), /* @__PURE__ */ b(s, { children: "Select the default agent for this bot" })] }), /* @__PURE__ */ x(o, {
790
+ className: "space-y-4",
791
+ children: [
792
+ $ && /* @__PURE__ */ x("div", {
793
+ className: "flex items-center justify-between p-4 border border-border-subtle rounded-lg",
794
+ children: [/* @__PURE__ */ x("div", {
795
+ className: "flex items-center gap-3",
796
+ children: [/* @__PURE__ */ b("span", {
797
+ className: "text-2xl",
798
+ children: "🤖"
799
+ }), /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
800
+ className: "font-medium",
801
+ children: $.name
802
+ }), /* @__PURE__ */ b(d, {
803
+ variant: "success",
804
+ children: "Default"
805
+ })] })]
806
+ }), /* @__PURE__ */ b(f, { status: $.status })]
807
+ }),
808
+ /* @__PURE__ */ b("div", {
809
+ className: "flex items-center gap-3",
810
+ children: /* @__PURE__ */ x("select", {
811
+ className: "flex h-10 flex-1 rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm",
812
+ value: H.defaultAgentId || "",
813
+ onChange: async (e) => {
814
+ if (R) try {
815
+ await G({
816
+ botId: R,
817
+ input: { defaultAgentId: e.target.value || null }
818
+ }), j.success(e.target.value ? "Default agent assigned" : "Default agent removed");
819
+ } catch (e) {
820
+ let t = e instanceof Error ? e.message : "Failed to assign agent";
821
+ j.error(t);
822
+ }
823
+ },
824
+ children: [/* @__PURE__ */ b("option", {
825
+ value: "",
826
+ children: "No default agent"
827
+ }), W?.map((e) => /* @__PURE__ */ b("option", {
828
+ value: e.id,
829
+ children: e.name
830
+ }, e.id))]
831
+ })
832
+ }),
833
+ !$ && !W?.length && /* @__PURE__ */ x("div", {
834
+ className: "text-center py-8 text-text-secondary",
835
+ children: [/* @__PURE__ */ b(C, { className: "h-8 w-8 mx-auto mb-2 opacity-50" }), /* @__PURE__ */ b("p", { children: "No agents available. Create an agent first." })]
836
+ })
837
+ ]
838
+ })] }),
839
+ q === "channels" && R && /* @__PURE__ */ b(se, {
840
+ botId: R,
841
+ botName: H.name
842
+ }),
843
+ q === "guardrails" && /* @__PURE__ */ x(a, { children: [/* @__PURE__ */ x(c, { children: [/* @__PURE__ */ b(l, { children: "Policy Bindings" }), /* @__PURE__ */ b(s, { children: "Guardrails and policies attached to this bot" })] }), /* @__PURE__ */ b(o, { children: /* @__PURE__ */ x("div", {
844
+ className: "text-center py-8 text-text-secondary",
845
+ children: [
846
+ /* @__PURE__ */ b(O, { className: "h-8 w-8 mx-auto mb-2 opacity-50" }),
847
+ /* @__PURE__ */ b("p", { children: "Not configured" }),
848
+ /* @__PURE__ */ b("p", {
849
+ className: "text-sm mt-1",
850
+ children: "Policy bindings will be available in a future update."
851
+ })
852
+ ]
853
+ }) })] }),
854
+ q === "releases" && /* @__PURE__ */ x(a, { children: [/* @__PURE__ */ x(c, { children: [/* @__PURE__ */ b(l, { children: "Release Tracks" }), /* @__PURE__ */ b(s, { children: "Version deployments across environments" })] }), /* @__PURE__ */ b(o, { children: /* @__PURE__ */ x("div", {
855
+ className: "text-center py-8 text-text-secondary",
856
+ children: [
857
+ /* @__PURE__ */ b(w, { className: "h-8 w-8 mx-auto mb-2 opacity-50" }),
858
+ /* @__PURE__ */ b("p", { children: "Not configured" }),
859
+ /* @__PURE__ */ b("p", {
860
+ className: "text-sm mt-1",
861
+ children: "Release tracks will be available in a future update."
862
+ })
863
+ ]
864
+ }) })] })
865
+ ]
866
+ })
867
+ });
868
+ };
869
+ //#endregion
870
+ export { I as BotDetailPage };
871
+
872
+ //# sourceMappingURL=BotDetailPage.js.map