@burdenoff/microfe-botmanor 2026.1120.26 → 2026.1120.27
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/BotmanorRootInner.js +43 -41
- package/dist/botlit/BotmanorRootInner.js.map +1 -1
- package/dist/botlit/components/ChannelRoutesPanel.js +8 -8
- package/dist/botlit/components/ChannelRoutesPanel.js.map +1 -1
- package/dist/botlit/components/CreateChannelRouteDialog.js +7 -7
- package/dist/botlit/components/GettingStartedChecklist.d.ts +13 -0
- package/dist/botlit/components/GettingStartedChecklist.js +126 -0
- package/dist/botlit/components/GettingStartedChecklist.js.map +1 -0
- package/dist/botlit/components/PageLayout.d.ts +7 -0
- package/dist/botlit/components/PageLayout.js +4 -1
- package/dist/botlit/components/PageLayout.js.map +1 -1
- package/dist/botlit/hooks/useStorePublishing.d.ts +1 -1
- package/dist/botlit/index.d.ts +1 -0
- package/dist/botlit/index.js +2 -1
- package/dist/botlit/pages/AgentsListPage.js +1 -0
- package/dist/botlit/pages/AgentsListPage.js.map +1 -1
- package/dist/botlit/pages/BotChannelsTab.js +58 -58
- package/dist/botlit/pages/BotsListPage.js +1 -0
- package/dist/botlit/pages/BotsListPage.js.map +1 -1
- package/dist/botlit/pages/BucketDetailPage.js +16 -16
- package/dist/botlit/pages/BucketDetailPage.js.map +1 -1
- package/dist/botlit/pages/ChannelDetailPage.js +12 -12
- package/dist/botlit/pages/ChannelsPage.js +6 -6
- package/dist/botlit/pages/ChannelsPage.js.map +1 -1
- package/dist/botlit/pages/ChatPage.js +1 -0
- package/dist/botlit/pages/ChatPage.js.map +1 -1
- package/dist/botlit/pages/DashboardPage.js +33 -26
- package/dist/botlit/pages/DashboardPage.js.map +1 -1
- package/dist/botlit/pages/ExecutionsPage.js +9 -8
- package/dist/botlit/pages/ExecutionsPage.js.map +1 -1
- package/dist/botlit/pages/KnowledgeBasesPage.js +1 -0
- package/dist/botlit/pages/KnowledgeBasesPage.js.map +1 -1
- package/dist/botlit/tours/tourRoutes.d.ts +25 -0
- package/dist/botlit/tours/tourRoutes.js +108 -0
- package/dist/botlit/tours/tourRoutes.js.map +1 -0
- package/dist/botlit/utils/gettingStarted.d.ts +16 -0
- package/dist/botlit/utils/gettingStarted.js +7 -0
- package/dist/botlit/utils/gettingStarted.js.map +1 -0
- package/dist/generated/wspace-operations.d.ts +33 -0
- package/dist/generated/wspace-operations.js +93 -87
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/index.js +2 -1
- package/package.json +1 -1
|
@@ -5,10 +5,10 @@ import { Button as s } from "../components/Button.js";
|
|
|
5
5
|
import { Badge as c } from "../components/Badge.js";
|
|
6
6
|
import { EmptyState as l } from "../components/EmptyState.js";
|
|
7
7
|
import { Input as u } from "../components/Input.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
8
|
+
import { useAllChannelConnectors as d, useBotChannelRoutes as f, useChannelConnector as p, useCreateChannelConnector as m, useCreateChannelRoute as h, useDeleteChannelRoute as g, useFindChannelConnector as _, useUpdateChannelConnector as v } from "../hooks/useChannels.js";
|
|
9
|
+
import { ChannelSelectorSheet as y } from "../components/ChannelSelectorSheet.js";
|
|
10
|
+
import { InboundWebhookCard as b } from "../components/ChannelSetupPanels.js";
|
|
11
|
+
import { useBotlit as x } from "../providers/BotlitProvider.js";
|
|
12
12
|
import { PLATFORM_CREDENTIALS as S, connectorPlatform as C, useInboundChannel as w } from "../hooks/useChannelSetup.js";
|
|
13
13
|
import { isNative as T, nativeCopyText as E, nativeNotify as D, nativeOpenUrl as O, nativeToast as k } from "../../utils/nativeBridge.js";
|
|
14
14
|
import "../hooks/index.js";
|
|
@@ -132,7 +132,7 @@ function $(e) {
|
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
134
|
var pe = ({ routeId: e, connectorId: t, channelId: n, platform: r, onRemoved: o, onReconnect: l }) => {
|
|
135
|
-
let { data: d, loading: f } =
|
|
135
|
+
let { data: d, loading: f } = p(t), m = d?.credentialsRefId ?? n, { data: h, loading: _, refetch: v } = M(m), { toggle: y, loading: b } = P(), { revoke: x, loading: S } = N(), { link: C } = j(), [w] = g(), [O, A] = R(""), [F, I] = R(!1), L = $(r);
|
|
136
136
|
return f ? /* @__PURE__ */ B("div", { className: "h-32 bg-bg-sunken motion-safe:animate-vc-shimmer rounded-lg" }) : /* @__PURE__ */ V("div", {
|
|
137
137
|
className: "rounded-lg border border-border-subtle bg-bg-sunken/30 p-4 space-y-3",
|
|
138
138
|
children: [/* @__PURE__ */ V("div", {
|
|
@@ -157,7 +157,7 @@ var pe = ({ routeId: e, connectorId: t, channelId: n, platform: r, onRemoved: o,
|
|
|
157
157
|
children: /* @__PURE__ */ B(X, { size: 13 })
|
|
158
158
|
})
|
|
159
159
|
})]
|
|
160
|
-
}),
|
|
160
|
+
}), _ ? /* @__PURE__ */ V("div", {
|
|
161
161
|
className: "flex items-center gap-2 py-2 text-text-secondary",
|
|
162
162
|
children: [/* @__PURE__ */ B(W, {
|
|
163
163
|
size: 14,
|
|
@@ -170,7 +170,7 @@ var pe = ({ routeId: e, connectorId: t, channelId: n, platform: r, onRemoved: o,
|
|
|
170
170
|
" connection…"
|
|
171
171
|
]
|
|
172
172
|
})]
|
|
173
|
-
}) :
|
|
173
|
+
}) : h?.dmAllowed ? /* @__PURE__ */ V("div", {
|
|
174
174
|
className: "space-y-2",
|
|
175
175
|
children: [
|
|
176
176
|
/* @__PURE__ */ V("div", {
|
|
@@ -185,36 +185,36 @@ var pe = ({ routeId: e, connectorId: t, channelId: n, platform: r, onRemoved: o,
|
|
|
185
185
|
children: [
|
|
186
186
|
/* @__PURE__ */ B("p", {
|
|
187
187
|
className: "font-medium text-sm",
|
|
188
|
-
children:
|
|
188
|
+
children: h.externalDisplayName || h.externalUsername || h.externalUserId
|
|
189
189
|
}),
|
|
190
|
-
|
|
190
|
+
h.externalUsername && /* @__PURE__ */ V("p", {
|
|
191
191
|
className: "text-xs text-text-secondary",
|
|
192
|
-
children: ["@",
|
|
192
|
+
children: ["@", h.externalUsername]
|
|
193
193
|
}),
|
|
194
|
-
|
|
194
|
+
h.connectedAt && /* @__PURE__ */ V("p", {
|
|
195
195
|
className: "text-xs text-text-secondary",
|
|
196
|
-
children: ["Connected ", new Date(
|
|
196
|
+
children: ["Connected ", new Date(h.connectedAt).toLocaleDateString()]
|
|
197
197
|
})
|
|
198
198
|
]
|
|
199
199
|
}),
|
|
200
|
-
|
|
200
|
+
h.isTokenExpired && /* @__PURE__ */ B(c, {
|
|
201
201
|
variant: "outline",
|
|
202
202
|
className: "text-xs text-status-warning-text border-status-warning-border",
|
|
203
203
|
children: "Token expired"
|
|
204
204
|
})
|
|
205
205
|
]
|
|
206
206
|
}),
|
|
207
|
-
|
|
207
|
+
h.integrationConnectionId && /* @__PURE__ */ V("div", {
|
|
208
208
|
className: "space-y-1.5",
|
|
209
209
|
children: [/* @__PURE__ */ B("label", {
|
|
210
210
|
className: "text-xs font-medium text-text-secondary",
|
|
211
211
|
children: "Integration Connection ID"
|
|
212
212
|
}), /* @__PURE__ */ B(u, {
|
|
213
|
-
value:
|
|
213
|
+
value: h.integrationConnectionId,
|
|
214
214
|
readOnly: !0,
|
|
215
215
|
className: "text-xs font-mono bg-bg-sunken/50 cursor-default",
|
|
216
216
|
onClick: (e) => {
|
|
217
|
-
e.currentTarget.select(), E(
|
|
217
|
+
e.currentTarget.select(), E(h.integrationConnectionId), Z.success("Connection ID copied to clipboard"), T() && k("Copied");
|
|
218
218
|
},
|
|
219
219
|
title: "Click to copy"
|
|
220
220
|
})]
|
|
@@ -223,7 +223,7 @@ var pe = ({ routeId: e, connectorId: t, channelId: n, platform: r, onRemoved: o,
|
|
|
223
223
|
className: "flex items-center justify-between p-3 border border-border-subtle rounded-lg bg-bg-surface",
|
|
224
224
|
children: [/* @__PURE__ */ V("div", {
|
|
225
225
|
className: "flex items-center gap-2",
|
|
226
|
-
children: [
|
|
226
|
+
children: [h.notificationsEnabled ? /* @__PURE__ */ B(H, {
|
|
227
227
|
size: 14,
|
|
228
228
|
className: "text-primary"
|
|
229
229
|
}) : /* @__PURE__ */ B(te, {
|
|
@@ -234,21 +234,21 @@ var pe = ({ routeId: e, connectorId: t, channelId: n, platform: r, onRemoved: o,
|
|
|
234
234
|
children: "DM Notifications"
|
|
235
235
|
}), /* @__PURE__ */ B("p", {
|
|
236
236
|
className: "text-xs text-text-secondary",
|
|
237
|
-
children:
|
|
237
|
+
children: h.notificationsEnabled ? `Bot will DM you on ${L.label}` : "DM notifications paused"
|
|
238
238
|
})] })]
|
|
239
239
|
}), /* @__PURE__ */ B(s, {
|
|
240
240
|
variant: "outline",
|
|
241
241
|
size: "sm",
|
|
242
242
|
isLoading: b,
|
|
243
243
|
onClick: async () => {
|
|
244
|
-
await
|
|
244
|
+
await y(h.id, !h.notificationsEnabled) && await v();
|
|
245
245
|
},
|
|
246
|
-
children:
|
|
246
|
+
children: h.notificationsEnabled ? "Disable" : "Enable"
|
|
247
247
|
})]
|
|
248
248
|
}),
|
|
249
249
|
/* @__PURE__ */ V("div", {
|
|
250
250
|
className: "flex gap-2 justify-end pt-1",
|
|
251
|
-
children: [
|
|
251
|
+
children: [h.isTokenExpired && /* @__PURE__ */ B(s, {
|
|
252
252
|
variant: "outline",
|
|
253
253
|
size: "sm",
|
|
254
254
|
leftIcon: L.icon,
|
|
@@ -260,7 +260,7 @@ var pe = ({ routeId: e, connectorId: t, channelId: n, platform: r, onRemoved: o,
|
|
|
260
260
|
leftIcon: /* @__PURE__ */ B(oe, { size: 13 }),
|
|
261
261
|
isLoading: S,
|
|
262
262
|
onClick: async () => {
|
|
263
|
-
await x(
|
|
263
|
+
await x(h.id) && await v();
|
|
264
264
|
},
|
|
265
265
|
children: "Disconnect"
|
|
266
266
|
})]
|
|
@@ -333,8 +333,8 @@ var pe = ({ routeId: e, connectorId: t, channelId: n, platform: r, onRemoved: o,
|
|
|
333
333
|
else {
|
|
334
334
|
I(!0);
|
|
335
335
|
try {
|
|
336
|
-
let e = await C(O.trim(),
|
|
337
|
-
e ? (Z.success(`${e.externalDisplayName ?? e.externalUsername ?? "Account"} connected! The bot can now send you direct messages.`), await
|
|
336
|
+
let e = await C(O.trim(), m);
|
|
337
|
+
e ? (Z.success(`${e.externalDisplayName ?? e.externalUsername ?? "Account"} connected! The bot can now send you direct messages.`), await v(), A("")) : Z.error("Failed to link connection. Please verify the ID and try again.");
|
|
338
338
|
} catch (e) {
|
|
339
339
|
Z.error(e instanceof Error ? e.message : "Failed to link connection");
|
|
340
340
|
} finally {
|
|
@@ -351,26 +351,26 @@ var pe = ({ routeId: e, connectorId: t, channelId: n, platform: r, onRemoved: o,
|
|
|
351
351
|
})]
|
|
352
352
|
});
|
|
353
353
|
}, me = ({ channel: o, routes: l, botId: u, botName: d, onRoutesChanged: f }) => {
|
|
354
|
-
let { basePath:
|
|
354
|
+
let { basePath: p } = x(), [g] = h(), [y] = m(), [b] = v(), S = _(), [C, w] = R(!1), E = o.platform, D = $(E), k = fe(o.adapterType), A = C, j = L((e) => {
|
|
355
355
|
let t = le[E];
|
|
356
356
|
if (!t) return;
|
|
357
|
-
let n = window.location.origin + window.location.pathname + window.location.search, r = `${
|
|
357
|
+
let n = window.location.origin + window.location.pathname + window.location.search, r = `${p ? p.replace(/\/(botmanor|botlit)(\/.*)?$/, "/integrations") : "/integrations"}/connections/add?${new URLSearchParams({
|
|
358
358
|
providerKey: t,
|
|
359
359
|
returnTo: n,
|
|
360
360
|
channelId: e
|
|
361
361
|
}).toString()}`;
|
|
362
362
|
T() && /^https?:\/\//.test(r) ? O(r) : window.open(r, "_blank");
|
|
363
|
-
}, [E,
|
|
363
|
+
}, [E, p]), M = L(async () => {
|
|
364
364
|
w(!0);
|
|
365
365
|
try {
|
|
366
366
|
let e = await S(o.id), t = await F(o, e, {
|
|
367
|
-
create:
|
|
368
|
-
activate: (e) =>
|
|
367
|
+
create: y,
|
|
368
|
+
activate: (e) => b({
|
|
369
369
|
connectorId: e,
|
|
370
370
|
input: { status: "ACTIVE" }
|
|
371
371
|
})
|
|
372
372
|
});
|
|
373
|
-
await
|
|
373
|
+
await g({
|
|
374
374
|
connectorId: t.id,
|
|
375
375
|
appId: u,
|
|
376
376
|
locationId: "*",
|
|
@@ -387,9 +387,9 @@ var pe = ({ routeId: e, connectorId: t, channelId: n, platform: r, onRemoved: o,
|
|
|
387
387
|
d,
|
|
388
388
|
o,
|
|
389
389
|
S,
|
|
390
|
-
g,
|
|
391
390
|
y,
|
|
392
|
-
|
|
391
|
+
b,
|
|
392
|
+
g,
|
|
393
393
|
D.label,
|
|
394
394
|
j,
|
|
395
395
|
f
|
|
@@ -475,8 +475,8 @@ var pe = ({ routeId: e, connectorId: t, channelId: n, platform: r, onRemoved: o,
|
|
|
475
475
|
})
|
|
476
476
|
]
|
|
477
477
|
}) })] });
|
|
478
|
-
}, he = ({ connector: o, routes: l, botId: u, botName: d, onRoutesChanged:
|
|
479
|
-
let { navigateTo:
|
|
478
|
+
}, he = ({ connector: o, routes: l, botId: u, botName: d, onRoutesChanged: f }) => {
|
|
479
|
+
let { navigateTo: p, workspaceId: m } = x(), [_] = h(), [y] = g(), [E] = v(), [O, k] = R(!1), A = $(o.type), j = o.status === "ACTIVE", M = C(o.type) ? o.credentialsRefId : null, { data: N, loading: P, error: F, refetch: I } = w(M), ee = L(async () => {
|
|
480
480
|
k(!0);
|
|
481
481
|
try {
|
|
482
482
|
let e = await _({
|
|
@@ -494,9 +494,9 @@ var pe = ({ routeId: e, connectorId: t, channelId: n, platform: r, onRemoved: o,
|
|
|
494
494
|
input: { status: "ACTIVE" }
|
|
495
495
|
});
|
|
496
496
|
} catch (t) {
|
|
497
|
-
throw await
|
|
497
|
+
throw await y(e.id).catch(() => void 0), await f(), t;
|
|
498
498
|
}
|
|
499
|
-
await
|
|
499
|
+
await f(), M && await I(), Z.success(`${o.name} now answers with ${d}`), T() && D("success");
|
|
500
500
|
} catch (e) {
|
|
501
501
|
Z.error(e instanceof Error ? e.message : `Failed to route ${o.name}`), T() && D("error");
|
|
502
502
|
} finally {
|
|
@@ -509,21 +509,21 @@ var pe = ({ routeId: e, connectorId: t, channelId: n, platform: r, onRemoved: o,
|
|
|
509
509
|
o.id,
|
|
510
510
|
o.name,
|
|
511
511
|
_,
|
|
512
|
-
|
|
512
|
+
y,
|
|
513
513
|
M,
|
|
514
|
-
|
|
514
|
+
f,
|
|
515
515
|
I,
|
|
516
516
|
E
|
|
517
517
|
]), z = L(async (e) => {
|
|
518
518
|
if (confirm(`Remove ${o.name} from this bot?`)) try {
|
|
519
|
-
await
|
|
519
|
+
await y(e), await f(), Z.success(`${o.name} removed from the bot`), T() && D("success");
|
|
520
520
|
} catch (e) {
|
|
521
521
|
Z.error(e instanceof Error ? e.message : "Failed to remove"), T() && D("error");
|
|
522
522
|
}
|
|
523
523
|
}, [
|
|
524
524
|
o.name,
|
|
525
|
-
|
|
526
|
-
|
|
525
|
+
y,
|
|
526
|
+
f
|
|
527
527
|
]);
|
|
528
528
|
return /* @__PURE__ */ V(e, { children: [/* @__PURE__ */ V(n, {
|
|
529
529
|
className: "flex flex-row items-center justify-between pb-3",
|
|
@@ -602,12 +602,12 @@ var pe = ({ routeId: e, connectorId: t, channelId: n, platform: r, onRemoved: o,
|
|
|
602
602
|
})
|
|
603
603
|
})]
|
|
604
604
|
}),
|
|
605
|
-
M && l.length > 0 && /* @__PURE__ */ B(
|
|
605
|
+
M && l.length > 0 && /* @__PURE__ */ B(b, {
|
|
606
606
|
channel: N,
|
|
607
607
|
loading: P,
|
|
608
608
|
error: F,
|
|
609
609
|
connectorActive: j,
|
|
610
|
-
workspaceId:
|
|
610
|
+
workspaceId: m,
|
|
611
611
|
hint: S[o.type]?.inboundHint,
|
|
612
612
|
usesInboundUrl: S[o.type]?.usesInboundUrl ?? !0,
|
|
613
613
|
onRefresh: () => void I()
|
|
@@ -616,13 +616,13 @@ var pe = ({ routeId: e, connectorId: t, channelId: n, platform: r, onRemoved: o,
|
|
|
616
616
|
variant: "ghost",
|
|
617
617
|
size: "sm",
|
|
618
618
|
leftIcon: /* @__PURE__ */ B(ie, { size: 14 }),
|
|
619
|
-
onClick: () =>
|
|
619
|
+
onClick: () => p(`channels/${o.id}`),
|
|
620
620
|
children: "Open connector"
|
|
621
621
|
})
|
|
622
622
|
]
|
|
623
623
|
})] });
|
|
624
624
|
}, ge = ({ route: e, oauthChannels: t, botId: n, botName: r, onRoutesChanged: i }) => {
|
|
625
|
-
let { data: a } =
|
|
625
|
+
let { data: a } = p(e.connectorId), o = t.find((e) => e.id === a?.credentialsRefId);
|
|
626
626
|
return a ? !o || !ue.has(o.platform) ? /* @__PURE__ */ B(he, {
|
|
627
627
|
connector: a,
|
|
628
628
|
routes: [e],
|
|
@@ -637,12 +637,12 @@ var pe = ({ routeId: e, connectorId: t, channelId: n, platform: r, onRemoved: o,
|
|
|
637
637
|
onRoutesChanged: i
|
|
638
638
|
}) : null;
|
|
639
639
|
}, _e = ({ botId: n, botName: r }) => {
|
|
640
|
-
let { organizationId: c } =
|
|
640
|
+
let { organizationId: c } = x(), u = ee(() => ({
|
|
641
641
|
channelType: I.Communication,
|
|
642
642
|
organizationId: c || void 0
|
|
643
|
-
}), [c]), { data:
|
|
643
|
+
}), [c]), { data: p, loading: m, error: h, refetch: g } = A(u), { data: _, loading: v, error: b, refetch: S } = f(n), [C, w] = R(!1), [T, E] = R(null), { data: D, loading: O, error: k, refetch: j } = d(), M = L(async () => {
|
|
644
644
|
await Promise.all([S(), j()]);
|
|
645
|
-
}, [S, j]), N =
|
|
645
|
+
}, [S, j]), N = p.filter((e) => ue.has(e.platform)), P = N.filter((e) => e.status === "ACTIVE" && (!c || e.organizationId === c)), F = new Set(_.map((e) => D.find((t) => t.id === e.connectorId)).map((e) => e?.credentialsRefId).filter((e) => !!e)), H = !m && !v && !O && !h && !b && !k, te = P.filter((e) => H && !F.has(e.id)), ne = new Set(N.map((e) => e.id)), re = new Set(_.map((e) => e.connectorId)), ie = o(i.CHANNEL_UPDATE), U = D.filter((e) => H && de.has(e.status) && (e.status === "ACTIVE" || ie) && !re.has(e.id) && !(e.credentialsRefId && ne.has(e.credentialsRefId))), W = [...U.map((e) => ({
|
|
646
646
|
id: `${Q}${e.id}`,
|
|
647
647
|
name: e.name,
|
|
648
648
|
platform: e.type,
|
|
@@ -655,7 +655,7 @@ var pe = ({ routeId: e, connectorId: t, channelId: n, platform: r, onRemoved: o,
|
|
|
655
655
|
let q = L((e, t) => {
|
|
656
656
|
E(e);
|
|
657
657
|
}, []), J = T?.startsWith(Q) ? D.find((e) => `${Q}${e.id}` === T) : void 0, Y = N.length > 0 || U.length > 0;
|
|
658
|
-
if (
|
|
658
|
+
if (m && p.length === 0 || v && _.length === 0 || O && D.length === 0) return /* @__PURE__ */ V("div", {
|
|
659
659
|
className: "space-y-4",
|
|
660
660
|
children: [
|
|
661
661
|
/* @__PURE__ */ B("div", { className: "h-10 bg-bg-sunken motion-safe:animate-vc-shimmer rounded-lg w-52" }),
|
|
@@ -663,7 +663,7 @@ var pe = ({ routeId: e, connectorId: t, channelId: n, platform: r, onRemoved: o,
|
|
|
663
663
|
/* @__PURE__ */ B("div", { className: "h-48 bg-bg-sunken motion-safe:animate-vc-shimmer rounded-lg" })
|
|
664
664
|
]
|
|
665
665
|
});
|
|
666
|
-
let X =
|
|
666
|
+
let X = _.length > 0;
|
|
667
667
|
return /* @__PURE__ */ V("div", {
|
|
668
668
|
className: "space-y-4",
|
|
669
669
|
children: [
|
|
@@ -686,18 +686,18 @@ var pe = ({ routeId: e, connectorId: t, channelId: n, platform: r, onRemoved: o,
|
|
|
686
686
|
})
|
|
687
687
|
})]
|
|
688
688
|
}),
|
|
689
|
-
|
|
689
|
+
h && /* @__PURE__ */ V("div", {
|
|
690
690
|
className: "flex items-center justify-between gap-2 rounded-lg border border-status-error-border/40 bg-status-error-bg/10 px-3 py-2 text-sm text-status-error-text",
|
|
691
|
-
children: [/* @__PURE__ */ V("span", { children: ["Failed to load channels: ",
|
|
691
|
+
children: [/* @__PURE__ */ V("span", { children: ["Failed to load channels: ", h.message] }), /* @__PURE__ */ B(s, {
|
|
692
692
|
variant: "ghost",
|
|
693
693
|
size: "sm",
|
|
694
|
-
onClick: () => void
|
|
694
|
+
onClick: () => void g(),
|
|
695
695
|
children: "Retry"
|
|
696
696
|
})]
|
|
697
697
|
}),
|
|
698
|
-
|
|
698
|
+
b && /* @__PURE__ */ V("div", {
|
|
699
699
|
className: "flex items-center justify-between gap-2 rounded-lg border border-status-error-border/40 bg-status-error-bg/10 px-3 py-2 text-sm text-status-error-text",
|
|
700
|
-
children: [/* @__PURE__ */ V("span", { children: ["Failed to load this bot's channel routes: ",
|
|
700
|
+
children: [/* @__PURE__ */ V("span", { children: ["Failed to load this bot's channel routes: ", b.message] }), /* @__PURE__ */ B(s, {
|
|
701
701
|
variant: "ghost",
|
|
702
702
|
size: "sm",
|
|
703
703
|
onClick: () => void S(),
|
|
@@ -740,7 +740,7 @@ var pe = ({ routeId: e, connectorId: t, channelId: n, platform: r, onRemoved: o,
|
|
|
740
740
|
(X || T) && /* @__PURE__ */ V("div", {
|
|
741
741
|
className: "space-y-4",
|
|
742
742
|
children: [
|
|
743
|
-
|
|
743
|
+
_.map((e) => /* @__PURE__ */ B(ge, {
|
|
744
744
|
route: e,
|
|
745
745
|
oauthChannels: N,
|
|
746
746
|
botId: n,
|
|
@@ -758,7 +758,7 @@ var pe = ({ routeId: e, connectorId: t, channelId: n, platform: r, onRemoved: o,
|
|
|
758
758
|
}, J.id),
|
|
759
759
|
T && !J && /* @__PURE__ */ B(z, { children: N.filter((e) => e.id === T).map((e) => /* @__PURE__ */ B(me, {
|
|
760
760
|
channel: e,
|
|
761
|
-
routes:
|
|
761
|
+
routes: _.filter((e) => !1),
|
|
762
762
|
botId: n,
|
|
763
763
|
botName: r,
|
|
764
764
|
onRoutesChanged: async () => {
|
|
@@ -767,7 +767,7 @@ var pe = ({ routeId: e, connectorId: t, channelId: n, platform: r, onRemoved: o,
|
|
|
767
767
|
}, e.id)) })
|
|
768
768
|
]
|
|
769
769
|
}),
|
|
770
|
-
/* @__PURE__ */ B(
|
|
770
|
+
/* @__PURE__ */ B(y, {
|
|
771
771
|
open: C,
|
|
772
772
|
onClose: () => w(!1),
|
|
773
773
|
onSelectChannel: q,
|
|
@@ -94,6 +94,7 @@ var N = "after:absolute after:inset-0 after:content-[\"\"] focus-visible:outline
|
|
|
94
94
|
})
|
|
95
95
|
}), $ = q.data;
|
|
96
96
|
return /* @__PURE__ */ D(i, {
|
|
97
|
+
tourId: "botmanor-bots",
|
|
97
98
|
title: P("botlit.botsList.title", "Bots"),
|
|
98
99
|
description: P("botlit.botsList.description", "Manage your AI-powered bots"),
|
|
99
100
|
actions: Z ? void 0 : Q,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BotsListPage.js","names":["STRETCHED_LINK","BotsListPage","t","useTr","can","useBotmanorCan","useBotlit","useBotlitStore","bots","useBots","botFilter","botCounts","useBotAppCounts","deleteBot","useDeleteBot","search","handleSearch","handleDelete","confirmAction","bot","toast","isNative","nativeNotify","refetch","err","message","menuItemsFor","items","BOTMANOR_PERMISSIONS","Edit","navigateTo","Workflow","Bot","Trash2","executionsLabel","n","count","formatNumber","showEmptyState","loading","error","createBotButton","BotmanorPermissionGate","Button","Plus","counts","PageLayout","PagePurpose","GlassCard","Search","Input","viewMode","setViewMode","Grid3X3","List","cn","i","ErrorState","Card","CardContent","Link","getPath","StatusBadge","ActionMenu","formatRelativeTime","EmptyState","updateBotFilter","LoadMore","loadMore"],"sources":["../../../src/botlit/pages/BotsListPage.tsx"],"sourcesContent":["/**\n * Bots List Page\n * @module botlit/pages\n *\n * States (BOFF-12435, 12436, 12443, 12444):\n * - loading: skeletons announced as a busy status region\n * - failed: an error state with retry, never the empty state\n * - no bots: first-step guidance and the only \"Create Bot\" button\n * - no search results: says so and offers to clear the search\n * - populated: grid or list, every row a real link, with an accessible menu\n */\n\nimport type { FC } from 'react';\nimport { Link } from 'react-router';\nimport { Plus, Search, Grid3X3, List, Bot, Trash2, Edit, Workflow } from 'lucide-react';\nimport { useTr } from '../../shared/hooks/useTr';\nimport { toast } from 'sonner';\nimport { isNative, nativeImpact, nativeNotify } from '../../utils/nativeBridge';\nimport { PagePurpose, GlassCard } from '@burdenoff/fe-libs/ui';\nimport { PageLayout } from '../components/PageLayout';\nimport { Card, CardContent } from '../components/Card';\nimport { Button } from '../components/Button';\nimport { Input } from '../components/Input';\nimport { StatusBadge } from '../components/Badge';\nimport { EmptyState } from '../components/EmptyState';\nimport { ErrorState } from '../components/ErrorState';\nimport { ActionMenu, type ActionMenuItem } from '../components/ActionMenu';\nimport { LoadMore } from '../components/LoadMore';\nimport { useBotAppCounts, useBots, useDeleteBot } from '../hooks/useBots';\nimport { useBotlitStore } from '../store/botlitStore';\nimport { useBotlit } from '../providers/BotlitProvider';\nimport { formatRelativeTime, formatNumber } from '../utils/formatters';\nimport { confirmAction } from '../utils/confirmAction';\nimport { cn } from '../utils/cn';\nimport { BOTMANOR_PERMISSIONS, BotmanorPermissionGate, useBotmanorCan } from '../permissions';\n// Real GraphQL BotApp fields: id, name, slug, description, type, status, visibility, icon, routingStrategy, defaultAgentId, executionCount, createdAt, tagIds\n\n/** Makes the whole card the click target while the name stays the one real link. */\nconst STRETCHED_LINK =\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';\n\nexport const BotsListPage: FC = () => {\n const t = useTr();\n const can = useBotmanorCan();\n const { navigateTo, getPath } = useBotlit();\n const { viewMode, setViewMode, botFilter, updateBotFilter } = useBotlitStore();\n const {\n data: bots,\n loading,\n error,\n refetch,\n hasMore,\n loadingMore,\n loadMore,\n } = useBots(botFilter);\n const botCounts = useBotAppCounts();\n const [deleteBot] = useDeleteBot();\n\n const search = (botFilter.search ?? '').trim();\n\n const handleSearch = (e: React.ChangeEvent<HTMLInputElement>) => {\n updateBotFilter({ search: e.target.value });\n };\n\n const handleDelete = async (bot: { id: string; name: string }) => {\n const confirmed = await confirmAction({\n title: t('botlit.botsList.delete.title', 'Delete bot?'),\n message: t(\n 'botlit.botsList.delete.confirm',\n 'Are you sure you want to delete \"{{name}}\"? Its channels will stop answering and this cannot be undone.',\n { name: bot.name }\n ),\n confirmLabel: t('botlit.common.delete', 'Delete'),\n cancelLabel: t('botlit.common.cancel', 'Cancel'),\n });\n if (!confirmed) return;\n\n nativeImpact('medium');\n try {\n const deleted = await deleteBot(bot.id);\n if (!deleted) {\n toast.error(t('botlit.botsList.delete.notDeleted', 'The bot could not be deleted.'));\n if (isNative()) void nativeNotify('error');\n return;\n }\n toast.success(\n t('botlit.botsList.delete.success', 'Bot \"{{name}}\" deleted successfully', {\n name: bot.name,\n })\n );\n if (isNative()) void nativeNotify('success');\n // The mutation only reports success; reload so the card actually leaves the page.\n await refetch();\n void botCounts.refetch();\n } catch (err: unknown) {\n const message =\n err instanceof Error\n ? err.message\n : t('botlit.botsList.delete.error', 'Failed to delete bot');\n toast.error(message);\n if (isNative()) void nativeNotify('error');\n }\n };\n\n const menuItemsFor = (bot: { id: string; name: string }): ActionMenuItem[] => {\n const items: ActionMenuItem[] = [];\n if (can(BOTMANOR_PERMISSIONS.APP_UPDATE)) {\n items.push({\n key: 'edit',\n label: t('botlit.botsList.menu.editBot', 'Edit Bot'),\n icon: <Edit size={16} aria-hidden=\"true\" />,\n onSelect: () => navigateTo(`bots/${bot.id}/edit`),\n });\n }\n items.push(\n {\n key: 'design',\n label: t('botlit.botsList.menu.design', 'Design workflow'),\n icon: <Workflow size={16} aria-hidden=\"true\" />,\n onSelect: () => navigateTo(`bots/${bot.id}?tab=workflow`),\n },\n {\n key: 'agents',\n label: t('botlit.botsList.menu.viewAgents', 'View Agents'),\n icon: <Bot size={16} aria-hidden=\"true\" />,\n onSelect: () => navigateTo(`bots/${bot.id}/agents`),\n }\n );\n if (can(BOTMANOR_PERMISSIONS.APP_DELETE)) {\n items.push({\n key: 'delete',\n label: t('botlit.common.delete', 'Delete'),\n icon: <Trash2 size={16} aria-hidden=\"true\" />,\n destructive: true,\n onSelect: () => void handleDelete(bot),\n });\n }\n return items;\n };\n\n const executionsLabel = (count: number | null | undefined) => {\n const n = count ?? 0;\n return n === 1\n ? t('botlit.common.executionsOne', '{{count}} execution', { count: formatNumber(n) })\n : t('botlit.common.executionsOther', '{{count}} executions', { count: formatNumber(n) });\n };\n\n const showEmptyState = !loading && !error && bots.length === 0 && search === '';\n const createBotButton = (\n <BotmanorPermissionGate permission={BOTMANOR_PERMISSIONS.APP_CREATE}>\n <Button leftIcon={<Plus size={16} />} onClick={() => navigateTo('bots/new')}>\n {t('botlit.botsList.actions.createBot', 'Create Bot')}\n </Button>\n </BotmanorPermissionGate>\n );\n\n const counts = botCounts.data;\n\n return (\n <PageLayout\n title={t('botlit.botsList.title', 'Bots')}\n description={t('botlit.botsList.description', 'Manage your AI-powered bots')}\n // The empty state carries its own \"Create Bot\"; showing both is a duplicate.\n actions={showEmptyState ? undefined : createBotButton}\n >\n <div className=\"space-y-6\">\n <PagePurpose icon={<Bot size={18} />}>\n {t(\n 'botlit.botsList.purpose',\n '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.'\n )}\n </PagePurpose>\n\n {/* Summary: exact workspace counts, independent of the search term */}\n {counts && counts.total - counts.archived > 0 ? (\n <div\n className=\"grid grid-cols-2 gap-4\"\n role=\"group\"\n aria-label={t('botlit.botsList.summary.title', 'Bot totals')}\n >\n <GlassCard treatment=\"metric\" className=\"p-4\">\n <p className=\"text-sm text-text-secondary\">\n {t('botlit.botsList.summary.total', 'Total bots')}\n </p>\n <p className=\"mt-1 text-2xl font-semibold tabular-nums text-text-primary\">\n {formatNumber(counts.total - counts.archived)}\n </p>\n </GlassCard>\n <GlassCard treatment=\"metric\" className=\"p-4\">\n <p className=\"text-sm text-text-secondary\">\n {t('botlit.botsList.summary.active', 'Active')}\n </p>\n <p className=\"mt-1 text-2xl font-semibold tabular-nums text-text-primary\">\n {formatNumber(counts.active)}\n </p>\n </GlassCard>\n </div>\n ) : null}\n\n {/* Toolbar */}\n <div className=\"flex items-center justify-between gap-4\">\n <div className=\"relative flex-1 max-w-md\">\n <Search\n className=\"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-text-secondary\"\n aria-hidden=\"true\"\n />\n <Input\n id=\"bots-search\"\n type=\"search\"\n aria-label={t('botlit.botsList.search.label', 'Search bots')}\n placeholder={t('botlit.botsList.searchPlaceholder', 'Search bots...')}\n value={botFilter.search || ''}\n onChange={handleSearch}\n className=\"pl-9\"\n />\n </div>\n <div\n className=\"flex items-center gap-2\"\n role=\"group\"\n aria-label={t('botlit.botsList.view.label', 'Layout')}\n >\n <Button\n variant={viewMode === 'grid' ? 'secondary' : 'ghost'}\n size=\"icon\"\n aria-label={t('botlit.botsList.view.grid', 'Grid view')}\n title={t('botlit.botsList.view.grid', 'Grid view')}\n aria-pressed={viewMode === 'grid'}\n onClick={() => setViewMode('grid')}\n >\n <Grid3X3 size={18} aria-hidden=\"true\" />\n </Button>\n <Button\n variant={viewMode === 'list' ? 'secondary' : 'ghost'}\n size=\"icon\"\n aria-label={t('botlit.botsList.view.list', 'List view')}\n title={t('botlit.botsList.view.list', 'List view')}\n aria-pressed={viewMode === 'list'}\n onClick={() => setViewMode('list')}\n >\n <List size={18} aria-hidden=\"true\" />\n </Button>\n </div>\n </div>\n\n {/* Content */}\n {loading ? (\n <div\n role=\"status\"\n aria-busy=\"true\"\n aria-label={t('botlit.common.loading', 'Loading')}\n className={cn(\n 'gap-4',\n viewMode === 'grid'\n ? 'grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3'\n : 'flex flex-col'\n )}\n >\n {[1, 2, 3, 4, 5, 6].map((i) => (\n <div\n key={i}\n className=\"h-48 bg-bg-sunken motion-safe:animate-vc-shimmer rounded-lg\"\n />\n ))}\n </div>\n ) : error ? (\n <ErrorState\n resource={t('botlit.botsList.resource', 'bots')}\n error={error}\n onRetry={() => void refetch()}\n />\n ) : bots.length > 0 ? (\n viewMode === 'grid' ? (\n <ul className=\"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4\">\n {bots.map((bot) => (\n <li key={bot.id}>\n <Card className=\"group relative h-full hover:shadow-md transition-shadow\">\n <CardContent className=\"pt-6\">\n <div className=\"flex items-start justify-between\">\n <div className=\"flex items-center gap-3\">\n <span className=\"text-4xl\" aria-hidden=\"true\">\n {bot.icon || '🤖'}\n </span>\n <div>\n <h2 className=\"font-semibold text-text-primary\">\n <Link to={getPath(`bots/${bot.id}`)} className={STRETCHED_LINK}>\n {bot.name}\n </Link>\n </h2>\n <StatusBadge status={bot.status} />\n </div>\n </div>\n <div className=\"relative z-10\">\n <ActionMenu\n label={t('botlit.botsList.menu.actionsFor', 'Actions for {{name}}', {\n name: bot.name,\n })}\n items={menuItemsFor(bot)}\n />\n </div>\n </div>\n <p className=\"mt-3 text-sm text-text-secondary line-clamp-2\">\n {bot.description}\n </p>\n <div className=\"mt-4 flex items-center gap-4 text-xs text-text-secondary\">\n <span className=\"flex items-center gap-1\">\n <Bot size={14} aria-hidden=\"true\" />\n {executionsLabel(bot.executionCount)}\n </span>\n </div>\n <div className=\"mt-3 pt-3 border-t border-border-subtle flex items-center justify-between gap-2\">\n <span className=\"text-xs text-text-secondary\">\n {t('botlit.botsList.createdLabel', 'Created')}{' '}\n {formatRelativeTime(bot.createdAt)}\n </span>\n <Button\n variant=\"ghost\"\n size=\"sm\"\n className=\"relative z-10\"\n leftIcon={<Workflow size={14} aria-hidden=\"true\" />}\n aria-label={t('botlit.botsList.actions.designFor', 'Design {{name}}', {\n name: bot.name,\n })}\n onClick={() => navigateTo(`bots/${bot.id}?tab=workflow`)}\n >\n {t('botlit.botsList.actions.design', 'Design')}\n </Button>\n </div>\n </CardContent>\n </Card>\n </li>\n ))}\n </ul>\n ) : (\n <ul className=\"space-y-2\">\n {bots.map((bot) => (\n <li key={bot.id}>\n <Card className=\"group relative hover:shadow-md transition-shadow\">\n <CardContent className=\"py-4\">\n <div className=\"flex items-center justify-between gap-4\">\n <div className=\"flex items-center gap-4\">\n <span className=\"text-3xl\" aria-hidden=\"true\">\n {bot.icon || '🤖'}\n </span>\n <div>\n <div className=\"flex items-center gap-2\">\n <h2 className=\"font-semibold text-text-primary\">\n <Link to={getPath(`bots/${bot.id}`)} className={STRETCHED_LINK}>\n {bot.name}\n </Link>\n </h2>\n <StatusBadge status={bot.status} />\n </div>\n <p className=\"text-sm text-text-secondary line-clamp-1\">\n {bot.description}\n </p>\n </div>\n </div>\n <div className=\"flex items-center gap-4 text-sm text-text-secondary\">\n <span>{executionsLabel(bot.executionCount)}</span>\n <Button\n variant=\"ghost\"\n size=\"sm\"\n className=\"relative z-10\"\n leftIcon={<Workflow size={14} aria-hidden=\"true\" />}\n aria-label={t('botlit.botsList.actions.designFor', 'Design {{name}}', {\n name: bot.name,\n })}\n onClick={() => navigateTo(`bots/${bot.id}?tab=workflow`)}\n >\n {t('botlit.botsList.actions.design', 'Design')}\n </Button>\n <div className=\"relative z-10\">\n <ActionMenu\n label={t('botlit.botsList.menu.actionsFor', 'Actions for {{name}}', {\n name: bot.name,\n })}\n items={menuItemsFor(bot)}\n />\n </div>\n </div>\n </div>\n </CardContent>\n </Card>\n </li>\n ))}\n </ul>\n )\n ) : search !== '' ? (\n <EmptyState\n illustration=\"empty-agents\"\n title={t('botlit.botsList.noResults.title', 'No bots match \"{{query}}\"', {\n query: search,\n })}\n description={t(\n 'botlit.botsList.noResults.description',\n 'Check the spelling or try a different search term.'\n )}\n action={\n <Button variant=\"outline\" onClick={() => updateBotFilter({ search: '' })}>\n {t('botlit.botsList.noResults.clear', 'Clear search')}\n </Button>\n }\n />\n ) : (\n <EmptyState\n illustration=\"empty-agents\"\n title={t('botlit.botsList.empty.title', 'No bots yet')}\n description={t(\n 'botlit.botsList.empty.description',\n 'A bot puts your agents in front of real users. Create an agent first, then create a bot to connect it to channels.'\n )}\n action={createBotButton}\n />\n )}\n <LoadMore\n hasMore={hasMore}\n loadingMore={loadingMore}\n onLoadMore={() => void loadMore()}\n loadedCount={bots.length}\n />\n </div>\n </PageLayout>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAsCA,IAAMA,IACJ,2KAEWC,UAAyB;CACpC,IAAMC,IAAIC,EAAM,GACVC,IAAMC,EAAe,GACrB,EAAE,eAAY,eAAYC,EAAU,GACpC,EAAE,aAAU,gBAAa,cAAW,uBAAoBC,EAAe,GACvE,EACJ,MAAMC,GACN,YACA,UACA,YACA,YACA,iBACA,iBACEC,EAAQC,CAAS,GACfC,IAAYC,GAAgB,GAC5B,CAACC,MAAaC,EAAa,GAE3BC,KAAUL,EAAU,UAAU,GAAA,CAAI,KAAK,GAEvCM,MAAgB,MAA2C;EAC/D,EAAgB,EAAE,QAAQ,EAAE,OAAO,MAAM,CAAC;CAC5C,GAEMC,KAAe,OAAO,MAAsC;EAWhE,IAAK,MAVmBC,EAAc;GACpC,OAAOhB,EAAE,gCAAgC,aAAa;GACtD,SAASA,EACP,kCACA,6GACA,EAAE,MAAMiB,EAAI,KAAK,CACnB;GACA,cAAcjB,EAAE,wBAAwB,QAAQ;GAChD,aAAaA,EAAE,wBAAwB,QAAQ;EACjD,CAAC,GAGD;KAAa,QAAQ;GACrB,IAAI;IAEF,IAAI,CAAC,MADiBW,GAAUM,EAAI,EAAE,GACxB;KAEZ,AADAC,EAAM,MAAMlB,EAAE,qCAAqC,+BAA+B,CAAC,GAC/EmB,EAAS,KAAGC,EAAkB,OAAO;KACzC;IACF;IASA,AARAF,EAAM,QACJlB,EAAE,kCAAkC,yCAAuC,EACzE,MAAMiB,EAAI,KACZ,CAAC,CACH,GACIE,EAAS,KAAGC,EAAkB,SAAS,GAE3C,MAAMC,EAAQ,GACdZ,EAAe,QAAQ;GACzB,SAASa,GAAc;IACrB,IAAMC,IACJD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kBAACwB,GAAD;WACE,SAAQ;WACR,MAAK;WACL,WAAU;WACV,UAAU,kBAACZ,GAAD;YAAU,MAAM;YAAI,eAAY;WAAQ,CAAA;WAClD,cAAY7B,EAAE,qCAAqC,mBAAmB,EACpE,MAAMiB,EAAI,KACZ,CAAC;WACD,eAAeW,EAAW,QAAQX,EAAI,GAAG,cAAc;WAEtD,UAAAjB,EAAE,kCAAkC,QAAQ;UACvC,CAAA;UACR,kBAAC,OAAD;WAAK,WAAU;WACb,UAAA,kBAAC6D,GAAD;YACE,OAAO7D,EAAE,mCAAmC,wBAAwB,EAClE,MAAMiB,EAAI,KACZ,CAAC;YACD,OAAOO,EAAaP,CAAG;WACxB,CAAA;UACE,CAAA;SACF;QACF,CAAA,CAAA;;MACM,CAAA;KACT,CAAA,EACJ,GAhDKA,EAAI,EAgDT,CACL;IACC,CAAA,IAEJJ,MAAW,KAiBb,kBAACkD,GAAD;KACE,cAAa;KACb,OAAO/D,EAAE,+BAA+B,aAAa;KACrD,aAAaA,EACX,qCACA,oHACF;KACA,QAAQuC;IACT,CAAA,IAxBD,kBAACwB,GAAD;KACE,cAAa;KACb,OAAO/D,EAAE,mCAAmC,+BAA6B,EACvE,OAAOa,EACT,CAAC;KACD,aAAab,EACX,yCACA,oDACF;KACA,QACE,kBAACyC,GAAD;MAAQ,SAAQ;MAAU,eAAeuB,EAAgB,EAAE,QAAQ,GAAG,CAAC;MACpE,UAAAhE,EAAE,mCAAmC,cAAc;KAC9C,CAAA;IAEX,CAAA;IAYH,kBAACiE,GAAD;KACW;KACI;KACb,kBAAkB,KAAKC,GAAS;KAChC,aAAa5D,EAAK;IACnB,CAAA;GACE;;CACK,CAAA;AAEhB"}
|
|
1
|
+
{"version":3,"file":"BotsListPage.js","names":["STRETCHED_LINK","BotsListPage","t","useTr","can","useBotmanorCan","useBotlit","useBotlitStore","bots","useBots","botFilter","botCounts","useBotAppCounts","deleteBot","useDeleteBot","search","handleSearch","handleDelete","confirmAction","bot","toast","isNative","nativeNotify","refetch","err","message","menuItemsFor","items","BOTMANOR_PERMISSIONS","Edit","navigateTo","Workflow","Bot","Trash2","executionsLabel","n","count","formatNumber","showEmptyState","loading","error","createBotButton","BotmanorPermissionGate","Button","Plus","counts","PageLayout","PagePurpose","GlassCard","Search","Input","viewMode","setViewMode","Grid3X3","List","cn","i","ErrorState","Card","CardContent","Link","getPath","StatusBadge","ActionMenu","formatRelativeTime","EmptyState","updateBotFilter","LoadMore","loadMore"],"sources":["../../../src/botlit/pages/BotsListPage.tsx"],"sourcesContent":["/**\n * Bots List Page\n * @module botlit/pages\n *\n * States (BOFF-12435, 12436, 12443, 12444):\n * - loading: skeletons announced as a busy status region\n * - failed: an error state with retry, never the empty state\n * - no bots: first-step guidance and the only \"Create Bot\" button\n * - no search results: says so and offers to clear the search\n * - populated: grid or list, every row a real link, with an accessible menu\n */\n\nimport type { FC } from 'react';\nimport { Link } from 'react-router';\nimport { Plus, Search, Grid3X3, List, Bot, Trash2, Edit, Workflow } from 'lucide-react';\nimport { useTr } from '../../shared/hooks/useTr';\nimport { toast } from 'sonner';\nimport { isNative, nativeImpact, nativeNotify } from '../../utils/nativeBridge';\nimport { PagePurpose, GlassCard } from '@burdenoff/fe-libs/ui';\nimport { PageLayout } from '../components/PageLayout';\nimport { Card, CardContent } from '../components/Card';\nimport { Button } from '../components/Button';\nimport { Input } from '../components/Input';\nimport { StatusBadge } from '../components/Badge';\nimport { EmptyState } from '../components/EmptyState';\nimport { ErrorState } from '../components/ErrorState';\nimport { ActionMenu, type ActionMenuItem } from '../components/ActionMenu';\nimport { LoadMore } from '../components/LoadMore';\nimport { useBotAppCounts, useBots, useDeleteBot } from '../hooks/useBots';\nimport { useBotlitStore } from '../store/botlitStore';\nimport { useBotlit } from '../providers/BotlitProvider';\nimport { formatRelativeTime, formatNumber } from '../utils/formatters';\nimport { confirmAction } from '../utils/confirmAction';\nimport { cn } from '../utils/cn';\nimport { BOTMANOR_PERMISSIONS, BotmanorPermissionGate, useBotmanorCan } from '../permissions';\n// Real GraphQL BotApp fields: id, name, slug, description, type, status, visibility, icon, routingStrategy, defaultAgentId, executionCount, createdAt, tagIds\n\n/** Makes the whole card the click target while the name stays the one real link. */\nconst STRETCHED_LINK =\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';\n\nexport const BotsListPage: FC = () => {\n const t = useTr();\n const can = useBotmanorCan();\n const { navigateTo, getPath } = useBotlit();\n const { viewMode, setViewMode, botFilter, updateBotFilter } = useBotlitStore();\n const {\n data: bots,\n loading,\n error,\n refetch,\n hasMore,\n loadingMore,\n loadMore,\n } = useBots(botFilter);\n const botCounts = useBotAppCounts();\n const [deleteBot] = useDeleteBot();\n\n const search = (botFilter.search ?? '').trim();\n\n const handleSearch = (e: React.ChangeEvent<HTMLInputElement>) => {\n updateBotFilter({ search: e.target.value });\n };\n\n const handleDelete = async (bot: { id: string; name: string }) => {\n const confirmed = await confirmAction({\n title: t('botlit.botsList.delete.title', 'Delete bot?'),\n message: t(\n 'botlit.botsList.delete.confirm',\n 'Are you sure you want to delete \"{{name}}\"? Its channels will stop answering and this cannot be undone.',\n { name: bot.name }\n ),\n confirmLabel: t('botlit.common.delete', 'Delete'),\n cancelLabel: t('botlit.common.cancel', 'Cancel'),\n });\n if (!confirmed) return;\n\n nativeImpact('medium');\n try {\n const deleted = await deleteBot(bot.id);\n if (!deleted) {\n toast.error(t('botlit.botsList.delete.notDeleted', 'The bot could not be deleted.'));\n if (isNative()) void nativeNotify('error');\n return;\n }\n toast.success(\n t('botlit.botsList.delete.success', 'Bot \"{{name}}\" deleted successfully', {\n name: bot.name,\n })\n );\n if (isNative()) void nativeNotify('success');\n // The mutation only reports success; reload so the card actually leaves the page.\n await refetch();\n void botCounts.refetch();\n } catch (err: unknown) {\n const message =\n err instanceof Error\n ? err.message\n : t('botlit.botsList.delete.error', 'Failed to delete bot');\n toast.error(message);\n if (isNative()) void nativeNotify('error');\n }\n };\n\n const menuItemsFor = (bot: { id: string; name: string }): ActionMenuItem[] => {\n const items: ActionMenuItem[] = [];\n if (can(BOTMANOR_PERMISSIONS.APP_UPDATE)) {\n items.push({\n key: 'edit',\n label: t('botlit.botsList.menu.editBot', 'Edit Bot'),\n icon: <Edit size={16} aria-hidden=\"true\" />,\n onSelect: () => navigateTo(`bots/${bot.id}/edit`),\n });\n }\n items.push(\n {\n key: 'design',\n label: t('botlit.botsList.menu.design', 'Design workflow'),\n icon: <Workflow size={16} aria-hidden=\"true\" />,\n onSelect: () => navigateTo(`bots/${bot.id}?tab=workflow`),\n },\n {\n key: 'agents',\n label: t('botlit.botsList.menu.viewAgents', 'View Agents'),\n icon: <Bot size={16} aria-hidden=\"true\" />,\n onSelect: () => navigateTo(`bots/${bot.id}/agents`),\n }\n );\n if (can(BOTMANOR_PERMISSIONS.APP_DELETE)) {\n items.push({\n key: 'delete',\n label: t('botlit.common.delete', 'Delete'),\n icon: <Trash2 size={16} aria-hidden=\"true\" />,\n destructive: true,\n onSelect: () => void handleDelete(bot),\n });\n }\n return items;\n };\n\n const executionsLabel = (count: number | null | undefined) => {\n const n = count ?? 0;\n return n === 1\n ? t('botlit.common.executionsOne', '{{count}} execution', { count: formatNumber(n) })\n : t('botlit.common.executionsOther', '{{count}} executions', { count: formatNumber(n) });\n };\n\n const showEmptyState = !loading && !error && bots.length === 0 && search === '';\n const createBotButton = (\n <BotmanorPermissionGate permission={BOTMANOR_PERMISSIONS.APP_CREATE}>\n <Button leftIcon={<Plus size={16} />} onClick={() => navigateTo('bots/new')}>\n {t('botlit.botsList.actions.createBot', 'Create Bot')}\n </Button>\n </BotmanorPermissionGate>\n );\n\n const counts = botCounts.data;\n\n return (\n <PageLayout\n tourId=\"botmanor-bots\"\n title={t('botlit.botsList.title', 'Bots')}\n description={t('botlit.botsList.description', 'Manage your AI-powered bots')}\n // The empty state carries its own \"Create Bot\"; showing both is a duplicate.\n actions={showEmptyState ? undefined : createBotButton}\n >\n <div className=\"space-y-6\">\n <PagePurpose icon={<Bot size={18} />}>\n {t(\n 'botlit.botsList.purpose',\n '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.'\n )}\n </PagePurpose>\n\n {/* Summary: exact workspace counts, independent of the search term */}\n {counts && counts.total - counts.archived > 0 ? (\n <div\n className=\"grid grid-cols-2 gap-4\"\n role=\"group\"\n aria-label={t('botlit.botsList.summary.title', 'Bot totals')}\n >\n <GlassCard treatment=\"metric\" className=\"p-4\">\n <p className=\"text-sm text-text-secondary\">\n {t('botlit.botsList.summary.total', 'Total bots')}\n </p>\n <p className=\"mt-1 text-2xl font-semibold tabular-nums text-text-primary\">\n {formatNumber(counts.total - counts.archived)}\n </p>\n </GlassCard>\n <GlassCard treatment=\"metric\" className=\"p-4\">\n <p className=\"text-sm text-text-secondary\">\n {t('botlit.botsList.summary.active', 'Active')}\n </p>\n <p className=\"mt-1 text-2xl font-semibold tabular-nums text-text-primary\">\n {formatNumber(counts.active)}\n </p>\n </GlassCard>\n </div>\n ) : null}\n\n {/* Toolbar */}\n <div className=\"flex items-center justify-between gap-4\">\n <div className=\"relative flex-1 max-w-md\">\n <Search\n className=\"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-text-secondary\"\n aria-hidden=\"true\"\n />\n <Input\n id=\"bots-search\"\n type=\"search\"\n aria-label={t('botlit.botsList.search.label', 'Search bots')}\n placeholder={t('botlit.botsList.searchPlaceholder', 'Search bots...')}\n value={botFilter.search || ''}\n onChange={handleSearch}\n className=\"pl-9\"\n />\n </div>\n <div\n className=\"flex items-center gap-2\"\n role=\"group\"\n aria-label={t('botlit.botsList.view.label', 'Layout')}\n >\n <Button\n variant={viewMode === 'grid' ? 'secondary' : 'ghost'}\n size=\"icon\"\n aria-label={t('botlit.botsList.view.grid', 'Grid view')}\n title={t('botlit.botsList.view.grid', 'Grid view')}\n aria-pressed={viewMode === 'grid'}\n onClick={() => setViewMode('grid')}\n >\n <Grid3X3 size={18} aria-hidden=\"true\" />\n </Button>\n <Button\n variant={viewMode === 'list' ? 'secondary' : 'ghost'}\n size=\"icon\"\n aria-label={t('botlit.botsList.view.list', 'List view')}\n title={t('botlit.botsList.view.list', 'List view')}\n aria-pressed={viewMode === 'list'}\n onClick={() => setViewMode('list')}\n >\n <List size={18} aria-hidden=\"true\" />\n </Button>\n </div>\n </div>\n\n {/* Content */}\n {loading ? (\n <div\n role=\"status\"\n aria-busy=\"true\"\n aria-label={t('botlit.common.loading', 'Loading')}\n className={cn(\n 'gap-4',\n viewMode === 'grid'\n ? 'grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3'\n : 'flex flex-col'\n )}\n >\n {[1, 2, 3, 4, 5, 6].map((i) => (\n <div\n key={i}\n className=\"h-48 bg-bg-sunken motion-safe:animate-vc-shimmer rounded-lg\"\n />\n ))}\n </div>\n ) : error ? (\n <ErrorState\n resource={t('botlit.botsList.resource', 'bots')}\n error={error}\n onRetry={() => void refetch()}\n />\n ) : bots.length > 0 ? (\n viewMode === 'grid' ? (\n <ul className=\"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4\">\n {bots.map((bot) => (\n <li key={bot.id}>\n <Card className=\"group relative h-full hover:shadow-md transition-shadow\">\n <CardContent className=\"pt-6\">\n <div className=\"flex items-start justify-between\">\n <div className=\"flex items-center gap-3\">\n <span className=\"text-4xl\" aria-hidden=\"true\">\n {bot.icon || '🤖'}\n </span>\n <div>\n <h2 className=\"font-semibold text-text-primary\">\n <Link to={getPath(`bots/${bot.id}`)} className={STRETCHED_LINK}>\n {bot.name}\n </Link>\n </h2>\n <StatusBadge status={bot.status} />\n </div>\n </div>\n <div className=\"relative z-10\">\n <ActionMenu\n label={t('botlit.botsList.menu.actionsFor', 'Actions for {{name}}', {\n name: bot.name,\n })}\n items={menuItemsFor(bot)}\n />\n </div>\n </div>\n <p className=\"mt-3 text-sm text-text-secondary line-clamp-2\">\n {bot.description}\n </p>\n <div className=\"mt-4 flex items-center gap-4 text-xs text-text-secondary\">\n <span className=\"flex items-center gap-1\">\n <Bot size={14} aria-hidden=\"true\" />\n {executionsLabel(bot.executionCount)}\n </span>\n </div>\n <div className=\"mt-3 pt-3 border-t border-border-subtle flex items-center justify-between gap-2\">\n <span className=\"text-xs text-text-secondary\">\n {t('botlit.botsList.createdLabel', 'Created')}{' '}\n {formatRelativeTime(bot.createdAt)}\n </span>\n <Button\n variant=\"ghost\"\n size=\"sm\"\n className=\"relative z-10\"\n leftIcon={<Workflow size={14} aria-hidden=\"true\" />}\n aria-label={t('botlit.botsList.actions.designFor', 'Design {{name}}', {\n name: bot.name,\n })}\n onClick={() => navigateTo(`bots/${bot.id}?tab=workflow`)}\n >\n {t('botlit.botsList.actions.design', 'Design')}\n </Button>\n </div>\n </CardContent>\n </Card>\n </li>\n ))}\n </ul>\n ) : (\n <ul className=\"space-y-2\">\n {bots.map((bot) => (\n <li key={bot.id}>\n <Card className=\"group relative hover:shadow-md transition-shadow\">\n <CardContent className=\"py-4\">\n <div className=\"flex items-center justify-between gap-4\">\n <div className=\"flex items-center gap-4\">\n <span className=\"text-3xl\" aria-hidden=\"true\">\n {bot.icon || '🤖'}\n </span>\n <div>\n <div className=\"flex items-center gap-2\">\n <h2 className=\"font-semibold text-text-primary\">\n <Link to={getPath(`bots/${bot.id}`)} className={STRETCHED_LINK}>\n {bot.name}\n </Link>\n </h2>\n <StatusBadge status={bot.status} />\n </div>\n <p className=\"text-sm text-text-secondary line-clamp-1\">\n {bot.description}\n </p>\n </div>\n </div>\n <div className=\"flex items-center gap-4 text-sm text-text-secondary\">\n <span>{executionsLabel(bot.executionCount)}</span>\n <Button\n variant=\"ghost\"\n size=\"sm\"\n className=\"relative z-10\"\n leftIcon={<Workflow size={14} aria-hidden=\"true\" />}\n aria-label={t('botlit.botsList.actions.designFor', 'Design {{name}}', {\n name: bot.name,\n })}\n onClick={() => navigateTo(`bots/${bot.id}?tab=workflow`)}\n >\n {t('botlit.botsList.actions.design', 'Design')}\n </Button>\n <div className=\"relative z-10\">\n <ActionMenu\n label={t('botlit.botsList.menu.actionsFor', 'Actions for {{name}}', {\n name: bot.name,\n })}\n items={menuItemsFor(bot)}\n />\n </div>\n </div>\n </div>\n </CardContent>\n </Card>\n </li>\n ))}\n </ul>\n )\n ) : search !== '' ? (\n <EmptyState\n illustration=\"empty-agents\"\n title={t('botlit.botsList.noResults.title', 'No bots match \"{{query}}\"', {\n query: search,\n })}\n description={t(\n 'botlit.botsList.noResults.description',\n 'Check the spelling or try a different search term.'\n )}\n action={\n <Button variant=\"outline\" onClick={() => updateBotFilter({ search: '' })}>\n {t('botlit.botsList.noResults.clear', 'Clear search')}\n </Button>\n }\n />\n ) : (\n <EmptyState\n illustration=\"empty-agents\"\n title={t('botlit.botsList.empty.title', 'No bots yet')}\n description={t(\n 'botlit.botsList.empty.description',\n 'A bot puts your agents in front of real users. Create an agent first, then create a bot to connect it to channels.'\n )}\n action={createBotButton}\n />\n )}\n <LoadMore\n hasMore={hasMore}\n loadingMore={loadingMore}\n onLoadMore={() => void loadMore()}\n loadedCount={bots.length}\n />\n </div>\n </PageLayout>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAsCA,IAAMA,IACJ,2KAEWC,UAAyB;CACpC,IAAMC,IAAIC,EAAM,GACVC,IAAMC,EAAe,GACrB,EAAE,eAAY,eAAYC,EAAU,GACpC,EAAE,aAAU,gBAAa,cAAW,uBAAoBC,EAAe,GACvE,EACJ,MAAMC,GACN,YACA,UACA,YACA,YACA,iBACA,iBACEC,EAAQC,CAAS,GACfC,IAAYC,GAAgB,GAC5B,CAACC,MAAaC,EAAa,GAE3BC,KAAUL,EAAU,UAAU,GAAA,CAAI,KAAK,GAEvCM,MAAgB,MAA2C;EAC/D,EAAgB,EAAE,QAAQ,EAAE,OAAO,MAAM,CAAC;CAC5C,GAEMC,KAAe,OAAO,MAAs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qCACA,oHACF;KACA,QAAQuC;IACT,CAAA,IAxBD,kBAACwB,GAAD;KACE,cAAa;KACb,OAAO/D,EAAE,mCAAmC,+BAA6B,EACvE,OAAOa,EACT,CAAC;KACD,aAAab,EACX,yCACA,oDACF;KACA,QACE,kBAACyC,GAAD;MAAQ,SAAQ;MAAU,eAAeuB,EAAgB,EAAE,QAAQ,GAAG,CAAC;MACpE,UAAAhE,EAAE,mCAAmC,cAAc;KAC9C,CAAA;IAEX,CAAA;IAYH,kBAACiE,GAAD;KACW;KACI;KACb,kBAAkB,KAAKC,GAAS;KAChC,aAAa5D,EAAK;IACnB,CAAA;GACE;;CACK,CAAA;AAEhB"}
|
|
@@ -11,16 +11,16 @@ import { ErrorState as f } from "../components/ErrorState.js";
|
|
|
11
11
|
import { LoadMore as p } from "../components/LoadMore.js";
|
|
12
12
|
import { BucketFormDialog as m, DeleteBucketDialog as h } from "../components/BucketDialogs.js";
|
|
13
13
|
import "../permissions/index.js";
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
14
|
+
import { useChannelConnectors as g } from "../hooks/useChannels.js";
|
|
15
|
+
import { useTr as _ } from "../../shared/hooks/useTr.js";
|
|
16
|
+
import { StatusBadge as v } from "../components/Badge.js";
|
|
17
17
|
import { usePolicies as te } from "../hooks/usePolicies.js";
|
|
18
|
-
import { useBucket as y, useChildBuckets as ne, useDeleteBucket as re, useUpdateBucket as
|
|
18
|
+
import { useBucket as y, useChildBuckets as ne, useDeleteBucket as re, useUpdateBucket as b } from "../hooks/useBuckets.js";
|
|
19
19
|
import "../hooks/index.js";
|
|
20
|
-
import { formatRelativeTime as
|
|
21
|
-
import { useState as
|
|
22
|
-
import { PagePurpose as
|
|
23
|
-
import { Fragment as
|
|
20
|
+
import { formatRelativeTime as ie } from "../utils/formatters.js";
|
|
21
|
+
import { useState as x } from "react";
|
|
22
|
+
import { PagePurpose as ae } from "@burdenoff/fe-libs/ui";
|
|
23
|
+
import { Fragment as oe, jsx as S, jsxs as C } from "react/jsx-runtime";
|
|
24
24
|
import { Link as w, useNavigate as se, useParams as T } from "react-router";
|
|
25
25
|
import { ArrowLeft as E, Bot as D, Folder as O, FolderOpen as ce, MessageSquare as le, Pencil as ue, Shield as k, Trash2 as A, Users as j } from "lucide-react";
|
|
26
26
|
import { toast as M } from "sonner";
|
|
@@ -36,7 +36,7 @@ var N = ({ title: e, resource: t, icon: n, loading: r, error: o, onRetry: l, chi
|
|
|
36
36
|
error: o,
|
|
37
37
|
onRetry: () => void l()
|
|
38
38
|
}) : u })] }), P = () => {
|
|
39
|
-
let { bucketId: P } = T(), { getPath: F } = e(), I = se(), L =
|
|
39
|
+
let { bucketId: P } = T(), { getPath: F } = e(), I = se(), L = _(), [R, z] = x(!1), [B, V] = x(!1), [H, U] = b(), [de, fe] = re(), { data: W, loading: pe, error: G, refetch: K } = y(P), { data: me, loading: he, error: q, refetch: ge, hasMore: _e, loadingMore: ve, loadMore: ye } = ne(W?.id), J = y(W?.parentBucketId ?? void 0), Y = r(W?.id ? { bucketId: W.id } : void 0), X = n(W?.id ? { bucketId: W.id } : void 0), Z = g(W?.id ? { bucketId: W.id } : void 0), Q = te(W?.id ? { bucketId: W.id } : void 0);
|
|
40
40
|
if (pe) return /* @__PURE__ */ S(t, {
|
|
41
41
|
title: L("botlit.buckets.detail.title", "Bucket"),
|
|
42
42
|
children: /* @__PURE__ */ S("div", {
|
|
@@ -132,7 +132,7 @@ var N = ({ title: e, resource: t, icon: n, loading: r, error: o, onRetry: l, chi
|
|
|
132
132
|
/* @__PURE__ */ C("div", {
|
|
133
133
|
className: "space-y-6",
|
|
134
134
|
children: [
|
|
135
|
-
/* @__PURE__ */ S(
|
|
135
|
+
/* @__PURE__ */ S(ae, {
|
|
136
136
|
icon: /* @__PURE__ */ S(O, { size: 18 }),
|
|
137
137
|
children: L("botlit.buckets.detail.purpose", "Buckets group your agents, bots, channels and policies. This page lists this bucket’s sub-buckets and the resources assigned directly to it.")
|
|
138
138
|
}),
|
|
@@ -158,7 +158,7 @@ var N = ({ title: e, resource: t, icon: n, loading: r, error: o, onRetry: l, chi
|
|
|
158
158
|
children: L("botlit.buckets.detail.created", "Created")
|
|
159
159
|
}), /* @__PURE__ */ S("dd", {
|
|
160
160
|
className: "mt-1 text-sm font-medium",
|
|
161
|
-
children:
|
|
161
|
+
children: ie(W.createdAt)
|
|
162
162
|
})] }),
|
|
163
163
|
/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("dt", {
|
|
164
164
|
className: "text-xs text-text-secondary",
|
|
@@ -183,7 +183,7 @@ var N = ({ title: e, resource: t, icon: n, loading: r, error: o, onRetry: l, chi
|
|
|
183
183
|
resource: L("botlit.buckets.detail.subBucketsResource", "sub-buckets"),
|
|
184
184
|
error: q,
|
|
185
185
|
onRetry: () => void ge()
|
|
186
|
-
}) : $.length > 0 ? /* @__PURE__ */ C(
|
|
186
|
+
}) : $.length > 0 ? /* @__PURE__ */ C(oe, { children: [/* @__PURE__ */ S("ul", {
|
|
187
187
|
className: "divide-y divide-border-subtle",
|
|
188
188
|
children: $.map((e) => /* @__PURE__ */ S("li", { children: /* @__PURE__ */ C(w, {
|
|
189
189
|
to: F(`buckets/${e.id}`),
|
|
@@ -230,7 +230,7 @@ var N = ({ title: e, resource: t, icon: n, loading: r, error: o, onRetry: l, chi
|
|
|
230
230
|
children: [/* @__PURE__ */ S("span", {
|
|
231
231
|
className: "font-medium",
|
|
232
232
|
children: e.name
|
|
233
|
-
}), /* @__PURE__ */ S(
|
|
233
|
+
}), /* @__PURE__ */ S(v, { status: e.status })]
|
|
234
234
|
}) }, e.id))
|
|
235
235
|
}) : /* @__PURE__ */ S("p", {
|
|
236
236
|
className: "text-sm text-text-secondary",
|
|
@@ -252,7 +252,7 @@ var N = ({ title: e, resource: t, icon: n, loading: r, error: o, onRetry: l, chi
|
|
|
252
252
|
children: [/* @__PURE__ */ S("span", {
|
|
253
253
|
className: "font-medium",
|
|
254
254
|
children: e.name
|
|
255
|
-
}), /* @__PURE__ */ S(
|
|
255
|
+
}), /* @__PURE__ */ S(v, { status: e.status })]
|
|
256
256
|
}) }, e.id))
|
|
257
257
|
}) : /* @__PURE__ */ S("p", {
|
|
258
258
|
className: "text-sm text-text-secondary",
|
|
@@ -274,7 +274,7 @@ var N = ({ title: e, resource: t, icon: n, loading: r, error: o, onRetry: l, chi
|
|
|
274
274
|
children: [/* @__PURE__ */ S("span", {
|
|
275
275
|
className: "font-medium",
|
|
276
276
|
children: e.name
|
|
277
|
-
}), /* @__PURE__ */ S(
|
|
277
|
+
}), /* @__PURE__ */ S(v, { status: e.status })]
|
|
278
278
|
}) }, e.id))
|
|
279
279
|
}) : /* @__PURE__ */ S("p", {
|
|
280
280
|
className: "text-sm text-text-secondary",
|
|
@@ -296,7 +296,7 @@ var N = ({ title: e, resource: t, icon: n, loading: r, error: o, onRetry: l, chi
|
|
|
296
296
|
children: [/* @__PURE__ */ S("span", {
|
|
297
297
|
className: "font-medium",
|
|
298
298
|
children: e.name
|
|
299
|
-
}), /* @__PURE__ */ S(
|
|
299
|
+
}), /* @__PURE__ */ S(v, { status: e.status })]
|
|
300
300
|
}) }, e.id))
|
|
301
301
|
}) : /* @__PURE__ */ S("p", {
|
|
302
302
|
className: "text-sm text-text-secondary",
|