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