@burdenoff/microfe-botmanor 2026.1112.3 → 2026.1115.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/botlit/components/ActionMenu.d.ts +18 -0
- package/dist/botlit/components/ActionMenu.js +76 -0
- package/dist/botlit/components/ActionMenu.js.map +1 -0
- package/dist/botlit/components/BotFormFields.d.ts +35 -0
- package/dist/botlit/components/BotFormFields.js +261 -0
- package/dist/botlit/components/BotFormFields.js.map +1 -0
- package/dist/botlit/components/Input.js +4 -0
- package/dist/botlit/components/Input.js.map +1 -1
- package/dist/botlit/components/index.d.ts +1 -0
- package/dist/botlit/hooks/useBots.js +3 -2
- package/dist/botlit/hooks/useBots.js.map +1 -1
- package/dist/botlit/pages/BotDetailPage.js +428 -551
- package/dist/botlit/pages/BotDetailPage.js.map +1 -1
- package/dist/botlit/pages/BotsListPage.js +260 -237
- package/dist/botlit/pages/BotsListPage.js.map +1 -1
- package/dist/botlit/utils/botIdentity.d.ts +34 -0
- package/dist/botlit/utils/botIdentity.js +36 -0
- package/dist/botlit/utils/botIdentity.js.map +1 -0
- package/dist/botlit/utils/breadcrumb.d.ts +12 -0
- package/dist/botlit/utils/breadcrumb.js +13 -0
- package/dist/botlit/utils/breadcrumb.js.map +1 -0
- package/dist/botlit/utils/confirmAction.d.ts +17 -0
- package/dist/botlit/utils/confirmAction.js +14 -0
- package/dist/botlit/utils/confirmAction.js.map +1 -0
- package/package.json +1 -1
|
@@ -1,132 +1,185 @@
|
|
|
1
1
|
import { useTr as e } from "../../shared/hooks/useTr.js";
|
|
2
|
-
import { isNative as t,
|
|
3
|
-
import { PageLayout as
|
|
4
|
-
import { Card as
|
|
5
|
-
import { Button as
|
|
6
|
-
import { Input as
|
|
7
|
-
import { BOTMANOR_PERMISSIONS as
|
|
8
|
-
import { BotmanorPermissionGate as d } from "../permissions/useBotmanorPermissions.js";
|
|
2
|
+
import { isNative as t, nativeImpact as n, nativeNotify as r } from "../../utils/nativeBridge.js";
|
|
3
|
+
import { PageLayout as i } from "../components/PageLayout.js";
|
|
4
|
+
import { Card as a, CardContent as o } from "../components/Card.js";
|
|
5
|
+
import { Button as s } from "../components/Button.js";
|
|
6
|
+
import { Input as c } from "../components/Input.js";
|
|
7
|
+
import { BOTMANOR_PERMISSIONS as l } from "../permissions/botmanorPermissions.js";
|
|
8
|
+
import { BotmanorPermissionGate as u, useBotmanorCan as d } from "../permissions/useBotmanorPermissions.js";
|
|
9
9
|
import { StatusBadge as f } from "../components/Badge.js";
|
|
10
10
|
import { EmptyState as p } from "../components/EmptyState.js";
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
11
|
+
import { ErrorState as m } from "../components/ErrorState.js";
|
|
12
|
+
import { ActionMenu as h } from "../components/ActionMenu.js";
|
|
13
|
+
import { LoadMore as g } from "../components/LoadMore.js";
|
|
14
|
+
import { useBotAppCounts as ee, useBots as _, useDeleteBot as v } from "../hooks/useBots.js";
|
|
15
|
+
import { useBotlitStore as y } from "../store/botlitStore.js";
|
|
16
|
+
import { useBotlit as b } from "../providers/BotlitProvider.js";
|
|
17
|
+
import { formatNumber as x, formatRelativeTime as S } from "../utils/formatters.js";
|
|
18
|
+
import { confirmAction as C } from "../utils/confirmAction.js";
|
|
19
|
+
import { cn as w } from "../utils/cn.js";
|
|
17
20
|
import "../permissions/index.js";
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import { toast as L } from "sonner";
|
|
21
|
+
import { GlassCard as T, PagePurpose as E } from "@burdenoff/fe-libs/ui";
|
|
22
|
+
import { jsx as D, jsxs as O } from "react/jsx-runtime";
|
|
23
|
+
import { Link as k } from "react-router";
|
|
24
|
+
import { Bot as A, Edit as te, Grid3X3 as ne, List as re, Plus as ie, Search as ae, Trash2 as oe, Workflow as j } from "lucide-react";
|
|
25
|
+
import { toast as M } from "sonner";
|
|
24
26
|
// src/botlit/pages/BotsListPage.tsx
|
|
25
|
-
var
|
|
26
|
-
let
|
|
27
|
-
|
|
28
|
-
},
|
|
29
|
-
|
|
30
|
-
title: "Delete bot?",
|
|
31
|
-
message:
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
})
|
|
35
|
-
|
|
36
|
-
r("medium");
|
|
27
|
+
var N = "after:absolute after:inset-0 after:content-[\"\"] focus-visible:outline-none focus-visible:after:ring-2 focus-visible:after:ring-primary focus-visible:after:rounded-lg", P = () => {
|
|
28
|
+
let P = e(), F = d(), { navigateTo: I, getPath: L } = b(), { viewMode: R, setViewMode: z, botFilter: B, updateBotFilter: V } = y(), { data: H, loading: U, error: W, refetch: G, hasMore: K, loadingMore: se, loadMore: ce } = _(B), q = ee(), [le] = v(), J = (B.search ?? "").trim(), ue = (e) => {
|
|
29
|
+
V({ search: e.target.value });
|
|
30
|
+
}, de = async (e) => {
|
|
31
|
+
if (await C({
|
|
32
|
+
title: P("botlit.botsList.delete.title", "Delete bot?"),
|
|
33
|
+
message: P("botlit.botsList.delete.confirm", "Are you sure you want to delete \"{{name}}\"? Its channels will stop answering and this cannot be undone.", { name: e.name }),
|
|
34
|
+
confirmLabel: P("botlit.common.delete", "Delete"),
|
|
35
|
+
cancelLabel: P("botlit.common.cancel", "Cancel")
|
|
36
|
+
})) {
|
|
37
|
+
n("medium");
|
|
37
38
|
try {
|
|
38
|
-
await
|
|
39
|
+
if (!await le(e.id)) {
|
|
40
|
+
M.error(P("botlit.botsList.delete.notDeleted", "The bot could not be deleted.")), t() && r("error");
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
M.success(P("botlit.botsList.delete.success", "Bot \"{{name}}\" deleted successfully", { name: e.name })), t() && r("success"), await G(), q.refetch();
|
|
39
44
|
} catch (e) {
|
|
40
|
-
let n = e instanceof Error ? e.message :
|
|
41
|
-
|
|
45
|
+
let n = e instanceof Error ? e.message : P("botlit.botsList.delete.error", "Failed to delete bot");
|
|
46
|
+
M.error(n), t() && r("error");
|
|
42
47
|
}
|
|
43
48
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
49
|
+
}, Y = (e) => {
|
|
50
|
+
let t = [];
|
|
51
|
+
return F(l.APP_UPDATE) && t.push({
|
|
52
|
+
key: "edit",
|
|
53
|
+
label: P("botlit.botsList.menu.editBot", "Edit Bot"),
|
|
54
|
+
icon: /* @__PURE__ */ D(te, {
|
|
55
|
+
size: 16,
|
|
56
|
+
"aria-hidden": "true"
|
|
57
|
+
}),
|
|
58
|
+
onSelect: () => I(`bots/${e.id}/edit`)
|
|
59
|
+
}), t.push({
|
|
60
|
+
key: "design",
|
|
61
|
+
label: P("botlit.botsList.menu.design", "Design workflow"),
|
|
62
|
+
icon: /* @__PURE__ */ D(j, {
|
|
63
|
+
size: 16,
|
|
64
|
+
"aria-hidden": "true"
|
|
65
|
+
}),
|
|
66
|
+
onSelect: () => I(`bots/${e.id}?tab=workflow`)
|
|
67
|
+
}, {
|
|
68
|
+
key: "agents",
|
|
69
|
+
label: P("botlit.botsList.menu.viewAgents", "View Agents"),
|
|
70
|
+
icon: /* @__PURE__ */ D(A, {
|
|
71
|
+
size: 16,
|
|
72
|
+
"aria-hidden": "true"
|
|
73
|
+
}),
|
|
74
|
+
onSelect: () => I(`bots/${e.id}/agents`)
|
|
75
|
+
}), F(l.APP_DELETE) && t.push({
|
|
76
|
+
key: "delete",
|
|
77
|
+
label: P("botlit.common.delete", "Delete"),
|
|
78
|
+
icon: /* @__PURE__ */ D(oe, {
|
|
79
|
+
size: 16,
|
|
80
|
+
"aria-hidden": "true"
|
|
81
|
+
}),
|
|
82
|
+
destructive: !0,
|
|
83
|
+
onSelect: () => void de(e)
|
|
84
|
+
}), t;
|
|
85
|
+
}, X = (e) => {
|
|
86
|
+
let t = e ?? 0;
|
|
87
|
+
return t === 1 ? P("botlit.common.executionsOne", "{{count}} execution", { count: x(t) }) : P("botlit.common.executionsOther", "{{count}} executions", { count: x(t) });
|
|
88
|
+
}, Z = !U && !W && H.length === 0 && J === "", Q = /* @__PURE__ */ D(u, {
|
|
89
|
+
permission: l.APP_CREATE,
|
|
90
|
+
children: /* @__PURE__ */ D(s, {
|
|
91
|
+
leftIcon: /* @__PURE__ */ D(ie, { size: 16 }),
|
|
92
|
+
onClick: () => I("bots/new"),
|
|
93
|
+
children: P("botlit.botsList.actions.createBot", "Create Bot")
|
|
94
|
+
})
|
|
95
|
+
}), $ = q.data;
|
|
96
|
+
return /* @__PURE__ */ D(i, {
|
|
97
|
+
title: P("botlit.botsList.title", "Bots"),
|
|
98
|
+
description: P("botlit.botsList.description", "Manage your AI-powered bots"),
|
|
99
|
+
actions: Z ? void 0 : Q,
|
|
100
|
+
children: /* @__PURE__ */ O("div", {
|
|
58
101
|
className: "space-y-6",
|
|
59
102
|
children: [
|
|
60
|
-
/* @__PURE__ */
|
|
61
|
-
icon: /* @__PURE__ */
|
|
62
|
-
children:
|
|
103
|
+
/* @__PURE__ */ D(E, {
|
|
104
|
+
icon: /* @__PURE__ */ D(A, { size: 18 }),
|
|
105
|
+
children: P("botlit.botsList.purpose", "A bot is the deployable, user-facing surface for your AI — it wraps one or more agents and exposes them to people through chat, channels (Slack, web widget, WhatsApp) and APIs. Create a bot here when you are ready to put an agent in front of real users, then connect channels and watch its executions.")
|
|
63
106
|
}),
|
|
64
|
-
|
|
65
|
-
className: "grid grid-cols-2 gap-4
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
}),
|
|
90
|
-
/* @__PURE__ */ E(C, {
|
|
91
|
-
treatment: "metric",
|
|
92
|
-
className: "col-span-2 p-4 sm:col-span-1",
|
|
93
|
-
children: [/* @__PURE__ */ T("p", {
|
|
94
|
-
className: "text-sm text-text-secondary",
|
|
95
|
-
children: R("botlit.botsList.summary.executions", "Total executions")
|
|
96
|
-
}), /* @__PURE__ */ T("p", {
|
|
97
|
-
className: "mt-1 text-2xl font-semibold tabular-nums text-text-primary",
|
|
98
|
-
children: y(G.reduce((e, t) => e + (t.executionCount ?? 0), 0))
|
|
99
|
-
})]
|
|
100
|
-
})
|
|
101
|
-
]
|
|
107
|
+
$ && $.total - $.archived > 0 ? /* @__PURE__ */ O("div", {
|
|
108
|
+
className: "grid grid-cols-2 gap-4",
|
|
109
|
+
role: "group",
|
|
110
|
+
"aria-label": P("botlit.botsList.summary.title", "Bot totals"),
|
|
111
|
+
children: [/* @__PURE__ */ O(T, {
|
|
112
|
+
treatment: "metric",
|
|
113
|
+
className: "p-4",
|
|
114
|
+
children: [/* @__PURE__ */ D("p", {
|
|
115
|
+
className: "text-sm text-text-secondary",
|
|
116
|
+
children: P("botlit.botsList.summary.total", "Total bots")
|
|
117
|
+
}), /* @__PURE__ */ D("p", {
|
|
118
|
+
className: "mt-1 text-2xl font-semibold tabular-nums text-text-primary",
|
|
119
|
+
children: x($.total - $.archived)
|
|
120
|
+
})]
|
|
121
|
+
}), /* @__PURE__ */ O(T, {
|
|
122
|
+
treatment: "metric",
|
|
123
|
+
className: "p-4",
|
|
124
|
+
children: [/* @__PURE__ */ D("p", {
|
|
125
|
+
className: "text-sm text-text-secondary",
|
|
126
|
+
children: P("botlit.botsList.summary.active", "Active")
|
|
127
|
+
}), /* @__PURE__ */ D("p", {
|
|
128
|
+
className: "mt-1 text-2xl font-semibold tabular-nums text-text-primary",
|
|
129
|
+
children: x($.active)
|
|
130
|
+
})]
|
|
131
|
+
})]
|
|
102
132
|
}) : null,
|
|
103
|
-
/* @__PURE__ */
|
|
133
|
+
/* @__PURE__ */ O("div", {
|
|
104
134
|
className: "flex items-center justify-between gap-4",
|
|
105
|
-
children: [/* @__PURE__ */
|
|
135
|
+
children: [/* @__PURE__ */ O("div", {
|
|
106
136
|
className: "relative flex-1 max-w-md",
|
|
107
|
-
children: [/* @__PURE__ */
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
137
|
+
children: [/* @__PURE__ */ D(ae, {
|
|
138
|
+
className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-text-secondary",
|
|
139
|
+
"aria-hidden": "true"
|
|
140
|
+
}), /* @__PURE__ */ D(c, {
|
|
141
|
+
id: "bots-search",
|
|
142
|
+
type: "search",
|
|
143
|
+
"aria-label": P("botlit.botsList.search.label", "Search bots"),
|
|
144
|
+
placeholder: P("botlit.botsList.searchPlaceholder", "Search bots..."),
|
|
145
|
+
value: B.search || "",
|
|
146
|
+
onChange: ue,
|
|
111
147
|
className: "pl-9"
|
|
112
148
|
})]
|
|
113
|
-
}), /* @__PURE__ */
|
|
149
|
+
}), /* @__PURE__ */ O("div", {
|
|
114
150
|
className: "flex items-center gap-2",
|
|
115
|
-
|
|
116
|
-
|
|
151
|
+
role: "group",
|
|
152
|
+
"aria-label": P("botlit.botsList.view.label", "Layout"),
|
|
153
|
+
children: [/* @__PURE__ */ D(s, {
|
|
154
|
+
variant: R === "grid" ? "secondary" : "ghost",
|
|
117
155
|
size: "icon",
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
156
|
+
"aria-label": P("botlit.botsList.view.grid", "Grid view"),
|
|
157
|
+
title: P("botlit.botsList.view.grid", "Grid view"),
|
|
158
|
+
"aria-pressed": R === "grid",
|
|
159
|
+
onClick: () => z("grid"),
|
|
160
|
+
children: /* @__PURE__ */ D(ne, {
|
|
161
|
+
size: 18,
|
|
162
|
+
"aria-hidden": "true"
|
|
163
|
+
})
|
|
164
|
+
}), /* @__PURE__ */ D(s, {
|
|
165
|
+
variant: R === "list" ? "secondary" : "ghost",
|
|
122
166
|
size: "icon",
|
|
123
|
-
|
|
124
|
-
|
|
167
|
+
"aria-label": P("botlit.botsList.view.list", "List view"),
|
|
168
|
+
title: P("botlit.botsList.view.list", "List view"),
|
|
169
|
+
"aria-pressed": R === "list",
|
|
170
|
+
onClick: () => z("list"),
|
|
171
|
+
children: /* @__PURE__ */ D(re, {
|
|
172
|
+
size: 18,
|
|
173
|
+
"aria-hidden": "true"
|
|
174
|
+
})
|
|
125
175
|
})]
|
|
126
176
|
})]
|
|
127
177
|
}),
|
|
128
|
-
|
|
129
|
-
|
|
178
|
+
U ? /* @__PURE__ */ D("div", {
|
|
179
|
+
role: "status",
|
|
180
|
+
"aria-busy": "true",
|
|
181
|
+
"aria-label": P("botlit.common.loading", "Loading"),
|
|
182
|
+
className: w("gap-4", R === "grid" ? "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3" : "flex flex-col"),
|
|
130
183
|
children: [
|
|
131
184
|
1,
|
|
132
185
|
2,
|
|
@@ -134,192 +187,162 @@ var R = () => {
|
|
|
134
187
|
4,
|
|
135
188
|
5,
|
|
136
189
|
6
|
|
137
|
-
].map((e) => /* @__PURE__ */
|
|
138
|
-
}) :
|
|
190
|
+
].map((e) => /* @__PURE__ */ D("div", { className: "h-48 bg-bg-sunken motion-safe:animate-vc-shimmer rounded-lg" }, e))
|
|
191
|
+
}) : W ? /* @__PURE__ */ D(m, {
|
|
192
|
+
resource: P("botlit.botsList.resource", "bots"),
|
|
193
|
+
error: W,
|
|
194
|
+
onRetry: () => void G()
|
|
195
|
+
}) : H.length > 0 ? R === "grid" ? /* @__PURE__ */ D("ul", {
|
|
139
196
|
className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",
|
|
140
|
-
children:
|
|
141
|
-
className: "group hover:shadow-md transition-shadow
|
|
142
|
-
|
|
143
|
-
children: /* @__PURE__ */ E(s, {
|
|
197
|
+
children: H.map((e) => /* @__PURE__ */ D("li", { children: /* @__PURE__ */ D(a, {
|
|
198
|
+
className: "group relative h-full hover:shadow-md transition-shadow",
|
|
199
|
+
children: /* @__PURE__ */ O(o, {
|
|
144
200
|
className: "pt-6",
|
|
145
201
|
children: [
|
|
146
|
-
/* @__PURE__ */
|
|
202
|
+
/* @__PURE__ */ O("div", {
|
|
147
203
|
className: "flex items-start justify-between",
|
|
148
|
-
children: [/* @__PURE__ */
|
|
204
|
+
children: [/* @__PURE__ */ O("div", {
|
|
149
205
|
className: "flex items-center gap-3",
|
|
150
|
-
children: [/* @__PURE__ */
|
|
206
|
+
children: [/* @__PURE__ */ D("span", {
|
|
151
207
|
className: "text-4xl",
|
|
208
|
+
"aria-hidden": "true",
|
|
152
209
|
children: e.icon || "🤖"
|
|
153
|
-
}), /* @__PURE__ */
|
|
210
|
+
}), /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("h3", {
|
|
154
211
|
className: "font-semibold text-text-primary",
|
|
155
|
-
children:
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
}), Z === e.id && /* @__PURE__ */ E("div", {
|
|
168
|
-
className: "absolute right-0 top-full mt-1 w-48 bg-popover border border-border-subtle rounded-md shadow-lg z-10",
|
|
169
|
-
children: [
|
|
170
|
-
/* @__PURE__ */ T(d, {
|
|
171
|
-
permission: u.APP_UPDATE,
|
|
172
|
-
children: /* @__PURE__ */ E("button", {
|
|
173
|
-
className: "w-full px-4 py-2 text-left text-sm hover:bg-accent flex items-center gap-2",
|
|
174
|
-
onClick: (t) => {
|
|
175
|
-
t.stopPropagation(), z(`bots/${e.id}/edit`), Q(null);
|
|
176
|
-
},
|
|
177
|
-
children: [/* @__PURE__ */ T(k, { size: 16 }), R("botlit.botsList.menu.editBot", "Edit Bot")]
|
|
178
|
-
})
|
|
179
|
-
}),
|
|
180
|
-
/* @__PURE__ */ E("button", {
|
|
181
|
-
className: "w-full px-4 py-2 text-left text-sm hover:bg-accent flex items-center gap-2",
|
|
182
|
-
onClick: (t) => {
|
|
183
|
-
t.stopPropagation(), z(`bots/${e.id}?tab=workflow`), Q(null);
|
|
184
|
-
},
|
|
185
|
-
children: [/* @__PURE__ */ T(I, { size: 16 }), R("botlit.botsList.menu.design", "Design workflow")]
|
|
186
|
-
}),
|
|
187
|
-
/* @__PURE__ */ E("button", {
|
|
188
|
-
className: "w-full px-4 py-2 text-left text-sm hover:bg-accent flex items-center gap-2",
|
|
189
|
-
onClick: (t) => {
|
|
190
|
-
t.stopPropagation(), z(`bots/${e.id}/agents`), Q(null);
|
|
191
|
-
},
|
|
192
|
-
children: [/* @__PURE__ */ T(O, { size: 16 }), R("botlit.botsList.menu.viewAgents", "View Agents")]
|
|
193
|
-
}),
|
|
194
|
-
/* @__PURE__ */ T(d, {
|
|
195
|
-
permission: u.APP_DELETE,
|
|
196
|
-
children: /* @__PURE__ */ E("button", {
|
|
197
|
-
className: "w-full px-4 py-2 text-left text-sm hover:bg-accent text-status-error-text flex items-center gap-2",
|
|
198
|
-
onClick: (t) => {
|
|
199
|
-
t.stopPropagation(), ee(e);
|
|
200
|
-
},
|
|
201
|
-
children: [/* @__PURE__ */ T(F, { size: 16 }), R("botlit.common.delete", "Delete")]
|
|
202
|
-
})
|
|
203
|
-
})
|
|
204
|
-
]
|
|
205
|
-
})]
|
|
212
|
+
children: /* @__PURE__ */ D(k, {
|
|
213
|
+
to: L(`bots/${e.id}`),
|
|
214
|
+
className: N,
|
|
215
|
+
children: e.name
|
|
216
|
+
})
|
|
217
|
+
}), /* @__PURE__ */ D(f, { status: e.status })] })]
|
|
218
|
+
}), /* @__PURE__ */ D("div", {
|
|
219
|
+
className: "relative z-10",
|
|
220
|
+
children: /* @__PURE__ */ D(h, {
|
|
221
|
+
label: P("botlit.botsList.menu.actionsFor", "Actions for {{name}}", { name: e.name }),
|
|
222
|
+
items: Y(e)
|
|
223
|
+
})
|
|
206
224
|
})]
|
|
207
225
|
}),
|
|
208
|
-
/* @__PURE__ */
|
|
226
|
+
/* @__PURE__ */ D("p", {
|
|
209
227
|
className: "mt-3 text-sm text-text-secondary line-clamp-2",
|
|
210
228
|
children: e.description
|
|
211
229
|
}),
|
|
212
|
-
/* @__PURE__ */
|
|
230
|
+
/* @__PURE__ */ D("div", {
|
|
213
231
|
className: "mt-4 flex items-center gap-4 text-xs text-text-secondary",
|
|
214
|
-
children: /* @__PURE__ */
|
|
232
|
+
children: /* @__PURE__ */ O("span", {
|
|
215
233
|
className: "flex items-center gap-1",
|
|
216
|
-
children: [
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
R("botlit.common.executions", "executions")
|
|
221
|
-
]
|
|
234
|
+
children: [/* @__PURE__ */ D(A, {
|
|
235
|
+
size: 14,
|
|
236
|
+
"aria-hidden": "true"
|
|
237
|
+
}), X(e.executionCount)]
|
|
222
238
|
})
|
|
223
239
|
}),
|
|
224
|
-
/* @__PURE__ */
|
|
240
|
+
/* @__PURE__ */ O("div", {
|
|
225
241
|
className: "mt-3 pt-3 border-t border-border-subtle flex items-center justify-between gap-2",
|
|
226
|
-
children: [/* @__PURE__ */
|
|
242
|
+
children: [/* @__PURE__ */ O("span", {
|
|
227
243
|
className: "text-xs text-text-secondary",
|
|
228
244
|
children: [
|
|
229
|
-
|
|
245
|
+
P("botlit.botsList.createdLabel", "Created"),
|
|
230
246
|
" ",
|
|
231
|
-
|
|
247
|
+
S(e.createdAt)
|
|
232
248
|
]
|
|
233
|
-
}), /* @__PURE__ */
|
|
249
|
+
}), /* @__PURE__ */ D(s, {
|
|
234
250
|
variant: "ghost",
|
|
235
251
|
size: "sm",
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
252
|
+
className: "relative z-10",
|
|
253
|
+
leftIcon: /* @__PURE__ */ D(j, {
|
|
254
|
+
size: 14,
|
|
255
|
+
"aria-hidden": "true"
|
|
256
|
+
}),
|
|
257
|
+
"aria-label": P("botlit.botsList.actions.designFor", "Design {{name}}", { name: e.name }),
|
|
258
|
+
onClick: () => I(`bots/${e.id}?tab=workflow`),
|
|
259
|
+
children: P("botlit.botsList.actions.design", "Design")
|
|
241
260
|
})]
|
|
242
261
|
})
|
|
243
262
|
]
|
|
244
263
|
})
|
|
245
|
-
}, e.id))
|
|
246
|
-
}) : /* @__PURE__ */
|
|
264
|
+
}) }, e.id))
|
|
265
|
+
}) : /* @__PURE__ */ D("ul", {
|
|
247
266
|
className: "space-y-2",
|
|
248
|
-
children:
|
|
249
|
-
className: "hover:shadow-md transition-shadow
|
|
250
|
-
|
|
251
|
-
children: /* @__PURE__ */ T(s, {
|
|
267
|
+
children: H.map((e) => /* @__PURE__ */ D("li", { children: /* @__PURE__ */ D(a, {
|
|
268
|
+
className: "group relative hover:shadow-md transition-shadow",
|
|
269
|
+
children: /* @__PURE__ */ D(o, {
|
|
252
270
|
className: "py-4",
|
|
253
|
-
children: /* @__PURE__ */
|
|
254
|
-
className: "flex items-center justify-between",
|
|
255
|
-
children: [/* @__PURE__ */
|
|
271
|
+
children: /* @__PURE__ */ O("div", {
|
|
272
|
+
className: "flex items-center justify-between gap-4",
|
|
273
|
+
children: [/* @__PURE__ */ O("div", {
|
|
256
274
|
className: "flex items-center gap-4",
|
|
257
|
-
children: [/* @__PURE__ */
|
|
275
|
+
children: [/* @__PURE__ */ D("span", {
|
|
258
276
|
className: "text-3xl",
|
|
277
|
+
"aria-hidden": "true",
|
|
259
278
|
children: e.icon || "🤖"
|
|
260
|
-
}), /* @__PURE__ */
|
|
279
|
+
}), /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ O("div", {
|
|
261
280
|
className: "flex items-center gap-2",
|
|
262
|
-
children: [/* @__PURE__ */
|
|
281
|
+
children: [/* @__PURE__ */ D("h3", {
|
|
263
282
|
className: "font-semibold text-text-primary",
|
|
264
|
-
children:
|
|
265
|
-
|
|
266
|
-
|
|
283
|
+
children: /* @__PURE__ */ D(k, {
|
|
284
|
+
to: L(`bots/${e.id}`),
|
|
285
|
+
className: N,
|
|
286
|
+
children: e.name
|
|
287
|
+
})
|
|
288
|
+
}), /* @__PURE__ */ D(f, { status: e.status })]
|
|
289
|
+
}), /* @__PURE__ */ D("p", {
|
|
267
290
|
className: "text-sm text-text-secondary line-clamp-1",
|
|
268
291
|
children: e.description
|
|
269
292
|
})] })]
|
|
270
|
-
}), /* @__PURE__ */
|
|
271
|
-
className: "flex items-center gap-
|
|
293
|
+
}), /* @__PURE__ */ O("div", {
|
|
294
|
+
className: "flex items-center gap-4 text-sm text-text-secondary",
|
|
272
295
|
children: [
|
|
273
|
-
/* @__PURE__ */
|
|
274
|
-
|
|
275
|
-
" ",
|
|
276
|
-
R("botlit.common.executions", "executions")
|
|
277
|
-
] }),
|
|
278
|
-
/* @__PURE__ */ T(c, {
|
|
296
|
+
/* @__PURE__ */ D("span", { children: X(e.executionCount) }),
|
|
297
|
+
/* @__PURE__ */ D(s, {
|
|
279
298
|
variant: "ghost",
|
|
280
299
|
size: "sm",
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
300
|
+
className: "relative z-10",
|
|
301
|
+
leftIcon: /* @__PURE__ */ D(j, {
|
|
302
|
+
size: 14,
|
|
303
|
+
"aria-hidden": "true"
|
|
304
|
+
}),
|
|
305
|
+
"aria-label": P("botlit.botsList.actions.designFor", "Design {{name}}", { name: e.name }),
|
|
306
|
+
onClick: () => I(`bots/${e.id}?tab=workflow`),
|
|
307
|
+
children: P("botlit.botsList.actions.design", "Design")
|
|
286
308
|
}),
|
|
287
|
-
/* @__PURE__ */
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
children: R("botlit.common.view", "View")
|
|
309
|
+
/* @__PURE__ */ D("div", {
|
|
310
|
+
className: "relative z-10",
|
|
311
|
+
children: /* @__PURE__ */ D(h, {
|
|
312
|
+
label: P("botlit.botsList.menu.actionsFor", "Actions for {{name}}", { name: e.name }),
|
|
313
|
+
items: Y(e)
|
|
293
314
|
})
|
|
294
315
|
})
|
|
295
316
|
]
|
|
296
317
|
})]
|
|
297
318
|
})
|
|
298
319
|
})
|
|
299
|
-
}, e.id))
|
|
300
|
-
}) : /* @__PURE__ */
|
|
320
|
+
}) }, e.id))
|
|
321
|
+
}) : J === "" ? /* @__PURE__ */ D(p, {
|
|
301
322
|
illustration: "empty-agents",
|
|
302
|
-
title:
|
|
303
|
-
description:
|
|
304
|
-
action:
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
323
|
+
title: P("botlit.botsList.empty.title", "No bots yet"),
|
|
324
|
+
description: P("botlit.botsList.empty.description", "A bot puts your agents in front of real users. Create an agent first, then create a bot to connect it to channels."),
|
|
325
|
+
action: Q
|
|
326
|
+
}) : /* @__PURE__ */ D(p, {
|
|
327
|
+
illustration: "empty-agents",
|
|
328
|
+
title: P("botlit.botsList.noResults.title", "No bots match \"{{query}}\"", { query: J }),
|
|
329
|
+
description: P("botlit.botsList.noResults.description", "Check the spelling or try a different search term."),
|
|
330
|
+
action: /* @__PURE__ */ D(s, {
|
|
331
|
+
variant: "outline",
|
|
332
|
+
onClick: () => V({ search: "" }),
|
|
333
|
+
children: P("botlit.botsList.noResults.clear", "Clear search")
|
|
311
334
|
})
|
|
312
335
|
}),
|
|
313
|
-
/* @__PURE__ */
|
|
314
|
-
hasMore:
|
|
315
|
-
loadingMore:
|
|
316
|
-
onLoadMore: () => void
|
|
317
|
-
loadedCount:
|
|
336
|
+
/* @__PURE__ */ D(g, {
|
|
337
|
+
hasMore: K,
|
|
338
|
+
loadingMore: se,
|
|
339
|
+
onLoadMore: () => void ce(),
|
|
340
|
+
loadedCount: H.length
|
|
318
341
|
})
|
|
319
342
|
]
|
|
320
343
|
})
|
|
321
344
|
});
|
|
322
345
|
};
|
|
323
|
-
export {
|
|
346
|
+
export { P as BotsListPage };
|
|
324
347
|
|
|
325
348
|
//# sourceMappingURL=BotsListPage.js.map
|