@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.
- package/dist/CatalogKindListing-DvUuZEpc.js +137 -0
- package/dist/{CodeBlock-mB_Loq7I.js → CodeBlock-B2Ecl916.js} +1 -1
- package/dist/EnvironmentCard-CIXhDhlZ.js +319 -0
- package/dist/{EnvironmentSelector-B7Bl93s2.js → EnvironmentSelector-D8S6nO9u.js} +1 -1
- package/dist/IsolationTierIndicator-cf90kgjL.js +81 -0
- package/dist/LabelChips-7rA7_yre.js +139 -0
- package/dist/PolicyListSection-D6aVSKwP.js +1143 -0
- package/dist/{ResourceListShell-Cx6mdeqv.js → ResourceListShell-DFisKftq.js} +1 -1
- package/dist/{SwaggerSpecViewer-BvkhoKsi.js → SwaggerSpecViewer-DzjR6U6W.js} +1 -1
- package/dist/{debounce-BV83M53b.js → debounce-D17ObVdG.js} +1 -1
- package/dist/{format-BEZZRyE2.js → format-wlHhWjGo.js} +1 -1
- package/dist/{formatDistanceToNow-TErllcH8.js → formatDistanceToNow-DyjnT7l9.js} +11 -11
- package/dist/{gatewayScripts-D8O45W8u.js → gatewayScripts-D4ZDEDPS.js} +1 -1
- package/dist/{index-sr-mWz4T.js → index-3K-zqdp-.js} +32 -32
- package/dist/{index-KRsV2L4V.js → index-6liAPSDn.js} +160 -160
- package/dist/{index-B52h3RHg.js → index-B3ASENUJ.js} +109 -109
- package/dist/index-B7Pf4oPq.js +3069 -0
- package/dist/index-BNO3FhZK.js +2304 -0
- package/dist/index-BUZSfCl5.js +335 -0
- package/dist/index-BXiG1r_o.js +1409 -0
- package/dist/{index-_0Pj_ZtW.js → index-BYy7Iaam.js} +40 -40
- package/dist/{index-BfjzUWDa.js → index-BbB_yx4V.js} +103 -103
- package/dist/index-BjWJ95lH.js +2728 -0
- package/dist/{index-B_Z0MwXk.js → index-ByEInFlf.js} +10916 -9520
- package/dist/index-C8WIhzyz.js +123 -0
- package/dist/index-CnzvaT6b.js +2368 -0
- package/dist/index-CrnCf-hJ.js +763 -0
- package/dist/{index-CgCWbWzN.js → index-Cvsho9xg.js} +381 -377
- package/dist/{index-UqDmyMSA.js → index-CxnAo1_c.js} +21 -21
- package/dist/{index-BnV-PkwM.js → index-Cz7-AZwE.js} +2 -2
- package/dist/{index-BP5drcF2.js → index-DBdRFjxm.js} +232 -233
- package/dist/{index-BZ4vxviI.js → index-DFsSvmMZ.js} +5 -5
- package/dist/index-DslzOSGN.js +2549 -0
- package/dist/{index-DD4qF7gq.js → index-DvpYvchM.js} +101 -100
- package/dist/index.d.ts +784 -163
- package/dist/index.js +532 -454
- package/dist/js-yaml-CvhD-clg.js +1335 -0
- package/dist/{llmProviderPayload-CzihkdNa.js → llmProviderPayload-BPzWDy7n.js} +2 -2
- package/package.json +1 -1
- package/dist/CatalogKindListing-DtFI2YMG.js +0 -118
- package/dist/EnvironmentCard-09h1XRxx.js +0 -310
- package/dist/PolicyListSection-o4k9e8XO.js +0 -2475
- package/dist/index-CGDYgUCH.js +0 -711
- package/dist/index-COt7nJIf.js +0 -2286
- package/dist/index-CWZjOy1h.js +0 -2247
- package/dist/index-CezvogTQ.js +0 -116
- package/dist/index-CjCkcuuI.js +0 -322
- package/dist/index-CjXvuf9m.js +0 -1354
- package/dist/index-DeQ-9KTC.js +0 -737
- package/dist/index-Df6OBy4E.js +0 -3041
- package/dist/index-PUuASE1F.js +0 -2507
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { jsx as t, jsxs as y, Fragment as
|
|
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
|
|
4
|
-
import {
|
|
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
|
|
6
|
-
import { c as
|
|
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
|
|
9
|
-
import { F as
|
|
10
|
-
import { E as $t } from "./EnvironmentSelector-
|
|
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:
|
|
13
|
-
} =
|
|
14
|
-
function
|
|
15
|
-
const e =
|
|
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,
|
|
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] !==
|
|
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(
|
|
64
|
-
/* @__PURE__ */ t(
|
|
65
|
-
/* @__PURE__ */ t(
|
|
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(
|
|
69
|
-
/* @__PURE__ */ t(
|
|
70
|
-
/* @__PURE__ */ t(
|
|
71
|
-
/* @__PURE__ */ t(
|
|
72
|
-
/* @__PURE__ */ t(
|
|
73
|
-
/* @__PURE__ */ t(
|
|
74
|
-
/* @__PURE__ */ t(
|
|
75
|
-
/* @__PURE__ */ t(
|
|
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(
|
|
78
|
-
/* @__PURE__ */ t(
|
|
79
|
-
n.map((u) => /* @__PURE__ */ y(
|
|
80
|
-
/* @__PURE__ */ t(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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:
|
|
116
|
-
/* @__PURE__ */ t(
|
|
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(
|
|
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(
|
|
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(
|
|
128
|
-
/* @__PURE__ */ t(
|
|
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(
|
|
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(
|
|
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(
|
|
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
|
|
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 =
|
|
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:
|
|
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[
|
|
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,
|
|
203
|
-
const
|
|
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: `${
|
|
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
|
-
} }) },
|
|
209
|
+
} }) }, F);
|
|
210
210
|
}
|
|
211
|
-
return /* @__PURE__ */ t(J, { title: d.skipReason || "Skipped", children: /* @__PURE__ */ t(W, { size: "small", variant: "outlined", label: `${
|
|
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
|
-
} }) },
|
|
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] !==
|
|
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] =
|
|
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
|
|
230
|
+
const ze = "custom-dark-transparent", Me = "custom-light-transparent";
|
|
231
231
|
function Jt(i) {
|
|
232
|
-
i.editor.defineTheme(
|
|
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 =
|
|
310
|
+
const e = X(36), {
|
|
311
311
|
attributes: n
|
|
312
312
|
} = i, {
|
|
313
313
|
mode: s
|
|
314
|
-
} =
|
|
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 = (
|
|
320
|
-
c.current =
|
|
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 = (
|
|
324
|
+
e[2] === Symbol.for("react.memo_cache_sentinel") ? (b = (_) => {
|
|
325
325
|
if (!c.current || f.current.length === 0)
|
|
326
326
|
return;
|
|
327
|
-
const
|
|
328
|
-
|
|
329
|
-
lineNumber:
|
|
330
|
-
column:
|
|
331
|
-
}), c.current.revealLineInCenter(
|
|
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
|
|
337
|
-
if (!c.current || !
|
|
336
|
+
const _ = (H) => {
|
|
337
|
+
if (!c.current || !H.trim()) {
|
|
338
338
|
f.current = [], m(0), h(0);
|
|
339
339
|
return;
|
|
340
340
|
}
|
|
341
|
-
const
|
|
342
|
-
if (!
|
|
341
|
+
const q = c.current.getModel();
|
|
342
|
+
if (!q)
|
|
343
343
|
return;
|
|
344
|
-
const ae = [], me =
|
|
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 =
|
|
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 = (
|
|
360
|
-
l(
|
|
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
|
|
370
|
-
A(
|
|
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
|
|
374
|
-
e[6] !== a ? (
|
|
373
|
+
let D;
|
|
374
|
+
e[6] !== a ? (D = () => {
|
|
375
375
|
if (f.current.length === 0)
|
|
376
376
|
return;
|
|
377
|
-
const
|
|
378
|
-
A(
|
|
379
|
-
}, e[6] = a, e[7] =
|
|
380
|
-
const
|
|
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
|
|
383
|
-
return e[8] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
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 = (
|
|
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 = (
|
|
389
|
-
|
|
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(
|
|
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(
|
|
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] !==
|
|
405
|
-
/* @__PURE__ */ t(ue, { size: "small", onClick:
|
|
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] =
|
|
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
|
|
414
|
-
let
|
|
415
|
-
e[26] !== n ? (
|
|
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
|
|
421
|
-
e[29] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
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] =
|
|
436
|
+
}, e[29] = j) : j = e[29];
|
|
437
437
|
let $;
|
|
438
|
-
e[30] !==
|
|
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(
|
|
486
|
-
/* @__PURE__ */ t(
|
|
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(
|
|
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(
|
|
495
|
+
}, children: /* @__PURE__ */ t(E, { variant: "body2", children: a.description }) }) })
|
|
496
496
|
] }),
|
|
497
497
|
!p && a.parameters && /* @__PURE__ */ y(G, { children: [
|
|
498
|
-
/* @__PURE__ */ t(
|
|
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(
|
|
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(
|
|
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
|
|
552
|
-
const n =
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
602
|
-
b.content && b.role && /* @__PURE__ */ t(
|
|
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
|
|
618
|
-
const e =
|
|
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 =
|
|
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(
|
|
689
|
-
/* @__PURE__ */ t(V, { variant: "outlined", children: /* @__PURE__ */ t(Y, { children: /* @__PURE__ */ t(
|
|
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(
|
|
694
|
-
/* @__PURE__ */ t(V, { variant: "outlined", children: /* @__PURE__ */ t(Y, { children: /* @__PURE__ */ t(
|
|
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(
|
|
702
|
-
/* @__PURE__ */ t(V, { variant: "outlined", children: /* @__PURE__ */ t(Y, { children: /* @__PURE__ */ t(
|
|
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(
|
|
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[
|
|
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
|
-
|
|
718
|
-
] }), e[23] = N, e[24] = O, e[25] =
|
|
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
|
|
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(
|
|
751
|
+
/* @__PURE__ */ t(E, { variant: "caption", sx: {
|
|
752
752
|
fontWeight: "bold"
|
|
753
753
|
}, children: i.name }),
|
|
754
|
-
i.arguments && /* @__PURE__ */ t(
|
|
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 =
|
|
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(
|
|
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(
|
|
797
|
-
f && m.skipReason && /* @__PURE__ */ t(
|
|
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 =
|
|
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(
|
|
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
|
|
891
|
-
e[33] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
892
|
-
const
|
|
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] !==
|
|
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:
|
|
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
|
|
914
|
-
e[51] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
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] =
|
|
919
|
-
let
|
|
920
|
-
e[52] !== r || e[53] !== n.attributes ? (
|
|
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
|
|
924
|
-
e[58] !== r || e[59] !== n.ampAttributes ? (
|
|
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] !==
|
|
929
|
-
|
|
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
|
-
|
|
931
|
+
j,
|
|
932
932
|
$
|
|
933
|
-
] }), e[65] =
|
|
934
|
-
let
|
|
935
|
-
return e[70] !== d || e[71] !== U ? (
|
|
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] =
|
|
938
|
+
] }), e[70] = d, e[71] = U, e[72] = _) : _ = e[72], _;
|
|
939
939
|
}
|
|
940
940
|
function on() {
|
|
941
|
-
const i =
|
|
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 =
|
|
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
|
-
} =
|
|
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
|
-
} =
|
|
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]),
|
|
1013
|
-
data:
|
|
1014
|
-
} =
|
|
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
|
|
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
|
|
1032
|
-
for (const
|
|
1033
|
-
|
|
1034
|
-
...
|
|
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,
|
|
1037
|
+
k.set(d.spanId, F);
|
|
1038
1038
|
}
|
|
1039
1039
|
}
|
|
1040
1040
|
return {
|
|
1041
1041
|
traceEvalScores: o,
|
|
1042
1042
|
spanScoresMap: k
|
|
1043
1043
|
};
|
|
1044
|
-
}, [
|
|
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(
|
|
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:
|
|
1054
|
+
}, children: D ? /* @__PURE__ */ t(on, {}) : T ? /* @__PURE__ */ t(G, { sx: {
|
|
1055
1055
|
p: 2
|
|
1056
|
-
}, children: /* @__PURE__ */ t(
|
|
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 =
|
|
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(
|
|
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
|
-
}],
|
|
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] =
|
|
1100
|
+
} = Ee(), [r, l] = He(), {
|
|
1101
1101
|
mutateAsync: a,
|
|
1102
1102
|
isPending: h
|
|
1103
|
-
} =
|
|
1103
|
+
} = qe(), {
|
|
1104
1104
|
data: p,
|
|
1105
1105
|
isPending: m,
|
|
1106
1106
|
isSuccess: c
|
|
1107
|
-
} =
|
|
1107
|
+
} = Qe({
|
|
1108
1108
|
orgName: e ?? ""
|
|
1109
1109
|
}), g = p?.namespace, {
|
|
1110
1110
|
data: f,
|
|
1111
1111
|
isPending: w,
|
|
1112
1112
|
isSuccess: C
|
|
1113
|
-
} =
|
|
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
|
-
} =
|
|
1121
|
+
} = et({
|
|
1122
1122
|
orgName: e ?? ""
|
|
1123
|
-
}), S = v?.find((z) => z.name === s)?.name, N = m || w || b, O = c && !g,
|
|
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:
|
|
1127
|
-
handleCustomRangeApply:
|
|
1128
|
-
} =
|
|
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:
|
|
1137
|
-
refetch:
|
|
1138
|
-
isRefetching:
|
|
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
|
-
} =
|
|
1143
|
+
} = nt(g, n, i, S, P, j, $, I, d), te = ee(() => {
|
|
1144
1144
|
const z = U?.fetchedRange;
|
|
1145
|
-
return z || (
|
|
1145
|
+
return z || (F ? {
|
|
1146
1146
|
startTime: I,
|
|
1147
1147
|
endTime: d
|
|
1148
1148
|
} : P ? Ne(P) : void 0);
|
|
1149
|
-
}, [U,
|
|
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]),
|
|
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 =
|
|
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:
|
|
1173
|
-
} = z,
|
|
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:
|
|
1179
|
+
endTime: $e,
|
|
1180
1180
|
sortOrder: $,
|
|
1181
|
-
limit:
|
|
1182
|
-
}),
|
|
1181
|
+
limit: j
|
|
1182
|
+
}), Ue = new Blob([JSON.stringify(Be, null, 2)], {
|
|
1183
1183
|
type: "application/json"
|
|
1184
|
-
}), ke = window.URL.createObjectURL(
|
|
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, $,
|
|
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]),
|
|
1192
|
+
}, [r, l]), Pe = Z((z) => {
|
|
1193
1193
|
const K = new URLSearchParams(r);
|
|
1194
1194
|
K.set("sortOrder", z), l(K);
|
|
1195
|
-
}, [r, l]),
|
|
1196
|
-
|
|
1197
|
-
}, [
|
|
1198
|
-
return
|
|
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
|
-
|
|
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
|
-
|
|
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(
|
|
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(
|
|
1237
|
-
/* @__PURE__ */ t(ue, { size: "small", onClick: () =>
|
|
1238
|
-
/* @__PURE__ */ t(ue, { size: "small", disabled:
|
|
1239
|
-
/* @__PURE__ */ t(Se, { size: "small", variant: "outlined", startIcon: h ? /* @__PURE__ */ t(de, { size: 16 }) : /* @__PURE__ */ t(
|
|
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 ||
|
|
1242
|
-
/* @__PURE__ */ y(
|
|
1243
|
-
/* @__PURE__ */ t(
|
|
1244
|
-
/* @__PURE__ */ t(
|
|
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:
|
|
1256
|
+
component: Ie,
|
|
1258
1257
|
levels: {
|
|
1259
|
-
component:
|
|
1258
|
+
component: Ie
|
|
1260
1259
|
}
|
|
1261
1260
|
};
|
|
1262
1261
|
export {
|
|
1263
|
-
|
|
1262
|
+
Ie as TracesComponent,
|
|
1264
1263
|
Tn as metaData
|
|
1265
1264
|
};
|