@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.
@@ -1,132 +1,185 @@
1
1
  import { useTr as e } from "../../shared/hooks/useTr.js";
2
- import { isNative as t, nativeConfirm as n, nativeImpact as r, nativeNotify as i } from "../../utils/nativeBridge.js";
3
- import { PageLayout as a } from "../components/PageLayout.js";
4
- import { Card as o, CardContent as s } from "../components/Card.js";
5
- import { Button as c } from "../components/Button.js";
6
- import { Input as l } from "../components/Input.js";
7
- import { BOTMANOR_PERMISSIONS as u } from "../permissions/botmanorPermissions.js";
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 { LoadMore as m } from "../components/LoadMore.js";
12
- import { useBots as h, useDeleteBot as g } from "../hooks/useBots.js";
13
- import { useBotlitStore as _ } from "../store/botlitStore.js";
14
- import { useBotlit as v } from "../providers/BotlitProvider.js";
15
- import { formatNumber as y, formatRelativeTime as b } from "../utils/formatters.js";
16
- import { cn as x } from "../utils/cn.js";
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 { useState as S } from "react";
19
- import { GlassCard as C, PagePurpose as w } from "@burdenoff/fe-libs/ui";
20
- import { jsx as T, jsxs as E } from "react/jsx-runtime";
21
- import { Link as D } from "react-router";
22
- import { Bot as O, Edit as k, Grid3X3 as A, List as j, MoreVertical as M, Plus as N, Search as P, Trash2 as F, Workflow as I } from "lucide-react";
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 R = () => {
26
- let R = e(), { navigateTo: z, getPath: B } = v(), { viewMode: V, setViewMode: H, botFilter: U, updateBotFilter: W } = _(), { data: G, loading: K, hasMore: q, loadingMore: J, loadMore: Y } = h(U), [X] = g(), [Z, Q] = S(null), $ = (e) => {
27
- W({ search: e.target.value });
28
- }, ee = async (e) => {
29
- let a = `${R("botlit.botsList.delete.confirmPrefix", "Are you sure you want to delete")} "${e.name}"?`, o = await n({
30
- title: "Delete bot?",
31
- message: a,
32
- okButtonTitle: "Delete",
33
- cancelButtonTitle: "Cancel"
34
- });
35
- if (o === null ? confirm(a) : o) {
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 X(e.id), L.success(`${R("botlit.botsList.delete.successPrefix", "Bot")} "${e.name}" ${R("botlit.botsList.delete.successSuffix", "deleted successfully")}`), t() && i("success");
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 : R("botlit.botsList.delete.error", "Failed to delete bot");
41
- L.error(n), t() && i("error");
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
- Q(null);
45
- };
46
- return /* @__PURE__ */ T(a, {
47
- title: R("botlit.botsList.title", "Bots"),
48
- description: R("botlit.botsList.description", "Manage your AI-powered bots"),
49
- actions: /* @__PURE__ */ T(d, {
50
- permission: u.APP_CREATE,
51
- children: /* @__PURE__ */ T(c, {
52
- leftIcon: /* @__PURE__ */ T(N, { size: 16 }),
53
- onClick: () => z("bots/new"),
54
- children: R("botlit.botsList.actions.createBot", "Create Bot")
55
- })
56
- }),
57
- children: /* @__PURE__ */ E("div", {
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__ */ T(w, {
61
- icon: /* @__PURE__ */ T(O, { size: 18 }),
62
- children: R("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.")
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
- G && G.length > 0 ? /* @__PURE__ */ E("div", {
65
- className: "grid grid-cols-2 gap-4 sm:grid-cols-3",
66
- children: [
67
- /* @__PURE__ */ E(C, {
68
- treatment: "glass",
69
- glow: !0,
70
- className: "p-4",
71
- children: [/* @__PURE__ */ T("p", {
72
- className: "text-sm text-text-secondary",
73
- children: R("botlit.botsList.summary.total", "Total bots")
74
- }), /* @__PURE__ */ T("p", {
75
- className: "mt-1 text-2xl font-semibold tabular-nums text-text-primary",
76
- children: G.length
77
- })]
78
- }),
79
- /* @__PURE__ */ E(C, {
80
- treatment: "metric",
81
- className: "p-4",
82
- children: [/* @__PURE__ */ T("p", {
83
- className: "text-sm text-text-secondary",
84
- children: R("botlit.botsList.summary.active", "Active")
85
- }), /* @__PURE__ */ T("p", {
86
- className: "mt-1 text-2xl font-semibold tabular-nums text-text-primary",
87
- children: G.filter((e) => e.status === "ACTIVE").length
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__ */ E("div", {
133
+ /* @__PURE__ */ O("div", {
104
134
  className: "flex items-center justify-between gap-4",
105
- children: [/* @__PURE__ */ E("div", {
135
+ children: [/* @__PURE__ */ O("div", {
106
136
  className: "relative flex-1 max-w-md",
107
- children: [/* @__PURE__ */ T(P, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-text-secondary" }), /* @__PURE__ */ T(l, {
108
- placeholder: R("botlit.botsList.searchPlaceholder", "Search bots..."),
109
- value: U.search || "",
110
- onChange: $,
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__ */ E("div", {
149
+ }), /* @__PURE__ */ O("div", {
114
150
  className: "flex items-center gap-2",
115
- children: [/* @__PURE__ */ T(c, {
116
- variant: V === "grid" ? "secondary" : "ghost",
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
- onClick: () => H("grid"),
119
- children: /* @__PURE__ */ T(A, { size: 18 })
120
- }), /* @__PURE__ */ T(c, {
121
- variant: V === "list" ? "secondary" : "ghost",
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
- onClick: () => H("list"),
124
- children: /* @__PURE__ */ T(j, { size: 18 })
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
- K ? /* @__PURE__ */ T("div", {
129
- className: x("gap-4", V === "grid" ? "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3" : "flex flex-col"),
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__ */ T("div", { className: "h-48 bg-bg-sunken motion-safe:animate-vc-shimmer rounded-lg" }, e))
138
- }) : G.length > 0 ? V === "grid" ? /* @__PURE__ */ T("div", {
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: G.map((e) => /* @__PURE__ */ T(o, {
141
- className: "group hover:shadow-md transition-shadow cursor-pointer relative",
142
- onClick: () => z(`bots/${e.id}`),
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__ */ E("div", {
202
+ /* @__PURE__ */ O("div", {
147
203
  className: "flex items-start justify-between",
148
- children: [/* @__PURE__ */ E("div", {
204
+ children: [/* @__PURE__ */ O("div", {
149
205
  className: "flex items-center gap-3",
150
- children: [/* @__PURE__ */ T("span", {
206
+ children: [/* @__PURE__ */ D("span", {
151
207
  className: "text-4xl",
208
+ "aria-hidden": "true",
152
209
  children: e.icon || "🤖"
153
- }), /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("h3", {
210
+ }), /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("h3", {
154
211
  className: "font-semibold text-text-primary",
155
- children: e.name
156
- }), /* @__PURE__ */ T(f, { status: e.status })] })]
157
- }), /* @__PURE__ */ E("div", {
158
- className: "relative",
159
- children: [/* @__PURE__ */ T(c, {
160
- variant: "ghost",
161
- size: "icon",
162
- className: "opacity-0 group-hover:opacity-100 transition-opacity",
163
- onClick: (t) => {
164
- t.stopPropagation(), Q(Z === e.id ? null : e.id);
165
- },
166
- children: /* @__PURE__ */ T(M, { size: 16 })
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__ */ T("p", {
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__ */ T("div", {
230
+ /* @__PURE__ */ D("div", {
213
231
  className: "mt-4 flex items-center gap-4 text-xs text-text-secondary",
214
- children: /* @__PURE__ */ E("span", {
232
+ children: /* @__PURE__ */ O("span", {
215
233
  className: "flex items-center gap-1",
216
- children: [
217
- /* @__PURE__ */ T(O, { size: 14 }),
218
- e.executionCount || 0,
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__ */ E("div", {
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__ */ E("span", {
242
+ children: [/* @__PURE__ */ O("span", {
227
243
  className: "text-xs text-text-secondary",
228
244
  children: [
229
- R("botlit.botsList.createdLabel", "Created"),
245
+ P("botlit.botsList.createdLabel", "Created"),
230
246
  " ",
231
- b(e.createdAt)
247
+ S(e.createdAt)
232
248
  ]
233
- }), /* @__PURE__ */ T(c, {
249
+ }), /* @__PURE__ */ D(s, {
234
250
  variant: "ghost",
235
251
  size: "sm",
236
- leftIcon: /* @__PURE__ */ T(I, { size: 14 }),
237
- onClick: (t) => {
238
- t.stopPropagation(), z(`bots/${e.id}?tab=workflow`);
239
- },
240
- children: R("botlit.botsList.actions.design", "Design")
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__ */ T("div", {
264
+ }) }, e.id))
265
+ }) : /* @__PURE__ */ D("ul", {
247
266
  className: "space-y-2",
248
- children: G.map((e) => /* @__PURE__ */ T(o, {
249
- className: "hover:shadow-md transition-shadow cursor-pointer",
250
- onClick: () => z(`bots/${e.id}`),
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__ */ E("div", {
254
- className: "flex items-center justify-between",
255
- children: [/* @__PURE__ */ E("div", {
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__ */ T("span", {
275
+ children: [/* @__PURE__ */ D("span", {
258
276
  className: "text-3xl",
277
+ "aria-hidden": "true",
259
278
  children: e.icon || "🤖"
260
- }), /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ E("div", {
279
+ }), /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ O("div", {
261
280
  className: "flex items-center gap-2",
262
- children: [/* @__PURE__ */ T("h3", {
281
+ children: [/* @__PURE__ */ D("h3", {
263
282
  className: "font-semibold text-text-primary",
264
- children: e.name
265
- }), /* @__PURE__ */ T(f, { status: e.status })]
266
- }), /* @__PURE__ */ T("p", {
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__ */ E("div", {
271
- className: "flex items-center gap-6 text-sm text-text-secondary",
293
+ }), /* @__PURE__ */ O("div", {
294
+ className: "flex items-center gap-4 text-sm text-text-secondary",
272
295
  children: [
273
- /* @__PURE__ */ E("span", { children: [
274
- y(e.executionCount),
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
- leftIcon: /* @__PURE__ */ T(I, { size: 14 }),
282
- onClick: (t) => {
283
- t.stopPropagation(), z(`bots/${e.id}?tab=workflow`);
284
- },
285
- children: R("botlit.botsList.actions.design", "Design")
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__ */ T(c, {
288
- variant: "ghost",
289
- size: "sm",
290
- children: /* @__PURE__ */ T(D, {
291
- to: B(`bots/${e.id}`),
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__ */ T(p, {
320
+ }) }, e.id))
321
+ }) : J === "" ? /* @__PURE__ */ D(p, {
301
322
  illustration: "empty-agents",
302
- title: R("botlit.botsList.empty.title", "No bots yet"),
303
- description: R("botlit.botsList.empty.description", "Create your first AI-powered bot to get started with building agents and automations."),
304
- action: /* @__PURE__ */ T(d, {
305
- permission: u.APP_CREATE,
306
- children: /* @__PURE__ */ T(c, {
307
- leftIcon: /* @__PURE__ */ T(N, { size: 16 }),
308
- onClick: () => z("bots/new"),
309
- children: R("botlit.botsList.actions.createBot", "Create Bot")
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__ */ T(m, {
314
- hasMore: q,
315
- loadingMore: J,
316
- onLoadMore: () => void Y(),
317
- loadedCount: G.length
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 { R as BotsListPage };
346
+ export { P as BotsListPage };
324
347
 
325
348
  //# sourceMappingURL=BotsListPage.js.map