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