@burdenoff/microfe-botmanor 2026.1120.7 → 2026.1120.8
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/DashboardUsagePanel.d.ts +8 -0
- package/dist/botlit/components/DashboardUsagePanel.js +277 -0
- package/dist/botlit/components/DashboardUsagePanel.js.map +1 -0
- package/dist/botlit/components/LiveIndicator.d.ts +9 -0
- package/dist/botlit/components/LiveIndicator.js +21 -0
- package/dist/botlit/components/LiveIndicator.js.map +1 -0
- package/dist/botlit/components/RunStatsCard.d.ts +9 -0
- package/dist/botlit/components/RunStatsCard.js +138 -0
- package/dist/botlit/components/RunStatsCard.js.map +1 -0
- package/dist/botlit/hooks/useExecutionLiveUpdates.d.ts +29 -0
- package/dist/botlit/hooks/useExecutionLiveUpdates.js +124 -0
- package/dist/botlit/hooks/useExecutionLiveUpdates.js.map +1 -0
- package/dist/botlit/hooks/useUsageStats.d.ts +71 -0
- package/dist/botlit/hooks/useUsageStats.js +115 -0
- package/dist/botlit/hooks/useUsageStats.js.map +1 -0
- package/dist/botlit/pages/AgentDetailPage.js +48 -43
- package/dist/botlit/pages/AgentDetailPage.js.map +1 -1
- package/dist/botlit/pages/BotDetailPage.js +317 -309
- package/dist/botlit/pages/BotDetailPage.js.map +1 -1
- package/dist/botlit/pages/DashboardPage.js +155 -153
- package/dist/botlit/pages/DashboardPage.js.map +1 -1
- package/dist/botlit/pages/ExecutionDetailPage.js +142 -132
- package/dist/botlit/pages/ExecutionDetailPage.js.map +1 -1
- package/dist/botlit/pages/ExecutionsPage.js +150 -141
- package/dist/botlit/pages/ExecutionsPage.js.map +1 -1
- package/dist/botlit/pages/PromptStudioPage.js +172 -172
- package/dist/botlit/pages/PromptStudioPage.js.map +1 -1
- package/dist/botlit/permissions/botmanorPermissions.d.ts +1 -0
- package/dist/botlit/permissions/botmanorPermissions.js +1 -0
- package/dist/botlit/permissions/botmanorPermissions.js.map +1 -1
- package/dist/botlit/utils/formatters.js +6 -2
- package/dist/botlit/utils/formatters.js.map +1 -1
- package/dist/generated/wspace-operations.d.ts +264 -0
- package/dist/generated/wspace-operations.js +95 -6
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/generated/wspace-types.d.ts +98 -0
- package/dist/generated/wspace-types.js +8 -4
- package/dist/generated/wspace-types.js.map +1 -1
- package/package.json +1 -1
|
@@ -6,19 +6,20 @@ import { StatusBadge as ee } from "../components/Badge.js";
|
|
|
6
6
|
import { BOTMANOR_PERMISSIONS as s } from "../permissions/botmanorPermissions.js";
|
|
7
7
|
import { BotmanorPermissionGate as c, useBotmanorPermissionDecision as l } from "../permissions/useBotmanorPermissions.js";
|
|
8
8
|
import { ErrorState as u } from "../components/ErrorState.js";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
9
|
+
import { DashboardUsagePanel as te } from "../components/DashboardUsagePanel.js";
|
|
10
|
+
import { useBotAppCounts as ne, useBots as re } from "../hooks/useBots.js";
|
|
11
|
+
import { useAgentCounts as ie, useAgents as ae } from "../hooks/useAgents.js";
|
|
12
|
+
import { useBotlit as oe } from "../providers/BotlitProvider.js";
|
|
12
13
|
import { formatNumber as d } from "../utils/formatters.js";
|
|
13
|
-
import { byRecentActivity as f, getGreetingName as
|
|
14
|
+
import { byRecentActivity as f, getGreetingName as se } from "../utils/greeting.js";
|
|
14
15
|
import "../permissions/index.js";
|
|
15
|
-
import { Fragment as
|
|
16
|
-
import { GlassCard as
|
|
17
|
-
import { Fragment as
|
|
18
|
-
import { Link as
|
|
19
|
-
import { AppWindow as
|
|
16
|
+
import { Fragment as ce, useMemo as p } from "react";
|
|
17
|
+
import { GlassCard as le, GradientText as ue, PagePurpose as m } from "@burdenoff/fe-libs/ui";
|
|
18
|
+
import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
19
|
+
import { Link as v, useLocation as de } from "react-router";
|
|
20
|
+
import { AppWindow as y, ArrowRight as b, BookOpen as fe, Bot as x, Headset as pe, KeyRound as me, Lock as he, MessagesSquare as ge, Plus as _e, Zap as ve } from "lucide-react";
|
|
20
21
|
// src/botlit/pages/DashboardPage.tsx
|
|
21
|
-
var
|
|
22
|
+
var S = "", C = "flex flex-col items-center gap-2 p-4 rounded-card border border-border-seam bg-bg-surface hover:border-border-strong hover:shadow-elevation-2 transition-[box-shadow,border-color]", w = ({ label: e }) => /* @__PURE__ */ g("div", {
|
|
22
23
|
className: "space-y-3",
|
|
23
24
|
role: "status",
|
|
24
25
|
"aria-busy": "true",
|
|
@@ -27,117 +28,117 @@ var x = "", S = "flex flex-col items-center gap-2 p-4 rounded-card border borde
|
|
|
27
28
|
1,
|
|
28
29
|
2,
|
|
29
30
|
3
|
|
30
|
-
].map((e) => /* @__PURE__ */
|
|
31
|
-
}),
|
|
32
|
-
let i = /* @__PURE__ */
|
|
31
|
+
].map((e) => /* @__PURE__ */ g("div", { className: "h-16 bg-bg-sunken rounded-lg motion-safe:animate-vc-shimmer" }, e))
|
|
32
|
+
}), T = ({ permission: e, to: t, icon: n, label: r }) => {
|
|
33
|
+
let i = /* @__PURE__ */ g("li", { children: /* @__PURE__ */ _(v, {
|
|
33
34
|
to: t,
|
|
34
|
-
className:
|
|
35
|
-
children: [n, /* @__PURE__ */
|
|
35
|
+
className: C,
|
|
36
|
+
children: [n, /* @__PURE__ */ g("span", {
|
|
36
37
|
className: "text-sm font-medium",
|
|
37
38
|
children: r
|
|
38
39
|
})]
|
|
39
40
|
}) });
|
|
40
|
-
return e ? /* @__PURE__ */
|
|
41
|
+
return e ? /* @__PURE__ */ g(c, {
|
|
41
42
|
permission: e,
|
|
42
43
|
children: i
|
|
43
44
|
}) : i;
|
|
44
|
-
},
|
|
45
|
-
let
|
|
46
|
-
|
|
45
|
+
}, E = () => {
|
|
46
|
+
let C = e(), E = de(), { currentUser: ye, navigateTo: D, getPath: O } = oe(), k = l(s.APP_READ), A = l(s.AGENT_READ), be = l(s.EXECUTION_READ), j = k === "allowed", M = A === "allowed", N = k === "loading" || A === "loading", { data: P, loading: F, error: I, hasMore: xe, refetch: Se } = re(), { data: L, loading: R, error: z, hasMore: B, refetch: Ce } = ae(), V = ne(j), H = ie(M), U = p(() => [...P].sort(f).slice(0, 4), [P]), W = p(() => L.filter((e) => e.status === "ACTIVE"), [L]), G = p(() => [...W].sort(f).slice(0, 4), [W]), we = !N && !j && !M, K = j && P.length > 0 || M && L.length > 0, q = (e, t) => t ? `${d(e)}+` : d(e), J = V.data ? V.data.total - V.data.archived : void 0, Y = H.data ? H.data.active : void 0, X = H.data ? H.data.total - H.data.archived : void 0, Z = [];
|
|
47
|
+
j && Z.push({
|
|
47
48
|
key: "bots",
|
|
48
|
-
label:
|
|
49
|
-
value: J === void 0 ?
|
|
50
|
-
loading: J === void 0 && (V.loading ||
|
|
51
|
-
icon: /* @__PURE__ */
|
|
49
|
+
label: C("botlit.dashboard.stats.totalBots", "Total Bots"),
|
|
50
|
+
value: J === void 0 ? I ? "—" : q(P.length, xe) : d(J),
|
|
51
|
+
loading: J === void 0 && (V.loading || F),
|
|
52
|
+
icon: /* @__PURE__ */ g(y, {
|
|
52
53
|
className: "h-5 w-5",
|
|
53
54
|
"aria-hidden": "true"
|
|
54
55
|
}),
|
|
55
56
|
hero: !0
|
|
56
|
-
}),
|
|
57
|
+
}), M && Z.push({
|
|
57
58
|
key: "agents",
|
|
58
|
-
label:
|
|
59
|
+
label: C("botlit.dashboard.stats.activeAgents", "Active Agents"),
|
|
59
60
|
value: Y === void 0 ? z ? "—" : q(W.length, B) : d(Y),
|
|
60
61
|
loading: Y === void 0 && (H.loading || R),
|
|
61
|
-
icon: /* @__PURE__ */
|
|
62
|
+
icon: /* @__PURE__ */ g(x, {
|
|
62
63
|
className: "h-5 w-5",
|
|
63
64
|
"aria-hidden": "true"
|
|
64
65
|
}),
|
|
65
|
-
hero: !
|
|
66
|
+
hero: !j
|
|
66
67
|
});
|
|
67
68
|
let Q = (e) => {
|
|
68
69
|
let t = e ?? 0;
|
|
69
|
-
return t === 1 ?
|
|
70
|
-
}, $ =
|
|
71
|
-
return /* @__PURE__ */
|
|
70
|
+
return t === 1 ? C("botlit.common.executionsOne", "{{count}} execution", { count: d(t) }) : C("botlit.common.executionsOther", "{{count}} executions", { count: d(t) });
|
|
71
|
+
}, $ = se(ye), Te = ($ ? K ? C("botlit.dashboard.titleNamed", "Welcome back, {{name}}", { name: S }) : C("botlit.dashboard.welcomeNamed", "Welcome, {{name}}", { name: S }) : K ? C("botlit.dashboard.title", "Welcome back") : C("botlit.dashboard.welcome", "Welcome")).split(S).map((e, t, n) => /* @__PURE__ */ _(ce, { children: [e, t < n.length - 1 ? /* @__PURE__ */ g(ue, { children: $ }) : null] }, t));
|
|
72
|
+
return /* @__PURE__ */ g(t, {
|
|
72
73
|
hero: !0,
|
|
73
|
-
title:
|
|
74
|
-
description:
|
|
75
|
-
actions: /* @__PURE__ */
|
|
74
|
+
title: Te,
|
|
75
|
+
description: C("botlit.dashboard.description", "Here's an overview of your AI agents and bots"),
|
|
76
|
+
actions: /* @__PURE__ */ _("div", {
|
|
76
77
|
className: "flex gap-2",
|
|
77
|
-
children: [/* @__PURE__ */
|
|
78
|
+
children: [/* @__PURE__ */ g(c, {
|
|
78
79
|
permission: s.AGENT_CREATE,
|
|
79
|
-
children: /* @__PURE__ */
|
|
80
|
-
leftIcon: /* @__PURE__ */
|
|
81
|
-
onClick: () =>
|
|
82
|
-
children:
|
|
80
|
+
children: /* @__PURE__ */ g(o, {
|
|
81
|
+
leftIcon: /* @__PURE__ */ g(x, { size: 16 }),
|
|
82
|
+
onClick: () => D("agents/new"),
|
|
83
|
+
children: C("botlit.dashboard.actions.createAgent", "Create Agent")
|
|
83
84
|
})
|
|
84
|
-
}), /* @__PURE__ */
|
|
85
|
+
}), /* @__PURE__ */ g(c, {
|
|
85
86
|
permission: s.APP_CREATE,
|
|
86
|
-
children: /* @__PURE__ */
|
|
87
|
+
children: /* @__PURE__ */ g(o, {
|
|
87
88
|
variant: "outline",
|
|
88
|
-
leftIcon: /* @__PURE__ */
|
|
89
|
-
onClick: () =>
|
|
90
|
-
children:
|
|
89
|
+
leftIcon: /* @__PURE__ */ g(_e, { size: 16 }),
|
|
90
|
+
onClick: () => D("bots/new"),
|
|
91
|
+
children: C("botlit.dashboard.actions.createBot", "Create Bot")
|
|
91
92
|
})
|
|
92
93
|
})]
|
|
93
94
|
}),
|
|
94
|
-
children: /* @__PURE__ */
|
|
95
|
+
children: /* @__PURE__ */ _("div", {
|
|
95
96
|
className: "space-y-6",
|
|
96
|
-
children: [/* @__PURE__ */
|
|
97
|
-
icon: /* @__PURE__ */
|
|
97
|
+
children: [/* @__PURE__ */ g(m, {
|
|
98
|
+
icon: /* @__PURE__ */ g(ve, {
|
|
98
99
|
size: 18,
|
|
99
100
|
"aria-hidden": "true"
|
|
100
101
|
}),
|
|
101
|
-
children:
|
|
102
|
-
}),
|
|
102
|
+
children: C("botlit.dashboard.purpose", "This is your home base — a quick pulse on every bot and agent in your workspace. Glance at the headline numbers, jump back into recent work, and use the quick actions below to start something new. If you are just getting started, create your first agent and connect it to a bot.")
|
|
103
|
+
}), we ? /* @__PURE__ */ _("div", {
|
|
103
104
|
role: "status",
|
|
104
105
|
className: "flex flex-col items-center justify-center gap-3 rounded-lg border border-border-subtle bg-bg-surface px-4 py-12 text-center",
|
|
105
|
-
children: [/* @__PURE__ */
|
|
106
|
+
children: [/* @__PURE__ */ g(he, {
|
|
106
107
|
size: 28,
|
|
107
108
|
className: "text-text-secondary",
|
|
108
109
|
"aria-hidden": "true"
|
|
109
|
-
}), /* @__PURE__ */
|
|
110
|
+
}), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("h2", {
|
|
110
111
|
className: "text-lg font-medium text-text-primary",
|
|
111
|
-
children:
|
|
112
|
-
}), /* @__PURE__ */
|
|
112
|
+
children: C("botlit.dashboard.noAccess.title", "You do not have access to this dashboard")
|
|
113
|
+
}), /* @__PURE__ */ g("p", {
|
|
113
114
|
className: "mt-2 max-w-md text-sm text-text-secondary",
|
|
114
|
-
children:
|
|
115
|
+
children: C("botlit.dashboard.noAccess.description", "Your role in this workspace cannot view bots or agents. Ask a workspace admin for read access.")
|
|
115
116
|
})] })]
|
|
116
|
-
}) : /* @__PURE__ */
|
|
117
|
-
/* @__PURE__ */
|
|
117
|
+
}) : /* @__PURE__ */ _(h, { children: [
|
|
118
|
+
/* @__PURE__ */ g("ul", {
|
|
118
119
|
className: "grid grid-cols-1 md:grid-cols-2 gap-4",
|
|
119
|
-
"aria-label":
|
|
120
|
-
children:
|
|
120
|
+
"aria-label": C("botlit.dashboard.stats.title", "Workspace totals"),
|
|
121
|
+
children: N ? /* @__PURE__ */ g("li", { children: /* @__PURE__ */ g(w, { label: C("botlit.common.loading", "Loading") }) }) : Z.map((e) => /* @__PURE__ */ g("li", { children: /* @__PURE__ */ g(n, {
|
|
121
122
|
treatment: e.hero ? "glass" : "metric",
|
|
122
123
|
glow: e.hero,
|
|
123
|
-
children: /* @__PURE__ */
|
|
124
|
+
children: /* @__PURE__ */ g(r, {
|
|
124
125
|
className: "pt-6",
|
|
125
|
-
children: /* @__PURE__ */
|
|
126
|
+
children: /* @__PURE__ */ _("div", {
|
|
126
127
|
className: "flex items-center gap-4",
|
|
127
|
-
children: [/* @__PURE__ */
|
|
128
|
+
children: [/* @__PURE__ */ g("div", {
|
|
128
129
|
className: "p-3 rounded-lg bg-[var(--color-accent-soft)] text-text-primary [&>svg]:text-text-primary",
|
|
129
130
|
children: e.icon
|
|
130
|
-
}), /* @__PURE__ */
|
|
131
|
+
}), /* @__PURE__ */ _("div", {
|
|
131
132
|
className: "flex flex-col-reverse",
|
|
132
|
-
children: [/* @__PURE__ */
|
|
133
|
+
children: [/* @__PURE__ */ g("p", {
|
|
133
134
|
className: "text-sm text-text-secondary",
|
|
134
135
|
children: e.label
|
|
135
|
-
}), e.loading ? /* @__PURE__ */
|
|
136
|
+
}), e.loading ? /* @__PURE__ */ g("div", {
|
|
136
137
|
role: "status",
|
|
137
138
|
"aria-busy": "true",
|
|
138
|
-
"aria-label":
|
|
139
|
+
"aria-label": C("botlit.common.loading", "Loading"),
|
|
139
140
|
className: "h-8 w-12 rounded bg-bg-sunken motion-safe:animate-vc-shimmer"
|
|
140
|
-
}) : /* @__PURE__ */
|
|
141
|
+
}) : /* @__PURE__ */ g("p", {
|
|
141
142
|
className: "text-2xl font-bold text-text-primary tabular-nums",
|
|
142
143
|
children: e.value
|
|
143
144
|
})]
|
|
@@ -146,109 +147,110 @@ var x = "", S = "flex flex-col items-center gap-2 p-4 rounded-card border borde
|
|
|
146
147
|
})
|
|
147
148
|
}) }, e.key))
|
|
148
149
|
}),
|
|
149
|
-
/* @__PURE__ */ g(
|
|
150
|
+
be === "allowed" ? /* @__PURE__ */ g(te, {}) : null,
|
|
151
|
+
/* @__PURE__ */ _("div", {
|
|
150
152
|
className: "grid grid-cols-1 lg:grid-cols-2 gap-6",
|
|
151
|
-
children: [
|
|
153
|
+
children: [j ? /* @__PURE__ */ _(n, {
|
|
152
154
|
treatment: "insight",
|
|
153
|
-
children: [/* @__PURE__ */
|
|
155
|
+
children: [/* @__PURE__ */ _(i, {
|
|
154
156
|
className: "flex flex-row items-center justify-between",
|
|
155
|
-
children: [/* @__PURE__ */
|
|
157
|
+
children: [/* @__PURE__ */ g(a, {
|
|
156
158
|
as: "h2",
|
|
157
|
-
children:
|
|
158
|
-
}), /* @__PURE__ */
|
|
159
|
+
children: C("botlit.dashboard.recentBots.title", "Recent Bots")
|
|
160
|
+
}), /* @__PURE__ */ g(o, {
|
|
159
161
|
variant: "ghost",
|
|
160
162
|
size: "sm",
|
|
161
|
-
rightIcon: /* @__PURE__ */
|
|
162
|
-
onClick: () =>
|
|
163
|
-
children:
|
|
163
|
+
rightIcon: /* @__PURE__ */ g(b, { size: 16 }),
|
|
164
|
+
onClick: () => D("bots"),
|
|
165
|
+
children: C("botlit.common.viewAll", "View All")
|
|
164
166
|
})]
|
|
165
|
-
}), /* @__PURE__ */
|
|
166
|
-
resource:
|
|
167
|
-
error:
|
|
168
|
-
onRetry: () => void
|
|
169
|
-
}) : U.length > 0 ? /* @__PURE__ */
|
|
167
|
+
}), /* @__PURE__ */ g(r, { children: F ? /* @__PURE__ */ g(w, { label: C("botlit.common.loading", "Loading") }) : I ? /* @__PURE__ */ g(u, {
|
|
168
|
+
resource: C("botlit.dashboard.resource.bots", "bots"),
|
|
169
|
+
error: I,
|
|
170
|
+
onRetry: () => void Se()
|
|
171
|
+
}) : U.length > 0 ? /* @__PURE__ */ g("ul", {
|
|
170
172
|
className: "space-y-3",
|
|
171
|
-
children: U.map((e) => /* @__PURE__ */
|
|
172
|
-
to:
|
|
173
|
+
children: U.map((e) => /* @__PURE__ */ g("li", { children: /* @__PURE__ */ _(v, {
|
|
174
|
+
to: O(`bots/${e.id}`),
|
|
173
175
|
className: "flex items-center justify-between p-3 rounded-lg border border-border-seam hover:border-border-strong hover:bg-accent transition-colors",
|
|
174
|
-
children: [/* @__PURE__ */
|
|
176
|
+
children: [/* @__PURE__ */ _("div", {
|
|
175
177
|
className: "flex items-center gap-3",
|
|
176
|
-
children: [/* @__PURE__ */
|
|
178
|
+
children: [/* @__PURE__ */ g("span", {
|
|
177
179
|
className: "text-2xl",
|
|
178
180
|
"aria-hidden": "true",
|
|
179
181
|
children: e.icon || "🤖"
|
|
180
|
-
}), /* @__PURE__ */
|
|
182
|
+
}), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
181
183
|
className: "font-medium text-text-primary",
|
|
182
184
|
children: e.name
|
|
183
|
-
}), /* @__PURE__ */
|
|
185
|
+
}), /* @__PURE__ */ g("p", {
|
|
184
186
|
className: "text-xs text-text-secondary",
|
|
185
187
|
children: Q(e.executionCount)
|
|
186
188
|
})] })]
|
|
187
|
-
}), /* @__PURE__ */
|
|
189
|
+
}), /* @__PURE__ */ g(ee, { status: e.status })]
|
|
188
190
|
}) }, e.id))
|
|
189
|
-
}) : /* @__PURE__ */
|
|
191
|
+
}) : /* @__PURE__ */ _("div", {
|
|
190
192
|
className: "text-center py-8 text-text-secondary",
|
|
191
193
|
children: [
|
|
192
|
-
/* @__PURE__ */
|
|
194
|
+
/* @__PURE__ */ g(y, {
|
|
193
195
|
className: "h-8 w-8 mx-auto mb-2 opacity-50",
|
|
194
196
|
"aria-hidden": "true"
|
|
195
197
|
}),
|
|
196
|
-
/* @__PURE__ */
|
|
197
|
-
/* @__PURE__ */
|
|
198
|
+
/* @__PURE__ */ g("p", { children: C("botlit.dashboard.recentBots.emptyTitle", "No bots yet") }),
|
|
199
|
+
/* @__PURE__ */ g(c, {
|
|
198
200
|
permission: s.APP_CREATE,
|
|
199
|
-
children: /* @__PURE__ */
|
|
201
|
+
children: /* @__PURE__ */ g(o, {
|
|
200
202
|
variant: "outline",
|
|
201
203
|
size: "sm",
|
|
202
204
|
className: "mt-3",
|
|
203
|
-
onClick: () =>
|
|
204
|
-
children:
|
|
205
|
+
onClick: () => D("bots/new"),
|
|
206
|
+
children: C("botlit.dashboard.recentBots.emptyAction", "Create your first bot")
|
|
205
207
|
})
|
|
206
208
|
})
|
|
207
209
|
]
|
|
208
210
|
}) })]
|
|
209
|
-
}) : null,
|
|
211
|
+
}) : null, M ? /* @__PURE__ */ _(n, {
|
|
210
212
|
treatment: "insight",
|
|
211
|
-
children: [/* @__PURE__ */
|
|
213
|
+
children: [/* @__PURE__ */ _(i, {
|
|
212
214
|
className: "flex flex-row items-center justify-between",
|
|
213
|
-
children: [/* @__PURE__ */
|
|
215
|
+
children: [/* @__PURE__ */ g(a, {
|
|
214
216
|
as: "h2",
|
|
215
|
-
children:
|
|
216
|
-
}), /* @__PURE__ */
|
|
217
|
+
children: C("botlit.dashboard.activeAgents.title", "Active Agents")
|
|
218
|
+
}), /* @__PURE__ */ g(o, {
|
|
217
219
|
variant: "ghost",
|
|
218
220
|
size: "sm",
|
|
219
|
-
rightIcon: /* @__PURE__ */
|
|
220
|
-
onClick: () =>
|
|
221
|
-
children:
|
|
221
|
+
rightIcon: /* @__PURE__ */ g(b, { size: 16 }),
|
|
222
|
+
onClick: () => D("agents"),
|
|
223
|
+
children: C("botlit.common.viewAll", "View All")
|
|
222
224
|
})]
|
|
223
|
-
}), /* @__PURE__ */
|
|
224
|
-
resource:
|
|
225
|
+
}), /* @__PURE__ */ g(r, { children: R ? /* @__PURE__ */ g(w, { label: C("botlit.common.loading", "Loading") }) : z ? /* @__PURE__ */ g(u, {
|
|
226
|
+
resource: C("botlit.dashboard.resource.agents", "agents"),
|
|
225
227
|
error: z,
|
|
226
|
-
onRetry: () => void
|
|
227
|
-
}) : G.length > 0 ? /* @__PURE__ */
|
|
228
|
+
onRetry: () => void Ce()
|
|
229
|
+
}) : G.length > 0 ? /* @__PURE__ */ g("ul", {
|
|
228
230
|
className: "space-y-3",
|
|
229
|
-
children: G.map((e) => /* @__PURE__ */
|
|
230
|
-
to:
|
|
231
|
+
children: G.map((e) => /* @__PURE__ */ g("li", { children: /* @__PURE__ */ g(v, {
|
|
232
|
+
to: O(`agents/${e.id}`),
|
|
231
233
|
className: "flex items-center justify-between p-3 rounded-lg border border-border-seam hover:border-border-strong hover:bg-accent transition-colors",
|
|
232
|
-
children: /* @__PURE__ */
|
|
234
|
+
children: /* @__PURE__ */ _("div", {
|
|
233
235
|
className: "flex items-center gap-3",
|
|
234
|
-
children: [/* @__PURE__ */
|
|
236
|
+
children: [/* @__PURE__ */ _("span", {
|
|
235
237
|
className: "relative text-2xl",
|
|
236
|
-
children: [/* @__PURE__ */
|
|
238
|
+
children: [/* @__PURE__ */ g("span", {
|
|
237
239
|
"aria-hidden": "true",
|
|
238
240
|
children: "🤖"
|
|
239
|
-
}), /* @__PURE__ */
|
|
241
|
+
}), /* @__PURE__ */ g("span", {
|
|
240
242
|
"aria-hidden": "true",
|
|
241
243
|
className: "absolute -right-0.5 -top-0.5 size-2 rounded-full bg-status-success-text motion-safe:animate-vc-glow-pulse"
|
|
242
244
|
})]
|
|
243
|
-
}), /* @__PURE__ */
|
|
245
|
+
}), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
244
246
|
className: "font-medium text-text-primary",
|
|
245
247
|
children: e.name
|
|
246
|
-
}), /* @__PURE__ */
|
|
248
|
+
}), /* @__PURE__ */ _("p", {
|
|
247
249
|
className: "text-xs text-text-secondary",
|
|
248
|
-
children: [/* @__PURE__ */
|
|
250
|
+
children: [/* @__PURE__ */ _("span", {
|
|
249
251
|
className: "sr-only",
|
|
250
252
|
children: [
|
|
251
|
-
|
|
253
|
+
C("botlit.status.active", "Active"),
|
|
252
254
|
".",
|
|
253
255
|
" "
|
|
254
256
|
]
|
|
@@ -256,94 +258,94 @@ var x = "", S = "flex flex-col items-center gap-2 p-4 rounded-card border borde
|
|
|
256
258
|
})] })]
|
|
257
259
|
})
|
|
258
260
|
}) }, e.id))
|
|
259
|
-
}) : /* @__PURE__ */
|
|
261
|
+
}) : /* @__PURE__ */ _("div", {
|
|
260
262
|
className: "text-center py-8 text-text-secondary",
|
|
261
|
-
children: [/* @__PURE__ */
|
|
263
|
+
children: [/* @__PURE__ */ g(x, {
|
|
262
264
|
className: "h-8 w-8 mx-auto mb-2 opacity-50",
|
|
263
265
|
"aria-hidden": "true"
|
|
264
|
-
}), L.length === 0 ? /* @__PURE__ */
|
|
266
|
+
}), L.length === 0 ? /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g("p", { children: C("botlit.dashboard.activeAgents.emptyTitle", "No agents yet") }), /* @__PURE__ */ g(c, {
|
|
265
267
|
permission: s.AGENT_CREATE,
|
|
266
|
-
children: /* @__PURE__ */
|
|
268
|
+
children: /* @__PURE__ */ g(o, {
|
|
267
269
|
variant: "outline",
|
|
268
270
|
size: "sm",
|
|
269
271
|
className: "mt-3",
|
|
270
|
-
onClick: () =>
|
|
271
|
-
children:
|
|
272
|
+
onClick: () => D("agents/new"),
|
|
273
|
+
children: C("botlit.dashboard.activeAgents.emptyAction", "Create your first agent")
|
|
272
274
|
})
|
|
273
|
-
})] }) : /* @__PURE__ */
|
|
275
|
+
})] }) : /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g("p", { children: Y !== void 0 && Y > 0 ? C("botlit.dashboard.activeAgents.activeElsewhere", "{{count}} active agents", { count: d(Y) }) : C("botlit.dashboard.activeAgents.noneActive", "{{count}} agents, none active", { count: X === void 0 ? q(L.length, B) : d(X) }) }), /* @__PURE__ */ g(o, {
|
|
274
276
|
variant: "outline",
|
|
275
277
|
size: "sm",
|
|
276
278
|
className: "mt-3",
|
|
277
|
-
onClick: () =>
|
|
278
|
-
children:
|
|
279
|
+
onClick: () => D("agents"),
|
|
280
|
+
children: C("botlit.dashboard.activeAgents.viewAgents", "Review agents")
|
|
279
281
|
})] })]
|
|
280
282
|
}) })]
|
|
281
283
|
}) : null]
|
|
282
284
|
}),
|
|
283
|
-
/* @__PURE__ */
|
|
285
|
+
/* @__PURE__ */ _(le, {
|
|
284
286
|
treatment: "plain",
|
|
285
287
|
className: "border-border-seam p-6",
|
|
286
|
-
children: [/* @__PURE__ */
|
|
288
|
+
children: [/* @__PURE__ */ g("h2", {
|
|
287
289
|
className: "text-lg font-semibold tracking-tight text-text-primary",
|
|
288
|
-
children:
|
|
289
|
-
}), /* @__PURE__ */
|
|
290
|
+
children: C("botlit.dashboard.quickActions.title", "Quick Actions")
|
|
291
|
+
}), /* @__PURE__ */ _("ul", {
|
|
290
292
|
className: "mt-4 grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-4",
|
|
291
293
|
children: [
|
|
292
|
-
/* @__PURE__ */
|
|
294
|
+
/* @__PURE__ */ g(T, {
|
|
293
295
|
permission: s.KNOWLEDGE_CREATE,
|
|
294
|
-
to:
|
|
295
|
-
icon: /* @__PURE__ */
|
|
296
|
+
to: O("knowledge/new"),
|
|
297
|
+
icon: /* @__PURE__ */ g(fe, {
|
|
296
298
|
className: "h-8 w-8 text-text-secondary",
|
|
297
299
|
"aria-hidden": "true"
|
|
298
300
|
}),
|
|
299
|
-
label:
|
|
301
|
+
label: C("botlit.dashboard.quickActions.addKnowledge", "Add Knowledge")
|
|
300
302
|
}),
|
|
301
|
-
/* @__PURE__ */
|
|
303
|
+
/* @__PURE__ */ g(T, {
|
|
302
304
|
permission: s.LLM_CREATE,
|
|
303
|
-
to:
|
|
304
|
-
icon: /* @__PURE__ */
|
|
305
|
+
to: O("settings"),
|
|
306
|
+
icon: /* @__PURE__ */ g(me, {
|
|
305
307
|
className: "h-8 w-8 text-text-secondary",
|
|
306
308
|
"aria-hidden": "true"
|
|
307
309
|
}),
|
|
308
|
-
label:
|
|
310
|
+
label: C("botlit.dashboard.quickActions.connectModel", "Connect LLM Provider")
|
|
309
311
|
}),
|
|
310
|
-
/* @__PURE__ */
|
|
312
|
+
/* @__PURE__ */ g(T, {
|
|
311
313
|
permission: s.AGENT_CREATE,
|
|
312
|
-
to:
|
|
313
|
-
icon: /* @__PURE__ */
|
|
314
|
+
to: O("agents/new"),
|
|
315
|
+
icon: /* @__PURE__ */ g(x, {
|
|
314
316
|
className: "h-8 w-8 text-text-secondary",
|
|
315
317
|
"aria-hidden": "true"
|
|
316
318
|
}),
|
|
317
|
-
label:
|
|
319
|
+
label: C("botlit.dashboard.actions.createAgent", "Create Agent")
|
|
318
320
|
}),
|
|
319
|
-
/* @__PURE__ */
|
|
321
|
+
/* @__PURE__ */ g(T, {
|
|
320
322
|
permission: s.APP_CREATE,
|
|
321
|
-
to:
|
|
322
|
-
icon: /* @__PURE__ */
|
|
323
|
+
to: O("bots/new"),
|
|
324
|
+
icon: /* @__PURE__ */ g(y, {
|
|
323
325
|
className: "h-8 w-8 text-text-secondary",
|
|
324
326
|
"aria-hidden": "true"
|
|
325
327
|
}),
|
|
326
|
-
label:
|
|
328
|
+
label: C("botlit.dashboard.actions.createBot", "Create Bot")
|
|
327
329
|
}),
|
|
328
|
-
/* @__PURE__ */
|
|
330
|
+
/* @__PURE__ */ g(T, {
|
|
329
331
|
permission: s.CHANNEL_MESSAGE_READ,
|
|
330
332
|
to: {
|
|
331
333
|
pathname: "/conversations",
|
|
332
|
-
search:
|
|
334
|
+
search: E.search
|
|
333
335
|
},
|
|
334
|
-
icon: /* @__PURE__ */
|
|
336
|
+
icon: /* @__PURE__ */ g(ge, {
|
|
335
337
|
className: "h-8 w-8 text-text-secondary",
|
|
336
338
|
"aria-hidden": "true"
|
|
337
339
|
}),
|
|
338
|
-
label:
|
|
340
|
+
label: C("botlit.dashboard.quickActions.conversations", "Conversations")
|
|
339
341
|
}),
|
|
340
|
-
/* @__PURE__ */
|
|
341
|
-
to:
|
|
342
|
-
icon: /* @__PURE__ */
|
|
342
|
+
/* @__PURE__ */ g(T, {
|
|
343
|
+
to: O("handoffs"),
|
|
344
|
+
icon: /* @__PURE__ */ g(pe, {
|
|
343
345
|
className: "h-8 w-8 text-text-secondary",
|
|
344
346
|
"aria-hidden": "true"
|
|
345
347
|
}),
|
|
346
|
-
label:
|
|
348
|
+
label: C("botlit.dashboard.quickActions.handoffs", "Human Handoffs")
|
|
347
349
|
})
|
|
348
350
|
]
|
|
349
351
|
})]
|
|
@@ -352,6 +354,6 @@ var x = "", S = "flex flex-col items-center gap-2 p-4 rounded-card border borde
|
|
|
352
354
|
})
|
|
353
355
|
});
|
|
354
356
|
};
|
|
355
|
-
export {
|
|
357
|
+
export { E as DashboardPage };
|
|
356
358
|
|
|
357
359
|
//# sourceMappingURL=DashboardPage.js.map
|