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