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