@burdenoff/microfe-botmanor 2026.1120.11 → 2026.1120.13

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.
@@ -1,329 +1,393 @@
1
1
  import { useBotlit as e } from "../providers/BotlitProvider.js";
2
2
  import { isNative as t, nativeCopyText as n, nativeToast as r } from "../../utils/nativeBridge.js";
3
- import { BOTMANOR_PERMISSIONS as i } from "../permissions/botmanorPermissions.js";
4
- import { BotmanorPermissionGate as a } from "../permissions/useBotmanorPermissions.js";
5
- import { PageLayout as o } from "../components/PageLayout.js";
6
- import { EmptyState as s } from "../components/EmptyState.js";
7
- import { Card as c, CardContent as l, CardDescription as u, CardHeader as d, CardTitle as f } from "../components/Card.js";
8
- import { Button as p } from "../components/Button.js";
9
- import { Badge as m } from "../components/Badge.js";
10
- import { ErrorState as h } from "../components/ErrorState.js";
11
- import { ExecutionModelFallback as g } from "../components/ExecutionModelFallback.js";
12
- import { ExecutionFeedback as _ } from "../components/ExecutionFeedback.js";
13
- import { useExecution as v } from "../hooks/useExecutions.js";
14
- import { useRerunExecution as y } from "../hooks/useRerunExecution.js";
15
- import { useLiveExecution as b } from "../hooks/useExecutionLiveUpdates.js";
16
- import { LiveIndicator as x } from "../components/LiveIndicator.js";
17
- import { formatCurrency as S, formatDuration as C, formatNumber as w, formatRelativeTime as T } from "../utils/formatters.js";
18
- import { ExecutionStatus as E } from "../../generated/wspace-types.js";
3
+ import { useTr as i } from "../../shared/hooks/useTr.js";
4
+ import { BOTMANOR_PERMISSIONS as a } from "../permissions/botmanorPermissions.js";
5
+ import { BotmanorPermissionGate as o } from "../permissions/useBotmanorPermissions.js";
6
+ import { PageLayout as s } from "../components/PageLayout.js";
7
+ import { EmptyState as c } from "../components/EmptyState.js";
8
+ import { Card as l, CardContent as u, CardDescription as d, CardHeader as f, CardTitle as p } from "../components/Card.js";
9
+ import { Button as m } from "../components/Button.js";
10
+ import { Badge as h } from "../components/Badge.js";
11
+ import { ErrorState as g } from "../components/ErrorState.js";
12
+ import { ExecutionModelFallback as ee } from "../components/ExecutionModelFallback.js";
13
+ import { ExecutionFeedback as te } from "../components/ExecutionFeedback.js";
14
+ import { useExecution as ne } from "../hooks/useExecutions.js";
15
+ import { useRerunExecution as _ } from "../hooks/useRerunExecution.js";
16
+ import { useLiveExecution as v } from "../hooks/useExecutionLiveUpdates.js";
17
+ import { LiveIndicator as re } from "../components/LiveIndicator.js";
18
+ import { formatCurrency as ie, formatDuration as y, formatNumber as b, formatRelativeTime as x } from "../utils/formatters.js";
19
+ import { ExecutionStatus as S } from "../../generated/wspace-types.js";
19
20
  import "../permissions/index.js";
20
- import { useEffect as D } from "react";
21
- import { PagePurpose as O } from "@burdenoff/fe-libs/ui";
22
- import { jsx as k, jsxs as A } from "react/jsx-runtime";
23
- import { useParams as j } from "react-router";
24
- import { AlertTriangle as M, ArrowLeft as N, CheckCircle as P, Clock as F, Copy as I, DollarSign as L, Hourglass as R, Play as z, RefreshCw as B, XCircle as V, Zap as H } from "lucide-react";
25
- import { toast as U } from "sonner";
21
+ import { executionStatusLabel as ae, readablePayload as C } from "../utils/executionStatus.js";
22
+ import { useEffect as w } from "react";
23
+ import { PagePurpose as T } from "@burdenoff/fe-libs/ui";
24
+ import { Fragment as E, jsx as D, jsxs as O } from "react/jsx-runtime";
25
+ import { useParams as k } from "react-router";
26
+ import { AlertTriangle as A, ArrowLeft as oe, Ban as j, CheckCircle as M, Clock as N, Copy as P, DollarSign as F, Hourglass as I, Play as L, RefreshCw as R, Timer as z, XCircle as B, Zap as V } from "lucide-react";
27
+ import { toast as H } from "sonner";
26
28
  // src/botlit/pages/ExecutionDetailPage.tsx
27
- var W = 3e3, G = /* @__PURE__ */ new Set(["AGENT", "APP"]), K = (e) => {
29
+ var U = 3e3, W = /* @__PURE__ */ new Set(["AGENT", "APP"]), G = (e) => {
28
30
  switch (e) {
29
- case E.Completed: return /* @__PURE__ */ k(P, {
31
+ case S.Completed: return /* @__PURE__ */ D(M, {
30
32
  className: "text-status-success-text",
31
33
  size: 20
32
34
  });
33
- case E.Failed:
34
- case E.Timeout: return /* @__PURE__ */ k(V, {
35
+ case S.Failed: return /* @__PURE__ */ D(B, {
35
36
  className: "text-status-error-text",
36
37
  size: 20
37
38
  });
38
- case E.Cancelled: return /* @__PURE__ */ k(V, {
39
+ case S.Timeout: return /* @__PURE__ */ D(z, {
40
+ className: "text-status-error-text",
41
+ size: 20
42
+ });
43
+ case S.Cancelled: return /* @__PURE__ */ D(j, {
39
44
  className: "text-text-secondary",
40
45
  size: 20
41
46
  });
42
- case E.Running: return /* @__PURE__ */ k(B, {
47
+ case S.Running: return /* @__PURE__ */ D(R, {
43
48
  className: "text-status-info-text motion-safe:animate-spin",
44
49
  size: 20
45
50
  });
46
- case E.Pending: return /* @__PURE__ */ k(R, {
51
+ case S.Pending: return /* @__PURE__ */ D(I, {
47
52
  className: "text-status-warning-text",
48
53
  size: 20
49
54
  });
50
- default: return /* @__PURE__ */ k(M, {
55
+ default: return /* @__PURE__ */ D(A, {
51
56
  className: "text-text-secondary",
52
57
  size: 20
53
58
  });
54
59
  }
55
- }, q = (e) => {
60
+ }, K = (e) => {
56
61
  switch (e) {
57
- case E.Completed: return "success";
58
- case E.Failed:
59
- case E.Timeout: return "destructive";
60
- case E.Pending: return "warning";
61
- case E.Running: return "default";
62
+ case S.Completed: return "success";
63
+ case S.Failed:
64
+ case S.Timeout: return "destructive";
65
+ case S.Pending: return "warning";
66
+ case S.Running: return "default";
62
67
  default: return "secondary";
63
68
  }
64
- }, J = () => {
65
- let { executionId: P } = j(), { navigateTo: R } = e(), { data: V, loading: J, error: Y, refetch: X } = v(P), Z = y(), Q = V?.status, $ = b(P, Q, () => void X());
66
- if (D(() => {
67
- if ($ === "live" || Q !== E.Pending && Q !== E.Running) return;
68
- let e = setInterval(() => void X(), W);
69
+ };
70
+ function q(e, t) {
71
+ let n = e?.[t];
72
+ return typeof n == "string" && n ? n : void 0;
73
+ }
74
+ function J(e, t) {
75
+ let n = e?.[t];
76
+ return typeof n == "number" && Number.isFinite(n) ? n : void 0;
77
+ }
78
+ var Y = ({ label: e, children: t, mono: n }) => /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("dt", {
79
+ className: "text-sm text-text-secondary",
80
+ children: e
81
+ }), /* @__PURE__ */ D("dd", {
82
+ className: n ? "font-mono text-sm break-all" : "font-medium break-words",
83
+ children: t
84
+ })] }), X = ({ name: e, id: t }) => t ? /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ D("span", {
85
+ className: "block",
86
+ children: e ?? t
87
+ }), e && /* @__PURE__ */ D("span", {
88
+ className: "block font-mono text-xs text-text-secondary",
89
+ children: t
90
+ })] }) : /* @__PURE__ */ D(E, { children: "—" }), se = ({ execution: e, t }) => {
91
+ let n = e.metadata, r = e.metrics, i = q(n, "model"), a = q(n, "providerType"), o = q(n, "agentVersionId"), s = r?.ragChunks ?? J(n, "ragChunksUsed"), c = J(n, "delegationCount"), m = n?.policyBlockedOutput === !0, h = t("botlit.executions.detail.notRecorded", "Not recorded");
92
+ return /* @__PURE__ */ O(l, { children: [/* @__PURE__ */ O(f, { children: [/* @__PURE__ */ D(p, { children: t("botlit.executions.detail.howAnswered", "How it was answered") }), /* @__PURE__ */ D(d, { children: t("botlit.executions.detail.howAnsweredHint", "What the runtime recorded for this run. Individual model and tool calls are not stored step by step.") })] }), /* @__PURE__ */ D(u, { children: /* @__PURE__ */ O("dl", {
93
+ className: "grid grid-cols-1 gap-6 md:grid-cols-3",
94
+ children: [
95
+ /* @__PURE__ */ D(Y, {
96
+ label: t("botlit.executions.detail.model", "Model"),
97
+ children: i ? a ? `${i} (${a})` : i : h
98
+ }),
99
+ /* @__PURE__ */ D(Y, {
100
+ label: t("botlit.executions.detail.agentVersion", "Agent version"),
101
+ mono: !0,
102
+ children: o ?? h
103
+ }),
104
+ /* @__PURE__ */ D(Y, {
105
+ label: t("botlit.executions.detail.tokenSplit", "Input / output tokens"),
106
+ children: r ? `${b(r.inputTokens)} / ${b(r.outputTokens)}` : h
107
+ }),
108
+ /* @__PURE__ */ D(Y, {
109
+ label: t("botlit.executions.detail.toolCalls", "Tool calls"),
110
+ children: r?.toolCalls ?? h
111
+ }),
112
+ /* @__PURE__ */ D(Y, {
113
+ label: t("botlit.executions.detail.knowledgeChunks", "Knowledge passages used"),
114
+ children: s ?? 0
115
+ }),
116
+ /* @__PURE__ */ D(Y, {
117
+ label: t("botlit.executions.detail.delegations", "Delegations to other agents"),
118
+ children: c ?? 0
119
+ }),
120
+ m && /* @__PURE__ */ D(Y, {
121
+ label: t("botlit.executions.detail.policy", "Policy"),
122
+ children: t("botlit.executions.detail.outputBlocked", "The answer was replaced because a content policy blocked it.")
123
+ })
124
+ ]
125
+ }) })] });
126
+ }, Z = () => {
127
+ let E = i(), { executionId: j } = k(), { navigateTo: M } = e(), { data: I, loading: z, error: B, refetch: q } = ne(j), J = _(), Z = I?.status, Q = v(j, Z, () => void q());
128
+ if (w(() => {
129
+ if (Q === "live" || Z !== S.Pending && Z !== S.Running) return;
130
+ let e = setInterval(() => void q(), U);
69
131
  return () => clearInterval(e);
70
132
  }, [
71
- $,
72
133
  Q,
73
- X
74
- ]), J && !V) return /* @__PURE__ */ k(o, {
75
- title: "Loading...",
76
- children: /* @__PURE__ */ k("div", { className: "h-96 bg-bg-sunken motion-safe:animate-vc-shimmer rounded-lg" })
134
+ Z,
135
+ q
136
+ ]), z && !I) return /* @__PURE__ */ D(s, {
137
+ title: E("botlit.executions.detail.loading", "Loading…"),
138
+ children: /* @__PURE__ */ D("div", { className: "h-96 bg-bg-sunken motion-safe:animate-vc-shimmer rounded-lg" })
77
139
  });
78
- if (Y) return /* @__PURE__ */ k(o, {
79
- title: "Execution",
80
- children: /* @__PURE__ */ k(h, {
140
+ if (B) return /* @__PURE__ */ D(s, {
141
+ title: E("botlit.executions.detail.title", "Execution"),
142
+ children: /* @__PURE__ */ D(g, {
81
143
  resource: "this execution",
82
- error: Y,
83
- onRetry: () => void X()
144
+ error: B,
145
+ onRetry: () => void q()
84
146
  })
85
147
  });
86
- if (!V) return /* @__PURE__ */ k(o, {
87
- title: "Execution Not Found",
88
- children: /* @__PURE__ */ k(s, {
89
- illustration: "empty-search",
90
- title: "Execution Not Found",
91
- description: "The execution doesn't exist.",
92
- action: /* @__PURE__ */ k(p, {
93
- onClick: () => R("executions"),
94
- children: "Back to Executions"
148
+ if (!I) {
149
+ let e = E("botlit.executions.detail.notFound", "Execution not found");
150
+ return /* @__PURE__ */ D(s, {
151
+ title: e,
152
+ children: /* @__PURE__ */ D(c, {
153
+ illustration: "empty-search",
154
+ title: e,
155
+ description: E("botlit.executions.detail.notFoundHint", "This execution does not exist in this workspace."),
156
+ action: /* @__PURE__ */ D(m, {
157
+ onClick: () => M("executions"),
158
+ children: E("botlit.executions.detail.back", "Back to Executions")
159
+ })
95
160
  })
96
- })
97
- });
98
- let ee = async () => {
161
+ });
162
+ }
163
+ let ce = ae(E, I.status), $ = C(I.output), le = async () => {
99
164
  try {
100
- let e = await Z.mutateAsync(V.id);
101
- U.success("Re-run started"), R(`executions/${e.id}`);
165
+ let e = await J.mutateAsync(I.id);
166
+ H.success("Re-run started"), M(`executions/${e.id}`);
102
167
  } catch (e) {
103
- U.error(e instanceof Error ? e.message : "Failed to re-run execution");
168
+ H.error(e instanceof Error ? e.message : "Failed to re-run execution");
104
169
  }
105
170
  };
106
- return /* @__PURE__ */ k(o, {
107
- title: /* @__PURE__ */ A("div", {
171
+ return /* @__PURE__ */ D(s, {
172
+ title: /* @__PURE__ */ O("div", {
108
173
  className: "flex items-center gap-3",
109
174
  children: [
110
- /* @__PURE__ */ k(p, {
175
+ /* @__PURE__ */ D(m, {
111
176
  variant: "ghost",
112
177
  size: "icon",
113
- onClick: () => R("executions"),
114
- children: /* @__PURE__ */ k(N, { size: 20 })
178
+ onClick: () => M("executions"),
179
+ "aria-label": E("botlit.executions.detail.back", "Back to Executions"),
180
+ children: /* @__PURE__ */ D(oe, { size: 20 })
115
181
  }),
116
- K(V.status),
117
- /* @__PURE__ */ A("div", { children: [/* @__PURE__ */ A("div", {
182
+ G(I.status),
183
+ /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ O("div", {
118
184
  className: "flex items-center gap-2",
119
185
  children: [
120
- /* @__PURE__ */ A("span", { children: [
121
- "Execution ",
122
- V.id.slice(0, 8),
123
- "…"
124
- ] }),
125
- /* @__PURE__ */ k(m, {
126
- variant: q(V.status),
127
- children: V.status
186
+ /* @__PURE__ */ D("span", { children: E("botlit.executions.detail.heading", "Execution {{id}}…", { id: I.id.slice(0, 8) }) }),
187
+ /* @__PURE__ */ D(h, {
188
+ variant: K(I.status),
189
+ children: ce
128
190
  }),
129
- /* @__PURE__ */ k(x, { state: $ })
191
+ /* @__PURE__ */ D(re, { state: Q })
130
192
  ]
131
- }), /* @__PURE__ */ A("p", {
193
+ }), /* @__PURE__ */ O("p", {
132
194
  className: "text-sm font-normal text-text-secondary",
133
195
  children: [
134
- V.appId ?? "—",
135
- " / ",
136
- V.agentId ?? "—"
196
+ I.appName ?? I.appId ?? "—",
197
+ " /",
198
+ " ",
199
+ I.agentName ?? I.agentId ?? "—"
137
200
  ]
138
201
  })] })
139
202
  ]
140
203
  }),
141
- actions: /* @__PURE__ */ A("div", {
204
+ actions: /* @__PURE__ */ O("div", {
142
205
  className: "flex gap-2",
143
- children: [/* @__PURE__ */ k(p, {
206
+ children: [/* @__PURE__ */ D(m, {
144
207
  variant: "outline",
145
- leftIcon: /* @__PURE__ */ k(I, { size: 16 }),
208
+ leftIcon: /* @__PURE__ */ D(P, { size: 16 }),
146
209
  onClick: () => {
147
- n(V.id), t() && r("Copied");
210
+ n(I.id), t() && r(E("botlit.executions.detail.copied", "Copied"));
148
211
  },
149
- children: "Copy ID"
150
- }), G.has(V.type) && /* @__PURE__ */ k(a, {
151
- permission: i.EXECUTION_CREATE,
152
- children: /* @__PURE__ */ k(p, {
153
- leftIcon: /* @__PURE__ */ k(z, { size: 16 }),
154
- onClick: () => void ee(),
155
- isLoading: Z.isPending,
212
+ children: E("botlit.executions.detail.copyId", "Copy ID")
213
+ }), W.has(I.type) && /* @__PURE__ */ D(o, {
214
+ permission: a.EXECUTION_CREATE,
215
+ children: /* @__PURE__ */ D(m, {
216
+ leftIcon: /* @__PURE__ */ D(L, { size: 16 }),
217
+ onClick: () => void le(),
218
+ isLoading: J.isPending,
156
219
  children: "Run again"
157
220
  })
158
221
  })]
159
222
  }),
160
- children: /* @__PURE__ */ A("div", {
223
+ children: /* @__PURE__ */ O("div", {
161
224
  className: "space-y-6",
162
225
  children: [
163
- /* @__PURE__ */ k(O, {
164
- icon: /* @__PURE__ */ k(F, { size: 18 }),
165
- children: "This is the record of one agent run — its status, how long it took, the tokens and cost it consumed, and the input and output that produced the result. Use it to debug a failure, understand an unexpected answer, or audit exactly what the agent did on a given request."
226
+ /* @__PURE__ */ D(T, {
227
+ icon: /* @__PURE__ */ D(N, { size: 18 }),
228
+ children: E("botlit.executions.detail.purpose", "This is the record of one agent run — its status, how long it took, the tokens and cost it consumed, the model and agent version that answered, and its input and output. Use it to debug a failure, understand an unexpected answer, or audit what the agent did on a given request.")
166
229
  }),
167
- /* @__PURE__ */ A("div", {
230
+ /* @__PURE__ */ O("div", {
168
231
  className: "grid grid-cols-2 md:grid-cols-4 gap-4",
169
232
  children: [
170
- /* @__PURE__ */ k(c, {
233
+ /* @__PURE__ */ D(l, {
171
234
  treatment: "glass",
172
235
  glow: !0,
173
- children: /* @__PURE__ */ A(l, {
236
+ children: /* @__PURE__ */ O(u, {
174
237
  className: "pt-6 text-center",
175
238
  children: [
176
- /* @__PURE__ */ k(F, { className: "h-6 w-6 mx-auto mb-2 text-text-secondary" }),
177
- /* @__PURE__ */ k("p", {
239
+ /* @__PURE__ */ D(N, { className: "h-6 w-6 mx-auto mb-2 text-text-secondary" }),
240
+ /* @__PURE__ */ D("p", {
178
241
  className: "text-2xl font-bold tabular-nums",
179
- children: V.duration === null || V.duration === void 0 ? "—" : C(V.duration)
242
+ children: y(I.duration)
180
243
  }),
181
- /* @__PURE__ */ k("p", {
244
+ /* @__PURE__ */ D("p", {
182
245
  className: "text-sm text-text-secondary",
183
- children: "Duration"
246
+ children: E("botlit.executions.table.duration", "Duration")
184
247
  })
185
248
  ]
186
249
  })
187
250
  }),
188
- /* @__PURE__ */ k(c, {
251
+ /* @__PURE__ */ D(l, {
189
252
  treatment: "metric",
190
- children: /* @__PURE__ */ A(l, {
253
+ children: /* @__PURE__ */ O(u, {
191
254
  className: "pt-6 text-center",
192
255
  children: [
193
- /* @__PURE__ */ k(H, { className: "h-6 w-6 mx-auto mb-2 text-text-secondary" }),
194
- /* @__PURE__ */ k("p", {
256
+ /* @__PURE__ */ D(V, { className: "h-6 w-6 mx-auto mb-2 text-text-secondary" }),
257
+ /* @__PURE__ */ D("p", {
195
258
  className: "text-2xl font-bold tabular-nums",
196
- children: w(V.tokensUsed)
259
+ children: I.tokensUsed === null || I.tokensUsed === void 0 ? "—" : b(I.tokensUsed)
197
260
  }),
198
- /* @__PURE__ */ k("p", {
261
+ /* @__PURE__ */ D("p", {
199
262
  className: "text-sm text-text-secondary",
200
- children: "Tokens"
263
+ children: E("botlit.executions.table.tokens", "Tokens")
201
264
  })
202
265
  ]
203
266
  })
204
267
  }),
205
- /* @__PURE__ */ k(c, {
268
+ /* @__PURE__ */ D(l, {
206
269
  treatment: "metric",
207
- children: /* @__PURE__ */ A(l, {
270
+ children: /* @__PURE__ */ O(u, {
208
271
  className: "pt-6 text-center",
209
272
  children: [
210
- /* @__PURE__ */ k(L, { className: "h-6 w-6 mx-auto mb-2 text-text-secondary" }),
211
- /* @__PURE__ */ k("p", {
273
+ /* @__PURE__ */ D(F, { className: "h-6 w-6 mx-auto mb-2 text-text-secondary" }),
274
+ /* @__PURE__ */ D("p", {
212
275
  className: "text-2xl font-bold tabular-nums",
213
- children: S(V.cost)
276
+ children: ie(I.cost)
214
277
  }),
215
- /* @__PURE__ */ k("p", {
278
+ /* @__PURE__ */ D("p", {
216
279
  className: "text-sm text-text-secondary",
217
- children: "Cost"
280
+ children: I.cost === null || I.cost === void 0 ? E("botlit.executions.detail.costUnknown", "Cost (price unknown)") : E("botlit.executions.table.cost", "Cost")
218
281
  })
219
282
  ]
220
283
  })
221
284
  }),
222
- /* @__PURE__ */ k(c, {
285
+ /* @__PURE__ */ D(l, {
223
286
  treatment: "metric",
224
- children: /* @__PURE__ */ A(l, {
287
+ children: /* @__PURE__ */ O(u, {
225
288
  className: "pt-6 text-center",
226
289
  children: [
227
- /* @__PURE__ */ k(B, { className: "h-6 w-6 mx-auto mb-2 text-text-secondary" }),
228
- /* @__PURE__ */ k("p", {
290
+ /* @__PURE__ */ D(R, { className: "h-6 w-6 mx-auto mb-2 text-text-secondary" }),
291
+ /* @__PURE__ */ D("p", {
229
292
  className: "text-2xl font-bold capitalize",
230
- children: V.type.toLowerCase()
293
+ children: I.type.toLowerCase()
231
294
  }),
232
- /* @__PURE__ */ k("p", {
295
+ /* @__PURE__ */ D("p", {
233
296
  className: "text-sm text-text-secondary",
234
- children: "Type"
297
+ children: E("botlit.executions.detail.type", "Type")
235
298
  })
236
299
  ]
237
300
  })
238
301
  })
239
302
  ]
240
303
  }),
241
- (V.errorMessage || V.errorCode) && /* @__PURE__ */ A(c, { children: [/* @__PURE__ */ A(d, { children: [/* @__PURE__ */ A(f, {
304
+ (I.errorMessage || I.errorCode) && /* @__PURE__ */ O(l, { children: [/* @__PURE__ */ O(f, { children: [/* @__PURE__ */ O(p, {
242
305
  className: "flex items-center gap-2 text-status-error-text",
243
- children: [/* @__PURE__ */ k(M, { size: 18 }), "Failure"]
244
- }), V.errorCode && /* @__PURE__ */ k(u, { children: V.errorCode })] }), /* @__PURE__ */ A(l, {
306
+ children: [/* @__PURE__ */ D(A, { size: 18 }), E("botlit.executions.detail.failure", "Failure")]
307
+ }), I.errorCode && /* @__PURE__ */ D(d, { children: I.errorCode })] }), /* @__PURE__ */ O(u, {
245
308
  className: "space-y-3",
246
- children: [V.errorMessage && /* @__PURE__ */ k("p", {
247
- className: "text-sm text-text-primary",
248
- children: V.errorMessage
249
- }), V.errorDetails && /* @__PURE__ */ k("pre", {
250
- className: "max-h-64 overflow-auto rounded-lg bg-bg-sunken p-3 font-mono text-xs",
251
- children: JSON.stringify(V.errorDetails, null, 2)
252
- })]
309
+ children: [
310
+ I.errorCode === "ORPHANED" && /* @__PURE__ */ D("p", {
311
+ className: "text-sm text-text-primary",
312
+ children: E("botlit.executions.detail.orphanedHint", "This run never finished, so the cleanup job closed it as failed.")
313
+ }),
314
+ I.errorMessage && /* @__PURE__ */ D("p", {
315
+ className: "text-sm text-text-primary",
316
+ children: I.errorMessage
317
+ }),
318
+ I.errorDetails && /* @__PURE__ */ D("pre", {
319
+ className: "max-h-64 overflow-auto rounded-lg bg-bg-sunken p-3 font-mono text-xs",
320
+ children: JSON.stringify(I.errorDetails, null, 2)
321
+ })
322
+ ]
253
323
  })] }),
254
- /* @__PURE__ */ A(c, { children: [/* @__PURE__ */ k(d, { children: /* @__PURE__ */ k(f, { children: "Run Details" }) }), /* @__PURE__ */ k(l, { children: /* @__PURE__ */ A("div", {
324
+ /* @__PURE__ */ O(l, { children: [/* @__PURE__ */ D(f, { children: /* @__PURE__ */ D(p, { children: E("botlit.executions.detail.runDetails", "Run details") }) }), /* @__PURE__ */ D(u, { children: /* @__PURE__ */ O("dl", {
255
325
  className: "grid grid-cols-1 gap-6 md:grid-cols-3",
256
326
  children: [
257
- /* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("p", {
258
- className: "text-sm text-text-secondary",
259
- children: "Execution ID"
260
- }), /* @__PURE__ */ k("p", {
261
- className: "font-mono text-sm break-all",
262
- children: V.id
263
- })] }),
264
- /* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("p", {
265
- className: "text-sm text-text-secondary",
266
- children: "Bot"
267
- }), /* @__PURE__ */ k("p", {
268
- className: "font-mono text-sm break-all",
269
- children: V.appId ?? "—"
270
- })] }),
271
- /* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("p", {
272
- className: "text-sm text-text-secondary",
273
- children: "Agent"
274
- }), /* @__PURE__ */ k("p", {
275
- className: "font-mono text-sm break-all",
276
- children: V.agentId ?? "—"
277
- })] }),
278
- /* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("p", {
279
- className: "text-sm text-text-secondary",
280
- children: "Conversation"
281
- }), /* @__PURE__ */ k("p", {
282
- className: "font-mono text-sm break-all",
283
- children: V.conversationId ?? "—"
284
- })] }),
285
- /* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("p", {
286
- className: "text-sm text-text-secondary",
287
- children: "Started"
288
- }), /* @__PURE__ */ k("p", {
289
- className: "font-medium",
290
- children: T(V.createdAt)
291
- })] }),
292
- /* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("p", {
293
- className: "text-sm text-text-secondary",
294
- children: "Completed"
295
- }), /* @__PURE__ */ k("p", {
296
- className: "font-medium",
297
- children: T(V.completedAt)
298
- })] })
327
+ /* @__PURE__ */ D(Y, {
328
+ label: E("botlit.executions.detail.executionId", "Execution ID"),
329
+ mono: !0,
330
+ children: I.id
331
+ }),
332
+ /* @__PURE__ */ D(Y, {
333
+ label: E("botlit.executions.filters.bot", "Bot"),
334
+ children: /* @__PURE__ */ D(X, {
335
+ name: I.appName,
336
+ id: I.appId
337
+ })
338
+ }),
339
+ /* @__PURE__ */ D(Y, {
340
+ label: E("botlit.executions.filters.agent", "Agent"),
341
+ children: /* @__PURE__ */ D(X, {
342
+ name: I.agentName,
343
+ id: I.agentId
344
+ })
345
+ }),
346
+ /* @__PURE__ */ D(Y, {
347
+ label: E("botlit.executions.detail.conversation", "Conversation"),
348
+ mono: !0,
349
+ children: I.conversationId ?? "—"
350
+ }),
351
+ /* @__PURE__ */ D(Y, {
352
+ label: E("botlit.executions.table.started", "Started"),
353
+ children: x(I.createdAt)
354
+ }),
355
+ /* @__PURE__ */ D(Y, {
356
+ label: E("botlit.executions.detail.completed", "Completed"),
357
+ children: x(I.completedAt)
358
+ })
299
359
  ]
300
360
  }) })] }),
301
- /* @__PURE__ */ A("div", {
361
+ /* @__PURE__ */ D(se, {
362
+ execution: I,
363
+ t: E
364
+ }),
365
+ /* @__PURE__ */ O("div", {
302
366
  className: "grid grid-cols-1 gap-6 lg:grid-cols-2",
303
- children: [/* @__PURE__ */ A(c, { children: [/* @__PURE__ */ k(d, { children: /* @__PURE__ */ k(f, { children: "Input" }) }), /* @__PURE__ */ k(l, { children: /* @__PURE__ */ k("pre", {
304
- className: "max-h-96 overflow-auto whitespace-pre-wrap rounded-lg bg-bg-sunken p-3 text-sm",
305
- children: V.input
306
- }) })] }), /* @__PURE__ */ A(c, { children: [/* @__PURE__ */ k(d, { children: /* @__PURE__ */ k(f, { children: "Output" }) }), /* @__PURE__ */ k(l, { children: V.output ? /* @__PURE__ */ k("pre", {
307
- className: "max-h-96 overflow-auto whitespace-pre-wrap rounded-lg bg-bg-sunken p-3 text-sm",
308
- children: V.output
309
- }) : /* @__PURE__ */ k("p", {
367
+ children: [/* @__PURE__ */ O(l, { children: [/* @__PURE__ */ D(f, { children: /* @__PURE__ */ D(p, { children: E("botlit.executions.detail.input", "Input") }) }), /* @__PURE__ */ D(u, { children: /* @__PURE__ */ D("pre", {
368
+ className: "max-h-96 overflow-auto whitespace-pre-wrap break-words rounded-lg bg-bg-sunken p-3 font-sans text-sm",
369
+ children: C(I.input) || "—"
370
+ }) })] }), /* @__PURE__ */ O(l, { children: [/* @__PURE__ */ D(f, { children: /* @__PURE__ */ D(p, { children: E("botlit.executions.detail.output", "Output") }) }), /* @__PURE__ */ D(u, { children: $ ? /* @__PURE__ */ D("pre", {
371
+ className: "max-h-96 overflow-auto whitespace-pre-wrap break-words rounded-lg bg-bg-sunken p-3 font-sans text-sm",
372
+ children: $
373
+ }) : /* @__PURE__ */ D("p", {
310
374
  className: "text-sm text-text-secondary",
311
- children: "This run has not produced an output yet."
375
+ children: E("botlit.executions.detail.noOutput", "This run has not produced an output.")
312
376
  }) })] })]
313
377
  }),
314
- /* @__PURE__ */ k(g, { metadata: V.metadata }),
315
- /* @__PURE__ */ k(_, {
316
- executionId: V.id,
317
- status: V.status
378
+ /* @__PURE__ */ D(ee, { metadata: I.metadata }),
379
+ /* @__PURE__ */ D(te, {
380
+ executionId: I.id,
381
+ status: I.status
318
382
  }),
319
- V.metadata && Object.keys(V.metadata).length > 0 && /* @__PURE__ */ A(c, { children: [/* @__PURE__ */ k(d, { children: /* @__PURE__ */ k(f, { children: "Metadata" }) }), /* @__PURE__ */ k(l, { children: /* @__PURE__ */ k("pre", {
383
+ I.metadata && Object.keys(I.metadata).length > 0 && /* @__PURE__ */ O(l, { children: [/* @__PURE__ */ D(f, { children: /* @__PURE__ */ D(p, { children: E("botlit.executions.detail.rawMetadata", "Recorded metadata") }) }), /* @__PURE__ */ D(u, { children: /* @__PURE__ */ D("pre", {
320
384
  className: "max-h-64 overflow-auto rounded-lg bg-bg-sunken p-3 font-mono text-xs",
321
- children: JSON.stringify(V.metadata, null, 2)
385
+ children: JSON.stringify(I.metadata, null, 2)
322
386
  }) })] })
323
387
  ]
324
388
  })
325
389
  });
326
390
  };
327
- export { J as ExecutionDetailPage };
391
+ export { Z as ExecutionDetailPage };
328
392
 
329
393
  //# sourceMappingURL=ExecutionDetailPage.js.map