@wso2/am-core-ui 0.0.19 → 0.0.20

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 (51) hide show
  1. package/dist/CatalogKindListing-DvUuZEpc.js +137 -0
  2. package/dist/{CodeBlock-mB_Loq7I.js → CodeBlock-B2Ecl916.js} +1 -1
  3. package/dist/EnvironmentCard-CIXhDhlZ.js +319 -0
  4. package/dist/{EnvironmentSelector-B7Bl93s2.js → EnvironmentSelector-D8S6nO9u.js} +1 -1
  5. package/dist/IsolationTierIndicator-cf90kgjL.js +81 -0
  6. package/dist/LabelChips-7rA7_yre.js +139 -0
  7. package/dist/PolicyListSection-D6aVSKwP.js +1143 -0
  8. package/dist/{ResourceListShell-Cx6mdeqv.js → ResourceListShell-DFisKftq.js} +1 -1
  9. package/dist/{SwaggerSpecViewer-BvkhoKsi.js → SwaggerSpecViewer-DzjR6U6W.js} +1 -1
  10. package/dist/{debounce-BV83M53b.js → debounce-D17ObVdG.js} +1 -1
  11. package/dist/{format-BEZZRyE2.js → format-wlHhWjGo.js} +1 -1
  12. package/dist/{formatDistanceToNow-TErllcH8.js → formatDistanceToNow-DyjnT7l9.js} +11 -11
  13. package/dist/{gatewayScripts-D8O45W8u.js → gatewayScripts-D4ZDEDPS.js} +1 -1
  14. package/dist/{index-sr-mWz4T.js → index-3K-zqdp-.js} +32 -32
  15. package/dist/{index-KRsV2L4V.js → index-6liAPSDn.js} +160 -160
  16. package/dist/{index-B52h3RHg.js → index-B3ASENUJ.js} +109 -109
  17. package/dist/index-B7Pf4oPq.js +3069 -0
  18. package/dist/index-BNO3FhZK.js +2304 -0
  19. package/dist/index-BUZSfCl5.js +335 -0
  20. package/dist/index-BXiG1r_o.js +1409 -0
  21. package/dist/{index-_0Pj_ZtW.js → index-BYy7Iaam.js} +40 -40
  22. package/dist/{index-BfjzUWDa.js → index-BbB_yx4V.js} +103 -103
  23. package/dist/index-BjWJ95lH.js +2728 -0
  24. package/dist/{index-B_Z0MwXk.js → index-ByEInFlf.js} +10916 -9520
  25. package/dist/index-C8WIhzyz.js +123 -0
  26. package/dist/index-CnzvaT6b.js +2368 -0
  27. package/dist/index-CrnCf-hJ.js +763 -0
  28. package/dist/{index-CgCWbWzN.js → index-Cvsho9xg.js} +381 -377
  29. package/dist/{index-UqDmyMSA.js → index-CxnAo1_c.js} +21 -21
  30. package/dist/{index-BnV-PkwM.js → index-Cz7-AZwE.js} +2 -2
  31. package/dist/{index-BP5drcF2.js → index-DBdRFjxm.js} +232 -233
  32. package/dist/{index-BZ4vxviI.js → index-DFsSvmMZ.js} +5 -5
  33. package/dist/index-DslzOSGN.js +2549 -0
  34. package/dist/{index-DD4qF7gq.js → index-DvpYvchM.js} +101 -100
  35. package/dist/index.d.ts +784 -163
  36. package/dist/index.js +532 -454
  37. package/dist/js-yaml-CvhD-clg.js +1335 -0
  38. package/dist/{llmProviderPayload-CzihkdNa.js → llmProviderPayload-BPzWDy7n.js} +2 -2
  39. package/package.json +1 -1
  40. package/dist/CatalogKindListing-DtFI2YMG.js +0 -118
  41. package/dist/EnvironmentCard-09h1XRxx.js +0 -310
  42. package/dist/PolicyListSection-o4k9e8XO.js +0 -2475
  43. package/dist/index-CGDYgUCH.js +0 -711
  44. package/dist/index-COt7nJIf.js +0 -2286
  45. package/dist/index-CWZjOy1h.js +0 -2247
  46. package/dist/index-CezvogTQ.js +0 -116
  47. package/dist/index-CjCkcuuI.js +0 -322
  48. package/dist/index-CjXvuf9m.js +0 -1354
  49. package/dist/index-DeQ-9KTC.js +0 -737
  50. package/dist/index-Df6OBy4E.js +0 -3041
  51. package/dist/index-PUuASE1F.js +0 -2507
@@ -1,18 +1,18 @@
1
- import { jsx as t, jsxs as y, Fragment as Le } from "react/jsx-runtime";
1
+ import { jsx as t, jsxs as y, Fragment as Ae } from "react/jsx-runtime";
2
2
  import { useState as re, useRef as Ce, useCallback as Z, memo as je, useEffect as De, useMemo as ee } from "react";
3
- import { useParams as Ee, useSearchParams as We } from "react-router-dom";
4
- import { I as ne, h as Je, aK as xe, N as pe, t as Ke, aL as Ge, aH as ze, aM as Ve, aN as Ye, aO as qe, aP as Xe, aQ as Qe, aR as Ze, i as et, z as tt, aS as nt, T as Q, e as rt, aT as Ne, q as Oe, P as ve, n as it, D as at, m as ot, aU as st } from "./index-B_Z0MwXk.js";
5
- import { ArrowUp as lt, XCircle as ct, CheckCircle as dt, ArrowDown as ut, Workflow as fe, X as ht, Check as pt, Clock as ft, Coins as mt, Package as gt, Brain as bt, Database as vt, Filter as St, Thermometer as xt, ChartArea as wt, Search as yt, ChevronUp as Tt, ChevronDown as kt, Shovel as Ct, Info as Nt, SortDesc as Ot, SortAsc as It, RefreshCcw as At, Download as Lt } from "@wso2/oxygen-ui-icons-react";
6
- import { c as q } from "react/compiler-runtime";
3
+ import { useParams as Ee, useSearchParams as He } from "react-router-dom";
4
+ import { O as ne, h as We, aP as xe, N as pe, n as Je, aQ as Ke, aM as Le, aR as Ge, aS as Ve, aT as Ye, aU as Xe, aV as qe, aW as Qe, o as Ze, G as et, aX as tt, T as Q, e as nt, aY as Ne, P as ve, t as rt, D as it, s as at, aZ as ot, a_ as st } from "./index-ByEInFlf.js";
5
+ import { ArrowUp as lt, XCircle as ct, CheckCircle as dt, ArrowDown as ut, Workflow as fe, X as ht, Check as pt, Clock as ft, Coins as mt, Package as gt, Brain as bt, Database as vt, Filter as St, Thermometer as xt, ChartArea as wt, Search as yt, ChevronUp as Tt, ChevronDown as kt, Shovel as Ct, Info as Nt, SortDesc as Ot, SortAsc as It, RefreshCcw as At, Download as Dt } from "@wso2/oxygen-ui-icons-react";
6
+ import { c as X } from "react/compiler-runtime";
7
7
  import "@tanstack/react-query";
8
- import { DataGrid as Dt, ListingTable as _, Button as Se, CircularProgress as de, Tooltip as J, Typography as D, Chip as W, Stack as R, useColorScheme as Et, IconButton as ue, Accordion as zt, AccordionSummary as _t, AccordionDetails as Mt, Box as G, Card as V, CardContent as Y, Divider as we, Tab as ce, Tabs as Rt, Skeleton as he, Alert as se, Snackbar as Pt } from "@wso2/oxygen-ui";
9
- import { F as Bt } from "./index-PWsNvJB-.js";
10
- import { E as $t } from "./EnvironmentSelector-B7Bl93s2.js";
8
+ import { DataGrid as Et, ListingTable as M, Button as Se, CircularProgress as de, Tooltip as J, Typography as E, Chip as W, Stack as R, useColorScheme as Lt, IconButton as ue, Accordion as zt, AccordionSummary as Mt, AccordionDetails as _t, Box as G, Card as V, CardContent as Y, Divider as we, Tab as ce, Tabs as Rt, Skeleton as he, Alert as se, Snackbar as Pt } from "@wso2/oxygen-ui";
9
+ import { F as Ft } from "./index-PWsNvJB-.js";
10
+ import { E as $t } from "./EnvironmentSelector-D8S6nO9u.js";
11
11
  const {
12
- DataGrid: Ft
13
- } = Dt, Ut = (i) => i / 1e9;
14
- function Ht(i) {
15
- const e = q(13), {
12
+ DataGrid: Bt
13
+ } = Et, Ut = (i) => i / 1e9;
14
+ function jt(i) {
15
+ const e = X(13), {
16
16
  traces: n,
17
17
  onTraceSelect: s,
18
18
  sortOrder: r,
@@ -22,9 +22,9 @@ function Ht(i) {
22
22
  isLoadingNewer: p,
23
23
  onLoadOlder: m,
24
24
  onLoadNewer: c
25
- } = i, g = r === void 0 ? "desc" : r, f = a === void 0 ? !1 : a, w = h === void 0 ? !1 : h, C = p === void 0 ? !1 : p, v = g === "desc", b = v ? "Load Newer Traces" : "Load Older Traces", A = v ? c : m, T = v ? !c || C : !m || w, S = v ? C : w, N = v ? "Load Older Traces" : "Load Newer Traces", O = v ? m : c, L = v ? !m || w : !c || C, E = v ? w : C;
25
+ } = i, g = r === void 0 ? "desc" : r, f = a === void 0 ? !1 : a, w = h === void 0 ? !1 : h, C = p === void 0 ? !1 : p, v = g === "desc", b = v ? "Load Newer Traces" : "Load Older Traces", A = v ? c : m, T = v ? !c || C : !m || w, S = v ? C : w, N = v ? "Load Older Traces" : "Load Newer Traces", O = v ? m : c, D = v ? !m || w : !c || C, L = v ? w : C;
26
26
  let x;
27
- return e[0] !== L || e[1] !== N || e[2] !== E || e[3] !== O || e[4] !== f || e[5] !== s || e[6] !== l || e[7] !== T || e[8] !== b || e[9] !== S || e[10] !== A || e[11] !== n ? (x = /* @__PURE__ */ t(ne, { children: f ? /* @__PURE__ */ t(Ft, { rows: [], columns: [{
27
+ return e[0] !== D || e[1] !== N || e[2] !== L || e[3] !== O || e[4] !== f || e[5] !== s || e[6] !== l || e[7] !== T || e[8] !== b || e[9] !== S || e[10] !== A || e[11] !== n ? (x = /* @__PURE__ */ t(ne, { children: f ? /* @__PURE__ */ t(Bt, { rows: [], columns: [{
28
28
  field: "status",
29
29
  headerName: "Status",
30
30
  flex: 5
@@ -60,74 +60,74 @@ function Ht(i) {
60
60
  field: "score",
61
61
  headerName: "Score",
62
62
  flex: 8
63
- }], loading: !0, hideFooter: !0 }) : n.length > 0 ? /* @__PURE__ */ t(_.Container, { children: /* @__PURE__ */ y(_, { children: [
64
- /* @__PURE__ */ t(_.Head, { children: /* @__PURE__ */ y(_.Row, { children: [
65
- /* @__PURE__ */ t(_.Cell, { align: "center", width: "5%", sx: {
63
+ }], loading: !0, hideFooter: !0 }) : n.length > 0 ? /* @__PURE__ */ t(M.Container, { children: /* @__PURE__ */ y(M, { children: [
64
+ /* @__PURE__ */ t(M.Head, { children: /* @__PURE__ */ y(M.Row, { children: [
65
+ /* @__PURE__ */ t(M.Cell, { align: "center", width: "5%", sx: {
66
66
  maxWidth: 20
67
67
  }, children: "Status" }),
68
- /* @__PURE__ */ t(_.Cell, { align: "left", width: "10%", children: "Name" }),
69
- /* @__PURE__ */ t(_.Cell, { align: "left", width: "18%", children: "Input" }),
70
- /* @__PURE__ */ t(_.Cell, { align: "left", width: "18%", children: "Output" }),
71
- /* @__PURE__ */ t(_.Cell, { align: "center", width: "12%", children: "Start Time" }),
72
- /* @__PURE__ */ t(_.Cell, { align: "right", width: "8%", children: "Duration" }),
73
- /* @__PURE__ */ t(_.Cell, { align: "right", width: "8%", children: "Tokens" }),
74
- /* @__PURE__ */ t(_.Cell, { align: "right", width: "8%", children: "Spans" }),
75
- /* @__PURE__ */ t(_.Cell, { align: "right", width: "8%", children: "Score" })
68
+ /* @__PURE__ */ t(M.Cell, { align: "left", width: "10%", children: "Name" }),
69
+ /* @__PURE__ */ t(M.Cell, { align: "left", width: "18%", children: "Input" }),
70
+ /* @__PURE__ */ t(M.Cell, { align: "left", width: "18%", children: "Output" }),
71
+ /* @__PURE__ */ t(M.Cell, { align: "center", width: "12%", children: "Start Time" }),
72
+ /* @__PURE__ */ t(M.Cell, { align: "right", width: "8%", children: "Duration" }),
73
+ /* @__PURE__ */ t(M.Cell, { align: "right", width: "8%", children: "Tokens" }),
74
+ /* @__PURE__ */ t(M.Cell, { align: "right", width: "8%", children: "Spans" }),
75
+ /* @__PURE__ */ t(M.Cell, { align: "right", width: "8%", children: "Score" })
76
76
  ] }) }),
77
- /* @__PURE__ */ y(_.Body, { children: [
78
- /* @__PURE__ */ t(_.Row, { children: /* @__PURE__ */ t(_.Cell, { colSpan: 9, align: "center", children: /* @__PURE__ */ t(Se, { size: "small", variant: "text", disabled: T, onClick: A, startIcon: S ? /* @__PURE__ */ t(de, { size: 16 }) : /* @__PURE__ */ t(lt, { size: 16 }), children: S ? "Loading..." : b }) }) }),
79
- n.map((u) => /* @__PURE__ */ y(_.Row, { hover: !0, selected: l === u.traceId, clickable: !0, onClick: () => s?.(u.traceId), children: [
80
- /* @__PURE__ */ t(_.Cell, { align: "center", sx: {
77
+ /* @__PURE__ */ y(M.Body, { children: [
78
+ /* @__PURE__ */ t(M.Row, { children: /* @__PURE__ */ t(M.Cell, { colSpan: 9, align: "center", children: /* @__PURE__ */ t(Se, { size: "small", variant: "text", disabled: T, onClick: A, startIcon: S ? /* @__PURE__ */ t(de, { size: 16 }) : /* @__PURE__ */ t(lt, { size: 16 }), children: S ? "Loading..." : b }) }) }),
79
+ n.map((u) => /* @__PURE__ */ y(M.Row, { hover: !0, selected: l === u.traceId, clickable: !0, onClick: () => s?.(u.traceId), children: [
80
+ /* @__PURE__ */ t(M.Cell, { align: "center", sx: {
81
81
  color: (o) => u.status?.errorCount && u.status.errorCount > 0 ? o.palette.error.main : o.palette.success.main,
82
82
  maxWidth: 20
83
83
  }, children: /* @__PURE__ */ t(J, { title: `${u.status?.errorCount} errors found`, disableHoverListener: !u.status?.errorCount || u.status?.errorCount === 0, children: u.status?.errorCount && u.status.errorCount > 0 ? /* @__PURE__ */ t(ct, { size: 16 }) : /* @__PURE__ */ t(dt, { size: 16 }) }) }),
84
- /* @__PURE__ */ t(_.Cell, { align: "left", children: /* @__PURE__ */ t(D, { variant: "caption", component: "span", sx: {
84
+ /* @__PURE__ */ t(M.Cell, { align: "left", children: /* @__PURE__ */ t(E, { variant: "caption", component: "span", sx: {
85
85
  display: "block",
86
86
  textOverflow: "ellipsis",
87
87
  overflow: "hidden",
88
88
  whiteSpace: "nowrap",
89
89
  maxWidth: "300px"
90
90
  }, children: u.rootSpanName }) }),
91
- /* @__PURE__ */ t(_.Cell, { align: "left", sx: {
91
+ /* @__PURE__ */ t(M.Cell, { align: "left", sx: {
92
92
  maxWidth: 200
93
- }, children: /* @__PURE__ */ t(J, { title: "Preview only. Open the trace for the full input.", disableHoverListener: !u.input, children: /* @__PURE__ */ t(D, { variant: "caption", component: "span", sx: {
93
+ }, children: /* @__PURE__ */ t(J, { title: "Preview only. Open the trace for the full input.", disableHoverListener: !u.input, children: /* @__PURE__ */ t(E, { variant: "caption", component: "span", sx: {
94
94
  display: "block",
95
95
  textOverflow: "ellipsis",
96
96
  overflow: "hidden",
97
97
  whiteSpace: "nowrap",
98
98
  maxWidth: "100%"
99
99
  }, children: u.input }) }) }),
100
- /* @__PURE__ */ t(_.Cell, { align: "left", sx: {
100
+ /* @__PURE__ */ t(M.Cell, { align: "left", sx: {
101
101
  maxWidth: 200
102
- }, children: /* @__PURE__ */ t(J, { title: "Preview only. Open the trace for the full output.", disableHoverListener: !u.output, children: /* @__PURE__ */ t(D, { variant: "caption", component: "span", sx: {
102
+ }, children: /* @__PURE__ */ t(J, { title: "Preview only. Open the trace for the full output.", disableHoverListener: !u.output, children: /* @__PURE__ */ t(E, { variant: "caption", component: "span", sx: {
103
103
  display: "block",
104
104
  textOverflow: "ellipsis",
105
105
  overflow: "hidden",
106
106
  whiteSpace: "nowrap",
107
107
  maxWidth: "100%"
108
108
  }, children: u.output }) }) }),
109
- /* @__PURE__ */ t(_.Cell, { align: "center", children: /* @__PURE__ */ t(D, { variant: "caption", component: "span", sx: {
109
+ /* @__PURE__ */ t(M.Cell, { align: "center", children: /* @__PURE__ */ t(E, { variant: "caption", component: "span", sx: {
110
110
  display: "block",
111
111
  textOverflow: "ellipsis",
112
112
  overflow: "hidden",
113
113
  whiteSpace: "nowrap",
114
114
  maxWidth: "100%"
115
- }, children: Je(new Date(u.startTime), "yyyy-MM-dd HH:mm:ss") }) }),
116
- /* @__PURE__ */ t(_.Cell, { align: "right", children: /* @__PURE__ */ y(D, { variant: "caption", component: "span", children: [
115
+ }, children: We(new Date(u.startTime), "yyyy-MM-dd HH:mm:ss") }) }),
116
+ /* @__PURE__ */ t(M.Cell, { align: "right", children: /* @__PURE__ */ y(E, { variant: "caption", component: "span", children: [
117
117
  Ut(u.durationInNanos).toFixed(2),
118
118
  "s"
119
119
  ] }) }),
120
- /* @__PURE__ */ t(_.Cell, { align: "right", children: (() => {
120
+ /* @__PURE__ */ t(M.Cell, { align: "right", children: (() => {
121
121
  const o = u.tokenUsage, k = o?.totalTokens != null, I = k ? o?.partial ? "Approximate total. This trace has more LLM spans than the list view aggregates. Open the trace for the exact total." : `${o?.inputTokens} input tokens, ${o?.outputTokens} output tokens` : "";
122
- return /* @__PURE__ */ t(J, { disableHoverListener: !k, title: I, children: /* @__PURE__ */ t(D, { variant: "caption", component: "span", children: k ? /* @__PURE__ */ y(Le, { children: [
122
+ return /* @__PURE__ */ t(J, { disableHoverListener: !k, title: I, children: /* @__PURE__ */ t(E, { variant: "caption", component: "span", children: k ? /* @__PURE__ */ y(Ae, { children: [
123
123
  o?.totalTokens,
124
124
  o?.partial ? "+" : null
125
125
  ] }) : "-" }) });
126
126
  })() }),
127
- /* @__PURE__ */ t(_.Cell, { align: "right", children: /* @__PURE__ */ t(D, { variant: "caption", component: "span", children: u.spanCount }) }),
128
- /* @__PURE__ */ t(_.Cell, { align: "right", children: (() => {
127
+ /* @__PURE__ */ t(M.Cell, { align: "right", children: /* @__PURE__ */ t(E, { variant: "caption", component: "span", children: u.spanCount }) }),
128
+ /* @__PURE__ */ t(M.Cell, { align: "right", children: (() => {
129
129
  const o = u.score;
130
- return !o || o.score == null ? /* @__PURE__ */ t(D, { variant: "caption", component: "span", children: "-" }) : /* @__PURE__ */ t(J, { title: `${o.totalCount} evaluations, ${o.skippedCount} skipped`, children: /* @__PURE__ */ y(D, { variant: "caption", component: "span", sx: {
130
+ return !o || o.score == null ? /* @__PURE__ */ t(E, { variant: "caption", component: "span", children: "-" }) : /* @__PURE__ */ t(J, { title: `${o.totalCount} evaluations, ${o.skippedCount} skipped`, children: /* @__PURE__ */ y(E, { variant: "caption", component: "span", sx: {
131
131
  color: xe(o.score),
132
132
  fontWeight: 600
133
133
  }, children: [
@@ -136,15 +136,15 @@ function Ht(i) {
136
136
  ] }) });
137
137
  })() })
138
138
  ] }, u.traceId)),
139
- /* @__PURE__ */ t(_.Row, { children: /* @__PURE__ */ t(_.Cell, { colSpan: 9, align: "center", children: /* @__PURE__ */ t(Se, { size: "small", variant: "text", disabled: L, onClick: O, startIcon: E ? /* @__PURE__ */ t(de, { size: 16 }) : /* @__PURE__ */ t(ut, { size: 16 }), children: E ? "Loading..." : N }) }) })
139
+ /* @__PURE__ */ t(M.Row, { children: /* @__PURE__ */ t(M.Cell, { colSpan: 9, align: "center", children: /* @__PURE__ */ t(Se, { size: "small", variant: "text", disabled: D, onClick: O, startIcon: L ? /* @__PURE__ */ t(de, { size: 16 }) : /* @__PURE__ */ t(ut, { size: 16 }), children: L ? "Loading..." : N }) }) })
140
140
  ] })
141
- ] }) }) : /* @__PURE__ */ t(_.Container, { children: /* @__PURE__ */ t(_.EmptyState, { illustration: /* @__PURE__ */ t(fe, { size: 64 }), title: "No traces found!", description: "Try changing the time range" }) }) }), e[0] = L, e[1] = N, e[2] = E, e[3] = O, e[4] = f, e[5] = s, e[6] = l, e[7] = T, e[8] = b, e[9] = S, e[10] = A, e[11] = n, e[12] = x) : x = e[12], x;
141
+ ] }) }) : /* @__PURE__ */ t(M.Container, { children: /* @__PURE__ */ t(M.EmptyState, { illustration: /* @__PURE__ */ t(fe, { size: 64 }), title: "No traces found!", description: "Try changing the time range" }) }) }), e[0] = D, e[1] = N, e[2] = L, e[3] = O, e[4] = f, e[5] = s, e[6] = l, e[7] = T, e[8] = b, e[9] = S, e[10] = A, e[11] = n, e[12] = x) : x = e[12], x;
142
142
  }
143
- function jt(i) {
143
+ function Ht(i) {
144
144
  return i > 1e3 * 1e3 * 1e3 ? `${(i / (1e3 * 1e3 * 1e3)).toFixed(2)}s` : i > 1e3 * 1e3 ? `${(i / (1e3 * 1e3)).toFixed(2)}ms` : `${(i / 1e3).toFixed(2)}μs`;
145
145
  }
146
146
  function Wt(i) {
147
- const e = q(39), {
147
+ const e = X(39), {
148
148
  span: n,
149
149
  evaluatorScores: s
150
150
  } = i;
@@ -185,13 +185,13 @@ function Wt(i) {
185
185
  let S;
186
186
  e[9] !== n.ampAttributes?.status?.error ? (S = !n.ampAttributes?.status?.error && /* @__PURE__ */ t(W, { icon: /* @__PURE__ */ t(pt, { size: 16 }), size: "small", variant: "outlined", label: "Success", color: "success" }), e[9] = n.ampAttributes?.status?.error, e[10] = S) : S = e[10];
187
187
  let N;
188
- e[11] !== n.durationInNanos ? (N = n.durationInNanos != null && /* @__PURE__ */ t(J, { title: "Execution duration", children: /* @__PURE__ */ t(W, { icon: /* @__PURE__ */ t(ft, { size: 16 }), size: "small", variant: "outlined", label: jt(n.durationInNanos) }) }), e[11] = n.durationInNanos, e[12] = N) : N = e[12];
188
+ e[11] !== n.durationInNanos ? (N = n.durationInNanos != null && /* @__PURE__ */ t(J, { title: "Execution duration", children: /* @__PURE__ */ t(W, { icon: /* @__PURE__ */ t(ft, { size: 16 }), size: "small", variant: "outlined", label: Ht(n.durationInNanos) }) }), e[11] = n.durationInNanos, e[12] = N) : N = e[12];
189
189
  let O;
190
190
  e[13] !== g ? (O = g && /* @__PURE__ */ t(J, { title: "Framework", children: /* @__PURE__ */ t(W, { icon: /* @__PURE__ */ t(gt, { size: 16 }), size: "small", variant: "outlined", label: g }) }), e[13] = g, e[14] = O) : O = e[14];
191
+ let D;
192
+ e[15] !== C ? (D = C && /* @__PURE__ */ t(J, { title: "Model used", children: /* @__PURE__ */ t(W, { icon: /* @__PURE__ */ t(bt, { size: 16 }), size: "small", variant: "outlined", label: C }) }), e[15] = C, e[16] = D) : D = e[16];
191
193
  let L;
192
- e[15] !== C ? (L = C && /* @__PURE__ */ t(J, { title: "Model used", children: /* @__PURE__ */ t(W, { icon: /* @__PURE__ */ t(bt, { size: 16 }), size: "small", variant: "outlined", label: C }) }), e[15] = C, e[16] = L) : L = e[16];
193
- let E;
194
- e[17] !== f ? (E = f && /* @__PURE__ */ t(J, { title: "Vector database", children: /* @__PURE__ */ t(W, { icon: /* @__PURE__ */ t(vt, { size: 16 }), size: "small", variant: "outlined", label: f }) }), e[17] = f, e[18] = E) : E = e[18];
194
+ e[17] !== f ? (L = f && /* @__PURE__ */ t(J, { title: "Vector database", children: /* @__PURE__ */ t(W, { icon: /* @__PURE__ */ t(vt, { size: 16 }), size: "small", variant: "outlined", label: f }) }), e[17] = f, e[18] = L) : L = e[18];
195
195
  let x;
196
196
  e[19] !== w ? (x = w !== void 0 && /* @__PURE__ */ t(J, { title: "Top K results", children: /* @__PURE__ */ t(W, { icon: /* @__PURE__ */ t(St, { size: 16 }), size: "small", variant: "outlined", label: `Top ${w}` }) }), e[19] = w, e[20] = x) : x = e[20];
197
197
  let u;
@@ -199,37 +199,37 @@ function Wt(i) {
199
199
  let o;
200
200
  e[23] !== c ? (o = c !== void 0 && /* @__PURE__ */ t(J, { title: "Temperature", children: /* @__PURE__ */ t(W, { icon: /* @__PURE__ */ t(xt, { size: 16 }), size: "small", variant: "outlined", label: c }) }), e[23] = c, e[24] = o) : o = e[24];
201
201
  let k;
202
- e[25] !== s || e[26] !== A ? (k = s && s.length > 0 && s.map((d, B) => {
203
- const F = A(d);
202
+ e[25] !== s || e[26] !== A ? (k = s && s.length > 0 && s.map((d, F) => {
203
+ const B = A(d);
204
204
  if (d.score != null) {
205
205
  const P = xe(d.score);
206
- return /* @__PURE__ */ t(J, { title: d.explanation || "No explanation", children: /* @__PURE__ */ t(W, { size: "small", variant: "outlined", label: `${F}: ${(d.score * 100).toFixed(1)}%`, sx: {
206
+ return /* @__PURE__ */ t(J, { title: d.explanation || "No explanation", children: /* @__PURE__ */ t(W, { size: "small", variant: "outlined", label: `${B}: ${(d.score * 100).toFixed(1)}%`, sx: {
207
207
  color: P,
208
208
  borderColor: P
209
- } }) }, B);
209
+ } }) }, F);
210
210
  }
211
- return /* @__PURE__ */ t(J, { title: d.skipReason || "Skipped", children: /* @__PURE__ */ t(W, { size: "small", variant: "outlined", label: `${F}: Skipped`, sx: {
211
+ return /* @__PURE__ */ t(J, { title: d.skipReason || "Skipped", children: /* @__PURE__ */ t(W, { size: "small", variant: "outlined", label: `${B}: Skipped`, sx: {
212
212
  opacity: 0.6,
213
213
  fontStyle: "italic"
214
- } }) }, B);
214
+ } }) }, F);
215
215
  }), e[25] = s, e[26] = A, e[27] = k) : k = e[27];
216
216
  let I;
217
- return e[28] !== u || e[29] !== o || e[30] !== k || e[31] !== T || e[32] !== S || e[33] !== N || e[34] !== O || e[35] !== L || e[36] !== E || e[37] !== x ? (I = /* @__PURE__ */ y(R, { spacing: 1, direction: "row", flexWrap: "wrap", useFlexGap: !0, alignItems: "center", children: [
217
+ return e[28] !== u || e[29] !== o || e[30] !== k || e[31] !== T || e[32] !== S || e[33] !== N || e[34] !== O || e[35] !== D || e[36] !== L || e[37] !== x ? (I = /* @__PURE__ */ y(R, { spacing: 1, direction: "row", flexWrap: "wrap", useFlexGap: !0, alignItems: "center", children: [
218
218
  T,
219
219
  S,
220
220
  N,
221
221
  O,
222
+ D,
222
223
  L,
223
- E,
224
224
  x,
225
225
  u,
226
226
  o,
227
227
  k
228
- ] }), e[28] = u, e[29] = o, e[30] = k, e[31] = T, e[32] = S, e[33] = N, e[34] = O, e[35] = L, e[36] = E, e[37] = x, e[38] = I) : I = e[38], I;
228
+ ] }), e[28] = u, e[29] = o, e[30] = k, e[31] = T, e[32] = S, e[33] = N, e[34] = O, e[35] = D, e[36] = L, e[37] = x, e[38] = I) : I = e[38], I;
229
229
  }
230
- const _e = "custom-dark-transparent", Me = "custom-light-transparent";
230
+ const ze = "custom-dark-transparent", Me = "custom-light-transparent";
231
231
  function Jt(i) {
232
- i.editor.defineTheme(_e, {
232
+ i.editor.defineTheme(ze, {
233
233
  base: "vs-dark",
234
234
  inherit: !0,
235
235
  rules: [],
@@ -307,44 +307,44 @@ function Kt(i) {
307
307
  }
308
308
  }
309
309
  function Gt(i) {
310
- const e = q(36), {
310
+ const e = X(36), {
311
311
  attributes: n
312
312
  } = i, {
313
313
  mode: s
314
- } = Et(), [r, l] = re(""), [a, h] = re(0), [p, m] = re(0), c = Ce(null);
314
+ } = Lt(), [r, l] = re(""), [a, h] = re(0), [p, m] = re(0), c = Ce(null);
315
315
  let g;
316
316
  e[0] === Symbol.for("react.memo_cache_sentinel") ? (g = [], e[0] = g) : g = e[0];
317
317
  const f = Ce(g), w = Vt;
318
318
  let C;
319
- e[1] === Symbol.for("react.memo_cache_sentinel") ? (C = (M) => {
320
- c.current = M;
319
+ e[1] === Symbol.for("react.memo_cache_sentinel") ? (C = (_) => {
320
+ c.current = _;
321
321
  }, e[1] = C) : C = e[1];
322
322
  const v = C;
323
323
  let b;
324
- e[2] === Symbol.for("react.memo_cache_sentinel") ? (b = (M) => {
324
+ e[2] === Symbol.for("react.memo_cache_sentinel") ? (b = (_) => {
325
325
  if (!c.current || f.current.length === 0)
326
326
  return;
327
- const j = f.current[M];
328
- j && (c.current.setPosition({
329
- lineNumber: j.range.startLineNumber,
330
- column: j.range.startColumn
331
- }), c.current.revealLineInCenter(j.range.startLineNumber), c.current.setSelection(j.range), h(M + 1));
327
+ const H = f.current[_];
328
+ H && (c.current.setPosition({
329
+ lineNumber: H.range.startLineNumber,
330
+ column: H.range.startColumn
331
+ }), c.current.revealLineInCenter(H.range.startLineNumber), c.current.setSelection(H.range), h(_ + 1));
332
332
  }, e[2] = b) : b = e[2];
333
333
  const A = b;
334
334
  let T;
335
335
  if (e[3] === Symbol.for("react.memo_cache_sentinel")) {
336
- const M = (j) => {
337
- if (!c.current || !j.trim()) {
336
+ const _ = (H) => {
337
+ if (!c.current || !H.trim()) {
338
338
  f.current = [], m(0), h(0);
339
339
  return;
340
340
  }
341
- const X = c.current.getModel();
342
- if (!X)
341
+ const q = c.current.getModel();
342
+ if (!q)
343
343
  return;
344
- const ae = [], me = j.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), ge = new RegExp(me, "gi"), be = X.getValue();
344
+ const ae = [], me = H.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), ge = new RegExp(me, "gi"), be = q.getValue();
345
345
  let te;
346
346
  for (; (te = ge.exec(be)) !== null; ) {
347
- const ie = X.getPositionAt(te.index), le = X.getPositionAt(te.index + te[0].length);
347
+ const ie = q.getPositionAt(te.index), le = q.getPositionAt(te.index + te[0].length);
348
348
  ae.push({
349
349
  range: {
350
350
  startLineNumber: ie.lineNumber,
@@ -356,8 +356,8 @@ function Gt(i) {
356
356
  }
357
357
  f.current = ae, m(ae.length), ae.length > 0 ? (h(1), A(0)) : h(0);
358
358
  };
359
- T = (j) => {
360
- l(j), M(j);
359
+ T = (H) => {
360
+ l(H), _(H);
361
361
  }, e[3] = T;
362
362
  } else
363
363
  T = e[3];
@@ -366,32 +366,32 @@ function Gt(i) {
366
366
  e[4] !== a ? (N = () => {
367
367
  if (f.current.length === 0)
368
368
  return;
369
- const M = a % f.current.length;
370
- A(M);
369
+ const _ = a % f.current.length;
370
+ A(_);
371
371
  }, e[4] = a, e[5] = N) : N = e[5];
372
372
  const O = N;
373
- let L;
374
- e[6] !== a ? (L = () => {
373
+ let D;
374
+ e[6] !== a ? (D = () => {
375
375
  if (f.current.length === 0)
376
376
  return;
377
- const M = a <= 1 ? f.current.length - 1 : a - 2;
378
- A(M);
379
- }, e[6] = a, e[7] = L) : L = e[7];
380
- const E = L;
377
+ const _ = a <= 1 ? f.current.length - 1 : a - 2;
378
+ A(_);
379
+ }, e[6] = a, e[7] = D) : D = e[7];
380
+ const L = D;
381
381
  if (!n || Object.keys(n).length === 0) {
382
- let M;
383
- return e[8] === Symbol.for("react.memo_cache_sentinel") ? (M = /* @__PURE__ */ t(pe, { message: "No attributes found", iconElement: wt, subtitle: "Try selecting a different span to view attributes", disableBackground: !0 }), e[8] = M) : M = e[8], M;
382
+ let _;
383
+ return e[8] === Symbol.for("react.memo_cache_sentinel") ? (_ = /* @__PURE__ */ t(pe, { message: "No attributes found", iconElement: wt, subtitle: "Try selecting a different span to view attributes", disableBackground: !0 }), e[8] = _) : _ = e[8], _;
384
384
  }
385
385
  let x;
386
- e[9] === Symbol.for("react.memo_cache_sentinel") ? (x = (M) => S(M.target.value), e[9] = x) : x = e[9];
386
+ e[9] === Symbol.for("react.memo_cache_sentinel") ? (x = (_) => S(_.target.value), e[9] = x) : x = e[9];
387
387
  let u;
388
- e[10] !== O ? (u = (M) => {
389
- M.key === "Enter" && O();
388
+ e[10] !== O ? (u = (_) => {
389
+ _.key === "Enter" && O();
390
390
  }, e[10] = O, e[11] = u) : u = e[11];
391
391
  let o;
392
392
  e[12] !== a || e[13] !== p ? (o = {
393
393
  input: {
394
- endAdornment: p > 0 ? /* @__PURE__ */ t(R, { direction: "row", alignItems: "center", gap: 1, children: /* @__PURE__ */ y(D, { variant: "caption", noWrap: !0, children: [
394
+ endAdornment: p > 0 ? /* @__PURE__ */ t(R, { direction: "row", alignItems: "center", gap: 1, children: /* @__PURE__ */ y(E, { variant: "caption", noWrap: !0, children: [
395
395
  a,
396
396
  " / ",
397
397
  p
@@ -399,26 +399,26 @@ function Gt(i) {
399
399
  }
400
400
  }, e[12] = a, e[13] = p, e[14] = o) : o = e[14];
401
401
  let k;
402
- e[15] !== r || e[16] !== u || e[17] !== o ? (k = /* @__PURE__ */ t(Ke, { placeholder: "Search...", value: r, onChange: x, size: "small", fullWidth: !0, "aria-label": "Search attributes", onKeyDown: u, slotProps: o }), e[15] = r, e[16] = u, e[17] = o, e[18] = k) : k = e[18];
402
+ e[15] !== r || e[16] !== u || e[17] !== o ? (k = /* @__PURE__ */ t(Je, { placeholder: "Search...", value: r, onChange: x, size: "small", fullWidth: !0, "aria-label": "Search attributes", onKeyDown: u, slotProps: o }), e[15] = r, e[16] = u, e[17] = o, e[18] = k) : k = e[18];
403
403
  let I;
404
- e[19] !== O || e[20] !== E || e[21] !== p ? (I = p > 0 && /* @__PURE__ */ y(R, { direction: "row", alignItems: "center", gap: 1, children: [
405
- /* @__PURE__ */ t(ue, { size: "small", onClick: E, "aria-label": "Previous match", title: "Previous match", children: /* @__PURE__ */ t(Tt, { size: 16, "aria-hidden": "true" }) }),
404
+ e[19] !== O || e[20] !== L || e[21] !== p ? (I = p > 0 && /* @__PURE__ */ y(R, { direction: "row", alignItems: "center", gap: 1, children: [
405
+ /* @__PURE__ */ t(ue, { size: "small", onClick: L, "aria-label": "Previous match", title: "Previous match", children: /* @__PURE__ */ t(Tt, { size: 16, "aria-hidden": "true" }) }),
406
406
  /* @__PURE__ */ t(ue, { size: "small", onClick: O, "aria-label": "Next match", title: "Next match", children: /* @__PURE__ */ t(kt, { size: 16, "aria-hidden": "true" }) })
407
- ] }), e[19] = O, e[20] = E, e[21] = p, e[22] = I) : I = e[22];
407
+ ] }), e[19] = O, e[20] = L, e[21] = p, e[22] = I) : I = e[22];
408
408
  let d;
409
409
  e[23] !== k || e[24] !== I ? (d = /* @__PURE__ */ y(R, { spacing: 1, pt: 2, direction: "row", justifyContent: "right", alignItems: "center", children: [
410
410
  k,
411
411
  I
412
412
  ] }), e[23] = k, e[24] = I, e[25] = d) : d = e[25];
413
- const B = s === "dark" ? _e : Me;
414
- let F;
415
- e[26] !== n ? (F = Kt(n), e[26] = n, e[27] = F) : F = e[27];
413
+ const F = s === "dark" ? ze : Me;
414
+ let B;
415
+ e[26] !== n ? (B = Kt(n), e[26] = n, e[27] = B) : B = e[27];
416
416
  let P;
417
417
  e[28] === Symbol.for("react.memo_cache_sentinel") ? (P = {
418
418
  enabled: !1
419
419
  }, e[28] = P) : P = e[28];
420
- let H;
421
- e[29] === Symbol.for("react.memo_cache_sentinel") ? (H = {
420
+ let j;
421
+ e[29] === Symbol.for("react.memo_cache_sentinel") ? (j = {
422
422
  readOnly: !0,
423
423
  contextmenu: !1,
424
424
  minimap: P,
@@ -433,9 +433,9 @@ function Gt(i) {
433
433
  showFoldingControls: "always",
434
434
  foldingHighlight: !0,
435
435
  unfoldOnClickAfterEndOfLine: !0
436
- }, e[29] = H) : H = e[29];
436
+ }, e[29] = j) : j = e[29];
437
437
  let $;
438
- e[30] !== B || e[31] !== F ? ($ = /* @__PURE__ */ t(Bt, { height: "calc(100vh - 266px)", theme: B, value: F, language: "json", beforeMount: w, onMount: v, options: H }), e[30] = B, e[31] = F, e[32] = $) : $ = e[32];
438
+ e[30] !== F || e[31] !== B ? ($ = /* @__PURE__ */ t(Ft, { height: "calc(100vh - 266px)", theme: F, value: B, language: "json", beforeMount: w, onMount: v, options: j }), e[30] = F, e[31] = B, e[32] = $) : $ = e[32];
439
439
  let U;
440
440
  return e[33] !== d || e[34] !== $ ? (U = /* @__PURE__ */ y(R, { direction: "column", spacing: 2, children: [
441
441
  d,
@@ -482,20 +482,20 @@ function Yt({
482
482
  return !i || i.length === 0 ? /* @__PURE__ */ t(pe, { message: "No tools found", iconElement: Ct, subtitle: "No tools found", disableBackground: !0 }) : /* @__PURE__ */ t(R, { children: i.map((a, h) => {
483
483
  const p = typeof a == "string", m = p ? a : a.name, c = m || `tool-${h}`;
484
484
  return /* @__PURE__ */ y(zt, { expanded: e === c, onChange: s(c), children: [
485
- /* @__PURE__ */ t(_t, { children: /* @__PURE__ */ t(D, { variant: "h6", children: m }) }),
486
- /* @__PURE__ */ t(Mt, { children: /* @__PURE__ */ y(R, { direction: "column", spacing: 2, children: [
485
+ /* @__PURE__ */ t(Mt, { children: /* @__PURE__ */ t(E, { variant: "h6", children: m }) }),
486
+ /* @__PURE__ */ t(_t, { children: /* @__PURE__ */ y(R, { direction: "column", spacing: 2, children: [
487
487
  !p && a.description && /* @__PURE__ */ y(G, { children: [
488
- /* @__PURE__ */ t(D, { variant: "subtitle2", sx: {
488
+ /* @__PURE__ */ t(E, { variant: "subtitle2", sx: {
489
489
  mb: 1
490
490
  }, children: "Description" }),
491
491
  /* @__PURE__ */ t(V, { variant: "outlined", children: /* @__PURE__ */ t(Y, { sx: {
492
492
  "&:last-child": {
493
493
  pb: 1.5
494
494
  }
495
- }, children: /* @__PURE__ */ t(D, { variant: "body2", children: a.description }) }) })
495
+ }, children: /* @__PURE__ */ t(E, { variant: "body2", children: a.description }) }) })
496
496
  ] }),
497
497
  !p && a.parameters && /* @__PURE__ */ y(G, { children: [
498
- /* @__PURE__ */ t(D, { variant: "subtitle2", sx: {
498
+ /* @__PURE__ */ t(E, { variant: "subtitle2", sx: {
499
499
  mb: 1
500
500
  }, children: "Parameters" }),
501
501
  /* @__PURE__ */ t(V, { variant: "outlined", sx: {
@@ -505,7 +505,7 @@ function Yt({
505
505
  "&:last-child": {
506
506
  pb: 1.5
507
507
  }
508
- }, children: /* @__PURE__ */ t(D, { variant: "caption", sx: {
508
+ }, children: /* @__PURE__ */ t(E, { variant: "caption", sx: {
509
509
  fontFamily: "monospace",
510
510
  whiteSpace: "pre-wrap",
511
511
  wordBreak: "break-word"
@@ -517,7 +517,7 @@ function Yt({
517
517
  "&:last-child": {
518
518
  pb: 1.5
519
519
  }
520
- }, children: /* @__PURE__ */ t(D, { variant: "body2", color: "text.secondary", children: "Additional tool details are not available" }) }) }) })
520
+ }, children: /* @__PURE__ */ t(E, { variant: "body2", color: "text.secondary", children: "Additional tool details are not available" }) }) }) })
521
521
  ] }) })
522
522
  ] }, c);
523
523
  }) });
@@ -548,8 +548,8 @@ function ye(i) {
548
548
  return i;
549
549
  }
550
550
  }
551
- const Ie = je(function(e) {
552
- const n = q(23), {
551
+ const Oe = je(function(e) {
552
+ const n = X(23), {
553
553
  title: s,
554
554
  messages: r,
555
555
  getRoleColor: l,
@@ -564,13 +564,13 @@ const Ie = je(function(e) {
564
564
  mb: 2
565
565
  }, n[0] = v) : v = n[0];
566
566
  let b;
567
- n[1] !== s ? (b = /* @__PURE__ */ t(D, { variant: "h6", sx: v, children: s }), n[1] = s, n[2] = b) : b = n[2];
567
+ n[1] !== s ? (b = /* @__PURE__ */ t(E, { variant: "h6", sx: v, children: s }), n[1] = s, n[2] = b) : b = n[2];
568
568
  let A;
569
569
  n[3] === Symbol.for("react.memo_cache_sentinel") ? (A = {
570
570
  bgcolor: "action.hover"
571
571
  }, n[3] = A) : A = n[3];
572
572
  let T;
573
- n[4] === Symbol.for("react.memo_cache_sentinel") ? (T = /* @__PURE__ */ t(V, { variant: "outlined", sx: A, children: /* @__PURE__ */ t(Y, { children: /* @__PURE__ */ t(D, { variant: "body2", color: "text.secondary", children: "No data available" }) }) }), n[4] = T) : T = n[4];
573
+ n[4] === Symbol.for("react.memo_cache_sentinel") ? (T = /* @__PURE__ */ t(V, { variant: "outlined", sx: A, children: /* @__PURE__ */ t(Y, { children: /* @__PURE__ */ t(E, { variant: "body2", color: "text.secondary", children: "No data available" }) }) }), n[4] = T) : T = n[4];
574
574
  let S;
575
575
  return n[5] !== b || n[6] !== a ? (S = /* @__PURE__ */ y(G, { "data-testid": a, children: [
576
576
  b,
@@ -586,7 +586,7 @@ const Ie = je(function(e) {
586
586
  mb: 2
587
587
  }, n[9] = c) : c = n[9];
588
588
  let g;
589
- n[10] !== s ? (g = /* @__PURE__ */ t(D, { variant: "h6", sx: c, children: s }), n[10] = s, n[11] = g) : g = n[11];
589
+ n[10] !== s ? (g = /* @__PURE__ */ t(E, { variant: "h6", sx: c, children: s }), n[10] = s, n[11] = g) : g = n[11];
590
590
  let f;
591
591
  if (n[12] !== l || n[13] !== r) {
592
592
  let v;
@@ -598,8 +598,8 @@ const Ie = je(function(e) {
598
598
  alignItems: "center",
599
599
  gap: 1
600
600
  }, children: b?.role && b.role !== "unknown" && /* @__PURE__ */ t(W, { label: b.role.charAt(0).toUpperCase() + b.role.slice(1), size: "small", color: l(b.role), variant: "outlined" }) }),
601
- b.content && !b.role && /* @__PURE__ */ t(Ge, { json: ye(b.content) }),
602
- b.content && b.role && /* @__PURE__ */ t(ze, { content: b.content }),
601
+ b.content && !b.role && /* @__PURE__ */ t(Ke, { json: ye(b.content) }),
602
+ b.content && b.role && /* @__PURE__ */ t(Le, { content: b.content }),
603
603
  b.toolCalls && b.toolCalls.length > 0 && /* @__PURE__ */ t(G, { children: /* @__PURE__ */ t(R, { spacing: 1, children: b.toolCalls.map(en) }) })
604
604
  ] }) }) }, T);
605
605
  }, n[15] = l, n[16] = v) : v = n[16], f = r.map(v), n[12] = l, n[13] = r, n[14] = f;
@@ -614,8 +614,8 @@ const Ie = je(function(e) {
614
614
  w
615
615
  ] }), n[19] = g, n[20] = w, n[21] = a, n[22] = C) : C = n[22], C;
616
616
  });
617
- function qt(i) {
618
- const e = q(29), {
617
+ function Xt(i) {
618
+ const e = X(29), {
619
619
  ampAttributes: n
620
620
  } = i, s = Qt;
621
621
  n?.input;
@@ -678,46 +678,46 @@ function qt(i) {
678
678
  }
679
679
  C = void 0;
680
680
  }
681
- const v = C, b = a.length > 0 || m.length > 0, A = Xt;
681
+ const v = C, b = a.length > 0 || m.length > 0, A = qt;
682
682
  if (!b && !g) {
683
683
  let x;
684
684
  return e[12] === Symbol.for("react.memo_cache_sentinel") ? (x = /* @__PURE__ */ t(pe, { message: "Failed to extract span details", iconElement: Nt, subtitle: "Try selecting a different span", disableBackground: !0 }), e[12] = x) : x = e[12], x;
685
685
  }
686
686
  let T;
687
687
  e[13] !== g ? (T = g && /* @__PURE__ */ y(R, { children: [
688
- /* @__PURE__ */ t(D, { variant: "h6", children: "Name" }),
689
- /* @__PURE__ */ t(V, { variant: "outlined", children: /* @__PURE__ */ t(Y, { children: /* @__PURE__ */ t(D, { variant: "body2", children: g }) }) })
688
+ /* @__PURE__ */ t(E, { variant: "h6", children: "Name" }),
689
+ /* @__PURE__ */ t(V, { variant: "outlined", children: /* @__PURE__ */ t(Y, { children: /* @__PURE__ */ t(E, { variant: "body2", children: g }) }) })
690
690
  ] }), e[13] = g, e[14] = T) : T = e[14];
691
691
  let S;
692
692
  e[15] !== w ? (S = w && /* @__PURE__ */ y(R, { children: [
693
- /* @__PURE__ */ t(D, { variant: "h6", children: "Description" }),
694
- /* @__PURE__ */ t(V, { variant: "outlined", children: /* @__PURE__ */ t(Y, { children: /* @__PURE__ */ t(D, { variant: "body2", sx: {
693
+ /* @__PURE__ */ t(E, { variant: "h6", children: "Description" }),
694
+ /* @__PURE__ */ t(V, { variant: "outlined", children: /* @__PURE__ */ t(Y, { children: /* @__PURE__ */ t(E, { variant: "body2", sx: {
695
695
  whiteSpace: "pre-wrap",
696
696
  wordBreak: "break-word"
697
697
  }, children: w }) }) })
698
698
  ] }), e[15] = w, e[16] = S) : S = e[16];
699
699
  let N;
700
700
  e[17] !== v ? (N = v && /* @__PURE__ */ y(R, { children: [
701
- /* @__PURE__ */ t(D, { variant: "h6", children: "System Prompt" }),
702
- /* @__PURE__ */ t(V, { variant: "outlined", children: /* @__PURE__ */ t(Y, { children: /* @__PURE__ */ t(D, { variant: "body2", sx: {
701
+ /* @__PURE__ */ t(E, { variant: "h6", children: "System Prompt" }),
702
+ /* @__PURE__ */ t(V, { variant: "outlined", children: /* @__PURE__ */ t(Y, { children: /* @__PURE__ */ t(E, { variant: "body2", sx: {
703
703
  whiteSpace: "pre-wrap",
704
704
  wordBreak: "break-word"
705
705
  }, children: ye(v) }) }) })
706
706
  ] }), e[17] = v, e[18] = N) : N = e[18];
707
707
  let O;
708
- e[19] !== a ? (O = /* @__PURE__ */ t(Ie, { title: "Input Messages", messages: a, getRoleColor: A, "data-testid": "input-messages", showEmptyMessage: !1 }), e[19] = a, e[20] = O) : O = e[20];
708
+ e[19] !== a ? (O = /* @__PURE__ */ t(Oe, { title: "Input Messages", messages: a, getRoleColor: A, "data-testid": "input-messages", showEmptyMessage: !1 }), e[19] = a, e[20] = O) : O = e[20];
709
+ let D;
710
+ e[21] !== m ? (D = /* @__PURE__ */ t(Oe, { title: "Output Messages", messages: m, getRoleColor: A, "data-testid": "output-messages", showEmptyMessage: !1 }), e[21] = m, e[22] = D) : D = e[22];
709
711
  let L;
710
- e[21] !== m ? (L = /* @__PURE__ */ t(Ie, { title: "Output Messages", messages: m, getRoleColor: A, "data-testid": "output-messages", showEmptyMessage: !1 }), e[21] = m, e[22] = L) : L = e[22];
711
- let E;
712
- return e[23] !== N || e[24] !== O || e[25] !== L || e[26] !== T || e[27] !== S ? (E = /* @__PURE__ */ y(R, { spacing: 3, children: [
712
+ return e[23] !== N || e[24] !== O || e[25] !== D || e[26] !== T || e[27] !== S ? (L = /* @__PURE__ */ y(R, { spacing: 3, children: [
713
713
  T,
714
714
  S,
715
715
  N,
716
716
  O,
717
- L
718
- ] }), e[23] = N, e[24] = O, e[25] = L, e[26] = T, e[27] = S, e[28] = E) : E = e[28], E;
717
+ D
718
+ ] }), e[23] = N, e[24] = O, e[25] = D, e[26] = T, e[27] = S, e[28] = L) : L = e[28], L;
719
719
  }
720
- function Xt(i) {
720
+ function qt(i) {
721
721
  switch (i) {
722
722
  case "system":
723
723
  return "default";
@@ -748,10 +748,10 @@ function en(i, e) {
748
748
  pb: 1.5
749
749
  }
750
750
  }, children: [
751
- /* @__PURE__ */ t(D, { variant: "caption", sx: {
751
+ /* @__PURE__ */ t(E, { variant: "caption", sx: {
752
752
  fontWeight: "bold"
753
753
  }, children: i.name }),
754
- i.arguments && /* @__PURE__ */ t(D, { variant: "caption", sx: {
754
+ i.arguments && /* @__PURE__ */ t(E, { variant: "caption", sx: {
755
755
  display: "block",
756
756
  mt: 0.5,
757
757
  fontFamily: "monospace",
@@ -761,7 +761,7 @@ function en(i, e) {
761
761
  ] }) }, n);
762
762
  }
763
763
  function tn(i) {
764
- const e = q(11), {
764
+ const e = X(11), {
765
765
  evaluatorScores: n
766
766
  } = i;
767
767
  let s;
@@ -782,7 +782,7 @@ function tn(i) {
782
782
  const g = l(m), f = m.score == null, w = f ? void 0 : xe(m.score);
783
783
  return /* @__PURE__ */ t(V, { variant: "outlined", children: /* @__PURE__ */ t(Y, { children: /* @__PURE__ */ y(R, { spacing: 1.5, children: [
784
784
  /* @__PURE__ */ y(R, { direction: "row", spacing: 1, alignItems: "center", children: [
785
- /* @__PURE__ */ t(D, { variant: "subtitle2", children: g }),
785
+ /* @__PURE__ */ t(E, { variant: "subtitle2", children: g }),
786
786
  f ? /* @__PURE__ */ t(W, { size: "small", variant: "outlined", label: "Skipped", sx: {
787
787
  ml: "auto",
788
788
  opacity: 0.6,
@@ -793,8 +793,8 @@ function tn(i) {
793
793
  borderColor: w
794
794
  } })
795
795
  ] }),
796
- m.explanation && /* @__PURE__ */ t(ze, { content: m.explanation }),
797
- f && m.skipReason && /* @__PURE__ */ t(D, { variant: "body2", color: "text.secondary", sx: {
796
+ m.explanation && /* @__PURE__ */ t(Le, { content: m.explanation }),
797
+ f && m.skipReason && /* @__PURE__ */ t(E, { variant: "body2", color: "text.secondary", sx: {
798
798
  fontStyle: "italic"
799
799
  }, children: m.skipReason })
800
800
  ] }) }) }, c);
@@ -838,7 +838,7 @@ function rn(i) {
838
838
  return !1;
839
839
  }
840
840
  function an(i) {
841
- const e = q(73), {
841
+ const e = X(73), {
842
842
  span: n,
843
843
  evaluatorScores: s
844
844
  } = i, [r, l] = re("overview");
@@ -871,7 +871,7 @@ function an(i) {
871
871
  height: "100%"
872
872
  }, e[19] = b) : b = e[19];
873
873
  let A;
874
- e[20] !== n.name ? (A = /* @__PURE__ */ t(D, { variant: "h4", noWrap: !0, textOverflow: "ellipsis", maxWidth: "70%", overflow: "hidden", children: n.name }), e[20] = n.name, e[21] = A) : A = e[21];
874
+ e[20] !== n.name ? (A = /* @__PURE__ */ t(E, { variant: "h4", noWrap: !0, textOverflow: "ellipsis", maxWidth: "70%", overflow: "hidden", children: n.name }), e[20] = n.name, e[21] = A) : A = e[21];
875
875
  let T;
876
876
  e[22] !== n.ampAttributes?.kind ? (T = n.ampAttributes?.kind && /* @__PURE__ */ t(W, { size: "small", variant: "outlined", label: n.ampAttributes?.kind.toUpperCase() }), e[22] = n.ampAttributes?.kind, e[23] = T) : T = e[23];
877
877
  let S;
@@ -887,11 +887,11 @@ function an(i) {
887
887
  S,
888
888
  N
889
889
  ] }), e[30] = N, e[31] = S, e[32] = O) : O = e[32];
890
- let L;
891
- e[33] === Symbol.for("react.memo_cache_sentinel") ? (L = (j, X) => l(X), e[33] = L) : L = e[33];
892
- const E = !h;
890
+ let D;
891
+ e[33] === Symbol.for("react.memo_cache_sentinel") ? (D = (H, q) => l(q), e[33] = D) : D = e[33];
892
+ const L = !h;
893
893
  let x;
894
- e[34] !== E ? (x = /* @__PURE__ */ t(ce, { label: "Overview", value: "overview", disabled: E }), e[34] = E, e[35] = x) : x = e[35];
894
+ e[34] !== L ? (x = /* @__PURE__ */ t(ce, { label: "Overview", value: "overview", disabled: L }), e[34] = L, e[35] = x) : x = e[35];
895
895
  let u;
896
896
  e[36] !== c ? (u = c && /* @__PURE__ */ t(ce, { label: "Tools", value: "tools" }), e[36] = c, e[37] = u) : u = e[37];
897
897
  let o;
@@ -899,7 +899,7 @@ function an(i) {
899
899
  let k;
900
900
  e[40] !== f ? (k = f && /* @__PURE__ */ t(ce, { label: "Scores", value: "scores" }), e[40] = f, e[41] = k) : k = e[41];
901
901
  let I;
902
- e[42] !== r || e[43] !== x || e[44] !== u || e[45] !== o || e[46] !== k ? (I = /* @__PURE__ */ y(Rt, { variant: "fullWidth", value: r, onChange: L, children: [
902
+ e[42] !== r || e[43] !== x || e[44] !== u || e[45] !== o || e[46] !== k ? (I = /* @__PURE__ */ y(Rt, { variant: "fullWidth", value: r, onChange: D, children: [
903
903
  x,
904
904
  u,
905
905
  o,
@@ -910,35 +910,35 @@ function an(i) {
910
910
  O,
911
911
  I
912
912
  ] }), e[48] = O, e[49] = I, e[50] = d) : d = e[50];
913
- let B;
914
- e[51] === Symbol.for("react.memo_cache_sentinel") ? (B = {
913
+ let F;
914
+ e[51] === Symbol.for("react.memo_cache_sentinel") ? (F = {
915
915
  overflowY: "auto",
916
916
  flexGrow: 1,
917
917
  boxShadow: "inset 0 4px 8px -4px rgba(0, 0, 0, 0.1)"
918
- }, e[51] = B) : B = e[51];
919
- let F;
920
- e[52] !== r || e[53] !== n.attributes ? (F = r === "attributes" && /* @__PURE__ */ t(ne, { children: /* @__PURE__ */ t(Gt, { attributes: n?.attributes }) }), e[52] = r, e[53] = n.attributes, e[54] = F) : F = e[54];
918
+ }, e[51] = F) : F = e[51];
919
+ let B;
920
+ e[52] !== r || e[53] !== n.attributes ? (B = r === "attributes" && /* @__PURE__ */ t(ne, { children: /* @__PURE__ */ t(Gt, { attributes: n?.attributes }) }), e[52] = r, e[53] = n.attributes, e[54] = B) : B = e[54];
921
921
  let P;
922
922
  e[55] !== r || e[56] !== m ? (P = r === "tools" && /* @__PURE__ */ t(ne, { children: /* @__PURE__ */ t(Yt, { tools: m || [] }) }), e[55] = r, e[56] = m, e[57] = P) : P = e[57];
923
- let H;
924
- e[58] !== r || e[59] !== n.ampAttributes ? (H = r === "overview" && /* @__PURE__ */ t(ne, { children: /* @__PURE__ */ t(qt, { ampAttributes: n.ampAttributes }) }), e[58] = r, e[59] = n.ampAttributes, e[60] = H) : H = e[60];
923
+ let j;
924
+ e[58] !== r || e[59] !== n.ampAttributes ? (j = r === "overview" && /* @__PURE__ */ t(ne, { children: /* @__PURE__ */ t(Xt, { ampAttributes: n.ampAttributes }) }), e[58] = r, e[59] = n.ampAttributes, e[60] = j) : j = e[60];
925
925
  let $;
926
926
  e[61] !== s || e[62] !== f || e[63] !== r ? ($ = r === "scores" && f && /* @__PURE__ */ t(ne, { children: /* @__PURE__ */ t(tn, { evaluatorScores: s }) }), e[61] = s, e[62] = f, e[63] = r, e[64] = $) : $ = e[64];
927
927
  let U;
928
- e[65] !== F || e[66] !== P || e[67] !== H || e[68] !== $ ? (U = /* @__PURE__ */ y(R, { spacing: 2, px: 1, sx: B, children: [
929
- F,
928
+ e[65] !== B || e[66] !== P || e[67] !== j || e[68] !== $ ? (U = /* @__PURE__ */ y(R, { spacing: 2, px: 1, sx: F, children: [
929
+ B,
930
930
  P,
931
- H,
931
+ j,
932
932
  $
933
- ] }), e[65] = F, e[66] = P, e[67] = H, e[68] = $, e[69] = U) : U = e[69];
934
- let M;
935
- return e[70] !== d || e[71] !== U ? (M = /* @__PURE__ */ y(R, { sx: b, children: [
933
+ ] }), e[65] = B, e[66] = P, e[67] = j, e[68] = $, e[69] = U) : U = e[69];
934
+ let _;
935
+ return e[70] !== d || e[71] !== U ? (_ = /* @__PURE__ */ y(R, { sx: b, children: [
936
936
  d,
937
937
  U
938
- ] }), e[70] = d, e[71] = U, e[72] = M) : M = e[72], M;
938
+ ] }), e[70] = d, e[71] = U, e[72] = _) : _ = e[72], _;
939
939
  }
940
940
  function on() {
941
- const i = q(1);
941
+ const i = X(1);
942
942
  let e;
943
943
  return i[0] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ y(R, { spacing: 2, px: 1, sx: {
944
944
  overflowY: "auto",
@@ -949,7 +949,7 @@ function on() {
949
949
  ] }), i[0] = e) : e = i[0], e;
950
950
  }
951
951
  function sn() {
952
- const i = q(1);
952
+ const i = X(1);
953
953
  let e;
954
954
  return i[0] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ y(R, { direction: "row", height: "calc(100vh - 64px)", gap: 1, children: [
955
955
  /* @__PURE__ */ t(he, { variant: "rounded", width: "55%", height: "100%" }),
@@ -987,7 +987,7 @@ function cn({
987
987
  data: c,
988
988
  isPending: g,
989
989
  isError: f
990
- } = Ve(e, n, s, r, i, l, a), [w, C] = re(null), v = ee(() => c?.spans?.map((o) => o.spanId).join(",") ?? "", [c?.spans]);
990
+ } = Ge(e, n, s, r, i, l, a), [w, C] = re(null), v = ee(() => c?.spans?.map((o) => o.spanId).join(",") ?? "", [c?.spans]);
991
991
  De(() => {
992
992
  const o = c?.spans;
993
993
  if (!o?.length) {
@@ -1000,7 +1000,7 @@ function cn({
1000
1000
  data: b,
1001
1001
  isPending: A,
1002
1002
  isError: T
1003
- } = Ye(i, w, !!c?.spans?.length && !!w), S = b && b.spanId === w ? b : null, N = ee(() => c?.spans?.length ? c.spans.map((o) => {
1003
+ } = Ve(i, w, !!c?.spans?.length && !!w), S = b && b.spanId === w ? b : null, N = ee(() => c?.spans?.length ? c.spans.map((o) => {
1004
1004
  const k = S?.spanId === o.spanId ? S : ln(o);
1005
1005
  return o.spanKind ? {
1006
1006
  ...k,
@@ -1009,9 +1009,9 @@ function cn({
1009
1009
  kind: o.spanKind
1010
1010
  }
1011
1011
  } : k;
1012
- }) : [], [c?.spans, S]), O = ee(() => w ? N.find((o) => o.spanId === w) ?? null : null, [N, w]), L = !!w && !T && (A || b?.spanId !== w), {
1013
- data: E
1014
- } = qe({
1012
+ }) : [], [c?.spans, S]), O = ee(() => w ? N.find((o) => o.spanId === w) ?? null : null, [N, w]), D = !!w && !T && (A || b?.spanId !== w), {
1013
+ data: L
1014
+ } = Ye({
1015
1015
  orgName: h,
1016
1016
  projName: p,
1017
1017
  agentName: m,
@@ -1021,43 +1021,43 @@ function cn({
1021
1021
  spanScoresMap: u
1022
1022
  } = ee(() => {
1023
1023
  const o = [], k = /* @__PURE__ */ new Map();
1024
- for (const I of E?.monitors ?? []) {
1024
+ for (const I of L?.monitors ?? []) {
1025
1025
  for (const d of I.evaluators)
1026
1026
  o.push({
1027
1027
  ...d,
1028
1028
  monitorName: I.monitorName
1029
1029
  });
1030
1030
  for (const d of I.spans) {
1031
- const B = k.get(d.spanId) ?? [];
1032
- for (const F of d.evaluators)
1033
- B.push({
1034
- ...F,
1031
+ const F = k.get(d.spanId) ?? [];
1032
+ for (const B of d.evaluators)
1033
+ F.push({
1034
+ ...B,
1035
1035
  monitorName: I.monitorName
1036
1036
  });
1037
- k.set(d.spanId, B);
1037
+ k.set(d.spanId, F);
1038
1038
  }
1039
1039
  }
1040
1040
  return {
1041
1041
  traceEvalScores: o,
1042
1042
  spanScoresMap: k
1043
1043
  };
1044
- }, [E]);
1044
+ }, [L]);
1045
1045
  return g ? /* @__PURE__ */ t(sn, {}) : f ? /* @__PURE__ */ t(ne, { children: /* @__PURE__ */ t(G, { sx: {
1046
1046
  p: 2
1047
- }, children: /* @__PURE__ */ t(D, { color: "error", children: "Failed to load trace details. Try again later." }) }) }) : c?.spans?.length == 0 ? /* @__PURE__ */ t(ne, { children: /* @__PURE__ */ t(pe, { message: "No spans found", iconElement: fe, disableBackground: !0, subtitle: "Try changing the time range" }) }) : /* @__PURE__ */ t(ne, { children: /* @__PURE__ */ y(R, { direction: "row", height: "calc(100vh - 72px)", children: [
1047
+ }, children: /* @__PURE__ */ t(E, { color: "error", children: "Failed to load trace details. Try again later." }) }) }) : c?.spans?.length == 0 ? /* @__PURE__ */ t(ne, { children: /* @__PURE__ */ t(pe, { message: "No spans found", iconElement: fe, disableBackground: !0, subtitle: "Try changing the time range" }) }) : /* @__PURE__ */ t(ne, { children: /* @__PURE__ */ y(R, { direction: "row", height: "calc(100vh - 72px)", children: [
1048
1048
  /* @__PURE__ */ t(G, { sx: {
1049
1049
  width: "45%"
1050
1050
  }, pr: 1, overflow: "auto", children: i && /* @__PURE__ */ t(Xe, { onOpenAttributesClick: (o) => C(o.spanId), selectedSpan: O, spans: N }) }),
1051
1051
  /* @__PURE__ */ t(we, { orientation: "vertical", flexItem: !0 }),
1052
1052
  /* @__PURE__ */ t(G, { sx: {
1053
1053
  width: "55%"
1054
- }, children: L ? /* @__PURE__ */ t(on, {}) : T ? /* @__PURE__ */ t(G, { sx: {
1054
+ }, children: D ? /* @__PURE__ */ t(on, {}) : T ? /* @__PURE__ */ t(G, { sx: {
1055
1055
  p: 2
1056
- }, children: /* @__PURE__ */ t(D, { color: "error", children: "Failed to load span details. Try again later." }) }) : /* @__PURE__ */ t(an, { span: S, evaluatorScores: S ? S.parentSpanId ? u.get(S.spanId) : [...x, ...u.get(S.spanId) ?? []] : void 0 }) })
1056
+ }, children: /* @__PURE__ */ t(E, { color: "error", children: "Failed to load span details. Try again later." }) }) : /* @__PURE__ */ t(an, { span: S, evaluatorScores: S ? S.parentSpanId ? u.get(S.spanId) : [...x, ...u.get(S.spanId) ?? []] : void 0 }) })
1057
1057
  ] }) });
1058
1058
  }
1059
1059
  const dn = (i) => {
1060
- const e = q(10), {
1060
+ const e = X(10), {
1061
1061
  traces: n,
1062
1062
  isLoading: s,
1063
1063
  sortOrder: r,
@@ -1069,7 +1069,7 @@ const dn = (i) => {
1069
1069
  onLoadNewer: c
1070
1070
  } = i, g = s === void 0 ? !1 : s, f = r === void 0 ? "desc" : r, w = a === void 0 ? !1 : a, C = h === void 0 ? !1 : h;
1071
1071
  let v;
1072
- return e[0] !== g || e[1] !== C || e[2] !== w || e[3] !== c || e[4] !== m || e[5] !== p || e[6] !== l || e[7] !== f || e[8] !== n ? (v = /* @__PURE__ */ t(Ht, { isLoading: g, sortOrder: f, traces: n, onTraceSelect: p, selectedTrace: l, isLoadingOlder: w, isLoadingNewer: C, onLoadOlder: m, onLoadNewer: c }), e[0] = g, e[1] = C, e[2] = w, e[3] = c, e[4] = m, e[5] = p, e[6] = l, e[7] = f, e[8] = n, e[9] = v) : v = e[9], v;
1072
+ return e[0] !== g || e[1] !== C || e[2] !== w || e[3] !== c || e[4] !== m || e[5] !== p || e[6] !== l || e[7] !== f || e[8] !== n ? (v = /* @__PURE__ */ t(jt, { isLoading: g, sortOrder: f, traces: n, onTraceSelect: p, selectedTrace: l, isLoadingOlder: w, isLoadingNewer: C, onLoadOlder: m, onLoadNewer: c }), e[0] = g, e[1] = C, e[2] = w, e[3] = c, e[4] = m, e[5] = p, e[6] = l, e[7] = f, e[8] = n, e[9] = v) : v = e[9], v;
1073
1073
  }, un = [{
1074
1074
  value: Q.TEN_MINUTES,
1075
1075
  label: "10 Minutes"
@@ -1091,26 +1091,26 @@ const dn = (i) => {
1091
1091
  }, {
1092
1092
  value: Q.SEVEN_DAYS,
1093
1093
  label: "7 Days"
1094
- }], Ae = () => {
1094
+ }], Ie = () => {
1095
1095
  const {
1096
1096
  agentId: i,
1097
1097
  orgId: e,
1098
1098
  projectId: n,
1099
1099
  envId: s
1100
- } = Ee(), [r, l] = We(), {
1100
+ } = Ee(), [r, l] = He(), {
1101
1101
  mutateAsync: a,
1102
1102
  isPending: h
1103
- } = Qe(), {
1103
+ } = qe(), {
1104
1104
  data: p,
1105
1105
  isPending: m,
1106
1106
  isSuccess: c
1107
- } = Ze({
1107
+ } = Qe({
1108
1108
  orgName: e ?? ""
1109
1109
  }), g = p?.namespace, {
1110
1110
  data: f,
1111
1111
  isPending: w,
1112
1112
  isSuccess: C
1113
- } = et({
1113
+ } = Ze({
1114
1114
  orgName: e ?? "",
1115
1115
  projName: n ?? "",
1116
1116
  agentName: i ?? ""
@@ -1118,14 +1118,14 @@ const dn = (i) => {
1118
1118
  data: v,
1119
1119
  isPending: b,
1120
1120
  isSuccess: A
1121
- } = tt({
1121
+ } = et({
1122
1122
  orgName: e ?? ""
1123
- }), S = v?.find((z) => z.name === s)?.name, N = m || w || b, O = c && !g, L = C && !f?.uuid, E = A && v !== void 0 && !S, [x, u] = re(null), [o, k] = re(!1), {
1123
+ }), S = v?.find((z) => z.name === s)?.name, N = m || w || b, O = c && !g, D = C && !f?.uuid, L = A && v !== void 0 && !S, [x, u] = re(null), [o, k] = re(!1), {
1124
1124
  customStartTime: I,
1125
1125
  customEndTime: d,
1126
- hasCustomRange: B,
1127
- handleCustomRangeApply: F
1128
- } = nt(r, l), P = ee(() => B ? void 0 : Object.values(Q).includes(r.get("timeRange") ?? "") ? r.get("timeRange") : Q.ONE_HOUR, [r, B]), H = ee(() => {
1126
+ hasCustomRange: F,
1127
+ handleCustomRangeApply: B
1128
+ } = tt(r, l), P = ee(() => F ? void 0 : Object.values(Q).includes(r.get("timeRange") ?? "") ? r.get("timeRange") : Q.ONE_HOUR, [r, F]), j = ee(() => {
1129
1129
  const z = parseInt(r.get("limit") || "10", 10);
1130
1130
  return Number.isFinite(z) && z > 0 ? z : 10;
1131
1131
  }, [r]), $ = ee(() => {
@@ -1133,33 +1133,33 @@ const dn = (i) => {
1133
1133
  return z === "asc" || z === "desc" ? z : "desc";
1134
1134
  }, [r]), {
1135
1135
  data: U,
1136
- isLoading: M,
1137
- refetch: j,
1138
- isRefetching: X,
1136
+ isLoading: _,
1137
+ refetch: H,
1138
+ isRefetching: q,
1139
1139
  loadOlder: ae,
1140
1140
  loadNewer: me,
1141
1141
  isLoadingOlder: ge,
1142
1142
  isLoadingNewer: be
1143
- } = rt(g, n, i, S, P, H, $, I, d), te = ee(() => {
1143
+ } = nt(g, n, i, S, P, j, $, I, d), te = ee(() => {
1144
1144
  const z = U?.fetchedRange;
1145
- return z || (B ? {
1145
+ return z || (F ? {
1146
1146
  startTime: I,
1147
1147
  endTime: d
1148
1148
  } : P ? Ne(P) : void 0);
1149
- }, [U, B, I, d, P]), ie = ee(() => r.get("selectedTrace"), [r]), le = Z((z) => {
1149
+ }, [U, F, I, d, P]), ie = ee(() => r.get("selectedTrace"), [r]), le = Z((z) => {
1150
1150
  const K = new URLSearchParams(r);
1151
1151
  K.set("selectedTrace", z), l(K);
1152
1152
  }, [r, l]), Te = Z(() => {
1153
1153
  const z = new URLSearchParams(r);
1154
1154
  z.delete("selectedTrace"), l(z), k(!1);
1155
- }, [r, l]), Re = Z(async () => {
1155
+ }, [r, l]), _e = Z(async () => {
1156
1156
  if (!g || !n || !i || !S) {
1157
1157
  u("Missing required parameters for export");
1158
1158
  return;
1159
1159
  }
1160
1160
  try {
1161
1161
  u(null);
1162
- const z = B ? {
1162
+ const z = F ? {
1163
1163
  startTime: I,
1164
1164
  endTime: d
1165
1165
  } : P ? Ne(P) : null;
@@ -1169,41 +1169,33 @@ const dn = (i) => {
1169
1169
  }
1170
1170
  const {
1171
1171
  startTime: K,
1172
- endTime: Fe
1173
- } = z, Ue = await a({
1172
+ endTime: $e
1173
+ } = z, Be = await a({
1174
1174
  organization: g,
1175
1175
  project: n,
1176
1176
  component: i,
1177
1177
  environment: S,
1178
1178
  startTime: K,
1179
- endTime: Fe,
1179
+ endTime: $e,
1180
1180
  sortOrder: $,
1181
- limit: H
1182
- }), He = new Blob([JSON.stringify(Ue, null, 2)], {
1181
+ limit: j
1182
+ }), Ue = new Blob([JSON.stringify(Be, null, 2)], {
1183
1183
  type: "application/json"
1184
- }), ke = window.URL.createObjectURL(He), oe = document.createElement("a");
1184
+ }), ke = window.URL.createObjectURL(Ue), oe = document.createElement("a");
1185
1185
  oe.href = ke, oe.download = `traces-export-${(/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-")}.json`, document.body.appendChild(oe), oe.click(), document.body.removeChild(oe), window.URL.revokeObjectURL(ke);
1186
1186
  } catch (z) {
1187
1187
  console.error("Export failed:", z), u(z instanceof Error ? z.message : "Failed to export traces");
1188
1188
  }
1189
- }, [g, n, i, S, P, $, H, a, B, I, d]), Pe = Z((z) => {
1189
+ }, [g, n, i, S, P, $, j, a, F, I, d]), Re = Z((z) => {
1190
1190
  const K = new URLSearchParams(r);
1191
1191
  K.set("timeRange", z), K.delete("startTime"), K.delete("endTime"), l(K);
1192
- }, [r, l]), Be = Z((z) => {
1192
+ }, [r, l]), Pe = Z((z) => {
1193
1193
  const K = new URLSearchParams(r);
1194
1194
  K.set("sortOrder", z), l(K);
1195
- }, [r, l]), $e = Z(() => {
1196
- j();
1197
- }, [j]);
1198
- return !Oe.obsApiBaseUrl?.trim() || Oe.obsApiBaseUrl.trim() === "$OBS_API_BASE_URL" ? /* @__PURE__ */ t(ve, { title: "Traces", disableIcon: !0, children: /* @__PURE__ */ y(se, { severity: "error", sx: {
1199
- mt: 2
1200
- }, children: [
1201
- /* @__PURE__ */ t("strong", { children: "Traces service not configured." }),
1202
- " Set",
1203
- " ",
1204
- /* @__PURE__ */ t("code", { children: "OBS_API_BASE_URL" }),
1205
- " to the traces-observer-service URL. The agent-manager no longer serves trace routes."
1206
- ] }) }) : O || L || E ? /* @__PURE__ */ y(ve, { title: "Traces", disableIcon: !0, children: [
1195
+ }, [r, l]), Fe = Z(() => {
1196
+ H();
1197
+ }, [H]);
1198
+ return st() ? O || D || L ? /* @__PURE__ */ y(ve, { title: "Traces", disableIcon: !0, children: [
1207
1199
  O && /* @__PURE__ */ y(se, { severity: "error", sx: {
1208
1200
  mt: 2
1209
1201
  }, children: [
@@ -1213,7 +1205,7 @@ const dn = (i) => {
1213
1205
  /* @__PURE__ */ t("code", { children: e }),
1214
1206
  " exists, or it has no organization identifier."
1215
1207
  ] }),
1216
- L && /* @__PURE__ */ y(se, { severity: "error", sx: {
1208
+ D && /* @__PURE__ */ y(se, { severity: "error", sx: {
1217
1209
  mt: 2
1218
1210
  }, children: [
1219
1211
  /* @__PURE__ */ t("strong", { children: "Agent not found." }),
@@ -1222,7 +1214,7 @@ const dn = (i) => {
1222
1214
  /* @__PURE__ */ t("code", { children: i }),
1223
1215
  " exists in this project."
1224
1216
  ] }),
1225
- E && /* @__PURE__ */ y(se, { severity: "error", sx: {
1217
+ L && /* @__PURE__ */ y(se, { severity: "error", sx: {
1226
1218
  mt: 2
1227
1219
  }, children: [
1228
1220
  /* @__PURE__ */ t("strong", { children: "Environment not found." }),
@@ -1230,36 +1222,43 @@ const dn = (i) => {
1230
1222
  /* @__PURE__ */ t("code", { children: s }),
1231
1223
  " does not match any environment in this organisation. Check the URL or verify the environment name."
1232
1224
  ] })
1233
- ] }) : /* @__PURE__ */ y(Le, { children: [
1225
+ ] }) : /* @__PURE__ */ y(Ae, { children: [
1234
1226
  /* @__PURE__ */ y(ve, { title: "Traces", disableIcon: !0, actions: /* @__PURE__ */ y(R, { direction: "row", spacing: 2, alignItems: "center", flexWrap: "wrap", children: [
1235
1227
  /* @__PURE__ */ t($t, {}),
1236
- /* @__PURE__ */ t(st, { preset: P, customStart: I, customEnd: d, options: un, onPresetChange: Pe, onCustomRangeApply: F }),
1237
- /* @__PURE__ */ t(ue, { size: "small", onClick: () => Be($ === "desc" ? "asc" : "desc"), "aria-label": $ === "desc" ? "Sort ascending" : "Sort descending", children: $ === "desc" ? /* @__PURE__ */ t(Ot, { size: 16 }) : /* @__PURE__ */ t(It, { size: 16 }) }),
1238
- /* @__PURE__ */ t(ue, { size: "small", disabled: X, onClick: $e, "aria-label": "Refresh", children: X ? /* @__PURE__ */ t(de, { size: 16 }) : /* @__PURE__ */ t(At, { size: 16 }) }),
1239
- /* @__PURE__ */ t(Se, { size: "small", variant: "outlined", startIcon: h ? /* @__PURE__ */ t(de, { size: 16 }) : /* @__PURE__ */ t(Lt, { size: 16 }), onClick: Re, disabled: h || N || M || (U?.traces ?? []).length === 0, children: "Export" })
1228
+ /* @__PURE__ */ t(ot, { preset: P, customStart: I, customEnd: d, options: un, onPresetChange: Re, onCustomRangeApply: B }),
1229
+ /* @__PURE__ */ t(ue, { size: "small", onClick: () => Pe($ === "desc" ? "asc" : "desc"), "aria-label": $ === "desc" ? "Sort ascending" : "Sort descending", children: $ === "desc" ? /* @__PURE__ */ t(Ot, { size: 16 }) : /* @__PURE__ */ t(It, { size: 16 }) }),
1230
+ /* @__PURE__ */ t(ue, { size: "small", disabled: q, onClick: Fe, "aria-label": "Refresh", children: q ? /* @__PURE__ */ t(de, { size: 16 }) : /* @__PURE__ */ t(At, { size: 16 }) }),
1231
+ /* @__PURE__ */ t(Se, { size: "small", variant: "outlined", startIcon: h ? /* @__PURE__ */ t(de, { size: 16 }) : /* @__PURE__ */ t(Dt, { size: 16 }), onClick: _e, disabled: h || N || _ || (U?.traces ?? []).length === 0, children: "Export" })
1240
1232
  ] }), children: [
1241
- /* @__PURE__ */ t(dn, { traces: U?.traces ?? [], isLoading: N || M, selectedTrace: ie, sortOrder: $, isLoadingOlder: ge, isLoadingNewer: be, onTraceSelect: le, onLoadOlder: ae, onLoadNewer: me }),
1242
- /* @__PURE__ */ y(it, { open: !!ie, disableScroll: !0, onClose: Te, minWidth: "80vw", fullscreen: o, children: [
1243
- /* @__PURE__ */ t(at, { title: "Trace Details", icon: /* @__PURE__ */ t(fe, { size: 24 }), onClose: Te, isFullscreen: o, onToggleFullscreen: () => k((z) => !z) }),
1244
- /* @__PURE__ */ t(ot, { children: ie && te && g && n && i && S ? /* @__PURE__ */ t(cn, { traceId: ie, organization: g, project: n, component: i, environment: S, startTime: te.startTime, endTime: te.endTime }) : null })
1233
+ /* @__PURE__ */ t(dn, { traces: U?.traces ?? [], isLoading: N || _, selectedTrace: ie, sortOrder: $, isLoadingOlder: ge, isLoadingNewer: be, onTraceSelect: le, onLoadOlder: ae, onLoadNewer: me }),
1234
+ /* @__PURE__ */ y(rt, { open: !!ie, disableScroll: !0, onClose: Te, minWidth: "80vw", fullscreen: o, children: [
1235
+ /* @__PURE__ */ t(it, { title: "Trace Details", icon: /* @__PURE__ */ t(fe, { size: 24 }), onClose: Te, isFullscreen: o, onToggleFullscreen: () => k((z) => !z) }),
1236
+ /* @__PURE__ */ t(at, { children: ie && te && g && n && i && S ? /* @__PURE__ */ t(cn, { traceId: ie, organization: g, project: n, component: i, environment: S, startTime: te.startTime, endTime: te.endTime }) : null })
1245
1237
  ] })
1246
1238
  ] }),
1247
1239
  /* @__PURE__ */ t(Pt, { open: !!x, autoHideDuration: 6e3, onClose: () => u(null), anchorOrigin: {
1248
1240
  vertical: "bottom",
1249
1241
  horizontal: "center"
1250
1242
  }, children: /* @__PURE__ */ t(se, { onClose: () => u(null), severity: "error", children: x }) })
1251
- ] });
1243
+ ] }) : /* @__PURE__ */ t(ve, { title: "Traces", disableIcon: !0, children: /* @__PURE__ */ y(se, { severity: "error", sx: {
1244
+ mt: 2
1245
+ }, children: [
1246
+ /* @__PURE__ */ t("strong", { children: "Observer not configured." }),
1247
+ " Ask your platform administrator to set ",
1248
+ /* @__PURE__ */ t("code", { children: "AM_OBSERVER_PUBLIC_URL" }),
1249
+ " on the agent-manager service."
1250
+ ] }) });
1252
1251
  }, Tn = {
1253
1252
  title: "Traces",
1254
1253
  description: "A page component for Traces",
1255
1254
  icon: fe,
1256
1255
  path: "/traces",
1257
- component: Ae,
1256
+ component: Ie,
1258
1257
  levels: {
1259
- component: Ae
1258
+ component: Ie
1260
1259
  }
1261
1260
  };
1262
1261
  export {
1263
- Ae as TracesComponent,
1262
+ Ie as TracesComponent,
1264
1263
  Tn as metaData
1265
1264
  };