@burdenoff/microfe-botmanor 2026.1120.11 → 2026.1120.12
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/hooks/index.d.ts +2 -2
- package/dist/botlit/hooks/index.js +2 -2
- package/dist/botlit/hooks/useExecutions.d.ts +30 -18
- package/dist/botlit/hooks/useExecutions.js +42 -49
- package/dist/botlit/hooks/useExecutions.js.map +1 -1
- package/dist/botlit/pages/ExecutionDetailPage.js +263 -199
- package/dist/botlit/pages/ExecutionDetailPage.js.map +1 -1
- package/dist/botlit/pages/ExecutionsPage.js +333 -210
- package/dist/botlit/pages/ExecutionsPage.js.map +1 -1
- package/dist/botlit/utils/executionStatus.d.ts +16 -0
- package/dist/botlit/utils/executionStatus.js +32 -0
- package/dist/botlit/utils/executionStatus.js.map +1 -0
- package/dist/botlit/utils/formatters.js +4 -2
- package/dist/botlit/utils/formatters.js.map +1 -1
- package/dist/generated/wspace-operations.d.ts +67 -0
- package/dist/generated/wspace-operations.js +101 -73
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/generated/wspace-types.d.ts +55 -0
- package/dist/generated/wspace-types.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,194 +1,306 @@
|
|
|
1
1
|
import { useBotlit as e } from "../providers/BotlitProvider.js";
|
|
2
2
|
import { useTr as t } from "../../shared/hooks/useTr.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
3
|
+
import { useBots as n } from "../hooks/useBots.js";
|
|
4
|
+
import { useAgents as r } from "../hooks/useAgents.js";
|
|
5
|
+
import { PageLayout as i } from "../components/PageLayout.js";
|
|
6
|
+
import { Card as a, CardContent as o } from "../components/Card.js";
|
|
7
|
+
import { Button as s } from "../components/Button.js";
|
|
8
|
+
import { Input as ee } from "../components/Input.js";
|
|
9
|
+
import { Badge as c } from "../components/Badge.js";
|
|
10
|
+
import { EmptyState as te } from "../components/EmptyState.js";
|
|
11
|
+
import { ErrorState as ne } from "../components/ErrorState.js";
|
|
12
|
+
import { LoadMore as re } from "../components/LoadMore.js";
|
|
13
|
+
import { LiveIndicator as ie } from "../components/LiveIndicator.js";
|
|
14
|
+
import { executionStatusLabels as ae } from "../utils/executionStatus.js";
|
|
15
|
+
import { useExecutionSummary as oe, useExecutions as l } from "../hooks/useExecutions.js";
|
|
16
|
+
import { useLiveExecutionList as u } from "../hooks/useExecutionLiveUpdates.js";
|
|
14
17
|
import "../hooks/index.js";
|
|
15
|
-
import { formatCurrency as
|
|
16
|
-
import { ExecutionStatus as
|
|
17
|
-
import { useMemo as
|
|
18
|
-
import { PagePurpose as
|
|
19
|
-
import { jsx as
|
|
20
|
-
import { Link as
|
|
21
|
-
import { Activity as
|
|
18
|
+
import { formatCurrency as d, formatDuration as f, formatNumber as p, formatRelativeTime as m } from "../utils/formatters.js";
|
|
19
|
+
import { ExecutionStatus as h } from "../../generated/wspace-types.js";
|
|
20
|
+
import { useEffect as g, useMemo as se, useState as _ } from "react";
|
|
21
|
+
import { PagePurpose as ce } from "@burdenoff/fe-libs/ui";
|
|
22
|
+
import { Fragment as v, jsx as y, jsxs as b } from "react/jsx-runtime";
|
|
23
|
+
import { Link as le } from "react-router";
|
|
24
|
+
import { Activity as x, Ban as S, CheckCircle as C, Clock as w, DollarSign as T, Hourglass as E, RefreshCw as D, Search as O, Timer as k, TrendingUp as A, XCircle as j, Zap as M } from "lucide-react";
|
|
22
25
|
// src/botlit/pages/ExecutionsPage.tsx
|
|
23
|
-
var
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
];
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
26
|
+
var ue = [
|
|
27
|
+
h.Completed,
|
|
28
|
+
h.Running,
|
|
29
|
+
h.Pending,
|
|
30
|
+
h.Failed
|
|
31
|
+
], de = 300;
|
|
32
|
+
function fe(e, t) {
|
|
33
|
+
let [n, r] = _(e);
|
|
34
|
+
return g(() => {
|
|
35
|
+
let n = setTimeout(() => r(e), t);
|
|
36
|
+
return () => clearTimeout(n);
|
|
37
|
+
}, [e, t]), n;
|
|
38
|
+
}
|
|
39
|
+
function pe(e) {
|
|
40
|
+
if (!e) return;
|
|
41
|
+
let t = /* @__PURE__ */ new Date(`${e}T00:00:00`);
|
|
42
|
+
return Number.isNaN(t.getTime()) ? void 0 : t.toISOString();
|
|
43
|
+
}
|
|
44
|
+
function N(e) {
|
|
45
|
+
if (!e) return;
|
|
46
|
+
let t = /* @__PURE__ */ new Date(`${e}T23:59:59.999`);
|
|
47
|
+
return Number.isNaN(t.getTime()) ? void 0 : t.toISOString();
|
|
40
48
|
}
|
|
41
|
-
var
|
|
49
|
+
var P = ({ status: e, className: t }) => {
|
|
42
50
|
switch (e) {
|
|
43
|
-
case
|
|
44
|
-
case
|
|
45
|
-
case
|
|
46
|
-
case
|
|
47
|
-
case
|
|
48
|
-
|
|
51
|
+
case h.Completed: return /* @__PURE__ */ y(C, { className: t ?? "h-4 w-4 text-status-success-text" });
|
|
52
|
+
case h.Failed: return /* @__PURE__ */ y(j, { className: t ?? "h-4 w-4 text-status-error-text" });
|
|
53
|
+
case h.Timeout: return /* @__PURE__ */ y(k, { className: t ?? "h-4 w-4 text-status-error-text" });
|
|
54
|
+
case h.Cancelled: return /* @__PURE__ */ y(S, { className: t ?? "h-4 w-4 text-text-secondary" });
|
|
55
|
+
case h.Running: return /* @__PURE__ */ y(D, { className: t ?? "h-4 w-4 text-status-info-text motion-safe:animate-spin" });
|
|
56
|
+
case h.Pending: return /* @__PURE__ */ y(E, { className: t ?? "h-4 w-4 text-status-warning-text" });
|
|
57
|
+
default: return /* @__PURE__ */ y(x, { className: t ?? "h-4 w-4 text-text-secondary" });
|
|
49
58
|
}
|
|
50
|
-
},
|
|
59
|
+
}, F = ({ status: e, labels: t }) => {
|
|
51
60
|
let n = {
|
|
52
|
-
[
|
|
53
|
-
[
|
|
54
|
-
[
|
|
55
|
-
[
|
|
56
|
-
[
|
|
57
|
-
[
|
|
61
|
+
[h.Completed]: "success",
|
|
62
|
+
[h.Failed]: "destructive",
|
|
63
|
+
[h.Timeout]: "destructive",
|
|
64
|
+
[h.Running]: "default",
|
|
65
|
+
[h.Pending]: "warning",
|
|
66
|
+
[h.Cancelled]: "secondary"
|
|
58
67
|
};
|
|
59
|
-
return /* @__PURE__ */
|
|
68
|
+
return /* @__PURE__ */ b(c, {
|
|
60
69
|
variant: n[e] ?? "secondary",
|
|
61
70
|
className: "flex items-center gap-1",
|
|
62
|
-
children: [/* @__PURE__ */
|
|
71
|
+
children: [/* @__PURE__ */ y(P, { status: e }), t[e] ?? e]
|
|
63
72
|
});
|
|
64
|
-
},
|
|
65
|
-
let
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
73
|
+
}, I = ({ execution: e, noBot: t, noAgent: n }) => {
|
|
74
|
+
let r = e.appName ?? e.appId ?? t, i = e.agentName ?? e.agentId ?? n;
|
|
75
|
+
return /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ y("p", {
|
|
76
|
+
className: "font-medium truncate",
|
|
77
|
+
title: e.appId ?? void 0,
|
|
78
|
+
children: r
|
|
79
|
+
}), /* @__PURE__ */ y("p", {
|
|
80
|
+
className: "text-sm text-text-secondary truncate",
|
|
81
|
+
title: e.agentId ?? void 0,
|
|
82
|
+
children: i
|
|
83
|
+
})] });
|
|
84
|
+
}, L = () => {
|
|
85
|
+
let c = t(), { getPath: h } = e(), [g, v] = _(""), [S, C] = _([]), [E, k] = _(""), [j, L] = _(""), [R, z] = _(""), [B, V] = _(""), H = ae(c), U = fe(g, de), me = r(), he = n(), W = se(() => ({
|
|
86
|
+
search: U,
|
|
87
|
+
status: S,
|
|
88
|
+
agentId: E || void 0,
|
|
89
|
+
appId: j || void 0,
|
|
90
|
+
startDate: pe(R),
|
|
91
|
+
endDate: N(B)
|
|
92
|
+
}), [
|
|
93
|
+
U,
|
|
94
|
+
S,
|
|
95
|
+
E,
|
|
96
|
+
j,
|
|
97
|
+
R,
|
|
98
|
+
B
|
|
99
|
+
]), { data: ge, loading: _e, error: G, refetch: K, hasMore: ve, loadingMore: ye, loadMore: q } = l(W), J = oe(W), Y = J.data, X = S.length > 0 || !!U.trim() || !!(E || j || R || B), { rows: Z, live: be } = u(ge, {
|
|
69
100
|
enabled: !0,
|
|
70
|
-
includeNew:
|
|
71
|
-
onFallbackPoll: () =>
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
101
|
+
includeNew: !X,
|
|
102
|
+
onFallbackPoll: () => {
|
|
103
|
+
K(), J.refetch();
|
|
104
|
+
}
|
|
105
|
+
}), xe = c("botlit.executions.table.noBot", "No bot"), Q = c("botlit.executions.table.noAgent", "No agent"), $ = "h-9 rounded-md border border-border-default bg-bg-surface px-2 text-sm text-text-primary";
|
|
106
|
+
return /* @__PURE__ */ y(i, {
|
|
107
|
+
title: c("botlit.executions.title", "Executions"),
|
|
108
|
+
description: c("botlit.executions.description", "Monitor agent execution history, performance, and costs"),
|
|
109
|
+
actions: /* @__PURE__ */ b("div", {
|
|
77
110
|
className: "flex items-center gap-2",
|
|
78
|
-
children: [/* @__PURE__ */
|
|
111
|
+
children: [/* @__PURE__ */ y(ie, { state: be }), /* @__PURE__ */ y(s, {
|
|
79
112
|
variant: "outline",
|
|
80
|
-
leftIcon: /* @__PURE__ */
|
|
81
|
-
onClick: () =>
|
|
82
|
-
|
|
113
|
+
leftIcon: /* @__PURE__ */ y(D, { size: 16 }),
|
|
114
|
+
onClick: () => {
|
|
115
|
+
K(), J.refetch();
|
|
116
|
+
},
|
|
117
|
+
children: c("botlit.executions.actions.refresh", "Refresh")
|
|
83
118
|
})]
|
|
84
119
|
}),
|
|
85
|
-
children: /* @__PURE__ */
|
|
120
|
+
children: /* @__PURE__ */ b("div", {
|
|
86
121
|
className: "space-y-6",
|
|
87
122
|
children: [
|
|
88
|
-
/* @__PURE__ */
|
|
89
|
-
icon: /* @__PURE__ */
|
|
90
|
-
children:
|
|
123
|
+
/* @__PURE__ */ y(ce, {
|
|
124
|
+
icon: /* @__PURE__ */ y(x, { size: 18 }),
|
|
125
|
+
children: c("botlit.executions.purpose", "An execution is a single run of an agent — one request in, one response out. See which runs succeeded or failed, how long they took, how many tokens they used and, where the model price is known, what they cost. Open a run to read its input and output, the model and agent version that answered, its token split, and the knowledge and policies that shaped it.")
|
|
91
126
|
}),
|
|
92
|
-
|
|
127
|
+
Y && Y.total > 0 && /* @__PURE__ */ b("div", {
|
|
93
128
|
className: "space-y-2",
|
|
94
|
-
children: [/* @__PURE__ */
|
|
129
|
+
children: [/* @__PURE__ */ b("div", {
|
|
95
130
|
className: "grid grid-cols-2 md:grid-cols-4 gap-4",
|
|
96
131
|
children: [
|
|
97
|
-
/* @__PURE__ */
|
|
132
|
+
/* @__PURE__ */ y(a, {
|
|
98
133
|
treatment: "glass",
|
|
99
134
|
glow: !0,
|
|
100
|
-
children: /* @__PURE__ */
|
|
135
|
+
children: /* @__PURE__ */ y(o, {
|
|
101
136
|
className: "pt-6",
|
|
102
|
-
children: /* @__PURE__ */
|
|
137
|
+
children: /* @__PURE__ */ b("div", {
|
|
103
138
|
className: "flex items-center justify-between",
|
|
104
|
-
children: [/* @__PURE__ */
|
|
139
|
+
children: [/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
|
|
105
140
|
className: "text-sm text-text-secondary",
|
|
106
|
-
children:
|
|
107
|
-
}), /* @__PURE__ */
|
|
141
|
+
children: c("botlit.executions.rollup.executions", "Executions")
|
|
142
|
+
}), /* @__PURE__ */ y("p", {
|
|
108
143
|
className: "text-2xl font-bold tabular-nums",
|
|
109
|
-
children:
|
|
110
|
-
})] }), /* @__PURE__ */
|
|
144
|
+
children: p(Y.total)
|
|
145
|
+
})] }), /* @__PURE__ */ y(x, { className: "h-8 w-8 text-text-secondary" })]
|
|
111
146
|
})
|
|
112
147
|
})
|
|
113
148
|
}),
|
|
114
|
-
/* @__PURE__ */
|
|
149
|
+
/* @__PURE__ */ y(a, {
|
|
115
150
|
treatment: "metric",
|
|
116
|
-
children: /* @__PURE__ */
|
|
151
|
+
children: /* @__PURE__ */ y(o, {
|
|
117
152
|
className: "pt-6",
|
|
118
|
-
children: /* @__PURE__ */
|
|
153
|
+
children: /* @__PURE__ */ b("div", {
|
|
119
154
|
className: "flex items-center justify-between",
|
|
120
|
-
children: [/* @__PURE__ */
|
|
155
|
+
children: [/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
|
|
121
156
|
className: "text-sm text-text-secondary",
|
|
122
|
-
children:
|
|
123
|
-
}), /* @__PURE__ */
|
|
157
|
+
children: c("botlit.executions.rollup.successRate", "Success Rate")
|
|
158
|
+
}), /* @__PURE__ */ b("p", {
|
|
124
159
|
className: "text-2xl font-bold tabular-nums text-status-success-text",
|
|
125
|
-
children: [(
|
|
126
|
-
})] }), /* @__PURE__ */
|
|
160
|
+
children: [(Y.succeeded / Y.total * 100).toFixed(1), "%"]
|
|
161
|
+
})] }), /* @__PURE__ */ y(A, { className: "h-8 w-8 text-status-success-text" })]
|
|
127
162
|
})
|
|
128
163
|
})
|
|
129
164
|
}),
|
|
130
|
-
/* @__PURE__ */
|
|
165
|
+
/* @__PURE__ */ y(a, {
|
|
131
166
|
treatment: "metric",
|
|
132
|
-
children: /* @__PURE__ */
|
|
167
|
+
children: /* @__PURE__ */ y(o, {
|
|
133
168
|
className: "pt-6",
|
|
134
|
-
children: /* @__PURE__ */
|
|
169
|
+
children: /* @__PURE__ */ b("div", {
|
|
135
170
|
className: "flex items-center justify-between",
|
|
136
|
-
children: [/* @__PURE__ */
|
|
171
|
+
children: [/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
|
|
137
172
|
className: "text-sm text-text-secondary",
|
|
138
|
-
children:
|
|
139
|
-
}), /* @__PURE__ */
|
|
173
|
+
children: c("botlit.executions.rollup.avgDuration", "Avg Duration")
|
|
174
|
+
}), /* @__PURE__ */ y("p", {
|
|
140
175
|
className: "text-2xl font-bold tabular-nums",
|
|
141
|
-
children:
|
|
142
|
-
})] }), /* @__PURE__ */
|
|
176
|
+
children: f(Y.avgDurationMs)
|
|
177
|
+
})] }), /* @__PURE__ */ y(w, { className: "h-8 w-8 text-text-secondary" })]
|
|
143
178
|
})
|
|
144
179
|
})
|
|
145
180
|
}),
|
|
146
|
-
/* @__PURE__ */
|
|
181
|
+
/* @__PURE__ */ y(a, {
|
|
147
182
|
treatment: "metric",
|
|
148
|
-
children: /* @__PURE__ */
|
|
183
|
+
children: /* @__PURE__ */ y(o, {
|
|
149
184
|
className: "pt-6",
|
|
150
|
-
children: /* @__PURE__ */
|
|
185
|
+
children: /* @__PURE__ */ b("div", {
|
|
151
186
|
className: "flex items-center justify-between",
|
|
152
|
-
children: [/* @__PURE__ */
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
187
|
+
children: [/* @__PURE__ */ b("div", { children: [
|
|
188
|
+
/* @__PURE__ */ y("p", {
|
|
189
|
+
className: "text-sm text-text-secondary",
|
|
190
|
+
children: c("botlit.executions.rollup.totalCost", "Total Cost")
|
|
191
|
+
}),
|
|
192
|
+
/* @__PURE__ */ y("p", {
|
|
193
|
+
className: "text-2xl font-bold tabular-nums",
|
|
194
|
+
children: d(Y.totalCost)
|
|
195
|
+
}),
|
|
196
|
+
Y.unpricedRuns > 0 && /* @__PURE__ */ y("p", {
|
|
197
|
+
className: "text-xs text-text-secondary",
|
|
198
|
+
children: c("botlit.executions.rollup.unpriced", "{{count}} runs have no known price", { count: Y.unpricedRuns })
|
|
199
|
+
})
|
|
200
|
+
] }), /* @__PURE__ */ y(T, { className: "h-8 w-8 text-text-secondary" })]
|
|
159
201
|
})
|
|
160
202
|
})
|
|
161
203
|
})
|
|
162
204
|
]
|
|
163
|
-
}), /* @__PURE__ */
|
|
205
|
+
}), /* @__PURE__ */ y("p", {
|
|
164
206
|
className: "text-xs text-text-secondary",
|
|
165
|
-
children:
|
|
207
|
+
children: c("botlit.executions.rollup.calculatedAcrossAll", "Calculated across all {{count}} matching runs. Average duration covers the {{timed}} runs that recorded one.", {
|
|
208
|
+
count: Y.total,
|
|
209
|
+
timed: Y.timedRuns
|
|
210
|
+
})
|
|
166
211
|
})]
|
|
167
212
|
}),
|
|
168
|
-
/* @__PURE__ */
|
|
213
|
+
/* @__PURE__ */ b("div", {
|
|
169
214
|
className: "flex flex-wrap items-center gap-4",
|
|
170
|
-
children: [/* @__PURE__ */
|
|
215
|
+
children: [/* @__PURE__ */ b("div", {
|
|
171
216
|
className: "relative flex-1 max-w-md",
|
|
172
|
-
children: [/* @__PURE__ */
|
|
173
|
-
placeholder:
|
|
174
|
-
value:
|
|
175
|
-
onChange: (e) =>
|
|
176
|
-
className: "pl-9"
|
|
217
|
+
children: [/* @__PURE__ */ y(O, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-text-secondary" }), /* @__PURE__ */ y(ee, {
|
|
218
|
+
placeholder: c("botlit.executions.filters.searchPlaceholder", "Search by run, agent, bot or input…"),
|
|
219
|
+
value: g,
|
|
220
|
+
onChange: (e) => v(e.target.value),
|
|
221
|
+
className: "pl-9",
|
|
222
|
+
"aria-label": c("botlit.executions.filters.searchLabel", "Search executions")
|
|
177
223
|
})]
|
|
178
|
-
}), /* @__PURE__ */
|
|
224
|
+
}), /* @__PURE__ */ y("div", {
|
|
179
225
|
className: "flex flex-wrap gap-2",
|
|
180
|
-
|
|
181
|
-
|
|
226
|
+
role: "group",
|
|
227
|
+
"aria-label": c("botlit.executions.filters.statusGroup", "Filter by status"),
|
|
228
|
+
children: ue.map((e) => /* @__PURE__ */ b(s, {
|
|
229
|
+
variant: S.includes(e) ? "default" : "outline",
|
|
182
230
|
size: "sm",
|
|
183
|
-
|
|
184
|
-
|
|
231
|
+
"aria-pressed": S.includes(e),
|
|
232
|
+
onClick: () => C((t) => t.includes(e) ? t.filter((t) => t !== e) : [...t, e]),
|
|
233
|
+
children: [/* @__PURE__ */ y(P, { status: e }), /* @__PURE__ */ y("span", {
|
|
185
234
|
className: "ml-1",
|
|
186
|
-
children:
|
|
235
|
+
children: H[e]
|
|
187
236
|
})]
|
|
188
237
|
}, e))
|
|
189
238
|
})]
|
|
190
239
|
}),
|
|
191
|
-
|
|
240
|
+
/* @__PURE__ */ b("div", {
|
|
241
|
+
className: "flex flex-wrap items-end gap-4",
|
|
242
|
+
children: [
|
|
243
|
+
/* @__PURE__ */ b("label", {
|
|
244
|
+
className: "grid gap-1 text-xs text-text-secondary",
|
|
245
|
+
children: [c("botlit.executions.filters.agent", "Agent"), /* @__PURE__ */ b("select", {
|
|
246
|
+
className: $,
|
|
247
|
+
value: E,
|
|
248
|
+
onChange: (e) => k(e.target.value),
|
|
249
|
+
children: [/* @__PURE__ */ y("option", {
|
|
250
|
+
value: "",
|
|
251
|
+
children: c("botlit.executions.filters.allAgents", "All agents")
|
|
252
|
+
}), me.data.map((e) => /* @__PURE__ */ y("option", {
|
|
253
|
+
value: e.id,
|
|
254
|
+
children: e.name
|
|
255
|
+
}, e.id))]
|
|
256
|
+
})]
|
|
257
|
+
}),
|
|
258
|
+
/* @__PURE__ */ b("label", {
|
|
259
|
+
className: "grid gap-1 text-xs text-text-secondary",
|
|
260
|
+
children: [c("botlit.executions.filters.bot", "Bot"), /* @__PURE__ */ b("select", {
|
|
261
|
+
className: $,
|
|
262
|
+
value: j,
|
|
263
|
+
onChange: (e) => L(e.target.value),
|
|
264
|
+
children: [/* @__PURE__ */ y("option", {
|
|
265
|
+
value: "",
|
|
266
|
+
children: c("botlit.executions.filters.allBots", "All bots")
|
|
267
|
+
}), he.data.map((e) => /* @__PURE__ */ y("option", {
|
|
268
|
+
value: e.id,
|
|
269
|
+
children: e.name
|
|
270
|
+
}, e.id))]
|
|
271
|
+
})]
|
|
272
|
+
}),
|
|
273
|
+
/* @__PURE__ */ b("label", {
|
|
274
|
+
className: "grid gap-1 text-xs text-text-secondary",
|
|
275
|
+
children: [c("botlit.executions.filters.from", "From"), /* @__PURE__ */ y("input", {
|
|
276
|
+
type: "date",
|
|
277
|
+
className: $,
|
|
278
|
+
value: R,
|
|
279
|
+
max: B || void 0,
|
|
280
|
+
onChange: (e) => z(e.target.value)
|
|
281
|
+
})]
|
|
282
|
+
}),
|
|
283
|
+
/* @__PURE__ */ b("label", {
|
|
284
|
+
className: "grid gap-1 text-xs text-text-secondary",
|
|
285
|
+
children: [c("botlit.executions.filters.to", "To"), /* @__PURE__ */ y("input", {
|
|
286
|
+
type: "date",
|
|
287
|
+
className: $,
|
|
288
|
+
value: B,
|
|
289
|
+
min: R || void 0,
|
|
290
|
+
onChange: (e) => V(e.target.value)
|
|
291
|
+
})]
|
|
292
|
+
}),
|
|
293
|
+
X && /* @__PURE__ */ y(s, {
|
|
294
|
+
variant: "ghost",
|
|
295
|
+
size: "sm",
|
|
296
|
+
onClick: () => {
|
|
297
|
+
v(""), C([]), k(""), L(""), z(""), V("");
|
|
298
|
+
},
|
|
299
|
+
children: c("botlit.executions.filters.clear", "Clear filters")
|
|
300
|
+
})
|
|
301
|
+
]
|
|
302
|
+
}),
|
|
303
|
+
_e ? /* @__PURE__ */ y("div", {
|
|
192
304
|
className: "space-y-4",
|
|
193
305
|
children: [
|
|
194
306
|
1,
|
|
@@ -196,121 +308,132 @@ var R = ({ status: e, className: t }) => {
|
|
|
196
308
|
3,
|
|
197
309
|
4,
|
|
198
310
|
5
|
|
199
|
-
].map((e) => /* @__PURE__ */
|
|
200
|
-
}) : G ? /* @__PURE__ */
|
|
311
|
+
].map((e) => /* @__PURE__ */ y("div", { className: "h-20 bg-bg-sunken motion-safe:animate-vc-shimmer rounded-lg" }, e))
|
|
312
|
+
}) : G ? /* @__PURE__ */ y(ne, {
|
|
201
313
|
resource: "executions",
|
|
202
314
|
error: G,
|
|
203
315
|
onRetry: () => void K()
|
|
204
|
-
}) :
|
|
316
|
+
}) : Z.length > 0 ? /* @__PURE__ */ b("div", {
|
|
205
317
|
className: "space-y-2",
|
|
206
|
-
children: [/* @__PURE__ */
|
|
318
|
+
children: [/* @__PURE__ */ b("div", {
|
|
319
|
+
"aria-hidden": "true",
|
|
207
320
|
className: "grid grid-cols-12 gap-4 px-4 py-2 text-sm font-medium text-text-secondary border-b border-border-subtle",
|
|
208
321
|
children: [
|
|
209
|
-
/* @__PURE__ */
|
|
322
|
+
/* @__PURE__ */ y("div", {
|
|
210
323
|
className: "col-span-2",
|
|
211
|
-
children:
|
|
324
|
+
children: c("botlit.executions.table.status", "Status")
|
|
212
325
|
}),
|
|
213
|
-
/* @__PURE__ */
|
|
326
|
+
/* @__PURE__ */ y("div", {
|
|
214
327
|
className: "col-span-3",
|
|
215
|
-
children:
|
|
328
|
+
children: c("botlit.executions.table.botAgent", "Bot / Agent")
|
|
216
329
|
}),
|
|
217
|
-
/* @__PURE__ */
|
|
330
|
+
/* @__PURE__ */ y("div", {
|
|
218
331
|
className: "col-span-2",
|
|
219
|
-
children:
|
|
332
|
+
children: c("botlit.executions.table.duration", "Duration")
|
|
220
333
|
}),
|
|
221
|
-
/* @__PURE__ */
|
|
334
|
+
/* @__PURE__ */ y("div", {
|
|
222
335
|
className: "col-span-2",
|
|
223
|
-
children:
|
|
336
|
+
children: c("botlit.executions.table.tokens", "Tokens")
|
|
224
337
|
}),
|
|
225
|
-
/* @__PURE__ */
|
|
338
|
+
/* @__PURE__ */ y("div", {
|
|
226
339
|
className: "col-span-1",
|
|
227
|
-
children:
|
|
340
|
+
children: c("botlit.executions.table.cost", "Cost")
|
|
228
341
|
}),
|
|
229
|
-
/* @__PURE__ */
|
|
342
|
+
/* @__PURE__ */ y("div", {
|
|
230
343
|
className: "col-span-2",
|
|
231
|
-
children:
|
|
344
|
+
children: c("botlit.executions.table.started", "Started")
|
|
232
345
|
})
|
|
233
346
|
]
|
|
234
|
-
}),
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
})
|
|
268
|
-
})
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
})
|
|
278
|
-
})
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
})
|
|
347
|
+
}), /* @__PURE__ */ y("ul", {
|
|
348
|
+
className: "space-y-2",
|
|
349
|
+
"aria-label": c("botlit.executions.list.label", "Executions"),
|
|
350
|
+
children: Z.map((e) => /* @__PURE__ */ y("li", { children: /* @__PURE__ */ y(le, {
|
|
351
|
+
to: h(`executions/${e.id}`),
|
|
352
|
+
"aria-label": c("botlit.executions.list.rowLabel", "{{status}} run of {{agent}}, started {{started}}", {
|
|
353
|
+
status: H[e.status] ?? e.status,
|
|
354
|
+
agent: e.agentName ?? e.agentId ?? Q,
|
|
355
|
+
started: m(e.createdAt)
|
|
356
|
+
}),
|
|
357
|
+
children: /* @__PURE__ */ y(a, {
|
|
358
|
+
className: "hover:border-primary/50 transition-colors cursor-pointer",
|
|
359
|
+
children: /* @__PURE__ */ y(o, {
|
|
360
|
+
className: "py-3",
|
|
361
|
+
children: /* @__PURE__ */ b("div", {
|
|
362
|
+
className: "grid grid-cols-12 gap-4 items-center",
|
|
363
|
+
children: [
|
|
364
|
+
/* @__PURE__ */ b("div", {
|
|
365
|
+
className: "col-span-2",
|
|
366
|
+
children: [/* @__PURE__ */ y(F, {
|
|
367
|
+
status: e.status,
|
|
368
|
+
labels: H
|
|
369
|
+
}), e.errorCode === "ORPHANED" && /* @__PURE__ */ y("p", {
|
|
370
|
+
className: "mt-1 text-xs text-text-secondary",
|
|
371
|
+
children: c("botlit.executions.status.orphaned", "Never finished (cleaned up)")
|
|
372
|
+
})]
|
|
373
|
+
}),
|
|
374
|
+
/* @__PURE__ */ y("div", {
|
|
375
|
+
className: "col-span-3",
|
|
376
|
+
children: /* @__PURE__ */ y(I, {
|
|
377
|
+
execution: e,
|
|
378
|
+
noBot: xe,
|
|
379
|
+
noAgent: Q
|
|
380
|
+
})
|
|
381
|
+
}),
|
|
382
|
+
/* @__PURE__ */ y("div", {
|
|
383
|
+
className: "col-span-2",
|
|
384
|
+
children: /* @__PURE__ */ b("div", {
|
|
385
|
+
className: "flex items-center gap-1",
|
|
386
|
+
children: [/* @__PURE__ */ y(w, {
|
|
387
|
+
size: 14,
|
|
388
|
+
className: "text-text-secondary"
|
|
389
|
+
}), /* @__PURE__ */ y("span", { children: f(e.duration) })]
|
|
390
|
+
})
|
|
391
|
+
}),
|
|
392
|
+
/* @__PURE__ */ y("div", {
|
|
393
|
+
className: "col-span-2",
|
|
394
|
+
children: /* @__PURE__ */ b("div", {
|
|
395
|
+
className: "flex items-center gap-1",
|
|
396
|
+
children: [/* @__PURE__ */ y(M, {
|
|
397
|
+
size: 14,
|
|
398
|
+
className: "text-text-secondary"
|
|
399
|
+
}), /* @__PURE__ */ y("span", { children: e.tokensUsed === null || e.tokensUsed === void 0 ? "—" : p(e.tokensUsed) })]
|
|
400
|
+
})
|
|
401
|
+
}),
|
|
402
|
+
/* @__PURE__ */ y("div", {
|
|
403
|
+
className: "col-span-1",
|
|
404
|
+
children: /* @__PURE__ */ b("div", {
|
|
405
|
+
className: "flex items-center gap-1",
|
|
406
|
+
children: [/* @__PURE__ */ y(T, {
|
|
407
|
+
size: 14,
|
|
408
|
+
className: "text-text-secondary"
|
|
409
|
+
}), /* @__PURE__ */ y("span", { children: d(e.cost) })]
|
|
410
|
+
})
|
|
411
|
+
}),
|
|
412
|
+
/* @__PURE__ */ y("div", {
|
|
413
|
+
className: "col-span-2 text-sm text-text-secondary",
|
|
414
|
+
children: m(e.createdAt)
|
|
288
415
|
})
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
className: "col-span-2 text-sm text-text-secondary",
|
|
292
|
-
children: v(e.createdAt)
|
|
293
|
-
})
|
|
294
|
-
]
|
|
416
|
+
]
|
|
417
|
+
})
|
|
295
418
|
})
|
|
296
419
|
})
|
|
297
|
-
})
|
|
298
|
-
}
|
|
299
|
-
}) : /* @__PURE__ */
|
|
420
|
+
}) }, e.id))
|
|
421
|
+
})]
|
|
422
|
+
}) : /* @__PURE__ */ y(te, {
|
|
300
423
|
illustration: "empty-search",
|
|
301
|
-
title:
|
|
302
|
-
description:
|
|
424
|
+
title: c("botlit.executions.empty.title", "No executions found"),
|
|
425
|
+
description: X ? c("botlit.executions.empty.descriptionFiltered", "No executions match your filters. Try adjusting your search.") : c("botlit.executions.empty.descriptionNoData", "Executions will appear here when agents process requests.")
|
|
303
426
|
}),
|
|
304
|
-
/* @__PURE__ */
|
|
305
|
-
hasMore:
|
|
306
|
-
loadingMore:
|
|
307
|
-
onLoadMore: () => void
|
|
308
|
-
loadedCount:
|
|
427
|
+
/* @__PURE__ */ y(re, {
|
|
428
|
+
hasMore: ve,
|
|
429
|
+
loadingMore: ye,
|
|
430
|
+
onLoadMore: () => void q(),
|
|
431
|
+
loadedCount: Z.length
|
|
309
432
|
})
|
|
310
433
|
]
|
|
311
434
|
})
|
|
312
435
|
});
|
|
313
436
|
};
|
|
314
|
-
export {
|
|
437
|
+
export { L as ExecutionsPage };
|
|
315
438
|
|
|
316
439
|
//# sourceMappingURL=ExecutionsPage.js.map
|