@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.
- package/dist/botlit/components/BotFormFields.js +66 -87
- package/dist/botlit/components/BotFormFields.js.map +1 -1
- package/dist/botlit/components/EmojiPicker.d.ts +20 -0
- package/dist/botlit/components/EmojiPicker.js +42 -0
- package/dist/botlit/components/EmojiPicker.js.map +1 -0
- package/dist/botlit/components/PageLayout.d.ts +5 -0
- package/dist/botlit/components/PageLayout.js +23 -14
- package/dist/botlit/components/PageLayout.js.map +1 -1
- package/dist/botlit/components/index.d.ts +1 -0
- package/dist/botlit/hooks/internal/allPages.d.ts +2 -0
- package/dist/botlit/hooks/internal/allPages.js +25 -0
- package/dist/botlit/hooks/internal/allPages.js.map +1 -0
- package/dist/botlit/hooks/useAgents.d.ts +24 -3
- package/dist/botlit/hooks/useAgents.js +158 -109
- package/dist/botlit/hooks/useAgents.js.map +1 -1
- package/dist/botlit/hooks/useBotAgents.d.ts +23 -0
- package/dist/botlit/hooks/useBotAgents.js +69 -0
- package/dist/botlit/hooks/useBotAgents.js.map +1 -0
- package/dist/botlit/hooks/useBots.js +2 -2
- package/dist/botlit/hooks/useBots.js.map +1 -1
- package/dist/botlit/hooks/useKnowledgeBases.js +40 -44
- package/dist/botlit/hooks/useKnowledgeBases.js.map +1 -1
- package/dist/botlit/hooks/useMCPServers.js +53 -57
- package/dist/botlit/hooks/useMCPServers.js.map +1 -1
- package/dist/botlit/pages/AgentBuilderPage.js +832 -425
- package/dist/botlit/pages/AgentBuilderPage.js.map +1 -1
- package/dist/botlit/pages/AgentDetailPage.js +407 -325
- package/dist/botlit/pages/AgentDetailPage.js.map +1 -1
- package/dist/botlit/pages/AgentsListPage.js +487 -291
- package/dist/botlit/pages/AgentsListPage.js.map +1 -1
- package/dist/botlit/pages/BotDetailPage.js +247 -257
- package/dist/botlit/pages/BotDetailPage.js.map +1 -1
- package/dist/botlit/pages/BotsListPage.js +2 -2
- package/dist/botlit/pages/BotsListPage.js.map +1 -1
- package/dist/botlit/types/index.d.ts +4 -1
- package/dist/botlit/utils/agentDelete.d.ts +5 -0
- package/dist/botlit/utils/agentDelete.js +15 -0
- package/dist/botlit/utils/agentDelete.js.map +1 -0
- package/dist/botlit/utils/agentSettings.d.ts +77 -0
- package/dist/botlit/utils/agentSettings.js +78 -0
- package/dist/botlit/utils/agentSettings.js.map +1 -0
- package/dist/generated/wspace-operations.d.ts +4 -0
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/generated/wspace-types.d.ts +43 -0
- package/dist/generated/wspace-types.js.map +1 -1
- 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
|
|
27
|
-
import { Link as
|
|
28
|
-
import { isQuotaExhaustedError as
|
|
29
|
-
import { ArrowLeft as
|
|
30
|
-
import { toast as
|
|
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
|
|
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
|
-
},
|
|
37
|
+
}, P = {
|
|
38
38
|
key: "resume",
|
|
39
39
|
target: "ACTIVE",
|
|
40
40
|
variant: "default",
|
|
41
41
|
confirm: !1
|
|
42
|
-
},
|
|
42
|
+
}, F = {
|
|
43
43
|
key: "pause",
|
|
44
44
|
target: "PAUSED",
|
|
45
45
|
variant: "outline",
|
|
46
46
|
confirm: !0
|
|
47
|
-
},
|
|
47
|
+
}, I = {
|
|
48
48
|
key: "archive",
|
|
49
49
|
target: "ARCHIVED",
|
|
50
50
|
variant: "outline",
|
|
51
51
|
confirm: !0
|
|
52
|
-
},
|
|
53
|
-
DRAFT: [
|
|
54
|
-
ACTIVE: [
|
|
55
|
-
PAUSED: [
|
|
56
|
-
ARCHIVED: [
|
|
57
|
-
},
|
|
58
|
-
function
|
|
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
|
|
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
|
|
80
|
+
function Fe(e) {
|
|
81
81
|
if (e.get("code") && e.get("state")) return "channels";
|
|
82
82
|
let t = e.get("tab");
|
|
83
|
-
return
|
|
83
|
+
return L.find((e) => e === t) ?? "overview";
|
|
84
84
|
}
|
|
85
|
-
var
|
|
86
|
-
let v = e(), { botId:
|
|
87
|
-
|
|
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 (
|
|
91
|
-
let e =
|
|
90
|
+
if (B && !m) {
|
|
91
|
+
let e = Pe(B);
|
|
92
92
|
q(e), We(e);
|
|
93
93
|
}
|
|
94
|
-
}, [
|
|
95
|
-
if (
|
|
96
|
-
}, [
|
|
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),
|
|
109
|
+
})) && (J(!0), I(e));
|
|
110
110
|
}, $e = async () => {
|
|
111
|
-
if (Ke(!0), Xe || !
|
|
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:
|
|
115
|
+
workspaceId: R,
|
|
116
116
|
name: e,
|
|
117
117
|
slug: K.slug.trim() || _(e),
|
|
118
|
-
type:
|
|
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),
|
|
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 (
|
|
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
|
-
|
|
130
|
+
M.error(t);
|
|
131
131
|
}
|
|
132
132
|
}, et = async () => {
|
|
133
|
-
if (Ke(!0), !
|
|
133
|
+
if (Ke(!0), !N || Xe) return;
|
|
134
134
|
let e = K.name.trim();
|
|
135
135
|
try {
|
|
136
136
|
await U({
|
|
137
|
-
botId:
|
|
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(),
|
|
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
|
-
|
|
151
|
+
M.error(t);
|
|
152
152
|
}
|
|
153
153
|
};
|
|
154
154
|
if (m) {
|
|
155
|
-
let e =
|
|
156
|
-
return /* @__PURE__ */
|
|
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__ */
|
|
159
|
+
actions: /* @__PURE__ */ C("div", {
|
|
160
160
|
className: "flex gap-2",
|
|
161
|
-
children: [/* @__PURE__ */
|
|
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__ */
|
|
166
|
+
}), /* @__PURE__ */ S(s, {
|
|
167
167
|
type: "submit",
|
|
168
168
|
form: "bot-create-form",
|
|
169
|
-
leftIcon: /* @__PURE__ */
|
|
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__ */
|
|
176
|
+
children: /* @__PURE__ */ S(n, {
|
|
177
177
|
className: "max-w-2xl",
|
|
178
|
-
children: /* @__PURE__ */
|
|
178
|
+
children: /* @__PURE__ */ S(r, {
|
|
179
179
|
className: "pt-6",
|
|
180
|
-
children: /* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
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 (
|
|
210
|
+
if (Ie) return /* @__PURE__ */ S(t, {
|
|
211
211
|
title: v("botlit.common.loading", "Loading..."),
|
|
212
|
-
children: /* @__PURE__ */
|
|
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 (
|
|
219
|
+
if (Le) return /* @__PURE__ */ S(t, {
|
|
220
220
|
title: v("botlit.botDetail.loadError.title", "Bot unavailable"),
|
|
221
|
-
children: /* @__PURE__ */
|
|
221
|
+
children: /* @__PURE__ */ S(re, {
|
|
222
222
|
resource: v("botlit.botDetail.resource", "this bot"),
|
|
223
|
-
error:
|
|
223
|
+
error: Le,
|
|
224
224
|
onRetry: () => void V()
|
|
225
225
|
})
|
|
226
226
|
});
|
|
227
|
-
if (!
|
|
227
|
+
if (!B) return /* @__PURE__ */ S(t, {
|
|
228
228
|
title: v("botlit.botDetail.notFound.title", "Bot Not Found"),
|
|
229
|
-
children: /* @__PURE__ */
|
|
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__ */
|
|
234
|
-
onClick: () =>
|
|
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 &&
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
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
|
-
|
|
251
|
+
title: v("botlit.botDetail.editPage.title", "Edit Bot"),
|
|
252
|
+
actions: /* @__PURE__ */ C("div", {
|
|
255
253
|
className: "flex gap-2",
|
|
256
|
-
children: [/* @__PURE__ */
|
|
254
|
+
children: [/* @__PURE__ */ S(s, {
|
|
257
255
|
variant: "outline",
|
|
258
256
|
type: "button",
|
|
259
|
-
onClick: () => void Z(`bots/${
|
|
257
|
+
onClick: () => void Z(`bots/${N}`),
|
|
260
258
|
children: v("botlit.common.cancel", "Cancel")
|
|
261
|
-
}), /* @__PURE__ */
|
|
259
|
+
}), /* @__PURE__ */ S(s, {
|
|
262
260
|
type: "submit",
|
|
263
261
|
form: "bot-edit-form",
|
|
264
|
-
leftIcon: /* @__PURE__ */
|
|
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__ */
|
|
267
|
+
children: /* @__PURE__ */ S(n, {
|
|
270
268
|
className: "max-w-2xl",
|
|
271
|
-
children: /* @__PURE__ */
|
|
269
|
+
children: /* @__PURE__ */ S(r, {
|
|
272
270
|
className: "pt-6",
|
|
273
|
-
children: /* @__PURE__ */
|
|
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__ */
|
|
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 (!
|
|
321
|
-
let t = Q(e.key,
|
|
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:
|
|
327
|
+
botId: N,
|
|
330
328
|
input: { status: e.target }
|
|
331
|
-
}), await V(),
|
|
329
|
+
}), await V(), M.success(t.success);
|
|
332
330
|
} catch (e) {
|
|
333
|
-
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
372
|
+
icon: /* @__PURE__ */ S(E, { size: 16 })
|
|
375
373
|
}
|
|
376
|
-
], $ =
|
|
377
|
-
return /* @__PURE__ */
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
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__ */
|
|
400
|
+
/* @__PURE__ */ S(d, {
|
|
411
401
|
permission: u.APP_UPDATE,
|
|
412
|
-
children: (
|
|
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,
|
|
406
|
+
children: Q(e.key, B.name).label
|
|
417
407
|
}, e.key))
|
|
418
408
|
}),
|
|
419
|
-
/* @__PURE__ */
|
|
409
|
+
/* @__PURE__ */ S(d, {
|
|
420
410
|
permission: u.APP_UPDATE,
|
|
421
|
-
children: /* @__PURE__ */
|
|
411
|
+
children: /* @__PURE__ */ S(s, {
|
|
422
412
|
variant: "outline",
|
|
423
|
-
leftIcon: /* @__PURE__ */
|
|
424
|
-
onClick: () =>
|
|
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__ */
|
|
418
|
+
/* @__PURE__ */ S(d, {
|
|
429
419
|
permission: u.AGENT_EXECUTE,
|
|
430
|
-
children: /* @__PURE__ */
|
|
420
|
+
children: /* @__PURE__ */ S(s, {
|
|
431
421
|
variant: "outline",
|
|
432
|
-
leftIcon: /* @__PURE__ */
|
|
422
|
+
leftIcon: /* @__PURE__ */ S(D, { size: 16 }),
|
|
433
423
|
onClick: () => {
|
|
434
|
-
let e =
|
|
435
|
-
|
|
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__ */
|
|
430
|
+
/* @__PURE__ */ S(d, {
|
|
441
431
|
permission: u.APP_DELETE,
|
|
442
|
-
children: /* @__PURE__ */
|
|
432
|
+
children: /* @__PURE__ */ S(s, {
|
|
443
433
|
variant: "destructive",
|
|
444
|
-
leftIcon: /* @__PURE__ */
|
|
434
|
+
leftIcon: /* @__PURE__ */ S(Ae, { size: 16 }),
|
|
445
435
|
isLoading: He.loading,
|
|
446
436
|
onClick: async () => {
|
|
447
|
-
if (
|
|
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:
|
|
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(
|
|
454
|
-
|
|
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
|
-
|
|
447
|
+
M.success(v("botlit.botsList.delete.success", "Bot \"{{name}}\" deleted successfully", { name: B.name })), I("bots");
|
|
458
448
|
} catch (e) {
|
|
459
|
-
|
|
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__ */
|
|
457
|
+
children: /* @__PURE__ */ C("div", {
|
|
468
458
|
className: "space-y-6",
|
|
469
459
|
children: [
|
|
470
|
-
/* @__PURE__ */
|
|
471
|
-
icon: /* @__PURE__ */
|
|
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__ */
|
|
464
|
+
/* @__PURE__ */ S("div", {
|
|
475
465
|
className: "flex gap-1 border-b border-border-subtle overflow-x-auto",
|
|
476
|
-
children: nt.map((e) => /* @__PURE__ */
|
|
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__ */
|
|
472
|
+
W === "overview" && /* @__PURE__ */ C("div", {
|
|
483
473
|
className: "space-y-6",
|
|
484
|
-
children: [/* @__PURE__ */
|
|
485
|
-
storageKey: `botlit-bot-${
|
|
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__ */
|
|
481
|
+
icon: /* @__PURE__ */ S(j, { size: 16 }),
|
|
492
482
|
onClick: () => G("workflow"),
|
|
493
|
-
done: !!
|
|
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__ */
|
|
489
|
+
icon: /* @__PURE__ */ S(T, { size: 16 }),
|
|
500
490
|
onClick: () => G("agents"),
|
|
501
|
-
done: !!
|
|
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__ */
|
|
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__ */
|
|
504
|
+
icon: /* @__PURE__ */ S(D, { size: 16 }),
|
|
515
505
|
onClick: () => {
|
|
516
|
-
let e =
|
|
517
|
-
|
|
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__ */
|
|
525
|
-
onClick: () =>
|
|
526
|
-
done:
|
|
514
|
+
icon: /* @__PURE__ */ S(A, { size: 16 }),
|
|
515
|
+
onClick: () => I(`bots/${N}/edit`),
|
|
516
|
+
done: B.status === "ACTIVE"
|
|
527
517
|
}
|
|
528
518
|
]
|
|
529
|
-
}), /* @__PURE__ */
|
|
519
|
+
}), /* @__PURE__ */ C("div", {
|
|
530
520
|
className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
|
|
531
521
|
children: [
|
|
532
|
-
/* @__PURE__ */
|
|
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__ */
|
|
525
|
+
/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
|
|
536
526
|
className: "text-sm text-text-secondary",
|
|
537
527
|
children: "Status"
|
|
538
|
-
}), /* @__PURE__ */
|
|
539
|
-
/* @__PURE__ */
|
|
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__ */
|
|
532
|
+
}), /* @__PURE__ */ S(c, {
|
|
543
533
|
variant: "outline",
|
|
544
|
-
children:
|
|
534
|
+
children: B.visibility
|
|
545
535
|
})] }),
|
|
546
|
-
/* @__PURE__ */
|
|
536
|
+
/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
|
|
547
537
|
className: "text-sm text-text-secondary",
|
|
548
538
|
children: "Routing Strategy"
|
|
549
|
-
}), /* @__PURE__ */
|
|
539
|
+
}), /* @__PURE__ */ S(c, {
|
|
550
540
|
variant: "outline",
|
|
551
|
-
children:
|
|
541
|
+
children: B.routingStrategy
|
|
552
542
|
})] }),
|
|
553
|
-
/* @__PURE__ */
|
|
543
|
+
/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
|
|
554
544
|
className: "text-sm text-text-secondary",
|
|
555
545
|
children: "Default Agent"
|
|
556
|
-
}), /* @__PURE__ */
|
|
546
|
+
}), /* @__PURE__ */ S("p", {
|
|
557
547
|
className: "font-medium",
|
|
558
|
-
children:
|
|
548
|
+
children: B.defaultAgentId ? "1 agent assigned" : "No agents"
|
|
559
549
|
})] }),
|
|
560
|
-
/* @__PURE__ */
|
|
550
|
+
/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
|
|
561
551
|
className: "text-sm text-text-secondary",
|
|
562
552
|
children: "Channels"
|
|
563
|
-
}), /* @__PURE__ */
|
|
553
|
+
}), /* @__PURE__ */ S("p", {
|
|
564
554
|
className: "font-medium",
|
|
565
555
|
children: "0 channels"
|
|
566
556
|
})] }),
|
|
567
|
-
/* @__PURE__ */
|
|
557
|
+
/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
|
|
568
558
|
className: "text-sm text-text-secondary",
|
|
569
559
|
children: "Created"
|
|
570
|
-
}), /* @__PURE__ */
|
|
560
|
+
}), /* @__PURE__ */ S("p", {
|
|
571
561
|
className: "font-medium",
|
|
572
|
-
children: fe(
|
|
562
|
+
children: fe(B.createdAt)
|
|
573
563
|
})] }),
|
|
574
|
-
/* @__PURE__ */
|
|
564
|
+
/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
|
|
575
565
|
className: "text-sm text-text-secondary",
|
|
576
566
|
children: "Executions"
|
|
577
|
-
}), /* @__PURE__ */
|
|
567
|
+
}), /* @__PURE__ */ S("p", {
|
|
578
568
|
className: "font-medium",
|
|
579
|
-
children: de(
|
|
569
|
+
children: de(B.executionCount)
|
|
580
570
|
})] })
|
|
581
571
|
]
|
|
582
572
|
})] }),
|
|
583
|
-
/* @__PURE__ */
|
|
573
|
+
/* @__PURE__ */ C(ye, {
|
|
584
574
|
treatment: "glass",
|
|
585
575
|
glow: !0,
|
|
586
576
|
className: "lg:col-span-2 p-6",
|
|
587
|
-
children: [/* @__PURE__ */
|
|
577
|
+
children: [/* @__PURE__ */ C("div", {
|
|
588
578
|
className: "mb-4 flex flex-row items-center justify-between",
|
|
589
|
-
children: [/* @__PURE__ */
|
|
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__ */
|
|
582
|
+
}), /* @__PURE__ */ S("p", {
|
|
593
583
|
className: "text-sm text-text-secondary",
|
|
594
584
|
children: "Agent configured for this bot"
|
|
595
|
-
})] }), /* @__PURE__ */
|
|
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__ */
|
|
591
|
+
}), /* @__PURE__ */ S("div", { children: $ ? /* @__PURE__ */ S("div", {
|
|
602
592
|
className: "space-y-3",
|
|
603
|
-
children: /* @__PURE__ */
|
|
604
|
-
to:
|
|
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__ */
|
|
596
|
+
children: [/* @__PURE__ */ C("div", {
|
|
607
597
|
className: "flex items-center gap-3",
|
|
608
|
-
children: [/* @__PURE__ */
|
|
598
|
+
children: [/* @__PURE__ */ S("span", {
|
|
609
599
|
className: "text-2xl",
|
|
610
600
|
children: "🤖"
|
|
611
|
-
}), /* @__PURE__ */
|
|
601
|
+
}), /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
|
|
612
602
|
className: "font-medium text-text-primary",
|
|
613
603
|
children: $.name
|
|
614
|
-
}), /* @__PURE__ */
|
|
604
|
+
}), /* @__PURE__ */ S("p", {
|
|
615
605
|
className: "text-xs text-text-secondary",
|
|
616
606
|
children: "Default Agent"
|
|
617
607
|
})] })]
|
|
618
|
-
}), /* @__PURE__ */
|
|
608
|
+
}), /* @__PURE__ */ S(l, { status: $.status })]
|
|
619
609
|
})
|
|
620
|
-
}) : /* @__PURE__ */
|
|
610
|
+
}) : /* @__PURE__ */ C("div", {
|
|
621
611
|
className: "text-center py-8 text-text-secondary",
|
|
622
612
|
children: [
|
|
623
|
-
/* @__PURE__ */
|
|
624
|
-
/* @__PURE__ */
|
|
625
|
-
/* @__PURE__ */
|
|
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
|
-
(
|
|
624
|
+
(B.tagIds || []).length > 0 && /* @__PURE__ */ C(n, {
|
|
635
625
|
className: "lg:col-span-3",
|
|
636
|
-
children: [/* @__PURE__ */
|
|
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: (
|
|
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" &&
|
|
648
|
-
fallback: /* @__PURE__ */
|
|
649
|
-
children: /* @__PURE__ */
|
|
650
|
-
botId:
|
|
651
|
-
botName:
|
|
652
|
-
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__ */
|
|
648
|
+
W === "routing" && /* @__PURE__ */ C("div", {
|
|
659
649
|
className: "space-y-6",
|
|
660
|
-
children: [/* @__PURE__ */
|
|
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__ */
|
|
652
|
+
children: /* @__PURE__ */ C("div", {
|
|
663
653
|
className: "grid grid-cols-2 gap-4",
|
|
664
|
-
children: [/* @__PURE__ */
|
|
654
|
+
children: [/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
|
|
665
655
|
className: "text-sm text-text-secondary",
|
|
666
656
|
children: "Strategy"
|
|
667
|
-
}), /* @__PURE__ */
|
|
657
|
+
}), /* @__PURE__ */ S(c, {
|
|
668
658
|
variant: "outline",
|
|
669
659
|
className: "mt-1",
|
|
670
|
-
children:
|
|
671
|
-
})] }),
|
|
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__ */
|
|
664
|
+
}), /* @__PURE__ */ S("p", {
|
|
675
665
|
className: "font-mono text-sm mt-1",
|
|
676
|
-
children:
|
|
666
|
+
children: B.defaultAgentId
|
|
677
667
|
})] })]
|
|
678
668
|
})
|
|
679
|
-
})] }), /* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
677
|
+
$ && /* @__PURE__ */ C("div", {
|
|
688
678
|
className: "flex items-center justify-between p-4 border border-border-subtle rounded-lg",
|
|
689
|
-
children: [/* @__PURE__ */
|
|
679
|
+
children: [/* @__PURE__ */ C("div", {
|
|
690
680
|
className: "flex items-center gap-3",
|
|
691
|
-
children: [/* @__PURE__ */
|
|
681
|
+
children: [/* @__PURE__ */ S("span", {
|
|
692
682
|
className: "text-2xl",
|
|
693
683
|
children: "🤖"
|
|
694
|
-
}), /* @__PURE__ */
|
|
684
|
+
}), /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
|
|
695
685
|
className: "font-medium",
|
|
696
686
|
children: $.name
|
|
697
|
-
}), /* @__PURE__ */
|
|
687
|
+
}), /* @__PURE__ */ S(c, {
|
|
698
688
|
variant: "success",
|
|
699
689
|
children: "Default"
|
|
700
690
|
})] })]
|
|
701
|
-
}), /* @__PURE__ */
|
|
691
|
+
}), /* @__PURE__ */ S(l, { status: $.status })]
|
|
702
692
|
}),
|
|
703
|
-
/* @__PURE__ */
|
|
693
|
+
/* @__PURE__ */ S("div", {
|
|
704
694
|
className: "flex items-center gap-3",
|
|
705
|
-
children: /* @__PURE__ */
|
|
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:
|
|
708
|
-
disabled: !
|
|
697
|
+
value: B.defaultAgentId || "",
|
|
698
|
+
disabled: !F(u.APP_UPDATE),
|
|
709
699
|
onChange: async (e) => {
|
|
710
|
-
if (
|
|
700
|
+
if (N) try {
|
|
711
701
|
await U({
|
|
712
|
-
botId:
|
|
702
|
+
botId: N,
|
|
713
703
|
input: { defaultAgentId: e.target.value || null }
|
|
714
|
-
}),
|
|
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
|
-
|
|
707
|
+
M.error(t);
|
|
718
708
|
}
|
|
719
709
|
},
|
|
720
|
-
children: [/* @__PURE__ */
|
|
710
|
+
children: [/* @__PURE__ */ S("option", {
|
|
721
711
|
value: "",
|
|
722
712
|
children: "No default agent"
|
|
723
|
-
}), H?.map((e) => /* @__PURE__ */
|
|
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__ */
|
|
719
|
+
!$ && !H?.length && /* @__PURE__ */ C("div", {
|
|
730
720
|
className: "text-center py-8 text-text-secondary",
|
|
731
|
-
children: [/* @__PURE__ */
|
|
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" &&
|
|
736
|
-
botId:
|
|
737
|
-
botName:
|
|
725
|
+
W === "channels" && N && /* @__PURE__ */ S(_e, {
|
|
726
|
+
botId: N,
|
|
727
|
+
botName: B.name
|
|
738
728
|
}),
|
|
739
|
-
W === "aiOperations" &&
|
|
729
|
+
W === "aiOperations" && N && /* @__PURE__ */ S(ee, {
|
|
740
730
|
filter: {
|
|
741
731
|
subjectType: "APP",
|
|
742
|
-
subjectId:
|
|
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__ */
|
|
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__ */
|
|
750
|
-
/* @__PURE__ */
|
|
751
|
-
/* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
761
|
-
/* @__PURE__ */
|
|
762
|
-
/* @__PURE__ */
|
|
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 {
|
|
762
|
+
export { R as BotDetailPage };
|
|
773
763
|
|
|
774
764
|
//# sourceMappingURL=BotDetailPage.js.map
|