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