@sanity/ailf-studio 1.18.0 → 1.18.1
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/index.js +1039 -916
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3615,11 +3615,11 @@ import { route } from "sanity/router";
|
|
|
3615
3615
|
// src/components/Dashboard.tsx
|
|
3616
3616
|
import { HelpCircleIcon as HelpCircleIcon8 } from "@sanity/icons";
|
|
3617
3617
|
import {
|
|
3618
|
-
Box as
|
|
3618
|
+
Box as Box40,
|
|
3619
3619
|
Button as Button16,
|
|
3620
3620
|
Container,
|
|
3621
|
-
Flex as
|
|
3622
|
-
Stack as
|
|
3621
|
+
Flex as Flex42,
|
|
3622
|
+
Stack as Stack45,
|
|
3623
3623
|
Tab as Tab3,
|
|
3624
3624
|
TabList as TabList3,
|
|
3625
3625
|
TabPanel as TabPanel3,
|
|
@@ -6865,10 +6865,10 @@ function LatestReports({
|
|
|
6865
6865
|
import { ArrowLeftIcon as ArrowLeftIcon3 } from "@sanity/icons";
|
|
6866
6866
|
import {
|
|
6867
6867
|
Badge as Badge10,
|
|
6868
|
-
Box as
|
|
6868
|
+
Box as Box33,
|
|
6869
6869
|
Button as Button12,
|
|
6870
|
-
Flex as
|
|
6871
|
-
Stack as
|
|
6870
|
+
Flex as Flex34,
|
|
6871
|
+
Stack as Stack36,
|
|
6872
6872
|
Tab,
|
|
6873
6873
|
TabList,
|
|
6874
6874
|
TabPanel,
|
|
@@ -8077,6 +8077,92 @@ function ModelRow({ row }) {
|
|
|
8077
8077
|
] });
|
|
8078
8078
|
}
|
|
8079
8079
|
|
|
8080
|
+
// src/components/report-detail/DiagnosisSkeleton.tsx
|
|
8081
|
+
import { Box as Box18, Card as Card13, Flex as Flex15, Stack as Stack20 } from "@sanity/ui";
|
|
8082
|
+
|
|
8083
|
+
// src/components/primitives/Skeleton.tsx
|
|
8084
|
+
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
8085
|
+
var KEYFRAMES_ID = "ailf-skeleton-keyframes";
|
|
8086
|
+
var KEYFRAMES_CSS = `
|
|
8087
|
+
@keyframes ailfSkeletonPulse {
|
|
8088
|
+
0% { opacity: 0.55; }
|
|
8089
|
+
50% { opacity: 1; }
|
|
8090
|
+
100% { opacity: 0.55; }
|
|
8091
|
+
}
|
|
8092
|
+
`;
|
|
8093
|
+
function ensureKeyframes() {
|
|
8094
|
+
if (typeof document === "undefined") return;
|
|
8095
|
+
if (document.getElementById(KEYFRAMES_ID)) return;
|
|
8096
|
+
const style = document.createElement("style");
|
|
8097
|
+
style.id = KEYFRAMES_ID;
|
|
8098
|
+
style.textContent = KEYFRAMES_CSS;
|
|
8099
|
+
document.head.appendChild(style);
|
|
8100
|
+
}
|
|
8101
|
+
function Skeleton({
|
|
8102
|
+
width = "100%",
|
|
8103
|
+
height = 12,
|
|
8104
|
+
radius = 4,
|
|
8105
|
+
style
|
|
8106
|
+
}) {
|
|
8107
|
+
ensureKeyframes();
|
|
8108
|
+
return /* @__PURE__ */ jsx30(
|
|
8109
|
+
"div",
|
|
8110
|
+
{
|
|
8111
|
+
"aria-hidden": "true",
|
|
8112
|
+
style: {
|
|
8113
|
+
animation: "ailfSkeletonPulse 1.4s ease-in-out infinite",
|
|
8114
|
+
background: "var(--card-skeleton-color, var(--card-muted-bg-color, rgba(128,128,128,0.15)))",
|
|
8115
|
+
borderRadius: radius,
|
|
8116
|
+
height,
|
|
8117
|
+
width,
|
|
8118
|
+
...style
|
|
8119
|
+
}
|
|
8120
|
+
}
|
|
8121
|
+
);
|
|
8122
|
+
}
|
|
8123
|
+
|
|
8124
|
+
// src/components/report-detail/DiagnosisSkeleton.tsx
|
|
8125
|
+
import { jsx as jsx31, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
8126
|
+
function PanelCardSkeleton({
|
|
8127
|
+
badgeRows = 2,
|
|
8128
|
+
bodyRows = 2
|
|
8129
|
+
}) {
|
|
8130
|
+
return /* @__PURE__ */ jsx31(Card13, { padding: 3, radius: 2, tone: "default", children: /* @__PURE__ */ jsxs24(Stack20, { space: 2, children: [
|
|
8131
|
+
/* @__PURE__ */ jsx31(Flex15, { align: "center", gap: 2, children: Array.from({ length: badgeRows }).map((_, i) => /* @__PURE__ */ jsx31(
|
|
8132
|
+
Skeleton,
|
|
8133
|
+
{
|
|
8134
|
+
width: i === 0 ? 96 : 72,
|
|
8135
|
+
height: 14
|
|
8136
|
+
},
|
|
8137
|
+
`badge-${i}`
|
|
8138
|
+
)) }),
|
|
8139
|
+
/* @__PURE__ */ jsx31(Stack20, { space: 1, children: Array.from({ length: bodyRows }).map((_, i) => /* @__PURE__ */ jsx31(
|
|
8140
|
+
Skeleton,
|
|
8141
|
+
{
|
|
8142
|
+
height: 10,
|
|
8143
|
+
width: i === bodyRows - 1 ? "70%" : "100%"
|
|
8144
|
+
},
|
|
8145
|
+
`row-${i}`
|
|
8146
|
+
)) })
|
|
8147
|
+
] }) });
|
|
8148
|
+
}
|
|
8149
|
+
function PanelSkeleton({
|
|
8150
|
+
titleWidth,
|
|
8151
|
+
cardCount
|
|
8152
|
+
}) {
|
|
8153
|
+
return /* @__PURE__ */ jsx31(Card13, { padding: 4, radius: 2, shadow: 1, style: neutralCardStyle, children: /* @__PURE__ */ jsxs24(Stack20, { space: 4, children: [
|
|
8154
|
+
/* @__PURE__ */ jsx31(Skeleton, { width: titleWidth, height: 16 }),
|
|
8155
|
+
/* @__PURE__ */ jsx31(Box18, { style: dividerStyle }),
|
|
8156
|
+
/* @__PURE__ */ jsx31(Stack20, { space: 3, children: Array.from({ length: cardCount }).map((_, i) => /* @__PURE__ */ jsx31(PanelCardSkeleton, { bodyRows: i === cardCount - 1 ? 3 : 2 }, i)) })
|
|
8157
|
+
] }) });
|
|
8158
|
+
}
|
|
8159
|
+
function DiagnosisSkeleton() {
|
|
8160
|
+
return /* @__PURE__ */ jsxs24(Stack20, { space: 5, "aria-busy": "true", "aria-label": "Loading diagnosis", children: [
|
|
8161
|
+
/* @__PURE__ */ jsx31(PanelSkeleton, { titleWidth: 170, cardCount: 3 }),
|
|
8162
|
+
/* @__PURE__ */ jsx31(PanelSkeleton, { titleWidth: 150, cardCount: 2 })
|
|
8163
|
+
] });
|
|
8164
|
+
}
|
|
8165
|
+
|
|
8080
8166
|
// src/components/report-detail/DiagnosticsOverview.tsx
|
|
8081
8167
|
import {
|
|
8082
8168
|
ArrowDownIcon,
|
|
@@ -8085,8 +8171,8 @@ import {
|
|
|
8085
8171
|
ErrorOutlineIcon,
|
|
8086
8172
|
WarningOutlineIcon
|
|
8087
8173
|
} from "@sanity/icons";
|
|
8088
|
-
import { Box as
|
|
8089
|
-
import { jsx as
|
|
8174
|
+
import { Box as Box19, Flex as Flex16, Stack as Stack21, Text as Text26 } from "@sanity/ui";
|
|
8175
|
+
import { jsx as jsx32, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
8090
8176
|
function DiagnosticsOverview({
|
|
8091
8177
|
scores,
|
|
8092
8178
|
overall,
|
|
@@ -8108,11 +8194,11 @@ function DiagnosticsOverview({
|
|
|
8108
8194
|
const regressed = comparison?.regressed ?? [];
|
|
8109
8195
|
const unchanged = comparison?.unchanged ?? [];
|
|
8110
8196
|
const hasComparison = improved.length > 0 || regressed.length > 0 || unchanged.length > 0;
|
|
8111
|
-
return /* @__PURE__ */
|
|
8112
|
-
/* @__PURE__ */
|
|
8113
|
-
/* @__PURE__ */
|
|
8114
|
-
/* @__PURE__ */
|
|
8115
|
-
/* @__PURE__ */
|
|
8197
|
+
return /* @__PURE__ */ jsxs25(Stack21, { space: 4, children: [
|
|
8198
|
+
/* @__PURE__ */ jsxs25(Box19, { style: sectionWrapperStyle, children: [
|
|
8199
|
+
/* @__PURE__ */ jsx32(Box19, { padding: 3, style: sectionHeaderStyle, children: /* @__PURE__ */ jsx32(SectionLabel, { label: "Baseline" }) }),
|
|
8200
|
+
/* @__PURE__ */ jsxs25(Stack21, { space: 3, padding: 3, children: [
|
|
8201
|
+
/* @__PURE__ */ jsxs25(
|
|
8116
8202
|
"div",
|
|
8117
8203
|
{
|
|
8118
8204
|
style: {
|
|
@@ -8121,7 +8207,7 @@ function DiagnosticsOverview({
|
|
|
8121
8207
|
gridTemplateColumns: showDocMetrics ? "repeat(3, 1fr)" : "repeat(2, 1fr)"
|
|
8122
8208
|
},
|
|
8123
8209
|
children: [
|
|
8124
|
-
/* @__PURE__ */
|
|
8210
|
+
/* @__PURE__ */ jsx32(HoverTip, { display: "block", text: GLOSSARY.overallScore, children: /* @__PURE__ */ jsx32(
|
|
8125
8211
|
ScoreCard,
|
|
8126
8212
|
{
|
|
8127
8213
|
delta: comparison?.deltas.overall,
|
|
@@ -8131,7 +8217,7 @@ function DiagnosticsOverview({
|
|
|
8131
8217
|
value: Math.round(overall.avgScore)
|
|
8132
8218
|
}
|
|
8133
8219
|
) }),
|
|
8134
|
-
showDocMetrics && /* @__PURE__ */
|
|
8220
|
+
showDocMetrics && /* @__PURE__ */ jsx32(HoverTip, { display: "block", text: GLOSSARY.docLift, children: /* @__PURE__ */ jsx32(
|
|
8135
8221
|
ScoreCard,
|
|
8136
8222
|
{
|
|
8137
8223
|
delta: comparison?.deltas.docLift,
|
|
@@ -8141,7 +8227,7 @@ function DiagnosticsOverview({
|
|
|
8141
8227
|
value: Math.round(overall.avgDocLift)
|
|
8142
8228
|
}
|
|
8143
8229
|
) }),
|
|
8144
|
-
/* @__PURE__ */
|
|
8230
|
+
/* @__PURE__ */ jsx32(HoverTip, { display: "block", text: GLOSSARY.tests, children: /* @__PURE__ */ jsx32(
|
|
8145
8231
|
ScoreCard,
|
|
8146
8232
|
{
|
|
8147
8233
|
label: "TESTS",
|
|
@@ -8152,7 +8238,7 @@ function DiagnosticsOverview({
|
|
|
8152
8238
|
]
|
|
8153
8239
|
}
|
|
8154
8240
|
),
|
|
8155
|
-
/* @__PURE__ */
|
|
8241
|
+
/* @__PURE__ */ jsxs25(
|
|
8156
8242
|
"div",
|
|
8157
8243
|
{
|
|
8158
8244
|
style: {
|
|
@@ -8161,7 +8247,7 @@ function DiagnosticsOverview({
|
|
|
8161
8247
|
gridTemplateColumns: showDocMetrics ? "repeat(2, 1fr)" : "1fr"
|
|
8162
8248
|
},
|
|
8163
8249
|
children: [
|
|
8164
|
-
showDocMetrics && /* @__PURE__ */
|
|
8250
|
+
showDocMetrics && /* @__PURE__ */ jsx32(HoverTip, { display: "block", text: GLOSSARY.negativeDocLiftMetric, children: /* @__PURE__ */ jsx32(
|
|
8165
8251
|
MetricCard,
|
|
8166
8252
|
{
|
|
8167
8253
|
label: "Negative Doc Lift",
|
|
@@ -8169,12 +8255,12 @@ function DiagnosticsOverview({
|
|
|
8169
8255
|
value: `${negativeDocLiftCount} area${negativeDocLiftCount === 1 ? "" : "s"}`
|
|
8170
8256
|
}
|
|
8171
8257
|
) }),
|
|
8172
|
-
durationMs != null && durationMs > 0 ? /* @__PURE__ */
|
|
8258
|
+
durationMs != null && durationMs > 0 ? /* @__PURE__ */ jsx32(
|
|
8173
8259
|
HoverTip,
|
|
8174
8260
|
{
|
|
8175
8261
|
display: "block",
|
|
8176
8262
|
text: "Total wall-clock time for the evaluation pipeline run.",
|
|
8177
|
-
children: /* @__PURE__ */
|
|
8263
|
+
children: /* @__PURE__ */ jsx32(
|
|
8178
8264
|
MetricCard,
|
|
8179
8265
|
{
|
|
8180
8266
|
label: "Duration",
|
|
@@ -8182,15 +8268,15 @@ function DiagnosticsOverview({
|
|
|
8182
8268
|
}
|
|
8183
8269
|
)
|
|
8184
8270
|
}
|
|
8185
|
-
) : /* @__PURE__ */
|
|
8271
|
+
) : /* @__PURE__ */ jsx32("div", {})
|
|
8186
8272
|
]
|
|
8187
8273
|
}
|
|
8188
8274
|
)
|
|
8189
8275
|
] })
|
|
8190
8276
|
] }),
|
|
8191
|
-
hasAgenticData && /* @__PURE__ */
|
|
8192
|
-
/* @__PURE__ */
|
|
8193
|
-
/* @__PURE__ */
|
|
8277
|
+
hasAgenticData && /* @__PURE__ */ jsxs25(Box19, { style: sectionWrapperStyle, children: [
|
|
8278
|
+
/* @__PURE__ */ jsx32(Box19, { padding: 3, style: sectionHeaderStyle, children: /* @__PURE__ */ jsx32(SectionLabel, { label: "Agent Performance" }) }),
|
|
8279
|
+
/* @__PURE__ */ jsx32(Stack21, { space: 3, padding: 3, children: /* @__PURE__ */ jsxs25(
|
|
8194
8280
|
"div",
|
|
8195
8281
|
{
|
|
8196
8282
|
style: {
|
|
@@ -8199,7 +8285,7 @@ function DiagnosticsOverview({
|
|
|
8199
8285
|
gridTemplateColumns: "repeat(3, 1fr)"
|
|
8200
8286
|
},
|
|
8201
8287
|
children: [
|
|
8202
|
-
/* @__PURE__ */
|
|
8288
|
+
/* @__PURE__ */ jsx32(HoverTip, { display: "block", text: GLOSSARY.actualScore, children: /* @__PURE__ */ jsx32(
|
|
8203
8289
|
ScoreCard,
|
|
8204
8290
|
{
|
|
8205
8291
|
delta: comparison?.deltas.actualDelta,
|
|
@@ -8209,7 +8295,7 @@ function DiagnosticsOverview({
|
|
|
8209
8295
|
value: Math.round(overall.avgActualScore)
|
|
8210
8296
|
}
|
|
8211
8297
|
) }),
|
|
8212
|
-
/* @__PURE__ */
|
|
8298
|
+
/* @__PURE__ */ jsx32(HoverTip, { display: "block", text: GLOSSARY.retrievalGap, children: /* @__PURE__ */ jsx32(
|
|
8213
8299
|
ScoreCard,
|
|
8214
8300
|
{
|
|
8215
8301
|
label: "RETRIEVAL GAP",
|
|
@@ -8219,7 +8305,7 @@ function DiagnosticsOverview({
|
|
|
8219
8305
|
value: overall.avgRetrievalGap != null ? Math.round(overall.avgRetrievalGap) : 0
|
|
8220
8306
|
}
|
|
8221
8307
|
) }),
|
|
8222
|
-
/* @__PURE__ */
|
|
8308
|
+
/* @__PURE__ */ jsx32(HoverTip, { display: "block", text: GLOSSARY.infraEfficiency, children: /* @__PURE__ */ jsx32(
|
|
8223
8309
|
ScoreCard,
|
|
8224
8310
|
{
|
|
8225
8311
|
label: "EFFICIENCY",
|
|
@@ -8233,9 +8319,9 @@ function DiagnosticsOverview({
|
|
|
8233
8319
|
}
|
|
8234
8320
|
) })
|
|
8235
8321
|
] }),
|
|
8236
|
-
/* @__PURE__ */
|
|
8237
|
-
/* @__PURE__ */
|
|
8238
|
-
/* @__PURE__ */
|
|
8322
|
+
/* @__PURE__ */ jsxs25(Box19, { style: sectionWrapperStyle, children: [
|
|
8323
|
+
/* @__PURE__ */ jsx32(Box19, { padding: 3, style: sectionHeaderStyle, children: /* @__PURE__ */ jsx32(SectionLabel, { label: "Area Health" }) }),
|
|
8324
|
+
/* @__PURE__ */ jsx32(Box19, { padding: 3, children: /* @__PURE__ */ jsxs25(
|
|
8239
8325
|
"div",
|
|
8240
8326
|
{
|
|
8241
8327
|
style: {
|
|
@@ -8244,30 +8330,30 @@ function DiagnosticsOverview({
|
|
|
8244
8330
|
gridTemplateColumns: "1fr 1fr 1fr"
|
|
8245
8331
|
},
|
|
8246
8332
|
children: [
|
|
8247
|
-
/* @__PURE__ */
|
|
8333
|
+
/* @__PURE__ */ jsx32(HoverTip, { display: "block", text: GLOSSARY.healthStrong, children: /* @__PURE__ */ jsx32(
|
|
8248
8334
|
HealthCard,
|
|
8249
8335
|
{
|
|
8250
8336
|
color: strong.length > 0 ? "emerald" : "muted",
|
|
8251
8337
|
count: strong.length,
|
|
8252
|
-
icon: /* @__PURE__ */
|
|
8338
|
+
icon: /* @__PURE__ */ jsx32(CheckmarkCircleIcon, {}),
|
|
8253
8339
|
label: "Strong (80+)"
|
|
8254
8340
|
}
|
|
8255
8341
|
) }),
|
|
8256
|
-
/* @__PURE__ */
|
|
8342
|
+
/* @__PURE__ */ jsx32(HoverTip, { display: "block", text: GLOSSARY.healthAttention, children: /* @__PURE__ */ jsx32(
|
|
8257
8343
|
HealthCard,
|
|
8258
8344
|
{
|
|
8259
8345
|
color: attention.length === 0 ? "muted" : "amber",
|
|
8260
8346
|
count: attention.length,
|
|
8261
|
-
icon: /* @__PURE__ */
|
|
8347
|
+
icon: /* @__PURE__ */ jsx32(WarningOutlineIcon, {}),
|
|
8262
8348
|
label: "Attention (70-79)"
|
|
8263
8349
|
}
|
|
8264
8350
|
) }),
|
|
8265
|
-
/* @__PURE__ */
|
|
8351
|
+
/* @__PURE__ */ jsx32(HoverTip, { display: "block", text: GLOSSARY.healthWeak, children: /* @__PURE__ */ jsx32(
|
|
8266
8352
|
HealthCard,
|
|
8267
8353
|
{
|
|
8268
8354
|
color: weak.length === 0 ? "muted" : "red",
|
|
8269
8355
|
count: weak.length,
|
|
8270
|
-
icon: /* @__PURE__ */
|
|
8356
|
+
icon: /* @__PURE__ */ jsx32(ErrorOutlineIcon, {}),
|
|
8271
8357
|
label: "Weak (<70)"
|
|
8272
8358
|
}
|
|
8273
8359
|
) })
|
|
@@ -8275,16 +8361,16 @@ function DiagnosticsOverview({
|
|
|
8275
8361
|
}
|
|
8276
8362
|
) })
|
|
8277
8363
|
] }),
|
|
8278
|
-
hasComparison && /* @__PURE__ */
|
|
8279
|
-
/* @__PURE__ */
|
|
8280
|
-
|
|
8364
|
+
hasComparison && /* @__PURE__ */ jsxs25(Box19, { style: neutralCardStyle, children: [
|
|
8365
|
+
/* @__PURE__ */ jsx32(
|
|
8366
|
+
Box19,
|
|
8281
8367
|
{
|
|
8282
8368
|
padding: 4,
|
|
8283
8369
|
style: { borderBottom: "1px solid var(--card-border-color)" },
|
|
8284
|
-
children: /* @__PURE__ */
|
|
8370
|
+
children: /* @__PURE__ */ jsx32(Text26, { size: 3, weight: "semibold", children: "Change from Previous Run" })
|
|
8285
8371
|
}
|
|
8286
8372
|
),
|
|
8287
|
-
/* @__PURE__ */
|
|
8373
|
+
/* @__PURE__ */ jsxs25(
|
|
8288
8374
|
"div",
|
|
8289
8375
|
{
|
|
8290
8376
|
style: {
|
|
@@ -8292,43 +8378,43 @@ function DiagnosticsOverview({
|
|
|
8292
8378
|
gridTemplateColumns: "1fr 1fr 1fr"
|
|
8293
8379
|
},
|
|
8294
8380
|
children: [
|
|
8295
|
-
/* @__PURE__ */
|
|
8296
|
-
/* @__PURE__ */
|
|
8297
|
-
/* @__PURE__ */
|
|
8298
|
-
/* @__PURE__ */
|
|
8381
|
+
/* @__PURE__ */ jsx32(Box19, { padding: 4, children: /* @__PURE__ */ jsxs25(Stack21, { space: 3, children: [
|
|
8382
|
+
/* @__PURE__ */ jsxs25(Flex16, { align: "center", gap: 2, children: [
|
|
8383
|
+
/* @__PURE__ */ jsx32(ArrowUpIcon, { style: { color: "#34d399" } }),
|
|
8384
|
+
/* @__PURE__ */ jsxs25(Text26, { size: 2, style: { color: "#34d399" }, weight: "medium", children: [
|
|
8299
8385
|
"Improved (",
|
|
8300
8386
|
improved.length,
|
|
8301
8387
|
")"
|
|
8302
8388
|
] })
|
|
8303
8389
|
] }),
|
|
8304
|
-
/* @__PURE__ */
|
|
8390
|
+
/* @__PURE__ */ jsx32(Flex16, { gap: 2, wrap: "wrap", children: improved.length > 0 ? improved.map((area) => /* @__PURE__ */ jsx32(Pill, { color: "emerald", label: area }, area)) : /* @__PURE__ */ jsx32(Text26, { muted: true, size: 2, children: "None" }) })
|
|
8305
8391
|
] }) }),
|
|
8306
|
-
/* @__PURE__ */
|
|
8307
|
-
|
|
8392
|
+
/* @__PURE__ */ jsx32(
|
|
8393
|
+
Box19,
|
|
8308
8394
|
{
|
|
8309
8395
|
padding: 4,
|
|
8310
8396
|
style: { borderLeft: "1px solid var(--card-border-color)" },
|
|
8311
|
-
children: /* @__PURE__ */
|
|
8312
|
-
/* @__PURE__ */
|
|
8313
|
-
/* @__PURE__ */
|
|
8314
|
-
/* @__PURE__ */
|
|
8397
|
+
children: /* @__PURE__ */ jsxs25(Stack21, { space: 3, children: [
|
|
8398
|
+
/* @__PURE__ */ jsxs25(Flex16, { align: "center", gap: 2, children: [
|
|
8399
|
+
/* @__PURE__ */ jsx32(ArrowDownIcon, { style: { color: "#f87171" } }),
|
|
8400
|
+
/* @__PURE__ */ jsxs25(Text26, { size: 2, style: { color: "#f87171" }, weight: "medium", children: [
|
|
8315
8401
|
"Regressed (",
|
|
8316
8402
|
regressed.length,
|
|
8317
8403
|
")"
|
|
8318
8404
|
] })
|
|
8319
8405
|
] }),
|
|
8320
|
-
/* @__PURE__ */
|
|
8406
|
+
/* @__PURE__ */ jsx32(Flex16, { gap: 2, wrap: "wrap", children: regressed.length > 0 ? regressed.map((area) => /* @__PURE__ */ jsx32(Pill, { color: "red", label: area }, area)) : /* @__PURE__ */ jsx32(Text26, { muted: true, size: 2, children: "None" }) })
|
|
8321
8407
|
] })
|
|
8322
8408
|
}
|
|
8323
8409
|
),
|
|
8324
|
-
/* @__PURE__ */
|
|
8325
|
-
|
|
8410
|
+
/* @__PURE__ */ jsx32(
|
|
8411
|
+
Box19,
|
|
8326
8412
|
{
|
|
8327
8413
|
padding: 4,
|
|
8328
8414
|
style: { borderLeft: "1px solid var(--card-border-color)" },
|
|
8329
|
-
children: /* @__PURE__ */
|
|
8330
|
-
/* @__PURE__ */
|
|
8331
|
-
/* @__PURE__ */
|
|
8415
|
+
children: /* @__PURE__ */ jsxs25(Stack21, { space: 3, children: [
|
|
8416
|
+
/* @__PURE__ */ jsxs25(Flex16, { align: "center", gap: 2, children: [
|
|
8417
|
+
/* @__PURE__ */ jsx32(
|
|
8332
8418
|
"span",
|
|
8333
8419
|
{
|
|
8334
8420
|
style: {
|
|
@@ -8339,13 +8425,13 @@ function DiagnosticsOverview({
|
|
|
8339
8425
|
children: "\u2014"
|
|
8340
8426
|
}
|
|
8341
8427
|
),
|
|
8342
|
-
/* @__PURE__ */
|
|
8428
|
+
/* @__PURE__ */ jsxs25(Text26, { muted: true, size: 2, weight: "medium", children: [
|
|
8343
8429
|
"Unchanged (",
|
|
8344
8430
|
unchanged.length,
|
|
8345
8431
|
")"
|
|
8346
8432
|
] })
|
|
8347
8433
|
] }),
|
|
8348
|
-
/* @__PURE__ */
|
|
8434
|
+
/* @__PURE__ */ jsx32(Flex16, { gap: 2, wrap: "wrap", children: unchanged.length > 0 ? unchanged.map((area) => /* @__PURE__ */ jsx32(Pill, { color: "muted", label: area }, area)) : /* @__PURE__ */ jsx32(Text26, { muted: true, size: 2, children: "None" }) })
|
|
8349
8435
|
] })
|
|
8350
8436
|
}
|
|
8351
8437
|
)
|
|
@@ -8364,7 +8450,7 @@ var sectionHeaderStyle = {
|
|
|
8364
8450
|
borderBottom: "1px solid var(--card-border-color)"
|
|
8365
8451
|
};
|
|
8366
8452
|
function SectionLabel({ label }) {
|
|
8367
|
-
return /* @__PURE__ */
|
|
8453
|
+
return /* @__PURE__ */ jsx32(
|
|
8368
8454
|
Text26,
|
|
8369
8455
|
{
|
|
8370
8456
|
muted: true,
|
|
@@ -8389,8 +8475,8 @@ function ScoreCard({
|
|
|
8389
8475
|
border: "1px solid var(--card-border-color)",
|
|
8390
8476
|
borderRadius: 6
|
|
8391
8477
|
};
|
|
8392
|
-
return /* @__PURE__ */
|
|
8393
|
-
/* @__PURE__ */
|
|
8478
|
+
return /* @__PURE__ */ jsx32(Box19, { padding: 4, style: cardStyle, children: /* @__PURE__ */ jsxs25(Stack21, { space: 3, children: [
|
|
8479
|
+
/* @__PURE__ */ jsx32(
|
|
8394
8480
|
Text26,
|
|
8395
8481
|
{
|
|
8396
8482
|
muted: true,
|
|
@@ -8402,8 +8488,8 @@ function ScoreCard({
|
|
|
8402
8488
|
children: label
|
|
8403
8489
|
}
|
|
8404
8490
|
),
|
|
8405
|
-
/* @__PURE__ */
|
|
8406
|
-
/* @__PURE__ */
|
|
8491
|
+
/* @__PURE__ */ jsxs25(Flex16, { align: "baseline", gap: 2, children: [
|
|
8492
|
+
/* @__PURE__ */ jsxs25(
|
|
8407
8493
|
"span",
|
|
8408
8494
|
{
|
|
8409
8495
|
style: {
|
|
@@ -8415,13 +8501,13 @@ function ScoreCard({
|
|
|
8415
8501
|
},
|
|
8416
8502
|
children: [
|
|
8417
8503
|
value,
|
|
8418
|
-
suffix && /* @__PURE__ */
|
|
8504
|
+
suffix && /* @__PURE__ */ jsx32("span", { style: { fontSize: 24 }, children: suffix })
|
|
8419
8505
|
]
|
|
8420
8506
|
}
|
|
8421
8507
|
),
|
|
8422
|
-
delta != null && delta !== 0 && /* @__PURE__ */
|
|
8508
|
+
delta != null && delta !== 0 && /* @__PURE__ */ jsx32(DeltaIndicator, { delta, icon: true, mono: true, size: 1 })
|
|
8423
8509
|
] }),
|
|
8424
|
-
/* @__PURE__ */
|
|
8510
|
+
/* @__PURE__ */ jsx32(Text26, { muted: true, size: 1, children: subtitle })
|
|
8425
8511
|
] }) });
|
|
8426
8512
|
}
|
|
8427
8513
|
function HealthCard({
|
|
@@ -8437,18 +8523,18 @@ function HealthCard({
|
|
|
8437
8523
|
muted: "var(--card-muted-fg-color)"
|
|
8438
8524
|
};
|
|
8439
8525
|
const textColor = TEXT_COLORS[color];
|
|
8440
|
-
return /* @__PURE__ */
|
|
8441
|
-
|
|
8526
|
+
return /* @__PURE__ */ jsx32(
|
|
8527
|
+
Box19,
|
|
8442
8528
|
{
|
|
8443
8529
|
padding: 4,
|
|
8444
8530
|
style: {
|
|
8445
8531
|
...sectionStyle(color),
|
|
8446
8532
|
minHeight: 80
|
|
8447
8533
|
},
|
|
8448
|
-
children: /* @__PURE__ */
|
|
8449
|
-
/* @__PURE__ */
|
|
8450
|
-
/* @__PURE__ */
|
|
8451
|
-
/* @__PURE__ */
|
|
8534
|
+
children: /* @__PURE__ */ jsxs25(Flex16, { align: "center", gap: 3, children: [
|
|
8535
|
+
/* @__PURE__ */ jsx32("span", { style: { color: textColor, fontSize: 28 }, children: icon }),
|
|
8536
|
+
/* @__PURE__ */ jsxs25(Stack21, { space: 1, children: [
|
|
8537
|
+
/* @__PURE__ */ jsx32(
|
|
8452
8538
|
"span",
|
|
8453
8539
|
{
|
|
8454
8540
|
style: {
|
|
@@ -8461,7 +8547,7 @@ function HealthCard({
|
|
|
8461
8547
|
children: count
|
|
8462
8548
|
}
|
|
8463
8549
|
),
|
|
8464
|
-
/* @__PURE__ */
|
|
8550
|
+
/* @__PURE__ */ jsx32(Text26, { muted: true, size: 2, children: label })
|
|
8465
8551
|
] })
|
|
8466
8552
|
] })
|
|
8467
8553
|
}
|
|
@@ -8482,9 +8568,9 @@ function MetricCard({
|
|
|
8482
8568
|
padding: 16
|
|
8483
8569
|
};
|
|
8484
8570
|
const valueColor = sentiment ? sentimentTextColor(sentiment) : "var(--card-fg-color)";
|
|
8485
|
-
return /* @__PURE__ */
|
|
8486
|
-
/* @__PURE__ */
|
|
8487
|
-
/* @__PURE__ */
|
|
8571
|
+
return /* @__PURE__ */ jsx32(Box19, { style, children: /* @__PURE__ */ jsxs25(Stack21, { space: 2, children: [
|
|
8572
|
+
/* @__PURE__ */ jsx32(Text26, { muted: true, size: 2, children: label }),
|
|
8573
|
+
/* @__PURE__ */ jsx32(
|
|
8488
8574
|
"span",
|
|
8489
8575
|
{
|
|
8490
8576
|
style: {
|
|
@@ -8512,7 +8598,7 @@ function Pill({
|
|
|
8512
8598
|
}
|
|
8513
8599
|
};
|
|
8514
8600
|
const c = colors[color];
|
|
8515
|
-
return /* @__PURE__ */
|
|
8601
|
+
return /* @__PURE__ */ jsx32(
|
|
8516
8602
|
"span",
|
|
8517
8603
|
{
|
|
8518
8604
|
style: {
|
|
@@ -8530,7 +8616,7 @@ function Pill({
|
|
|
8530
8616
|
}
|
|
8531
8617
|
|
|
8532
8618
|
// src/components/report-detail/FailureModesPanel.tsx
|
|
8533
|
-
import { Box as
|
|
8619
|
+
import { Box as Box20, Flex as Flex17, Stack as Stack22, Text as Text27 } from "@sanity/ui";
|
|
8534
8620
|
|
|
8535
8621
|
// src/lib/useArtifactListRow.ts
|
|
8536
8622
|
import { useCallback as useCallback20, useMemo as useMemo12 } from "react";
|
|
@@ -8700,7 +8786,7 @@ function useGraderJudgmentArtifact(key, listKeys) {
|
|
|
8700
8786
|
}
|
|
8701
8787
|
|
|
8702
8788
|
// src/components/report-detail/FailureModesPanel.tsx
|
|
8703
|
-
import { jsx as
|
|
8789
|
+
import { jsx as jsx33, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
8704
8790
|
function severityColor(severity) {
|
|
8705
8791
|
switch (severity) {
|
|
8706
8792
|
case "critical":
|
|
@@ -8720,25 +8806,25 @@ function FailureModesPanel({ failureModes }) {
|
|
|
8720
8806
|
if (!failureModes || failureModes.topTitles.length === 0) return null;
|
|
8721
8807
|
const allKeys = failureModes.topTitles.map((t) => t.id);
|
|
8722
8808
|
const classificationPct = Math.round(failureModes.classificationRate);
|
|
8723
|
-
return /* @__PURE__ */
|
|
8724
|
-
|
|
8809
|
+
return /* @__PURE__ */ jsx33(
|
|
8810
|
+
Box20,
|
|
8725
8811
|
{
|
|
8726
8812
|
style: {
|
|
8727
8813
|
...neutralCardStyle,
|
|
8728
8814
|
padding: "12px 16px"
|
|
8729
8815
|
},
|
|
8730
|
-
children: /* @__PURE__ */
|
|
8731
|
-
/* @__PURE__ */
|
|
8732
|
-
/* @__PURE__ */
|
|
8733
|
-
/* @__PURE__ */
|
|
8816
|
+
children: /* @__PURE__ */ jsxs26(Stack22, { space: 3, children: [
|
|
8817
|
+
/* @__PURE__ */ jsxs26(Flex17, { align: "baseline", gap: 2, wrap: "wrap", children: [
|
|
8818
|
+
/* @__PURE__ */ jsx33(Text27, { size: 2, weight: "semibold", children: "Failure Categories" }),
|
|
8819
|
+
/* @__PURE__ */ jsxs26(Text27, { muted: true, size: 1, children: [
|
|
8734
8820
|
failureModes.totalJudgments,
|
|
8735
8821
|
" judgments \xB7 ",
|
|
8736
8822
|
classificationPct,
|
|
8737
8823
|
"% classified"
|
|
8738
8824
|
] })
|
|
8739
8825
|
] }),
|
|
8740
|
-
/* @__PURE__ */
|
|
8741
|
-
/* @__PURE__ */
|
|
8826
|
+
/* @__PURE__ */ jsx33(Box20, { style: dividerStyle }),
|
|
8827
|
+
/* @__PURE__ */ jsx33(Stack22, { space: 2, children: failureModes.topTitles.map((row) => /* @__PURE__ */ jsx33(
|
|
8742
8828
|
FailureModeRow,
|
|
8743
8829
|
{
|
|
8744
8830
|
allKeys,
|
|
@@ -8762,8 +8848,8 @@ function FailureModeRow({
|
|
|
8762
8848
|
const title = artifact.preview?.titlePreview ?? row.title ?? toTitleCase(category);
|
|
8763
8849
|
const pct = total > 0 ? Math.round(row.count / total * 100) : 0;
|
|
8764
8850
|
const sevColors = severityColor(severity);
|
|
8765
|
-
return /* @__PURE__ */
|
|
8766
|
-
|
|
8851
|
+
return /* @__PURE__ */ jsxs26(
|
|
8852
|
+
Flex17,
|
|
8767
8853
|
{
|
|
8768
8854
|
align: "center",
|
|
8769
8855
|
gap: 3,
|
|
@@ -8771,7 +8857,7 @@ function FailureModeRow({
|
|
|
8771
8857
|
onMouseEnter: artifact.handlers.onMouseEnter,
|
|
8772
8858
|
style: { padding: "4px 0" },
|
|
8773
8859
|
children: [
|
|
8774
|
-
/* @__PURE__ */
|
|
8860
|
+
/* @__PURE__ */ jsx33(
|
|
8775
8861
|
"span",
|
|
8776
8862
|
{
|
|
8777
8863
|
style: {
|
|
@@ -8788,9 +8874,9 @@ function FailureModeRow({
|
|
|
8788
8874
|
children: severity.toUpperCase()
|
|
8789
8875
|
}
|
|
8790
8876
|
),
|
|
8791
|
-
/* @__PURE__ */
|
|
8792
|
-
/* @__PURE__ */
|
|
8793
|
-
/* @__PURE__ */
|
|
8877
|
+
/* @__PURE__ */ jsx33(Text27, { size: 1, weight: "medium", children: title }),
|
|
8878
|
+
/* @__PURE__ */ jsx33(Text27, { muted: true, size: 1, children: "\xB7" }),
|
|
8879
|
+
/* @__PURE__ */ jsxs26(
|
|
8794
8880
|
Text27,
|
|
8795
8881
|
{
|
|
8796
8882
|
muted: true,
|
|
@@ -8814,11 +8900,11 @@ function FailureModeRow({
|
|
|
8814
8900
|
|
|
8815
8901
|
// src/components/report-detail/LineageCard.tsx
|
|
8816
8902
|
import { LinkIcon as LinkIcon2 } from "@sanity/icons";
|
|
8817
|
-
import { Badge as Badge6, Card as
|
|
8903
|
+
import { Badge as Badge6, Card as Card14, Flex as Flex18, Stack as Stack23, Text as Text28 } from "@sanity/ui";
|
|
8818
8904
|
import { useCallback as useCallback21, useEffect as useEffect10, useState as useState16 } from "react";
|
|
8819
8905
|
import { useClient as useClient7 } from "sanity";
|
|
8820
8906
|
import { useRouter as useRouter3 } from "sanity/router";
|
|
8821
|
-
import { jsx as
|
|
8907
|
+
import { jsx as jsx34, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
8822
8908
|
var REPORT_TYPE2 = "ailf.report";
|
|
8823
8909
|
var SPAWNED_REPORTS_QUERY = (
|
|
8824
8910
|
/* groq */
|
|
@@ -8851,12 +8937,12 @@ function LineageCard({ provenance, reportId }) {
|
|
|
8851
8937
|
}, [client, reportId]);
|
|
8852
8938
|
const hasLineage = lineage?.rerunOf || lineage?.comparedAgainst;
|
|
8853
8939
|
if (!hasLineage && spawned.length === 0) return null;
|
|
8854
|
-
return /* @__PURE__ */
|
|
8855
|
-
/* @__PURE__ */
|
|
8856
|
-
/* @__PURE__ */
|
|
8940
|
+
return /* @__PURE__ */ jsx34(Card14, { padding: 4, radius: 2, shadow: 1, children: /* @__PURE__ */ jsxs27(Stack23, { space: 4, children: [
|
|
8941
|
+
/* @__PURE__ */ jsx34(Flex18, { align: "center", gap: 2, children: /* @__PURE__ */ jsxs27(Text28, { size: 3, weight: "semibold", children: [
|
|
8942
|
+
/* @__PURE__ */ jsx34(LinkIcon2, {}),
|
|
8857
8943
|
" Lineage"
|
|
8858
8944
|
] }) }),
|
|
8859
|
-
lineage?.rerunOf && /* @__PURE__ */
|
|
8945
|
+
lineage?.rerunOf && /* @__PURE__ */ jsx34(
|
|
8860
8946
|
LineageLink,
|
|
8861
8947
|
{
|
|
8862
8948
|
label: "Re-run of",
|
|
@@ -8864,7 +8950,7 @@ function LineageCard({ provenance, reportId }) {
|
|
|
8864
8950
|
router
|
|
8865
8951
|
}
|
|
8866
8952
|
),
|
|
8867
|
-
lineage?.comparedAgainst && /* @__PURE__ */
|
|
8953
|
+
lineage?.comparedAgainst && /* @__PURE__ */ jsx34(
|
|
8868
8954
|
LineageLink,
|
|
8869
8955
|
{
|
|
8870
8956
|
label: "Compared against",
|
|
@@ -8872,9 +8958,9 @@ function LineageCard({ provenance, reportId }) {
|
|
|
8872
8958
|
router
|
|
8873
8959
|
}
|
|
8874
8960
|
),
|
|
8875
|
-
spawned.length > 0 && /* @__PURE__ */
|
|
8876
|
-
/* @__PURE__ */
|
|
8877
|
-
spawned.map((s) => /* @__PURE__ */
|
|
8961
|
+
spawned.length > 0 && /* @__PURE__ */ jsxs27(Stack23, { space: 2, children: [
|
|
8962
|
+
/* @__PURE__ */ jsx34(Text28, { muted: true, size: 1, weight: "semibold", children: "SPAWNED RE-RUNS" }),
|
|
8963
|
+
spawned.map((s) => /* @__PURE__ */ jsx34(SpawnedReportRow, { report: s, router }, s.reportId))
|
|
8878
8964
|
] })
|
|
8879
8965
|
] }) });
|
|
8880
8966
|
}
|
|
@@ -8886,12 +8972,12 @@ function LineageLink({
|
|
|
8886
8972
|
const handleClick = useCallback21(() => {
|
|
8887
8973
|
router.navigate({ reportId });
|
|
8888
8974
|
}, [reportId, router]);
|
|
8889
|
-
return /* @__PURE__ */
|
|
8890
|
-
/* @__PURE__ */
|
|
8975
|
+
return /* @__PURE__ */ jsxs27(Flex18, { align: "center", gap: 2, children: [
|
|
8976
|
+
/* @__PURE__ */ jsxs27(Text28, { muted: true, size: 2, weight: "semibold", children: [
|
|
8891
8977
|
label,
|
|
8892
8978
|
":"
|
|
8893
8979
|
] }),
|
|
8894
|
-
/* @__PURE__ */
|
|
8980
|
+
/* @__PURE__ */ jsx34(Text28, { size: 2, children: /* @__PURE__ */ jsxs27(
|
|
8895
8981
|
"a",
|
|
8896
8982
|
{
|
|
8897
8983
|
href: "#",
|
|
@@ -8917,8 +9003,8 @@ function SpawnedReportRow({
|
|
|
8917
9003
|
}, [report.reportId, router]);
|
|
8918
9004
|
const dateLabel = formatShortDate(report.completedAt);
|
|
8919
9005
|
const label = report.title ?? report.tag ?? dateLabel;
|
|
8920
|
-
return /* @__PURE__ */
|
|
8921
|
-
/* @__PURE__ */
|
|
9006
|
+
return /* @__PURE__ */ jsxs27(Flex18, { align: "center", gap: 2, children: [
|
|
9007
|
+
/* @__PURE__ */ jsx34(Text28, { size: 2, children: /* @__PURE__ */ jsx34(
|
|
8922
9008
|
"a",
|
|
8923
9009
|
{
|
|
8924
9010
|
href: "#",
|
|
@@ -8930,8 +9016,8 @@ function SpawnedReportRow({
|
|
|
8930
9016
|
children: label
|
|
8931
9017
|
}
|
|
8932
9018
|
) }),
|
|
8933
|
-
(report.title ?? report.tag) && /* @__PURE__ */
|
|
8934
|
-
/* @__PURE__ */
|
|
9019
|
+
(report.title ?? report.tag) && /* @__PURE__ */ jsx34(Text28, { muted: true, size: 1, children: dateLabel }),
|
|
9020
|
+
/* @__PURE__ */ jsx34(Badge6, { fontSize: 1, mode: "outline", tone: "default", children: report.reportId.slice(0, 8) })
|
|
8935
9021
|
] });
|
|
8936
9022
|
}
|
|
8937
9023
|
function formatShortDate(iso) {
|
|
@@ -8954,11 +9040,11 @@ import {
|
|
|
8954
9040
|
ErrorOutlineIcon as ErrorOutlineIcon2,
|
|
8955
9041
|
HelpCircleIcon as HelpCircleIcon7
|
|
8956
9042
|
} from "@sanity/icons";
|
|
8957
|
-
import { Box as
|
|
9043
|
+
import { Box as Box24, Flex as Flex21, Stack as Stack25, Text as Text33, Tooltip as Tooltip9 } from "@sanity/ui";
|
|
8958
9044
|
|
|
8959
9045
|
// src/components/report-detail/PromptReplayDrawer.tsx
|
|
8960
9046
|
import { useEffect as useEffect12 } from "react";
|
|
8961
|
-
import { Badge as Badge7, Box as
|
|
9047
|
+
import { Badge as Badge7, Box as Box22, Card as Card15, Dialog, Flex as Flex19, Grid as Grid3, Stack as Stack24, Text as Text30 } from "@sanity/ui";
|
|
8962
9048
|
|
|
8963
9049
|
// src/components/CopyButton.tsx
|
|
8964
9050
|
import {
|
|
@@ -8968,8 +9054,8 @@ import {
|
|
|
8968
9054
|
useState as useState17
|
|
8969
9055
|
} from "react";
|
|
8970
9056
|
import { CheckmarkIcon, CopyIcon } from "@sanity/icons";
|
|
8971
|
-
import { Box as
|
|
8972
|
-
import { jsx as
|
|
9057
|
+
import { Box as Box21, Button as Button4, Text as Text29, Tooltip as Tooltip7 } from "@sanity/ui";
|
|
9058
|
+
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
8973
9059
|
function CopyButton({
|
|
8974
9060
|
copiedLabel = "Copied!",
|
|
8975
9061
|
errorLabel = "Copy failed",
|
|
@@ -9008,13 +9094,13 @@ function CopyButton({
|
|
|
9008
9094
|
const tone = status === "copied" ? "positive" : status === "error" ? "critical" : "default";
|
|
9009
9095
|
const icon = status === "copied" ? CheckmarkIcon : CopyIcon;
|
|
9010
9096
|
const idle = status === "idle";
|
|
9011
|
-
return /* @__PURE__ */
|
|
9097
|
+
return /* @__PURE__ */ jsx35(
|
|
9012
9098
|
Tooltip7,
|
|
9013
9099
|
{
|
|
9014
|
-
content: /* @__PURE__ */
|
|
9100
|
+
content: /* @__PURE__ */ jsx35(Box21, { padding: 2, children: /* @__PURE__ */ jsx35(Text29, { size: 1, children: tooltipLabel }) }),
|
|
9015
9101
|
placement: "left",
|
|
9016
9102
|
portal: true,
|
|
9017
|
-
children: /* @__PURE__ */
|
|
9103
|
+
children: /* @__PURE__ */ jsx35(
|
|
9018
9104
|
Button4,
|
|
9019
9105
|
{
|
|
9020
9106
|
"aria-label": label,
|
|
@@ -9048,7 +9134,7 @@ function CopyButton({
|
|
|
9048
9134
|
}
|
|
9049
9135
|
|
|
9050
9136
|
// src/components/report-detail/PromptReplayDrawer.tsx
|
|
9051
|
-
import { Fragment as Fragment10, jsx as
|
|
9137
|
+
import { Fragment as Fragment10, jsx as jsx36, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
9052
9138
|
function useArtifactPane(type, entryKey, project) {
|
|
9053
9139
|
const ref = useArtifactRef(type);
|
|
9054
9140
|
const isLocalStore = ref?.store === "local";
|
|
@@ -9109,18 +9195,18 @@ function PromptReplayDrawer({
|
|
|
9109
9195
|
onClose
|
|
9110
9196
|
}) {
|
|
9111
9197
|
if (!open) return null;
|
|
9112
|
-
return /* @__PURE__ */
|
|
9198
|
+
return /* @__PURE__ */ jsx36(
|
|
9113
9199
|
Dialog,
|
|
9114
9200
|
{
|
|
9115
9201
|
header: "Prompt replay",
|
|
9116
9202
|
id: "prompt-replay-drawer",
|
|
9117
9203
|
onClose,
|
|
9118
9204
|
width: 4,
|
|
9119
|
-
children: /* @__PURE__ */
|
|
9120
|
-
/* @__PURE__ */
|
|
9121
|
-
/* @__PURE__ */
|
|
9122
|
-
/* @__PURE__ */
|
|
9123
|
-
/* @__PURE__ */
|
|
9205
|
+
children: /* @__PURE__ */ jsx36(Box22, { padding: 4, children: /* @__PURE__ */ jsxs28(Stack24, { space: 4, children: [
|
|
9206
|
+
/* @__PURE__ */ jsx36(Text30, { muted: true, size: 1, children: subtitle }),
|
|
9207
|
+
/* @__PURE__ */ jsxs28(Grid3, { columns: [1, 1, 2], gap: 4, children: [
|
|
9208
|
+
/* @__PURE__ */ jsx36(RenderedPromptPane, { entryKey: renderedPromptKey }),
|
|
9209
|
+
/* @__PURE__ */ jsx36(GraderRubricPane, { entryKey: graderPromptKey })
|
|
9124
9210
|
] })
|
|
9125
9211
|
] }) })
|
|
9126
9212
|
}
|
|
@@ -9128,7 +9214,7 @@ function PromptReplayDrawer({
|
|
|
9128
9214
|
}
|
|
9129
9215
|
function RenderedPromptPane({ entryKey }) {
|
|
9130
9216
|
const data = useRenderedPrompt(entryKey);
|
|
9131
|
-
return /* @__PURE__ */
|
|
9217
|
+
return /* @__PURE__ */ jsx36(
|
|
9132
9218
|
PromptPane,
|
|
9133
9219
|
{
|
|
9134
9220
|
copiedLabel: "Prompt copied",
|
|
@@ -9141,7 +9227,7 @@ function RenderedPromptPane({ entryKey }) {
|
|
|
9141
9227
|
}
|
|
9142
9228
|
function GraderRubricPane({ entryKey }) {
|
|
9143
9229
|
const data = useGraderRubric(entryKey);
|
|
9144
|
-
return /* @__PURE__ */
|
|
9230
|
+
return /* @__PURE__ */ jsx36(
|
|
9145
9231
|
PromptPane,
|
|
9146
9232
|
{
|
|
9147
9233
|
copiedLabel: "Rubric copied",
|
|
@@ -9160,27 +9246,27 @@ function PromptPane({
|
|
|
9160
9246
|
paneLabel
|
|
9161
9247
|
}) {
|
|
9162
9248
|
if (!entryKey) {
|
|
9163
|
-
return /* @__PURE__ */
|
|
9249
|
+
return /* @__PURE__ */ jsx36(PaneCard, { paneLabel, children: /* @__PURE__ */ jsx36(Text30, { muted: true, size: 1, children: "Not available for this report (no entry key could be derived from the task identity)." }) });
|
|
9164
9250
|
}
|
|
9165
9251
|
if (!data.present) {
|
|
9166
|
-
return /* @__PURE__ */
|
|
9252
|
+
return /* @__PURE__ */ jsx36(PaneCard, { paneLabel, children: /* @__PURE__ */ jsx36(Text30, { muted: true, size: 1, children: "Not captured for this entry. (Older runs pre-dating the renderedPrompts/graderPrompts writers won't carry a manifest entry.)" }) });
|
|
9167
9253
|
}
|
|
9168
9254
|
const { fullText, snippet, charCount, extra, status, isLocalStore } = data;
|
|
9169
9255
|
const displayText = fullText ?? snippet ?? "";
|
|
9170
9256
|
const isPreviewOnly = fullText === null;
|
|
9171
|
-
const footer = isLocalStore ? /* @__PURE__ */
|
|
9172
|
-
return /* @__PURE__ */
|
|
9257
|
+
const footer = isLocalStore ? /* @__PURE__ */ jsx36(Text30, { muted: true, size: 1, style: { marginTop: 8 }, children: "Full text stored locally on the runner that produced this report \u2014 not reachable from Studio. Showing 120-char preview only." }) : status === "error" ? /* @__PURE__ */ jsx36(Text30, { muted: true, size: 1, style: { color: "#f87171", marginTop: 8 }, children: "Failed to load full text \u2014 showing preview only." }) : status === "loading" && !fullText ? /* @__PURE__ */ jsx36(Text30, { muted: true, size: 1, style: { marginTop: 8 }, children: "Loading full text from artifact store\u2026" }) : isPreviewOnly ? /* @__PURE__ */ jsx36(Text30, { muted: true, size: 1, style: { marginTop: 8 }, children: "Showing 120-char preview. Full text not yet hydrated." }) : null;
|
|
9258
|
+
return /* @__PURE__ */ jsxs28(
|
|
9173
9259
|
PaneCard,
|
|
9174
9260
|
{
|
|
9175
|
-
badges: /* @__PURE__ */
|
|
9176
|
-
/* @__PURE__ */
|
|
9261
|
+
badges: /* @__PURE__ */ jsxs28(Fragment10, { children: [
|
|
9262
|
+
/* @__PURE__ */ jsxs28(Badge7, { fontSize: 0, tone: "primary", children: [
|
|
9177
9263
|
charCount.toLocaleString(),
|
|
9178
9264
|
" char",
|
|
9179
9265
|
charCount === 1 ? "" : "s"
|
|
9180
9266
|
] }),
|
|
9181
|
-
extra && /* @__PURE__ */
|
|
9267
|
+
extra && /* @__PURE__ */ jsx36(Badge7, { fontSize: 0, tone: "default", children: extra })
|
|
9182
9268
|
] }),
|
|
9183
|
-
copyAction: displayText.length > 0 ? /* @__PURE__ */
|
|
9269
|
+
copyAction: displayText.length > 0 ? /* @__PURE__ */ jsx36(
|
|
9184
9270
|
CopyButton,
|
|
9185
9271
|
{
|
|
9186
9272
|
copiedLabel,
|
|
@@ -9190,7 +9276,7 @@ function PromptPane({
|
|
|
9190
9276
|
) : null,
|
|
9191
9277
|
paneLabel,
|
|
9192
9278
|
children: [
|
|
9193
|
-
displayText.length === 0 ? /* @__PURE__ */
|
|
9279
|
+
displayText.length === 0 ? /* @__PURE__ */ jsx36(Text30, { muted: true, size: 1, children: "(empty)" }) : /* @__PURE__ */ jsx36(
|
|
9194
9280
|
"pre",
|
|
9195
9281
|
{
|
|
9196
9282
|
style: {
|
|
@@ -9221,11 +9307,11 @@ function PaneCard({
|
|
|
9221
9307
|
copyAction,
|
|
9222
9308
|
paneLabel
|
|
9223
9309
|
}) {
|
|
9224
|
-
return /* @__PURE__ */
|
|
9225
|
-
/* @__PURE__ */
|
|
9226
|
-
/* @__PURE__ */
|
|
9310
|
+
return /* @__PURE__ */ jsx36(Card15, { border: true, padding: 3, radius: 2, tone: "transparent", children: /* @__PURE__ */ jsxs28(Stack24, { space: 3, children: [
|
|
9311
|
+
/* @__PURE__ */ jsxs28(Flex19, { align: "center", gap: 2, wrap: "wrap", children: [
|
|
9312
|
+
/* @__PURE__ */ jsx36(Text30, { size: 1, weight: "semibold", children: paneLabel }),
|
|
9227
9313
|
badges,
|
|
9228
|
-
/* @__PURE__ */
|
|
9314
|
+
/* @__PURE__ */ jsx36(Box22, { flex: 1 }),
|
|
9229
9315
|
copyAction
|
|
9230
9316
|
] }),
|
|
9231
9317
|
children
|
|
@@ -9233,8 +9319,8 @@ function PaneCard({
|
|
|
9233
9319
|
}
|
|
9234
9320
|
|
|
9235
9321
|
// src/components/report-detail/judgment-formatting.tsx
|
|
9236
|
-
import { Box as
|
|
9237
|
-
import { jsx as
|
|
9322
|
+
import { Box as Box23, Text as Text31, Tooltip as Tooltip8 } from "@sanity/ui";
|
|
9323
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
9238
9324
|
function judgmentSlug(j) {
|
|
9239
9325
|
const sep = j.taskId.indexOf(" - ");
|
|
9240
9326
|
const area = sep > 0 ? j.taskId.substring(0, sep) : j.taskId;
|
|
@@ -9269,13 +9355,13 @@ function splitVariant(taskName) {
|
|
|
9269
9355
|
function VariantBadge({ variant }) {
|
|
9270
9356
|
if (!variant) return null;
|
|
9271
9357
|
const isGold = variant === "gold";
|
|
9272
|
-
return /* @__PURE__ */
|
|
9358
|
+
return /* @__PURE__ */ jsx37(
|
|
9273
9359
|
Tooltip8,
|
|
9274
9360
|
{
|
|
9275
|
-
content: /* @__PURE__ */
|
|
9361
|
+
content: /* @__PURE__ */ jsx37(Box23, { padding: 2, style: { maxWidth: 240 }, children: /* @__PURE__ */ jsx37(Text31, { size: 1, children: isGold ? "Gold: uses the documentation-authored reference prompt." : "Baseline: model implementation with no documentation guidance." }) }),
|
|
9276
9362
|
placement: "bottom",
|
|
9277
9363
|
portal: true,
|
|
9278
|
-
children: /* @__PURE__ */
|
|
9364
|
+
children: /* @__PURE__ */ jsx37(
|
|
9279
9365
|
"span",
|
|
9280
9366
|
{
|
|
9281
9367
|
style: {
|
|
@@ -9297,10 +9383,10 @@ function VariantBadge({ variant }) {
|
|
|
9297
9383
|
}
|
|
9298
9384
|
|
|
9299
9385
|
// src/components/report-detail/JudgmentListToolbar.tsx
|
|
9300
|
-
import { Flex as
|
|
9386
|
+
import { Flex as Flex20, Text as Text32, TextInput as TextInput5 } from "@sanity/ui";
|
|
9301
9387
|
import { ResetIcon as ResetIcon2, SearchIcon as SearchIcon6 } from "@sanity/icons";
|
|
9302
9388
|
import { useCallback as useCallback23 } from "react";
|
|
9303
|
-
import { jsx as
|
|
9389
|
+
import { jsx as jsx38, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
9304
9390
|
var FILTERS_BOX_STYLE = {
|
|
9305
9391
|
background: "var(--card-bg-color)",
|
|
9306
9392
|
border: "1px solid var(--card-border-color)",
|
|
@@ -9399,11 +9485,11 @@ function JudgmentListToolbar({
|
|
|
9399
9485
|
},
|
|
9400
9486
|
[onQueryChange]
|
|
9401
9487
|
);
|
|
9402
|
-
return /* @__PURE__ */
|
|
9403
|
-
/* @__PURE__ */
|
|
9404
|
-
/* @__PURE__ */
|
|
9405
|
-
/* @__PURE__ */
|
|
9406
|
-
hasActiveFilters && /* @__PURE__ */
|
|
9488
|
+
return /* @__PURE__ */ jsx38("div", { style: FILTERS_BOX_STYLE, children: /* @__PURE__ */ jsxs29(Flex20, { direction: "column", gap: 3, children: [
|
|
9489
|
+
/* @__PURE__ */ jsxs29(Flex20, { align: "center", gap: 2, children: [
|
|
9490
|
+
/* @__PURE__ */ jsx38(Text32, { muted: true, size: 1, style: GROUP_LABEL_STYLE, weight: "semibold", children: "Filters" }),
|
|
9491
|
+
/* @__PURE__ */ jsx38("div", { style: { flex: "1 0 0px" } }),
|
|
9492
|
+
hasActiveFilters && /* @__PURE__ */ jsxs29(
|
|
9407
9493
|
"button",
|
|
9408
9494
|
{
|
|
9409
9495
|
onBlur: (e) => {
|
|
@@ -9430,15 +9516,15 @@ function JudgmentListToolbar({
|
|
|
9430
9516
|
},
|
|
9431
9517
|
type: "button",
|
|
9432
9518
|
children: [
|
|
9433
|
-
/* @__PURE__ */
|
|
9519
|
+
/* @__PURE__ */ jsx38(ResetIcon2, { style: { fontSize: 14 } }),
|
|
9434
9520
|
"Reset"
|
|
9435
9521
|
]
|
|
9436
9522
|
}
|
|
9437
9523
|
),
|
|
9438
|
-
/* @__PURE__ */
|
|
9524
|
+
/* @__PURE__ */ jsx38(Text32, { muted: true, size: 1, style: { whiteSpace: "nowrap" }, children: filteredCount === totalCount ? `${totalCount}` : `${filteredCount} of ${totalCount}` })
|
|
9439
9525
|
] }),
|
|
9440
|
-
/* @__PURE__ */
|
|
9441
|
-
/* @__PURE__ */
|
|
9526
|
+
/* @__PURE__ */ jsxs29("div", { style: CONTROLS_ROW_STYLE, children: [
|
|
9527
|
+
/* @__PURE__ */ jsx38("div", { style: { flex: "1 1 220px", maxWidth: 360, minWidth: 160 }, children: /* @__PURE__ */ jsx38(
|
|
9442
9528
|
TextInput5,
|
|
9443
9529
|
{
|
|
9444
9530
|
fontSize: 1,
|
|
@@ -9448,7 +9534,7 @@ function JudgmentListToolbar({
|
|
|
9448
9534
|
value: query
|
|
9449
9535
|
}
|
|
9450
9536
|
) }),
|
|
9451
|
-
/* @__PURE__ */
|
|
9537
|
+
/* @__PURE__ */ jsx38(PillGroup, { label: "Score", children: SCORE_BANDS.map(({ band, label }) => /* @__PURE__ */ jsx38(
|
|
9452
9538
|
"button",
|
|
9453
9539
|
{
|
|
9454
9540
|
onClick: () => onScoreBandChange(band),
|
|
@@ -9458,7 +9544,7 @@ function JudgmentListToolbar({
|
|
|
9458
9544
|
},
|
|
9459
9545
|
label
|
|
9460
9546
|
)) }),
|
|
9461
|
-
/* @__PURE__ */
|
|
9547
|
+
/* @__PURE__ */ jsx38(PillGroup, { label: "Sort", children: SORT_OPTIONS.map(({ order, label }) => /* @__PURE__ */ jsx38(
|
|
9462
9548
|
"button",
|
|
9463
9549
|
{
|
|
9464
9550
|
onClick: () => onSortOrderChange(order),
|
|
@@ -9469,11 +9555,11 @@ function JudgmentListToolbar({
|
|
|
9469
9555
|
order
|
|
9470
9556
|
)) })
|
|
9471
9557
|
] }),
|
|
9472
|
-
dimensions.length > 0 && /* @__PURE__ */
|
|
9473
|
-
/* @__PURE__ */
|
|
9558
|
+
dimensions.length > 0 && /* @__PURE__ */ jsxs29(Flex20, { align: "center", gap: 2, wrap: "wrap", children: [
|
|
9559
|
+
/* @__PURE__ */ jsx38(Text32, { muted: true, size: 1, style: GROUP_LABEL_STYLE, weight: "semibold", children: "Dimensions" }),
|
|
9474
9560
|
dimensions.map((d) => {
|
|
9475
9561
|
const active = selectedDimensions.has(d.key);
|
|
9476
|
-
return /* @__PURE__ */
|
|
9562
|
+
return /* @__PURE__ */ jsxs29(
|
|
9477
9563
|
"button",
|
|
9478
9564
|
{
|
|
9479
9565
|
"aria-pressed": active,
|
|
@@ -9483,7 +9569,7 @@ function JudgmentListToolbar({
|
|
|
9483
9569
|
children: [
|
|
9484
9570
|
d.label,
|
|
9485
9571
|
" ",
|
|
9486
|
-
/* @__PURE__ */
|
|
9572
|
+
/* @__PURE__ */ jsx38(
|
|
9487
9573
|
"span",
|
|
9488
9574
|
{
|
|
9489
9575
|
style: {
|
|
@@ -9506,14 +9592,14 @@ function PillGroup({
|
|
|
9506
9592
|
label,
|
|
9507
9593
|
children
|
|
9508
9594
|
}) {
|
|
9509
|
-
return /* @__PURE__ */
|
|
9510
|
-
/* @__PURE__ */
|
|
9511
|
-
/* @__PURE__ */
|
|
9595
|
+
return /* @__PURE__ */ jsxs29(Flex20, { align: "center", gap: 2, children: [
|
|
9596
|
+
/* @__PURE__ */ jsx38(Text32, { muted: true, size: 1, style: GROUP_LABEL_STYLE, weight: "semibold", children: label }),
|
|
9597
|
+
/* @__PURE__ */ jsx38("div", { style: PILL_GROUP_STYLE, children })
|
|
9512
9598
|
] });
|
|
9513
9599
|
}
|
|
9514
9600
|
|
|
9515
9601
|
// src/components/report-detail/JudgmentList.tsx
|
|
9516
|
-
import { jsx as
|
|
9602
|
+
import { jsx as jsx39, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
9517
9603
|
function isOutputFailure(j) {
|
|
9518
9604
|
if (j.outputFailure) return true;
|
|
9519
9605
|
return j.score === 0 && j.taskId.includes("(baseline)");
|
|
@@ -9776,20 +9862,20 @@ function JudgmentList({
|
|
|
9776
9862
|
if (judgments.length === 0) return null;
|
|
9777
9863
|
if (pruned.length === 0) return null;
|
|
9778
9864
|
const outputFailureCount = judgments.length - pruned.length;
|
|
9779
|
-
return /* @__PURE__ */
|
|
9780
|
-
/* @__PURE__ */
|
|
9781
|
-
/* @__PURE__ */
|
|
9782
|
-
/* @__PURE__ */
|
|
9783
|
-
/* @__PURE__ */
|
|
9865
|
+
return /* @__PURE__ */ jsxs30(Stack25, { space: 3, children: [
|
|
9866
|
+
/* @__PURE__ */ jsxs30(Flex21, { align: "center", gap: 2, children: [
|
|
9867
|
+
/* @__PURE__ */ jsx39(ErrorOutlineIcon2, { style: { color: "#fbbf24" } }),
|
|
9868
|
+
/* @__PURE__ */ jsx39(Text33, { size: 2, weight: "medium", children: "Low-Scoring Judgments" }),
|
|
9869
|
+
/* @__PURE__ */ jsx39(
|
|
9784
9870
|
Tooltip9,
|
|
9785
9871
|
{
|
|
9786
|
-
content: /* @__PURE__ */
|
|
9872
|
+
content: /* @__PURE__ */ jsx39(Box24, { padding: 2, style: { maxWidth: 260 }, children: /* @__PURE__ */ jsx39(Text33, { size: 2, children: GLOSSARY.lowScoringJudgments }) }),
|
|
9787
9873
|
placement: "bottom",
|
|
9788
9874
|
portal: true,
|
|
9789
|
-
children: /* @__PURE__ */
|
|
9875
|
+
children: /* @__PURE__ */ jsx39(Text33, { muted: true, size: 1, children: /* @__PURE__ */ jsx39(HelpCircleIcon7, {}) })
|
|
9790
9876
|
}
|
|
9791
9877
|
),
|
|
9792
|
-
/* @__PURE__ */
|
|
9878
|
+
/* @__PURE__ */ jsxs30(
|
|
9793
9879
|
"span",
|
|
9794
9880
|
{
|
|
9795
9881
|
style: {
|
|
@@ -9808,10 +9894,10 @@ function JudgmentList({
|
|
|
9808
9894
|
]
|
|
9809
9895
|
}
|
|
9810
9896
|
),
|
|
9811
|
-
outputFailureCount > 0 && /* @__PURE__ */
|
|
9897
|
+
outputFailureCount > 0 && /* @__PURE__ */ jsx39(
|
|
9812
9898
|
Tooltip9,
|
|
9813
9899
|
{
|
|
9814
|
-
content: /* @__PURE__ */
|
|
9900
|
+
content: /* @__PURE__ */ jsx39(Box24, { padding: 2, style: { maxWidth: 280 }, children: /* @__PURE__ */ jsxs30(Text33, { size: 2, children: [
|
|
9815
9901
|
outputFailureCount,
|
|
9816
9902
|
" judgment",
|
|
9817
9903
|
outputFailureCount === 1 ? "" : "s",
|
|
@@ -9819,7 +9905,7 @@ function JudgmentList({
|
|
|
9819
9905
|
] }) }),
|
|
9820
9906
|
placement: "bottom",
|
|
9821
9907
|
portal: true,
|
|
9822
|
-
children: /* @__PURE__ */
|
|
9908
|
+
children: /* @__PURE__ */ jsxs30(
|
|
9823
9909
|
"span",
|
|
9824
9910
|
{
|
|
9825
9911
|
style: {
|
|
@@ -9841,7 +9927,7 @@ function JudgmentList({
|
|
|
9841
9927
|
}
|
|
9842
9928
|
)
|
|
9843
9929
|
] }),
|
|
9844
|
-
/* @__PURE__ */
|
|
9930
|
+
/* @__PURE__ */ jsx39(
|
|
9845
9931
|
JudgmentListToolbar,
|
|
9846
9932
|
{
|
|
9847
9933
|
dimensions: dimensionOptions,
|
|
@@ -9858,7 +9944,7 @@ function JudgmentList({
|
|
|
9858
9944
|
totalCount: pruned.length
|
|
9859
9945
|
}
|
|
9860
9946
|
),
|
|
9861
|
-
/* @__PURE__ */
|
|
9947
|
+
/* @__PURE__ */ jsx39(
|
|
9862
9948
|
PromptReplayDrawer,
|
|
9863
9949
|
{
|
|
9864
9950
|
graderPromptKey: promptReplay?.graderPromptKey ?? null,
|
|
@@ -9868,11 +9954,11 @@ function JudgmentList({
|
|
|
9868
9954
|
subtitle: promptReplay?.subtitle ?? ""
|
|
9869
9955
|
}
|
|
9870
9956
|
),
|
|
9871
|
-
filtered.length === 0 ? /* @__PURE__ */
|
|
9872
|
-
/* @__PURE__ */
|
|
9873
|
-
/* @__PURE__ */
|
|
9874
|
-
] }) }) : /* @__PURE__ */
|
|
9875
|
-
/* @__PURE__ */
|
|
9957
|
+
filtered.length === 0 ? /* @__PURE__ */ jsx39(Box24, { padding: 4, style: neutralCardStyle, children: /* @__PURE__ */ jsxs30(Stack25, { space: 2, children: [
|
|
9958
|
+
/* @__PURE__ */ jsx39(Text33, { muted: true, size: 2, children: "No judgments match these filters." }),
|
|
9959
|
+
/* @__PURE__ */ jsx39(Text33, { muted: true, size: 1, children: "Try clearing a filter or widening the score band." })
|
|
9960
|
+
] }) }) : /* @__PURE__ */ jsxs30(Stack25, { space: 2, children: [
|
|
9961
|
+
/* @__PURE__ */ jsx39(
|
|
9876
9962
|
AreaJumpRail,
|
|
9877
9963
|
{
|
|
9878
9964
|
areas: groupedWithStats.map(([area, list]) => ({
|
|
@@ -9881,20 +9967,20 @@ function JudgmentList({
|
|
|
9881
9967
|
}))
|
|
9882
9968
|
}
|
|
9883
9969
|
),
|
|
9884
|
-
/* @__PURE__ */
|
|
9970
|
+
/* @__PURE__ */ jsx39(Box24, { onKeyDown: handleListKeyDown, style: neutralCardStyle, children: groupedWithStats.map(
|
|
9885
9971
|
([area, areaJudgments, stats], groupIndex) => {
|
|
9886
9972
|
const anchorId = areaAnchorId(area);
|
|
9887
9973
|
const collapsed = collapsedAreas.has(area);
|
|
9888
9974
|
const groupBodyId = `${anchorId}-body`;
|
|
9889
|
-
return /* @__PURE__ */
|
|
9890
|
-
|
|
9975
|
+
return /* @__PURE__ */ jsx39(
|
|
9976
|
+
Box24,
|
|
9891
9977
|
{
|
|
9892
9978
|
id: anchorId,
|
|
9893
9979
|
padding: 3,
|
|
9894
9980
|
style: groupIndex > 0 ? dividerStyle : void 0,
|
|
9895
|
-
children: /* @__PURE__ */
|
|
9896
|
-
/* @__PURE__ */
|
|
9897
|
-
/* @__PURE__ */
|
|
9981
|
+
children: /* @__PURE__ */ jsxs30(Stack25, { space: 2, children: [
|
|
9982
|
+
/* @__PURE__ */ jsxs30(Flex21, { align: "center", gap: 3, wrap: "wrap", children: [
|
|
9983
|
+
/* @__PURE__ */ jsxs30(
|
|
9898
9984
|
"button",
|
|
9899
9985
|
{
|
|
9900
9986
|
"aria-controls": groupBodyId,
|
|
@@ -9908,7 +9994,7 @@ function JudgmentList({
|
|
|
9908
9994
|
},
|
|
9909
9995
|
type: "button",
|
|
9910
9996
|
children: [
|
|
9911
|
-
/* @__PURE__ */
|
|
9997
|
+
/* @__PURE__ */ jsx39(
|
|
9912
9998
|
"span",
|
|
9913
9999
|
{
|
|
9914
10000
|
"aria-hidden": true,
|
|
@@ -9918,13 +10004,13 @@ function JudgmentList({
|
|
|
9918
10004
|
display: "inline-flex",
|
|
9919
10005
|
fontSize: 14
|
|
9920
10006
|
},
|
|
9921
|
-
children: collapsed ? /* @__PURE__ */
|
|
10007
|
+
children: collapsed ? /* @__PURE__ */ jsx39(ChevronRightIcon, {}) : /* @__PURE__ */ jsx39(ChevronDownIcon2, {})
|
|
9922
10008
|
}
|
|
9923
10009
|
),
|
|
9924
|
-
/* @__PURE__ */
|
|
10010
|
+
/* @__PURE__ */ jsxs30(Text33, { size: 2, weight: "semibold", children: [
|
|
9925
10011
|
area,
|
|
9926
10012
|
" ",
|
|
9927
|
-
/* @__PURE__ */
|
|
10013
|
+
/* @__PURE__ */ jsxs30(
|
|
9928
10014
|
"span",
|
|
9929
10015
|
{
|
|
9930
10016
|
style: {
|
|
@@ -9942,10 +10028,10 @@ function JudgmentList({
|
|
|
9942
10028
|
]
|
|
9943
10029
|
}
|
|
9944
10030
|
),
|
|
9945
|
-
/* @__PURE__ */
|
|
10031
|
+
/* @__PURE__ */ jsx39(
|
|
9946
10032
|
Tooltip9,
|
|
9947
10033
|
{
|
|
9948
|
-
content: /* @__PURE__ */
|
|
10034
|
+
content: /* @__PURE__ */ jsx39(Box24, { padding: 2, children: /* @__PURE__ */ jsxs30(Text33, { size: 1, children: [
|
|
9949
10035
|
"Average score across the ",
|
|
9950
10036
|
areaJudgments.length,
|
|
9951
10037
|
" ",
|
|
@@ -9955,7 +10041,7 @@ function JudgmentList({
|
|
|
9955
10041
|
] }) }),
|
|
9956
10042
|
placement: "bottom",
|
|
9957
10043
|
portal: true,
|
|
9958
|
-
children: /* @__PURE__ */
|
|
10044
|
+
children: /* @__PURE__ */ jsxs30(
|
|
9959
10045
|
"span",
|
|
9960
10046
|
{
|
|
9961
10047
|
style: {
|
|
@@ -9975,12 +10061,12 @@ function JudgmentList({
|
|
|
9975
10061
|
)
|
|
9976
10062
|
}
|
|
9977
10063
|
),
|
|
9978
|
-
/* @__PURE__ */
|
|
9979
|
-
stats.breakdown.length > 0 && /* @__PURE__ */
|
|
10064
|
+
/* @__PURE__ */ jsx39(DistributionBar, { bands: stats.bands }),
|
|
10065
|
+
stats.breakdown.length > 0 && /* @__PURE__ */ jsx39(Text33, { muted: true, size: 1, children: stats.breakdown.map((d) => `${d.label} ${d.count}`).join(" \xB7 ") })
|
|
9980
10066
|
] }),
|
|
9981
|
-
!collapsed && /* @__PURE__ */
|
|
10067
|
+
!collapsed && /* @__PURE__ */ jsx39(Stack25, { id: groupBodyId, space: 1, children: areaJudgments.map((j) => {
|
|
9982
10068
|
const slug = judgmentSlug(j);
|
|
9983
|
-
return /* @__PURE__ */
|
|
10069
|
+
return /* @__PURE__ */ jsx39(
|
|
9984
10070
|
JudgmentCard,
|
|
9985
10071
|
{
|
|
9986
10072
|
allKeys: flatKeys,
|
|
@@ -10052,8 +10138,8 @@ function JudgmentCard({
|
|
|
10052
10138
|
row.handlers.onFocus();
|
|
10053
10139
|
onHoverTestOutputs?.();
|
|
10054
10140
|
}, [row.handlers, onHoverTestOutputs]);
|
|
10055
|
-
return /* @__PURE__ */
|
|
10056
|
-
|
|
10141
|
+
return /* @__PURE__ */ jsx39(
|
|
10142
|
+
Box24,
|
|
10057
10143
|
{
|
|
10058
10144
|
"aria-expanded": focused,
|
|
10059
10145
|
"aria-label": `${score} ${dimLabel}: ${taskName}`,
|
|
@@ -10076,8 +10162,8 @@ function JudgmentCard({
|
|
|
10076
10162
|
} : {}
|
|
10077
10163
|
},
|
|
10078
10164
|
tabIndex: tabbable ? 0 : -1,
|
|
10079
|
-
children: /* @__PURE__ */
|
|
10080
|
-
/* @__PURE__ */
|
|
10165
|
+
children: /* @__PURE__ */ jsxs30(Flex21, { align: "center", gap: 2, wrap: "wrap", children: [
|
|
10166
|
+
/* @__PURE__ */ jsx39(
|
|
10081
10167
|
"span",
|
|
10082
10168
|
{
|
|
10083
10169
|
style: {
|
|
@@ -10092,7 +10178,7 @@ function JudgmentCard({
|
|
|
10092
10178
|
children: score
|
|
10093
10179
|
}
|
|
10094
10180
|
),
|
|
10095
|
-
/* @__PURE__ */
|
|
10181
|
+
/* @__PURE__ */ jsx39(
|
|
10096
10182
|
"span",
|
|
10097
10183
|
{
|
|
10098
10184
|
style: {
|
|
@@ -10105,15 +10191,15 @@ function JudgmentCard({
|
|
|
10105
10191
|
children: dimLabel
|
|
10106
10192
|
}
|
|
10107
10193
|
),
|
|
10108
|
-
/* @__PURE__ */
|
|
10109
|
-
/* @__PURE__ */
|
|
10110
|
-
/* @__PURE__ */
|
|
10194
|
+
/* @__PURE__ */ jsx39(Text33, { size: 1, weight: "medium", children: taskName }),
|
|
10195
|
+
/* @__PURE__ */ jsx39(VariantBadge, { variant }),
|
|
10196
|
+
/* @__PURE__ */ jsx39(
|
|
10111
10197
|
Tooltip9,
|
|
10112
10198
|
{
|
|
10113
|
-
content: /* @__PURE__ */
|
|
10199
|
+
content: /* @__PURE__ */ jsx39(Box24, { padding: 2, children: /* @__PURE__ */ jsx39(Text33, { size: 1, children: judgment.modelId }) }),
|
|
10114
10200
|
placement: "bottom",
|
|
10115
10201
|
portal: true,
|
|
10116
|
-
children: /* @__PURE__ */
|
|
10202
|
+
children: /* @__PURE__ */ jsx39(
|
|
10117
10203
|
"span",
|
|
10118
10204
|
{
|
|
10119
10205
|
style: {
|
|
@@ -10130,7 +10216,7 @@ function JudgmentCard({
|
|
|
10130
10216
|
)
|
|
10131
10217
|
}
|
|
10132
10218
|
),
|
|
10133
|
-
/* @__PURE__ */
|
|
10219
|
+
/* @__PURE__ */ jsx39(Flex21, { align: "center", gap: 1, style: { marginLeft: "auto" }, children: /* @__PURE__ */ jsx39(Text33, { muted: true, size: 1, children: /* @__PURE__ */ jsx39(ChevronRightIcon, {}) }) })
|
|
10134
10220
|
] })
|
|
10135
10221
|
}
|
|
10136
10222
|
);
|
|
@@ -10160,13 +10246,13 @@ function DistributionBar({ bands }) {
|
|
|
10160
10246
|
label: `${bands.borderline} borderline (50\u201369)`
|
|
10161
10247
|
});
|
|
10162
10248
|
}
|
|
10163
|
-
return /* @__PURE__ */
|
|
10249
|
+
return /* @__PURE__ */ jsx39(
|
|
10164
10250
|
Tooltip9,
|
|
10165
10251
|
{
|
|
10166
|
-
content: /* @__PURE__ */
|
|
10252
|
+
content: /* @__PURE__ */ jsx39(Box24, { padding: 2, children: /* @__PURE__ */ jsx39(Stack25, { space: 1, children: parts.map((p) => /* @__PURE__ */ jsx39(Text33, { size: 1, children: p.label }, p.label)) }) }),
|
|
10167
10253
|
placement: "bottom",
|
|
10168
10254
|
portal: true,
|
|
10169
|
-
children: /* @__PURE__ */
|
|
10255
|
+
children: /* @__PURE__ */ jsx39(
|
|
10170
10256
|
"div",
|
|
10171
10257
|
{
|
|
10172
10258
|
"aria-label": parts.map((p) => p.label).join(", "),
|
|
@@ -10180,7 +10266,7 @@ function DistributionBar({ bands }) {
|
|
|
10180
10266
|
overflow: "hidden",
|
|
10181
10267
|
width: 72
|
|
10182
10268
|
},
|
|
10183
|
-
children: parts.map((p) => /* @__PURE__ */
|
|
10269
|
+
children: parts.map((p) => /* @__PURE__ */ jsx39(
|
|
10184
10270
|
"div",
|
|
10185
10271
|
{
|
|
10186
10272
|
style: {
|
|
@@ -10201,8 +10287,8 @@ function AreaJumpRail({ areas }) {
|
|
|
10201
10287
|
el?.scrollIntoView({ behavior: "smooth", block: "start" });
|
|
10202
10288
|
}, []);
|
|
10203
10289
|
if (areas.length <= 1) return null;
|
|
10204
|
-
return /* @__PURE__ */
|
|
10205
|
-
/* @__PURE__ */
|
|
10290
|
+
return /* @__PURE__ */ jsxs30(Flex21, { align: "center", gap: 2, style: { padding: "2px 0" }, wrap: "wrap", children: [
|
|
10291
|
+
/* @__PURE__ */ jsx39(
|
|
10206
10292
|
Text33,
|
|
10207
10293
|
{
|
|
10208
10294
|
muted: true,
|
|
@@ -10216,8 +10302,8 @@ function AreaJumpRail({ areas }) {
|
|
|
10216
10302
|
children: "Jump to"
|
|
10217
10303
|
}
|
|
10218
10304
|
),
|
|
10219
|
-
areas.map(({ area, count }, i) => /* @__PURE__ */
|
|
10220
|
-
i > 0 && /* @__PURE__ */
|
|
10305
|
+
areas.map(({ area, count }, i) => /* @__PURE__ */ jsxs30(React2.Fragment, { children: [
|
|
10306
|
+
i > 0 && /* @__PURE__ */ jsx39(
|
|
10221
10307
|
"span",
|
|
10222
10308
|
{
|
|
10223
10309
|
"aria-hidden": true,
|
|
@@ -10228,7 +10314,7 @@ function AreaJumpRail({ areas }) {
|
|
|
10228
10314
|
children: "\xB7"
|
|
10229
10315
|
}
|
|
10230
10316
|
),
|
|
10231
|
-
/* @__PURE__ */
|
|
10317
|
+
/* @__PURE__ */ jsxs30(
|
|
10232
10318
|
"button",
|
|
10233
10319
|
{
|
|
10234
10320
|
"aria-label": `Jump to ${area}, ${count} judgment${count === 1 ? "" : "s"}`,
|
|
@@ -10256,8 +10342,8 @@ function AreaJumpRail({ areas }) {
|
|
|
10256
10342
|
},
|
|
10257
10343
|
type: "button",
|
|
10258
10344
|
children: [
|
|
10259
|
-
/* @__PURE__ */
|
|
10260
|
-
/* @__PURE__ */
|
|
10345
|
+
/* @__PURE__ */ jsx39("span", { "aria-hidden": true, children: area }),
|
|
10346
|
+
/* @__PURE__ */ jsx39(
|
|
10261
10347
|
"span",
|
|
10262
10348
|
{
|
|
10263
10349
|
"aria-hidden": true,
|
|
@@ -10278,25 +10364,25 @@ function AreaJumpRail({ areas }) {
|
|
|
10278
10364
|
|
|
10279
10365
|
// src/components/report-detail/PipelineExecutionPanel.tsx
|
|
10280
10366
|
import { ChevronDownIcon as ChevronDownIcon3, ChevronRightIcon as ChevronRightIcon2 } from "@sanity/icons";
|
|
10281
|
-
import { Badge as Badge8, Box as
|
|
10367
|
+
import { Badge as Badge8, Box as Box25, Button as Button5, Card as Card16, Flex as Flex22, Stack as Stack26, Text as Text34 } from "@sanity/ui";
|
|
10282
10368
|
import { useCallback as useCallback25, useState as useState19 } from "react";
|
|
10283
|
-
import { Fragment as Fragment11, jsx as
|
|
10369
|
+
import { Fragment as Fragment11, jsx as jsx40, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
10284
10370
|
var PRE_W0060_HELP_URL = "https://github.com/sanity-labs/ai-literacy-framework/blob/main/docs/design-docs/artifact-data-surfacing.md";
|
|
10285
10371
|
function PipelineExecutionPanel() {
|
|
10286
10372
|
const ref = useArtifactRef("pipelineContext");
|
|
10287
10373
|
const preview = ref?.preview;
|
|
10288
10374
|
if (!ref || !preview) {
|
|
10289
|
-
return /* @__PURE__ */
|
|
10375
|
+
return /* @__PURE__ */ jsx40(EmptyState, {});
|
|
10290
10376
|
}
|
|
10291
|
-
return /* @__PURE__ */
|
|
10377
|
+
return /* @__PURE__ */ jsx40(LoadedPanel, { preview });
|
|
10292
10378
|
}
|
|
10293
10379
|
function EmptyState() {
|
|
10294
|
-
return /* @__PURE__ */
|
|
10295
|
-
/* @__PURE__ */
|
|
10296
|
-
/* @__PURE__ */
|
|
10380
|
+
return /* @__PURE__ */ jsx40(Card16, { padding: 4, radius: 2, shadow: 1, children: /* @__PURE__ */ jsxs31(Stack26, { space: 3, children: [
|
|
10381
|
+
/* @__PURE__ */ jsx40(Text34, { size: 3, weight: "semibold", children: "Pipeline Execution" }),
|
|
10382
|
+
/* @__PURE__ */ jsxs31(Text34, { muted: true, size: 2, children: [
|
|
10297
10383
|
"Pipeline context was not captured for this run.",
|
|
10298
10384
|
" ",
|
|
10299
|
-
/* @__PURE__ */
|
|
10385
|
+
/* @__PURE__ */ jsx40(
|
|
10300
10386
|
"a",
|
|
10301
10387
|
{
|
|
10302
10388
|
href: PRE_W0060_HELP_URL,
|
|
@@ -10320,13 +10406,13 @@ function LoadedPanel({ preview }) {
|
|
|
10320
10406
|
return next;
|
|
10321
10407
|
});
|
|
10322
10408
|
}, [request]);
|
|
10323
|
-
return /* @__PURE__ */
|
|
10324
|
-
/* @__PURE__ */
|
|
10325
|
-
/* @__PURE__ */
|
|
10326
|
-
preview.belowCritical === true && /* @__PURE__ */
|
|
10409
|
+
return /* @__PURE__ */ jsx40(Card16, { padding: 4, radius: 2, shadow: 1, children: /* @__PURE__ */ jsxs31(Stack26, { space: 4, children: [
|
|
10410
|
+
/* @__PURE__ */ jsxs31(Flex22, { align: "center", gap: 3, justify: "space-between", wrap: "wrap", children: [
|
|
10411
|
+
/* @__PURE__ */ jsx40(Text34, { size: 3, weight: "semibold", children: "Pipeline Execution" }),
|
|
10412
|
+
preview.belowCritical === true && /* @__PURE__ */ jsx40(Badge8, { tone: "critical", children: "Below critical" })
|
|
10327
10413
|
] }),
|
|
10328
|
-
/* @__PURE__ */
|
|
10329
|
-
/* @__PURE__ */
|
|
10414
|
+
/* @__PURE__ */ jsx40(HeaderRow, { preview }),
|
|
10415
|
+
/* @__PURE__ */ jsx40(Box25, { children: /* @__PURE__ */ jsx40(
|
|
10330
10416
|
Button5,
|
|
10331
10417
|
{
|
|
10332
10418
|
icon: expanded ? ChevronDownIcon3 : ChevronRightIcon2,
|
|
@@ -10336,34 +10422,34 @@ function LoadedPanel({ preview }) {
|
|
|
10336
10422
|
text: expanded ? "Hide details" : "Show details"
|
|
10337
10423
|
}
|
|
10338
10424
|
) }),
|
|
10339
|
-
expanded && /* @__PURE__ */
|
|
10425
|
+
expanded && /* @__PURE__ */ jsx40(Details, { full, preview, status })
|
|
10340
10426
|
] }) });
|
|
10341
10427
|
}
|
|
10342
10428
|
function HeaderRow({ preview }) {
|
|
10343
10429
|
const failedCount = preview.failedSteps.length;
|
|
10344
|
-
return /* @__PURE__ */
|
|
10345
|
-
/* @__PURE__ */
|
|
10346
|
-
/* @__PURE__ */
|
|
10347
|
-
/* @__PURE__ */
|
|
10348
|
-
/* @__PURE__ */
|
|
10349
|
-
/* @__PURE__ */
|
|
10350
|
-
/* @__PURE__ */
|
|
10351
|
-
failedCount > 0 ? /* @__PURE__ */
|
|
10430
|
+
return /* @__PURE__ */ jsxs31(Flex22, { align: "center", gap: 3, wrap: "wrap", children: [
|
|
10431
|
+
/* @__PURE__ */ jsx40(Stat2, { label: "Steps", value: String(preview.stepCount) }),
|
|
10432
|
+
/* @__PURE__ */ jsx40(Dot, {}),
|
|
10433
|
+
/* @__PURE__ */ jsx40(Stat2, { label: "Duration", value: formatDuration(preview.totalDurationMs) }),
|
|
10434
|
+
/* @__PURE__ */ jsx40(Dot, {}),
|
|
10435
|
+
/* @__PURE__ */ jsxs31(Flex22, { align: "baseline", gap: 2, children: [
|
|
10436
|
+
/* @__PURE__ */ jsx40(SectionTitle, { children: "Failed" }),
|
|
10437
|
+
failedCount > 0 ? /* @__PURE__ */ jsx40(Badge8, { tone: "critical", children: failedCount }) : /* @__PURE__ */ jsx40(Text34, { size: 2, children: "0" })
|
|
10352
10438
|
] }),
|
|
10353
|
-
typeof preview.cacheHits === "number" && /* @__PURE__ */
|
|
10354
|
-
/* @__PURE__ */
|
|
10355
|
-
/* @__PURE__ */
|
|
10439
|
+
typeof preview.cacheHits === "number" && /* @__PURE__ */ jsxs31(Fragment11, { children: [
|
|
10440
|
+
/* @__PURE__ */ jsx40(Dot, {}),
|
|
10441
|
+
/* @__PURE__ */ jsx40(Stat2, { label: "Cache hits", value: String(preview.cacheHits) })
|
|
10356
10442
|
] })
|
|
10357
10443
|
] });
|
|
10358
10444
|
}
|
|
10359
10445
|
function Stat2({ label, value }) {
|
|
10360
|
-
return /* @__PURE__ */
|
|
10361
|
-
/* @__PURE__ */
|
|
10362
|
-
/* @__PURE__ */
|
|
10446
|
+
return /* @__PURE__ */ jsxs31(Flex22, { align: "baseline", gap: 2, children: [
|
|
10447
|
+
/* @__PURE__ */ jsx40(SectionTitle, { children: label }),
|
|
10448
|
+
/* @__PURE__ */ jsx40(Text34, { size: 2, children: value })
|
|
10363
10449
|
] });
|
|
10364
10450
|
}
|
|
10365
10451
|
function Dot() {
|
|
10366
|
-
return /* @__PURE__ */
|
|
10452
|
+
return /* @__PURE__ */ jsx40(Text34, { "aria-hidden": true, muted: true, size: 1, children: "\xB7" });
|
|
10367
10453
|
}
|
|
10368
10454
|
function Details({
|
|
10369
10455
|
full,
|
|
@@ -10371,18 +10457,18 @@ function Details({
|
|
|
10371
10457
|
status
|
|
10372
10458
|
}) {
|
|
10373
10459
|
if (status === "loading") {
|
|
10374
|
-
return /* @__PURE__ */
|
|
10460
|
+
return /* @__PURE__ */ jsx40(Text34, { muted: true, size: 2, children: "Loading pipeline context\u2026" });
|
|
10375
10461
|
}
|
|
10376
10462
|
if (status === "error") {
|
|
10377
|
-
return /* @__PURE__ */
|
|
10463
|
+
return /* @__PURE__ */ jsx40(Card16, { padding: 3, radius: 2, tone: "critical", children: /* @__PURE__ */ jsx40(Text34, { size: 2, children: "Failed to load pipeline context." }) });
|
|
10378
10464
|
}
|
|
10379
10465
|
if (!full) {
|
|
10380
10466
|
return null;
|
|
10381
10467
|
}
|
|
10382
|
-
return /* @__PURE__ */
|
|
10383
|
-
/* @__PURE__ */
|
|
10384
|
-
/* @__PURE__ */
|
|
10385
|
-
/* @__PURE__ */
|
|
10468
|
+
return /* @__PURE__ */ jsxs31(Stack26, { space: 4, children: [
|
|
10469
|
+
/* @__PURE__ */ jsx40(StepTimeline, { steps: full.steps ?? [] }),
|
|
10470
|
+
/* @__PURE__ */ jsx40(ConfigPane, { config: full.config ?? {} }),
|
|
10471
|
+
/* @__PURE__ */ jsx40(
|
|
10386
10472
|
CacheTelemetry,
|
|
10387
10473
|
{
|
|
10388
10474
|
cacheKeys: full.state?.remoteCacheHits ?? [],
|
|
@@ -10393,15 +10479,15 @@ function Details({
|
|
|
10393
10479
|
}
|
|
10394
10480
|
function StepTimeline({ steps }) {
|
|
10395
10481
|
if (steps.length === 0) {
|
|
10396
|
-
return /* @__PURE__ */
|
|
10482
|
+
return /* @__PURE__ */ jsx40(Text34, { muted: true, size: 2, children: "No pipeline steps recorded." });
|
|
10397
10483
|
}
|
|
10398
10484
|
const maxDuration = Math.max(
|
|
10399
10485
|
1,
|
|
10400
10486
|
...steps.map((s) => typeof s.durationMs === "number" ? s.durationMs : 0)
|
|
10401
10487
|
);
|
|
10402
|
-
return /* @__PURE__ */
|
|
10403
|
-
/* @__PURE__ */
|
|
10404
|
-
/* @__PURE__ */
|
|
10488
|
+
return /* @__PURE__ */ jsxs31(Stack26, { space: 3, children: [
|
|
10489
|
+
/* @__PURE__ */ jsx40(SectionTitle, { children: "Steps" }),
|
|
10490
|
+
/* @__PURE__ */ jsx40(Stack26, { space: 2, children: steps.map((step) => /* @__PURE__ */ jsx40(StepRow, { maxDurationMs: maxDuration, step }, step.name)) })
|
|
10405
10491
|
] });
|
|
10406
10492
|
}
|
|
10407
10493
|
function StepRow({
|
|
@@ -10411,8 +10497,8 @@ function StepRow({
|
|
|
10411
10497
|
const widthPct = typeof step.durationMs === "number" && maxDurationMs > 0 ? Math.max(2, Math.round(step.durationMs / maxDurationMs * 100)) : 0;
|
|
10412
10498
|
const tone = step.status === "success" ? "positive" : step.status === "failed" ? "critical" : "default";
|
|
10413
10499
|
const barColor = tone === "critical" ? "var(--card-bg-critical-color, #c4314b)" : tone === "positive" ? "var(--card-bg-positive-color, #43d675)" : "var(--card-muted-fg-color, #999)";
|
|
10414
|
-
return /* @__PURE__ */
|
|
10415
|
-
/* @__PURE__ */
|
|
10500
|
+
return /* @__PURE__ */ jsxs31(Flex22, { align: "center", gap: 3, wrap: "nowrap", children: [
|
|
10501
|
+
/* @__PURE__ */ jsx40(Box25, { style: { minWidth: 180, maxWidth: 220 }, children: /* @__PURE__ */ jsx40(
|
|
10416
10502
|
Text34,
|
|
10417
10503
|
{
|
|
10418
10504
|
size: 2,
|
|
@@ -10421,10 +10507,10 @@ function StepRow({
|
|
|
10421
10507
|
children: step.name
|
|
10422
10508
|
}
|
|
10423
10509
|
) }),
|
|
10424
|
-
/* @__PURE__ */
|
|
10425
|
-
/* @__PURE__ */
|
|
10426
|
-
/* @__PURE__ */
|
|
10427
|
-
|
|
10510
|
+
/* @__PURE__ */ jsx40(Box25, { style: { minWidth: 72 }, children: /* @__PURE__ */ jsx40(Badge8, { tone, children: step.status }) }),
|
|
10511
|
+
/* @__PURE__ */ jsxs31(Box25, { flex: 1, style: { position: "relative", minWidth: 80 }, children: [
|
|
10512
|
+
/* @__PURE__ */ jsx40(
|
|
10513
|
+
Box25,
|
|
10428
10514
|
{
|
|
10429
10515
|
style: {
|
|
10430
10516
|
backgroundColor: "var(--card-border-color, #e5e5e5)",
|
|
@@ -10434,8 +10520,8 @@ function StepRow({
|
|
|
10434
10520
|
}
|
|
10435
10521
|
}
|
|
10436
10522
|
),
|
|
10437
|
-
widthPct > 0 && /* @__PURE__ */
|
|
10438
|
-
|
|
10523
|
+
widthPct > 0 && /* @__PURE__ */ jsx40(
|
|
10524
|
+
Box25,
|
|
10439
10525
|
{
|
|
10440
10526
|
style: {
|
|
10441
10527
|
backgroundColor: barColor,
|
|
@@ -10449,16 +10535,16 @@ function StepRow({
|
|
|
10449
10535
|
}
|
|
10450
10536
|
)
|
|
10451
10537
|
] }),
|
|
10452
|
-
/* @__PURE__ */
|
|
10538
|
+
/* @__PURE__ */ jsx40(Box25, { style: { minWidth: 80, textAlign: "right" }, children: /* @__PURE__ */ jsx40(Text34, { muted: true, size: 1, style: { fontFamily: "monospace" }, children: typeof step.durationMs === "number" ? formatDuration(step.durationMs) : "\u2014" }) })
|
|
10453
10539
|
] });
|
|
10454
10540
|
}
|
|
10455
10541
|
function ConfigPane({ config }) {
|
|
10456
10542
|
const [expanded, setExpanded] = useState19(false);
|
|
10457
10543
|
const json = JSON.stringify(config, null, 2);
|
|
10458
|
-
return /* @__PURE__ */
|
|
10459
|
-
/* @__PURE__ */
|
|
10460
|
-
/* @__PURE__ */
|
|
10461
|
-
/* @__PURE__ */
|
|
10544
|
+
return /* @__PURE__ */ jsxs31(Stack26, { space: 2, children: [
|
|
10545
|
+
/* @__PURE__ */ jsxs31(Flex22, { align: "center", gap: 2, children: [
|
|
10546
|
+
/* @__PURE__ */ jsx40(SectionTitle, { children: "Effective config" }),
|
|
10547
|
+
/* @__PURE__ */ jsx40(
|
|
10462
10548
|
Button5,
|
|
10463
10549
|
{
|
|
10464
10550
|
fontSize: 1,
|
|
@@ -10470,8 +10556,8 @@ function ConfigPane({ config }) {
|
|
|
10470
10556
|
}
|
|
10471
10557
|
)
|
|
10472
10558
|
] }),
|
|
10473
|
-
expanded && /* @__PURE__ */
|
|
10474
|
-
/* @__PURE__ */
|
|
10559
|
+
expanded && /* @__PURE__ */ jsxs31(Box25, { style: { position: "relative" }, children: [
|
|
10560
|
+
/* @__PURE__ */ jsx40(Card16, { border: true, padding: 3, radius: 2, tone: "transparent", children: /* @__PURE__ */ jsx40(
|
|
10475
10561
|
"pre",
|
|
10476
10562
|
{
|
|
10477
10563
|
style: {
|
|
@@ -10487,7 +10573,7 @@ function ConfigPane({ config }) {
|
|
|
10487
10573
|
children: json
|
|
10488
10574
|
}
|
|
10489
10575
|
) }),
|
|
10490
|
-
/* @__PURE__ */
|
|
10576
|
+
/* @__PURE__ */ jsx40(
|
|
10491
10577
|
CopyButton,
|
|
10492
10578
|
{
|
|
10493
10579
|
label: "Copy config",
|
|
@@ -10505,11 +10591,11 @@ function CacheTelemetry({
|
|
|
10505
10591
|
const [expanded, setExpanded] = useState19(false);
|
|
10506
10592
|
const count = cacheKeys.length || preview.cacheHits || 0;
|
|
10507
10593
|
if (count === 0) return null;
|
|
10508
|
-
return /* @__PURE__ */
|
|
10509
|
-
/* @__PURE__ */
|
|
10510
|
-
/* @__PURE__ */
|
|
10511
|
-
/* @__PURE__ */
|
|
10512
|
-
cacheKeys.length > 0 && /* @__PURE__ */
|
|
10594
|
+
return /* @__PURE__ */ jsxs31(Stack26, { space: 2, children: [
|
|
10595
|
+
/* @__PURE__ */ jsxs31(Flex22, { align: "center", gap: 2, children: [
|
|
10596
|
+
/* @__PURE__ */ jsx40(SectionTitle, { children: "Remote cache hits" }),
|
|
10597
|
+
/* @__PURE__ */ jsx40(Text34, { size: 2, children: count }),
|
|
10598
|
+
cacheKeys.length > 0 && /* @__PURE__ */ jsx40(
|
|
10513
10599
|
Button5,
|
|
10514
10600
|
{
|
|
10515
10601
|
fontSize: 1,
|
|
@@ -10521,11 +10607,11 @@ function CacheTelemetry({
|
|
|
10521
10607
|
}
|
|
10522
10608
|
)
|
|
10523
10609
|
] }),
|
|
10524
|
-
expanded && cacheKeys.length > 0 && /* @__PURE__ */
|
|
10610
|
+
expanded && cacheKeys.length > 0 && /* @__PURE__ */ jsx40(Stack26, { space: 1, children: cacheKeys.map((k) => /* @__PURE__ */ jsx40(Text34, { size: 1, style: { fontFamily: "monospace" }, children: k }, k)) })
|
|
10525
10611
|
] });
|
|
10526
10612
|
}
|
|
10527
10613
|
function SectionTitle({ children }) {
|
|
10528
|
-
return /* @__PURE__ */
|
|
10614
|
+
return /* @__PURE__ */ jsx40(
|
|
10529
10615
|
Text34,
|
|
10530
10616
|
{
|
|
10531
10617
|
muted: true,
|
|
@@ -10541,29 +10627,29 @@ function SectionTitle({ children }) {
|
|
|
10541
10627
|
import {
|
|
10542
10628
|
Badge as Badge9,
|
|
10543
10629
|
Button as Button6,
|
|
10544
|
-
Card as
|
|
10545
|
-
Flex as
|
|
10630
|
+
Card as Card17,
|
|
10631
|
+
Flex as Flex23,
|
|
10546
10632
|
Grid as Grid4,
|
|
10547
10633
|
Inline as Inline2,
|
|
10548
|
-
Stack as
|
|
10634
|
+
Stack as Stack27,
|
|
10549
10635
|
Text as Text35
|
|
10550
10636
|
} from "@sanity/ui";
|
|
10551
10637
|
import { useState as useState20 } from "react";
|
|
10552
|
-
import { jsx as
|
|
10638
|
+
import { jsx as jsx41, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
10553
10639
|
var TASK_IDS_INLINE_THRESHOLD = 3;
|
|
10554
10640
|
function ProvenanceCard({ provenance }) {
|
|
10555
|
-
return /* @__PURE__ */
|
|
10556
|
-
/* @__PURE__ */
|
|
10557
|
-
/* @__PURE__ */
|
|
10558
|
-
provenance.classification && /* @__PURE__ */
|
|
10559
|
-
provenance.owner?.team && provenance.owner.team !== "unknown" && /* @__PURE__ */
|
|
10641
|
+
return /* @__PURE__ */ jsx41(Card17, { padding: 4, radius: 2, shadow: 1, children: /* @__PURE__ */ jsxs32(Stack27, { space: 4, children: [
|
|
10642
|
+
/* @__PURE__ */ jsxs32(Flex23, { align: "center", gap: 3, wrap: "wrap", children: [
|
|
10643
|
+
/* @__PURE__ */ jsx41(Text35, { size: 3, weight: "semibold", children: "Provenance" }),
|
|
10644
|
+
provenance.classification && /* @__PURE__ */ jsx41(ClassificationBadge, { value: provenance.classification }),
|
|
10645
|
+
provenance.owner?.team && provenance.owner.team !== "unknown" && /* @__PURE__ */ jsxs32(Badge9, { fontSize: 1, mode: "outline", tone: "primary", children: [
|
|
10560
10646
|
"Team: ",
|
|
10561
10647
|
provenance.owner.team
|
|
10562
10648
|
] }),
|
|
10563
|
-
provenance.executor && /* @__PURE__ */
|
|
10649
|
+
provenance.executor && /* @__PURE__ */ jsx41(ExecutorBadge, { executor: provenance.executor })
|
|
10564
10650
|
] }),
|
|
10565
|
-
provenance.purpose && /* @__PURE__ */
|
|
10566
|
-
/* @__PURE__ */
|
|
10651
|
+
provenance.purpose && /* @__PURE__ */ jsx41(Card17, { border: true, padding: 3, radius: 2, tone: "transparent", children: /* @__PURE__ */ jsxs32(Stack27, { space: 2, children: [
|
|
10652
|
+
/* @__PURE__ */ jsx41(
|
|
10567
10653
|
Text35,
|
|
10568
10654
|
{
|
|
10569
10655
|
muted: true,
|
|
@@ -10576,28 +10662,28 @@ function ProvenanceCard({ provenance }) {
|
|
|
10576
10662
|
children: "Purpose"
|
|
10577
10663
|
}
|
|
10578
10664
|
),
|
|
10579
|
-
/* @__PURE__ */
|
|
10665
|
+
/* @__PURE__ */ jsx41(Text35, { size: 2, children: provenance.purpose })
|
|
10580
10666
|
] }) }),
|
|
10581
|
-
provenance.labels && provenance.labels.length > 0 && /* @__PURE__ */
|
|
10582
|
-
/* @__PURE__ */
|
|
10583
|
-
/* @__PURE__ */
|
|
10584
|
-
/* @__PURE__ */
|
|
10585
|
-
/* @__PURE__ */
|
|
10667
|
+
provenance.labels && provenance.labels.length > 0 && /* @__PURE__ */ jsx41(Inline2, { space: 2, children: provenance.labels.map((label) => /* @__PURE__ */ jsx41(Badge9, { fontSize: 1, mode: "outline", tone: "default", children: label }, label)) }),
|
|
10668
|
+
/* @__PURE__ */ jsxs32(Grid4, { columns: [1, 2, 3], gap: 4, children: [
|
|
10669
|
+
/* @__PURE__ */ jsx41(Field, { label: "Mode", value: provenance.mode }),
|
|
10670
|
+
/* @__PURE__ */ jsx41(Field, { label: "Source", value: provenance.source.name }),
|
|
10671
|
+
/* @__PURE__ */ jsx41(
|
|
10586
10672
|
Field,
|
|
10587
10673
|
{
|
|
10588
10674
|
label: "Trigger",
|
|
10589
10675
|
value: provenance.trigger.type + (provenance.trigger.workflow ? ` (${provenance.trigger.workflow})` : "")
|
|
10590
10676
|
}
|
|
10591
10677
|
),
|
|
10592
|
-
/* @__PURE__ */
|
|
10678
|
+
/* @__PURE__ */ jsx41(
|
|
10593
10679
|
Field,
|
|
10594
10680
|
{
|
|
10595
10681
|
label: "Models",
|
|
10596
10682
|
value: provenance.models.map((m) => m.label).join(", ")
|
|
10597
10683
|
}
|
|
10598
10684
|
),
|
|
10599
|
-
/* @__PURE__ */
|
|
10600
|
-
provenance.contextHash && /* @__PURE__ */
|
|
10685
|
+
/* @__PURE__ */ jsx41(Field, { label: "Grader Model", mono: true, value: provenance.graderModel }),
|
|
10686
|
+
provenance.contextHash && /* @__PURE__ */ jsx41(
|
|
10601
10687
|
Field,
|
|
10602
10688
|
{
|
|
10603
10689
|
label: "Context Hash",
|
|
@@ -10605,24 +10691,24 @@ function ProvenanceCard({ provenance }) {
|
|
|
10605
10691
|
value: provenance.contextHash.slice(0, 16) + "\u2026"
|
|
10606
10692
|
}
|
|
10607
10693
|
),
|
|
10608
|
-
provenance.owner?.individual && /* @__PURE__ */
|
|
10694
|
+
provenance.owner?.individual && /* @__PURE__ */ jsx41(
|
|
10609
10695
|
Field,
|
|
10610
10696
|
{
|
|
10611
10697
|
label: "Owner (individual)",
|
|
10612
10698
|
value: provenance.owner.individual
|
|
10613
10699
|
}
|
|
10614
10700
|
),
|
|
10615
|
-
provenance.areas.length > 0 && /* @__PURE__ */
|
|
10616
|
-
provenance.taskIds && provenance.taskIds.length > 0 && /* @__PURE__ */
|
|
10701
|
+
provenance.areas.length > 0 && /* @__PURE__ */ jsx41(Field, { label: "Areas", value: provenance.areas.join(", ") }),
|
|
10702
|
+
provenance.taskIds && provenance.taskIds.length > 0 && /* @__PURE__ */ jsx41(TaskIdsField, { taskIds: provenance.taskIds })
|
|
10617
10703
|
] }),
|
|
10618
|
-
provenance.git && /* @__PURE__ */
|
|
10619
|
-
/* @__PURE__ */
|
|
10620
|
-
/* @__PURE__ */
|
|
10704
|
+
provenance.git && /* @__PURE__ */ jsx41(GitInfo, { git: provenance.git }),
|
|
10705
|
+
/* @__PURE__ */ jsx41(ToolHostFooter, { tool: provenance.tool, host: provenance.host }),
|
|
10706
|
+
/* @__PURE__ */ jsx41(PromptfooLinks, { provenance })
|
|
10621
10707
|
] }) });
|
|
10622
10708
|
}
|
|
10623
10709
|
function ClassificationBadge({ value }) {
|
|
10624
10710
|
const tone = classificationTone(value);
|
|
10625
|
-
return /* @__PURE__ */
|
|
10711
|
+
return /* @__PURE__ */ jsx41(Badge9, { fontSize: 1, tone, children: value });
|
|
10626
10712
|
}
|
|
10627
10713
|
function classificationTone(value) {
|
|
10628
10714
|
switch (value) {
|
|
@@ -10644,14 +10730,14 @@ function ExecutorBadge({
|
|
|
10644
10730
|
}) {
|
|
10645
10731
|
if (executor.type === "system") {
|
|
10646
10732
|
const workflowSuffix = executor.workflow ? ` \xB7 ${executor.workflow}` : "";
|
|
10647
|
-
return /* @__PURE__ */
|
|
10733
|
+
return /* @__PURE__ */ jsxs32(Badge9, { fontSize: 1, mode: "outline", children: [
|
|
10648
10734
|
executor.name ?? "system",
|
|
10649
10735
|
workflowSuffix
|
|
10650
10736
|
] });
|
|
10651
10737
|
}
|
|
10652
10738
|
const name = executor.name ?? executor.githubActor ?? "anonymous";
|
|
10653
10739
|
const surface = executor.surface ? ` \xB7 ${executor.surface}` : "";
|
|
10654
|
-
return /* @__PURE__ */
|
|
10740
|
+
return /* @__PURE__ */ jsxs32(Badge9, { fontSize: 1, mode: "outline", children: [
|
|
10655
10741
|
name,
|
|
10656
10742
|
surface
|
|
10657
10743
|
] });
|
|
@@ -10668,15 +10754,15 @@ function ToolHostFooter({
|
|
|
10668
10754
|
}
|
|
10669
10755
|
if (host?.ci) parts.push(`ci:${host.ci}`);
|
|
10670
10756
|
if (parts.length === 0) return null;
|
|
10671
|
-
return /* @__PURE__ */
|
|
10757
|
+
return /* @__PURE__ */ jsx41(Text35, { muted: true, size: 1, style: { fontFamily: "monospace" }, children: parts.join(" \xB7 ") });
|
|
10672
10758
|
}
|
|
10673
10759
|
function Field({
|
|
10674
10760
|
label,
|
|
10675
10761
|
mono,
|
|
10676
10762
|
value
|
|
10677
10763
|
}) {
|
|
10678
|
-
return /* @__PURE__ */
|
|
10679
|
-
/* @__PURE__ */
|
|
10764
|
+
return /* @__PURE__ */ jsxs32(Stack27, { space: 1, children: [
|
|
10765
|
+
/* @__PURE__ */ jsx41(
|
|
10680
10766
|
Text35,
|
|
10681
10767
|
{
|
|
10682
10768
|
muted: true,
|
|
@@ -10686,7 +10772,7 @@ function Field({
|
|
|
10686
10772
|
children: label
|
|
10687
10773
|
}
|
|
10688
10774
|
),
|
|
10689
|
-
/* @__PURE__ */
|
|
10775
|
+
/* @__PURE__ */ jsx41(Text35, { size: 2, style: mono ? { fontFamily: "monospace" } : void 0, children: value })
|
|
10690
10776
|
] });
|
|
10691
10777
|
}
|
|
10692
10778
|
function TaskIdsField({ taskIds }) {
|
|
@@ -10694,9 +10780,9 @@ function TaskIdsField({ taskIds }) {
|
|
|
10694
10780
|
const count = taskIds.length;
|
|
10695
10781
|
const needsToggle = count > TASK_IDS_INLINE_THRESHOLD;
|
|
10696
10782
|
const showList = !needsToggle || expanded;
|
|
10697
|
-
return /* @__PURE__ */
|
|
10698
|
-
/* @__PURE__ */
|
|
10699
|
-
/* @__PURE__ */
|
|
10783
|
+
return /* @__PURE__ */ jsxs32(Stack27, { space: 1, children: [
|
|
10784
|
+
/* @__PURE__ */ jsxs32(Flex23, { align: "center", gap: 2, children: [
|
|
10785
|
+
/* @__PURE__ */ jsx41(
|
|
10700
10786
|
Text35,
|
|
10701
10787
|
{
|
|
10702
10788
|
muted: true,
|
|
@@ -10709,14 +10795,14 @@ function TaskIdsField({ taskIds }) {
|
|
|
10709
10795
|
children: "Tasks"
|
|
10710
10796
|
}
|
|
10711
10797
|
),
|
|
10712
|
-
/* @__PURE__ */
|
|
10798
|
+
/* @__PURE__ */ jsxs32(Text35, { muted: true, size: 1, children: [
|
|
10713
10799
|
"(",
|
|
10714
10800
|
count,
|
|
10715
10801
|
")"
|
|
10716
10802
|
] })
|
|
10717
10803
|
] }),
|
|
10718
|
-
showList && /* @__PURE__ */
|
|
10719
|
-
needsToggle && /* @__PURE__ */
|
|
10804
|
+
showList && /* @__PURE__ */ jsx41(Stack27, { space: 1, children: taskIds.map((id) => /* @__PURE__ */ jsx41(Text35, { size: 2, style: { fontFamily: "monospace" }, children: id }, id)) }),
|
|
10805
|
+
needsToggle && /* @__PURE__ */ jsx41(
|
|
10720
10806
|
Button6,
|
|
10721
10807
|
{
|
|
10722
10808
|
fontSize: 1,
|
|
@@ -10733,15 +10819,15 @@ function GitInfo({ git }) {
|
|
|
10733
10819
|
const branchUrl = `${repoUrl}/tree/${git.branch}`;
|
|
10734
10820
|
const commitUrl = `${repoUrl}/commit/${git.sha}`;
|
|
10735
10821
|
const prUrl = git.prNumber ? `${repoUrl}/pull/${git.prNumber}` : null;
|
|
10736
|
-
return /* @__PURE__ */
|
|
10737
|
-
/* @__PURE__ */
|
|
10738
|
-
/* @__PURE__ */
|
|
10739
|
-
/* @__PURE__ */
|
|
10822
|
+
return /* @__PURE__ */ jsx41(Card17, { border: true, padding: 3, radius: 2, tone: "transparent", children: /* @__PURE__ */ jsxs32(Flex23, { align: "center", gap: 3, wrap: "wrap", children: [
|
|
10823
|
+
/* @__PURE__ */ jsx41(Text35, { muted: true, size: 2, weight: "semibold", children: "Git" }),
|
|
10824
|
+
/* @__PURE__ */ jsxs32(Text35, { size: 2, children: [
|
|
10825
|
+
/* @__PURE__ */ jsx41("a", { href: repoUrl, rel: "noopener noreferrer", target: "_blank", children: git.repo }),
|
|
10740
10826
|
" / ",
|
|
10741
|
-
/* @__PURE__ */
|
|
10827
|
+
/* @__PURE__ */ jsx41("a", { href: branchUrl, rel: "noopener noreferrer", target: "_blank", children: git.branch })
|
|
10742
10828
|
] }),
|
|
10743
|
-
/* @__PURE__ */
|
|
10744
|
-
prUrl && /* @__PURE__ */
|
|
10829
|
+
/* @__PURE__ */ jsx41(Text35, { muted: true, size: 2, style: { fontFamily: "monospace" }, children: /* @__PURE__ */ jsx41("a", { href: commitUrl, rel: "noopener noreferrer", target: "_blank", children: git.sha.slice(0, 12) }) }),
|
|
10830
|
+
prUrl && /* @__PURE__ */ jsx41(Text35, { size: 2, children: /* @__PURE__ */ jsxs32("a", { href: prUrl, rel: "noopener noreferrer", target: "_blank", children: [
|
|
10745
10831
|
"PR #",
|
|
10746
10832
|
git.prNumber,
|
|
10747
10833
|
" \u2192"
|
|
@@ -10752,14 +10838,14 @@ function PromptfooLinks({
|
|
|
10752
10838
|
provenance
|
|
10753
10839
|
}) {
|
|
10754
10840
|
if (provenance.promptfooUrls && provenance.promptfooUrls.length > 0) {
|
|
10755
|
-
return /* @__PURE__ */
|
|
10841
|
+
return /* @__PURE__ */ jsx41(Flex23, { align: "center", gap: 3, wrap: "wrap", children: provenance.promptfooUrls.map((entry) => /* @__PURE__ */ jsx41(Text35, { size: 2, children: /* @__PURE__ */ jsxs32("a", { href: entry.url, rel: "noopener noreferrer", target: "_blank", children: [
|
|
10756
10842
|
"View in Promptfoo (",
|
|
10757
10843
|
entry.mode,
|
|
10758
10844
|
") \u2192"
|
|
10759
10845
|
] }) }, entry.mode)) });
|
|
10760
10846
|
}
|
|
10761
10847
|
if (provenance.promptfooUrl) {
|
|
10762
|
-
return /* @__PURE__ */
|
|
10848
|
+
return /* @__PURE__ */ jsx41(Text35, { size: 2, children: /* @__PURE__ */ jsx41(
|
|
10763
10849
|
"a",
|
|
10764
10850
|
{
|
|
10765
10851
|
href: provenance.promptfooUrl,
|
|
@@ -10769,26 +10855,47 @@ function PromptfooLinks({
|
|
|
10769
10855
|
}
|
|
10770
10856
|
) });
|
|
10771
10857
|
}
|
|
10772
|
-
return /* @__PURE__ */
|
|
10858
|
+
return /* @__PURE__ */ jsx41(PromptfooUnavailable, { reason: "not-shared" });
|
|
10773
10859
|
}
|
|
10774
10860
|
var UNAVAILABLE_TOOLTIPS = {
|
|
10775
10861
|
"not-shared": "No Promptfoo share link was generated for this report. This usually means the evaluation was run locally without the --share flag."
|
|
10776
10862
|
};
|
|
10777
10863
|
function PromptfooUnavailable({ reason }) {
|
|
10778
|
-
return /* @__PURE__ */
|
|
10779
|
-
/* @__PURE__ */
|
|
10780
|
-
/* @__PURE__ */
|
|
10864
|
+
return /* @__PURE__ */ jsxs32(Flex23, { align: "center", gap: 2, children: [
|
|
10865
|
+
/* @__PURE__ */ jsx41(Text35, { muted: true, size: 2, children: "Promptfoo report not available" }),
|
|
10866
|
+
/* @__PURE__ */ jsx41(InfoTip, { text: UNAVAILABLE_TOOLTIPS[reason] ?? "" })
|
|
10781
10867
|
] });
|
|
10782
10868
|
}
|
|
10783
10869
|
|
|
10784
10870
|
// src/components/report-detail/RecommendationsSection.tsx
|
|
10785
10871
|
import React3 from "react";
|
|
10786
10872
|
import { BoltIcon } from "@sanity/icons";
|
|
10787
|
-
import { Box as
|
|
10873
|
+
import { Box as Box26, Card as Card18, Flex as Flex24, Stack as Stack28, Text as Text37 } from "@sanity/ui";
|
|
10874
|
+
|
|
10875
|
+
// src/components/primitives/InlineCode.tsx
|
|
10876
|
+
import { Fragment as Fragment12, jsx as jsx42 } from "react/jsx-runtime";
|
|
10877
|
+
function InlineCode({ text }) {
|
|
10878
|
+
const parts = text.split(/`([^`]+)`/);
|
|
10879
|
+
return /* @__PURE__ */ jsx42(Fragment12, { children: parts.map(
|
|
10880
|
+
(part, i) => i % 2 === 1 ? /* @__PURE__ */ jsx42(
|
|
10881
|
+
"code",
|
|
10882
|
+
{
|
|
10883
|
+
style: {
|
|
10884
|
+
background: "var(--card-code-bg-color, rgba(0,0,0,0.05))",
|
|
10885
|
+
borderRadius: 3,
|
|
10886
|
+
fontSize: "0.9em",
|
|
10887
|
+
padding: "1px 4px"
|
|
10888
|
+
},
|
|
10889
|
+
children: part
|
|
10890
|
+
},
|
|
10891
|
+
i
|
|
10892
|
+
) : /* @__PURE__ */ jsx42("span", { children: part }, i)
|
|
10893
|
+
) });
|
|
10894
|
+
}
|
|
10788
10895
|
|
|
10789
10896
|
// src/components/report-detail/failure-mode-styling.tsx
|
|
10790
10897
|
import { Text as Text36 } from "@sanity/ui";
|
|
10791
|
-
import { jsx as
|
|
10898
|
+
import { jsx as jsx43, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
10792
10899
|
var FAILURE_MODE_COLORS = {
|
|
10793
10900
|
// Literacy taxonomy
|
|
10794
10901
|
"missing-docs": { bg: "rgba(239,68,68,0.2)", text: "#f87171" },
|
|
@@ -10848,8 +10955,8 @@ var fmLabel = {
|
|
|
10848
10955
|
function failureModeTip(mode) {
|
|
10849
10956
|
const desc = FAILURE_MODE_DESCS[mode];
|
|
10850
10957
|
if (!desc) return GLOSSARY.failureMode;
|
|
10851
|
-
return /* @__PURE__ */
|
|
10852
|
-
/* @__PURE__ */
|
|
10958
|
+
return /* @__PURE__ */ jsxs33(Text36, { size: 2, style: { lineHeight: 1.5 }, children: [
|
|
10959
|
+
/* @__PURE__ */ jsx43("span", { style: fmLabel, children: mode }),
|
|
10853
10960
|
" \u2014 ",
|
|
10854
10961
|
desc
|
|
10855
10962
|
] });
|
|
@@ -10858,10 +10965,10 @@ function confidenceTip(level) {
|
|
|
10858
10965
|
const desc = CONFIDENCE_DESCS[level];
|
|
10859
10966
|
if (!desc) return GLOSSARY.confidence;
|
|
10860
10967
|
const icons = { high: "\u{1F7E2}", medium: "\u{1F7E1}", low: "\u{1F534}" };
|
|
10861
|
-
return /* @__PURE__ */
|
|
10968
|
+
return /* @__PURE__ */ jsxs33(Text36, { size: 2, style: { lineHeight: 1.5 }, children: [
|
|
10862
10969
|
icons[level],
|
|
10863
10970
|
" ",
|
|
10864
|
-
/* @__PURE__ */
|
|
10971
|
+
/* @__PURE__ */ jsxs33("span", { style: fmLabel, children: [
|
|
10865
10972
|
level,
|
|
10866
10973
|
" confidence"
|
|
10867
10974
|
] }),
|
|
@@ -10877,18 +10984,16 @@ function failureModeColor(mode) {
|
|
|
10877
10984
|
}
|
|
10878
10985
|
|
|
10879
10986
|
// src/components/report-detail/RecommendationsSection.tsx
|
|
10880
|
-
import { jsx as
|
|
10987
|
+
import { jsx as jsx44, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
10881
10988
|
var ACTION_CARD_TYPES = /* @__PURE__ */ new Set([
|
|
10882
10989
|
"top-recommendations",
|
|
10883
10990
|
"low-confidence-attribution",
|
|
10884
10991
|
"doc-attribution-spotlight",
|
|
10885
10992
|
"regression-vs-baseline"
|
|
10886
10993
|
]);
|
|
10887
|
-
var
|
|
10888
|
-
|
|
10889
|
-
|
|
10890
|
-
WebkitBoxOrient: "vertical",
|
|
10891
|
-
overflow: "hidden"
|
|
10994
|
+
var WRAPPED_PROSE = {
|
|
10995
|
+
overflowWrap: "anywhere",
|
|
10996
|
+
wordBreak: "break-word"
|
|
10892
10997
|
};
|
|
10893
10998
|
var PRIORITY_COLORS = {
|
|
10894
10999
|
high: { bg: "rgba(239,68,68,0.2)", text: "#f87171" },
|
|
@@ -10896,53 +11001,57 @@ var PRIORITY_COLORS = {
|
|
|
10896
11001
|
low: { bg: "rgba(107,114,128,0.2)", text: "#9ca3af" }
|
|
10897
11002
|
};
|
|
10898
11003
|
function renderTopRecommendations(body, _meta) {
|
|
10899
|
-
return /* @__PURE__ */
|
|
10900
|
-
/* @__PURE__ */
|
|
10901
|
-
/* @__PURE__ */
|
|
10902
|
-
/* @__PURE__ */
|
|
11004
|
+
return /* @__PURE__ */ jsx44(Card18, { padding: 3, radius: 2, tone: "default", children: /* @__PURE__ */ jsxs34(Stack28, { space: 3, children: [
|
|
11005
|
+
/* @__PURE__ */ jsxs34(Flex24, { align: "center", gap: 2, children: [
|
|
11006
|
+
/* @__PURE__ */ jsx44(Text37, { size: 1, muted: true, weight: "semibold", children: "Top recommendations" }),
|
|
11007
|
+
/* @__PURE__ */ jsxs34(Text37, { size: 1, muted: true, children: [
|
|
10903
11008
|
"(",
|
|
10904
11009
|
body.suggestions.length,
|
|
10905
11010
|
")"
|
|
10906
11011
|
] })
|
|
10907
11012
|
] }),
|
|
10908
|
-
/* @__PURE__ */
|
|
10909
|
-
/* @__PURE__ */
|
|
11013
|
+
/* @__PURE__ */ jsx44(Text37, { size: 2, style: WRAPPED_PROSE, children: /* @__PURE__ */ jsx44(InlineCode, { text: body.summary }) }),
|
|
11014
|
+
/* @__PURE__ */ jsx44(Stack28, { space: 2, children: body.suggestions.map((s, i) => {
|
|
10910
11015
|
const colors = PRIORITY_COLORS[s.priority] ?? {
|
|
10911
11016
|
bg: "var(--card-muted-bg-color)",
|
|
10912
11017
|
text: "var(--card-muted-fg-color)"
|
|
10913
11018
|
};
|
|
10914
|
-
return /* @__PURE__ */
|
|
10915
|
-
|
|
11019
|
+
return /* @__PURE__ */ jsx44(
|
|
11020
|
+
Box26,
|
|
10916
11021
|
{
|
|
10917
|
-
padding:
|
|
11022
|
+
padding: 3,
|
|
10918
11023
|
style: {
|
|
10919
11024
|
borderRadius: 4,
|
|
10920
11025
|
border: "1px solid var(--card-border-color)"
|
|
10921
11026
|
},
|
|
10922
|
-
children: /* @__PURE__ */
|
|
10923
|
-
/* @__PURE__ */
|
|
10924
|
-
/* @__PURE__ */
|
|
11027
|
+
children: /* @__PURE__ */ jsxs34(Stack28, { space: 3, children: [
|
|
11028
|
+
/* @__PURE__ */ jsxs34(Flex24, { align: "flex-start", gap: 2, wrap: "wrap", children: [
|
|
11029
|
+
/* @__PURE__ */ jsx44(
|
|
10925
11030
|
"span",
|
|
10926
11031
|
{
|
|
10927
11032
|
style: {
|
|
10928
11033
|
backgroundColor: colors.bg,
|
|
10929
11034
|
borderRadius: 4,
|
|
10930
11035
|
color: colors.text,
|
|
10931
|
-
|
|
11036
|
+
flexShrink: 0,
|
|
11037
|
+
fontSize: 11,
|
|
10932
11038
|
fontWeight: 600,
|
|
11039
|
+
letterSpacing: 0.4,
|
|
10933
11040
|
padding: "2px 6px",
|
|
10934
11041
|
textTransform: "uppercase"
|
|
10935
11042
|
},
|
|
10936
11043
|
children: s.priority
|
|
10937
11044
|
}
|
|
10938
11045
|
),
|
|
10939
|
-
/* @__PURE__ */
|
|
11046
|
+
/* @__PURE__ */ jsx44(Text37, { size: 2, weight: "semibold", style: WRAPPED_PROSE, children: s.title })
|
|
10940
11047
|
] }),
|
|
10941
|
-
/* @__PURE__ */
|
|
10942
|
-
/* @__PURE__ */
|
|
10943
|
-
|
|
10944
|
-
|
|
10945
|
-
|
|
11048
|
+
/* @__PURE__ */ jsx44(Text37, { size: 2, muted: true, style: WRAPPED_PROSE, children: /* @__PURE__ */ jsx44(InlineCode, { text: s.body }) }),
|
|
11049
|
+
/* @__PURE__ */ jsx44(Text37, { size: 1, muted: true, style: WRAPPED_PROSE, children: /* @__PURE__ */ jsx44(
|
|
11050
|
+
InlineCode,
|
|
11051
|
+
{
|
|
11052
|
+
text: s.docSlug + (s.sectionHeading !== null ? ` \xB7 ${s.sectionHeading}` : "")
|
|
11053
|
+
}
|
|
11054
|
+
) })
|
|
10946
11055
|
] })
|
|
10947
11056
|
},
|
|
10948
11057
|
`sugg-${i}`
|
|
@@ -10951,17 +11060,17 @@ function renderTopRecommendations(body, _meta) {
|
|
|
10951
11060
|
] }) });
|
|
10952
11061
|
}
|
|
10953
11062
|
function renderLowConfidenceAttribution(body, _meta) {
|
|
10954
|
-
return /* @__PURE__ */
|
|
10955
|
-
/* @__PURE__ */
|
|
10956
|
-
/* @__PURE__ */
|
|
10957
|
-
/* @__PURE__ */
|
|
11063
|
+
return /* @__PURE__ */ jsx44(Card18, { padding: 3, radius: 2, tone: "default", children: /* @__PURE__ */ jsxs34(Stack28, { space: 2, children: [
|
|
11064
|
+
/* @__PURE__ */ jsxs34(Flex24, { align: "center", gap: 2, children: [
|
|
11065
|
+
/* @__PURE__ */ jsx44(Text37, { size: 1, muted: true, weight: "semibold", children: "Low-confidence attribution" }),
|
|
11066
|
+
/* @__PURE__ */ jsxs34(Text37, { size: 1, muted: true, children: [
|
|
10958
11067
|
"(",
|
|
10959
11068
|
body.judgmentRefs.length,
|
|
10960
11069
|
")"
|
|
10961
11070
|
] })
|
|
10962
11071
|
] }),
|
|
10963
|
-
/* @__PURE__ */
|
|
10964
|
-
/* @__PURE__ */
|
|
11072
|
+
/* @__PURE__ */ jsx44(Text37, { size: 2, style: WRAPPED_PROSE, children: /* @__PURE__ */ jsx44(InlineCode, { text: body.summary }) }),
|
|
11073
|
+
/* @__PURE__ */ jsx44(Stack28, { space: 1, children: body.judgmentRefs.map((ref, i) => /* @__PURE__ */ jsxs34(Text37, { size: 1, muted: true, style: WRAPPED_PROSE, children: [
|
|
10965
11074
|
ref.taskId,
|
|
10966
11075
|
" \xB7 ",
|
|
10967
11076
|
ref.modelId,
|
|
@@ -10971,35 +11080,35 @@ function renderLowConfidenceAttribution(body, _meta) {
|
|
|
10971
11080
|
] }) });
|
|
10972
11081
|
}
|
|
10973
11082
|
function renderDocAttributionSpotlight(body, _meta) {
|
|
10974
|
-
return /* @__PURE__ */
|
|
10975
|
-
/* @__PURE__ */
|
|
10976
|
-
/* @__PURE__ */
|
|
10977
|
-
/* @__PURE__ */
|
|
10978
|
-
/* @__PURE__ */
|
|
10979
|
-
/* @__PURE__ */
|
|
10980
|
-
/* @__PURE__ */
|
|
11083
|
+
return /* @__PURE__ */ jsx44(Card18, { padding: 3, radius: 2, tone: "default", children: /* @__PURE__ */ jsxs34(Stack28, { space: 2, children: [
|
|
11084
|
+
/* @__PURE__ */ jsx44(Text37, { size: 1, muted: true, weight: "semibold", children: "Doc attribution spotlight" }),
|
|
11085
|
+
/* @__PURE__ */ jsx44(Text37, { size: 2, style: WRAPPED_PROSE, children: /* @__PURE__ */ jsx44(InlineCode, { text: body.summary }) }),
|
|
11086
|
+
/* @__PURE__ */ jsx44(Stack28, { space: 1, children: body.docCitations.map((c, i) => /* @__PURE__ */ jsxs34(Flex24, { align: "center", gap: 2, wrap: "wrap", children: [
|
|
11087
|
+
/* @__PURE__ */ jsx44(Text37, { size: 2, style: WRAPPED_PROSE, children: c.docSlug }),
|
|
11088
|
+
/* @__PURE__ */ jsx44(Text37, { size: 1, muted: true, children: c.role }),
|
|
11089
|
+
/* @__PURE__ */ jsx44(HoverTip, { text: confidenceTip(c.confidence.level), children: /* @__PURE__ */ jsx44(Text37, { size: 1, muted: true, children: c.confidence.level }) })
|
|
10981
11090
|
] }, `doc-${i}`)) })
|
|
10982
11091
|
] }) });
|
|
10983
11092
|
}
|
|
10984
11093
|
function renderRegressionVsBaseline(body, _meta) {
|
|
10985
|
-
return /* @__PURE__ */
|
|
10986
|
-
/* @__PURE__ */
|
|
10987
|
-
/* @__PURE__ */
|
|
10988
|
-
/* @__PURE__ */
|
|
11094
|
+
return /* @__PURE__ */ jsx44(Card18, { padding: 3, radius: 2, tone: "default", children: /* @__PURE__ */ jsxs34(Stack28, { space: 2, children: [
|
|
11095
|
+
/* @__PURE__ */ jsxs34(Flex24, { align: "center", gap: 2, children: [
|
|
11096
|
+
/* @__PURE__ */ jsx44(Text37, { size: 1, muted: true, weight: "semibold", children: "Regression vs baseline" }),
|
|
11097
|
+
/* @__PURE__ */ jsxs34(Text37, { size: 1, muted: true, children: [
|
|
10989
11098
|
"(",
|
|
10990
11099
|
body.overallTrend,
|
|
10991
11100
|
")"
|
|
10992
11101
|
] })
|
|
10993
11102
|
] }),
|
|
10994
|
-
/* @__PURE__ */
|
|
10995
|
-
/* @__PURE__ */
|
|
11103
|
+
/* @__PURE__ */ jsx44(Text37, { size: 2, style: WRAPPED_PROSE, children: /* @__PURE__ */ jsx44(InlineCode, { text: body.summary }) }),
|
|
11104
|
+
/* @__PURE__ */ jsx44(Stack28, { space: 1, children: body.deltas.map((d, i) => {
|
|
10996
11105
|
const arrow = d.direction === "improved" ? "\u2191" : d.direction === "regressed" ? "\u2193" : "\u2192";
|
|
10997
11106
|
const deltaColor = d.pointsDelta > 0 ? "#34d399" : d.pointsDelta < 0 ? "#f87171" : "var(--card-muted-fg-color)";
|
|
10998
11107
|
const driverPreview = d.drivers[0] ?? "";
|
|
10999
11108
|
const colors = failureModeColor(driverPreview);
|
|
11000
|
-
return /* @__PURE__ */
|
|
11001
|
-
/* @__PURE__ */
|
|
11002
|
-
/* @__PURE__ */
|
|
11109
|
+
return /* @__PURE__ */ jsxs34(Flex24, { align: "center", gap: 2, children: [
|
|
11110
|
+
/* @__PURE__ */ jsx44(Text37, { size: 2, weight: "medium", children: d.area }),
|
|
11111
|
+
/* @__PURE__ */ jsxs34(
|
|
11003
11112
|
"span",
|
|
11004
11113
|
{
|
|
11005
11114
|
style: {
|
|
@@ -11016,7 +11125,7 @@ function renderRegressionVsBaseline(body, _meta) {
|
|
|
11016
11125
|
]
|
|
11017
11126
|
}
|
|
11018
11127
|
),
|
|
11019
|
-
driverPreview && /* @__PURE__ */
|
|
11128
|
+
driverPreview && /* @__PURE__ */ jsx44(
|
|
11020
11129
|
"span",
|
|
11021
11130
|
{
|
|
11022
11131
|
style: {
|
|
@@ -11034,7 +11143,7 @@ function renderRegressionVsBaseline(body, _meta) {
|
|
|
11034
11143
|
] }) });
|
|
11035
11144
|
}
|
|
11036
11145
|
function renderDegradedCard(card) {
|
|
11037
|
-
return /* @__PURE__ */
|
|
11146
|
+
return /* @__PURE__ */ jsx44(Card18, { padding: 2, radius: 2, tone: "caution", children: /* @__PURE__ */ jsxs34(Text37, { size: 1, muted: true, children: [
|
|
11038
11147
|
"Card unavailable: ",
|
|
11039
11148
|
card.cardType,
|
|
11040
11149
|
" (",
|
|
@@ -11051,26 +11160,26 @@ function RecommendationsSection(props) {
|
|
|
11051
11160
|
(c) => (c.status === "ready" || c.status === "degraded") && ACTION_CARD_TYPES.has(c.cardType)
|
|
11052
11161
|
);
|
|
11053
11162
|
if (matched.length === 0) return null;
|
|
11054
|
-
return /* @__PURE__ */
|
|
11055
|
-
/* @__PURE__ */
|
|
11056
|
-
/* @__PURE__ */
|
|
11057
|
-
/* @__PURE__ */
|
|
11163
|
+
return /* @__PURE__ */ jsx44(Card18, { padding: 4, radius: 2, shadow: 1, style: neutralCardStyle, children: /* @__PURE__ */ jsxs34(Stack28, { space: 4, children: [
|
|
11164
|
+
/* @__PURE__ */ jsxs34(Flex24, { align: "center", gap: 2, children: [
|
|
11165
|
+
/* @__PURE__ */ jsx44(BoltIcon, { style: { color: "#fbbf24" } }),
|
|
11166
|
+
/* @__PURE__ */ jsx44(Text37, { size: 2, weight: "semibold", children: "Recommendations" })
|
|
11058
11167
|
] }),
|
|
11059
|
-
/* @__PURE__ */
|
|
11060
|
-
/* @__PURE__ */
|
|
11168
|
+
/* @__PURE__ */ jsx44(Box26, { style: dividerStyle }),
|
|
11169
|
+
/* @__PURE__ */ jsx44(Stack28, { space: 3, children: matched.map((card, idx) => {
|
|
11061
11170
|
const key = `action-${idx}`;
|
|
11062
11171
|
if (card.status === "degraded") {
|
|
11063
|
-
return /* @__PURE__ */
|
|
11172
|
+
return /* @__PURE__ */ jsx44(React3.Fragment, { children: renderDegradedCard(card) }, key);
|
|
11064
11173
|
}
|
|
11065
11174
|
switch (card.cardType) {
|
|
11066
11175
|
case "top-recommendations":
|
|
11067
|
-
return /* @__PURE__ */
|
|
11176
|
+
return /* @__PURE__ */ jsx44(React3.Fragment, { children: renderTopRecommendations(card.body, card.meta) }, key);
|
|
11068
11177
|
case "low-confidence-attribution":
|
|
11069
|
-
return /* @__PURE__ */
|
|
11178
|
+
return /* @__PURE__ */ jsx44(React3.Fragment, { children: renderLowConfidenceAttribution(card.body, card.meta) }, key);
|
|
11070
11179
|
case "doc-attribution-spotlight":
|
|
11071
|
-
return /* @__PURE__ */
|
|
11180
|
+
return /* @__PURE__ */ jsx44(React3.Fragment, { children: renderDocAttributionSpotlight(card.body, card.meta) }, key);
|
|
11072
11181
|
case "regression-vs-baseline":
|
|
11073
|
-
return /* @__PURE__ */
|
|
11182
|
+
return /* @__PURE__ */ jsx44(React3.Fragment, { children: renderRegressionVsBaseline(card.body, card.meta) }, key);
|
|
11074
11183
|
default:
|
|
11075
11184
|
return null;
|
|
11076
11185
|
}
|
|
@@ -11080,7 +11189,7 @@ function RecommendationsSection(props) {
|
|
|
11080
11189
|
|
|
11081
11190
|
// src/components/report-detail/report-actions/ActionButton.tsx
|
|
11082
11191
|
import { Button as Button7, useToast as useToast2 } from "@sanity/ui";
|
|
11083
|
-
import { jsx as
|
|
11192
|
+
import { jsx as jsx45 } from "react/jsx-runtime";
|
|
11084
11193
|
|
|
11085
11194
|
// src/components/report-detail/report-actions/JudgmentActions.tsx
|
|
11086
11195
|
import { DocumentTextIcon, LinkIcon as LinkIcon3 } from "@sanity/icons";
|
|
@@ -11089,16 +11198,16 @@ import { useCallback as useCallback26 } from "react";
|
|
|
11089
11198
|
|
|
11090
11199
|
// src/components/report-detail/report-actions/SplitActionButton.tsx
|
|
11091
11200
|
import { ChevronDownIcon as ChevronDownIcon4 } from "@sanity/icons";
|
|
11092
|
-
import { Button as Button8, Flex as
|
|
11093
|
-
import { jsx as
|
|
11201
|
+
import { Button as Button8, Flex as Flex25, Menu as Menu2, MenuButton as MenuButton2 } from "@sanity/ui";
|
|
11202
|
+
import { jsx as jsx46, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
11094
11203
|
function SplitActionButton({
|
|
11095
11204
|
menu,
|
|
11096
11205
|
menuId,
|
|
11097
11206
|
placement = "bottom-end",
|
|
11098
11207
|
primary
|
|
11099
11208
|
}) {
|
|
11100
|
-
return /* @__PURE__ */
|
|
11101
|
-
/* @__PURE__ */
|
|
11209
|
+
return /* @__PURE__ */ jsxs35(Flex25, { children: [
|
|
11210
|
+
/* @__PURE__ */ jsx46(
|
|
11102
11211
|
Button8,
|
|
11103
11212
|
{
|
|
11104
11213
|
fontSize: primary.fontSize,
|
|
@@ -11115,10 +11224,10 @@ function SplitActionButton({
|
|
|
11115
11224
|
text: primary.text
|
|
11116
11225
|
}
|
|
11117
11226
|
),
|
|
11118
|
-
/* @__PURE__ */
|
|
11227
|
+
/* @__PURE__ */ jsx46(
|
|
11119
11228
|
MenuButton2,
|
|
11120
11229
|
{
|
|
11121
|
-
button: /* @__PURE__ */
|
|
11230
|
+
button: /* @__PURE__ */ jsx46(
|
|
11122
11231
|
Button8,
|
|
11123
11232
|
{
|
|
11124
11233
|
icon: ChevronDownIcon4,
|
|
@@ -11132,7 +11241,7 @@ function SplitActionButton({
|
|
|
11132
11241
|
}
|
|
11133
11242
|
),
|
|
11134
11243
|
id: menuId,
|
|
11135
|
-
menu: /* @__PURE__ */
|
|
11244
|
+
menu: /* @__PURE__ */ jsx46(Menu2, { children: menu }),
|
|
11136
11245
|
popover: { placement, portal: true }
|
|
11137
11246
|
}
|
|
11138
11247
|
)
|
|
@@ -11140,7 +11249,7 @@ function SplitActionButton({
|
|
|
11140
11249
|
}
|
|
11141
11250
|
|
|
11142
11251
|
// src/components/report-detail/report-actions/JudgmentActions.tsx
|
|
11143
|
-
import { Fragment as
|
|
11252
|
+
import { Fragment as Fragment13, jsx as jsx47, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
11144
11253
|
function JudgmentActions({ onShowPrompts } = {}) {
|
|
11145
11254
|
const toast = useToast3();
|
|
11146
11255
|
const handleCopyLink = useCallback26(() => {
|
|
@@ -11161,12 +11270,12 @@ function JudgmentActions({ onShowPrompts } = {}) {
|
|
|
11161
11270
|
}
|
|
11162
11271
|
);
|
|
11163
11272
|
}, [toast]);
|
|
11164
|
-
return /* @__PURE__ */
|
|
11273
|
+
return /* @__PURE__ */ jsx47(
|
|
11165
11274
|
SplitActionButton,
|
|
11166
11275
|
{
|
|
11167
|
-
menu: /* @__PURE__ */
|
|
11168
|
-
onShowPrompts && /* @__PURE__ */
|
|
11169
|
-
/* @__PURE__ */
|
|
11276
|
+
menu: /* @__PURE__ */ jsxs36(Fragment13, { children: [
|
|
11277
|
+
onShowPrompts && /* @__PURE__ */ jsxs36(Fragment13, { children: [
|
|
11278
|
+
/* @__PURE__ */ jsx47(
|
|
11170
11279
|
MenuItem2,
|
|
11171
11280
|
{
|
|
11172
11281
|
icon: DocumentTextIcon,
|
|
@@ -11174,9 +11283,9 @@ function JudgmentActions({ onShowPrompts } = {}) {
|
|
|
11174
11283
|
text: "Show prompts"
|
|
11175
11284
|
}
|
|
11176
11285
|
),
|
|
11177
|
-
/* @__PURE__ */
|
|
11286
|
+
/* @__PURE__ */ jsx47(MenuDivider2, {})
|
|
11178
11287
|
] }),
|
|
11179
|
-
/* @__PURE__ */
|
|
11288
|
+
/* @__PURE__ */ jsx47(MenuItem2, { icon: LinkIcon3, onClick: handleCopyLink, text: "Copy link" })
|
|
11180
11289
|
] }),
|
|
11181
11290
|
menuId: "judgment-actions-menu",
|
|
11182
11291
|
primary: {
|
|
@@ -11201,7 +11310,7 @@ import { ClipboardIcon } from "@sanity/icons";
|
|
|
11201
11310
|
import { MenuItem as MenuItem3, useToast as useToast4 } from "@sanity/ui";
|
|
11202
11311
|
import { useCallback as useCallback27, useState as useState21 } from "react";
|
|
11203
11312
|
import { useClient as useClient8 } from "sanity";
|
|
11204
|
-
import { jsx as
|
|
11313
|
+
import { jsx as jsx48 } from "react/jsx-runtime";
|
|
11205
11314
|
function CopyReportAction({ documentId }) {
|
|
11206
11315
|
const client = useClient8({ apiVersion: API_VERSION });
|
|
11207
11316
|
const toast = useToast4();
|
|
@@ -11238,7 +11347,7 @@ function CopyReportAction({ documentId }) {
|
|
|
11238
11347
|
setCopying(false);
|
|
11239
11348
|
}
|
|
11240
11349
|
}, [client, documentId, toast]);
|
|
11241
|
-
return /* @__PURE__ */
|
|
11350
|
+
return /* @__PURE__ */ jsx48(
|
|
11242
11351
|
MenuItem3,
|
|
11243
11352
|
{
|
|
11244
11353
|
disabled: copying,
|
|
@@ -11253,7 +11362,7 @@ function CopyReportAction({ documentId }) {
|
|
|
11253
11362
|
import { CopyIcon as CopyIcon2 } from "@sanity/icons";
|
|
11254
11363
|
import { MenuItem as MenuItem4, useToast as useToast5 } from "@sanity/ui";
|
|
11255
11364
|
import { useCallback as useCallback28 } from "react";
|
|
11256
|
-
import { jsx as
|
|
11365
|
+
import { jsx as jsx49 } from "react/jsx-runtime";
|
|
11257
11366
|
function CopyReportIdAction({ reportId }) {
|
|
11258
11367
|
const toast = useToast5();
|
|
11259
11368
|
const handleClick = useCallback28(() => {
|
|
@@ -11274,14 +11383,14 @@ function CopyReportIdAction({ reportId }) {
|
|
|
11274
11383
|
}
|
|
11275
11384
|
);
|
|
11276
11385
|
}, [reportId, toast]);
|
|
11277
|
-
return /* @__PURE__ */
|
|
11386
|
+
return /* @__PURE__ */ jsx49(MenuItem4, { icon: CopyIcon2, onClick: handleClick, text: "Copy report ID" });
|
|
11278
11387
|
}
|
|
11279
11388
|
|
|
11280
11389
|
// src/components/report-detail/report-actions/CopyVisionQueryAction.tsx
|
|
11281
11390
|
import { SearchIcon as SearchIcon7 } from "@sanity/icons";
|
|
11282
11391
|
import { MenuItem as MenuItem5, useToast as useToast6 } from "@sanity/ui";
|
|
11283
11392
|
import { useCallback as useCallback29 } from "react";
|
|
11284
|
-
import { jsx as
|
|
11393
|
+
import { jsx as jsx50 } from "react/jsx-runtime";
|
|
11285
11394
|
function CopyVisionQueryAction({
|
|
11286
11395
|
reportId
|
|
11287
11396
|
}) {
|
|
@@ -11306,7 +11415,7 @@ function CopyVisionQueryAction({
|
|
|
11306
11415
|
}
|
|
11307
11416
|
);
|
|
11308
11417
|
}, [reportId, toast]);
|
|
11309
|
-
return /* @__PURE__ */
|
|
11418
|
+
return /* @__PURE__ */ jsx50(
|
|
11310
11419
|
MenuItem5,
|
|
11311
11420
|
{
|
|
11312
11421
|
icon: SearchIcon7,
|
|
@@ -11317,24 +11426,24 @@ function CopyVisionQueryAction({
|
|
|
11317
11426
|
}
|
|
11318
11427
|
|
|
11319
11428
|
// src/components/report-detail/report-actions/DeleteConfirmDialog.tsx
|
|
11320
|
-
import { Box as
|
|
11321
|
-
import { jsx as
|
|
11429
|
+
import { Box as Box27, Button as Button9, Card as Card19, Dialog as Dialog2, Flex as Flex26, Stack as Stack29, Text as Text38 } from "@sanity/ui";
|
|
11430
|
+
import { jsx as jsx51, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
11322
11431
|
function DeleteConfirmDialog({
|
|
11323
11432
|
isDeleting,
|
|
11324
11433
|
onClose,
|
|
11325
11434
|
onConfirm,
|
|
11326
11435
|
reportId
|
|
11327
11436
|
}) {
|
|
11328
|
-
return /* @__PURE__ */
|
|
11437
|
+
return /* @__PURE__ */ jsx51(
|
|
11329
11438
|
Dialog2,
|
|
11330
11439
|
{
|
|
11331
11440
|
header: "Delete Report",
|
|
11332
11441
|
id: "delete-report-dialog",
|
|
11333
11442
|
onClose,
|
|
11334
11443
|
width: 1,
|
|
11335
|
-
children: /* @__PURE__ */
|
|
11336
|
-
/* @__PURE__ */
|
|
11337
|
-
/* @__PURE__ */
|
|
11444
|
+
children: /* @__PURE__ */ jsx51(Box27, { padding: 4, children: /* @__PURE__ */ jsxs37(Stack29, { space: 4, children: [
|
|
11445
|
+
/* @__PURE__ */ jsx51(Text38, { children: "Are you sure you want to delete this report? This action cannot be undone." }),
|
|
11446
|
+
/* @__PURE__ */ jsx51(Card19, { border: true, padding: 3, radius: 2, tone: "transparent", children: /* @__PURE__ */ jsx51(
|
|
11338
11447
|
Text38,
|
|
11339
11448
|
{
|
|
11340
11449
|
muted: true,
|
|
@@ -11343,8 +11452,8 @@ function DeleteConfirmDialog({
|
|
|
11343
11452
|
children: reportId
|
|
11344
11453
|
}
|
|
11345
11454
|
) }),
|
|
11346
|
-
/* @__PURE__ */
|
|
11347
|
-
/* @__PURE__ */
|
|
11455
|
+
/* @__PURE__ */ jsxs37(Flex26, { gap: 2, justify: "flex-end", children: [
|
|
11456
|
+
/* @__PURE__ */ jsx51(
|
|
11348
11457
|
Button9,
|
|
11349
11458
|
{
|
|
11350
11459
|
disabled: isDeleting,
|
|
@@ -11353,7 +11462,7 @@ function DeleteConfirmDialog({
|
|
|
11353
11462
|
text: "Cancel"
|
|
11354
11463
|
}
|
|
11355
11464
|
),
|
|
11356
|
-
/* @__PURE__ */
|
|
11465
|
+
/* @__PURE__ */ jsx51(
|
|
11357
11466
|
Button9,
|
|
11358
11467
|
{
|
|
11359
11468
|
disabled: isDeleting,
|
|
@@ -11371,11 +11480,11 @@ function DeleteConfirmDialog({
|
|
|
11371
11480
|
// src/components/report-detail/report-actions/DeleteReportAction.tsx
|
|
11372
11481
|
import { TrashIcon } from "@sanity/icons";
|
|
11373
11482
|
import { MenuItem as MenuItem6 } from "@sanity/ui";
|
|
11374
|
-
import { jsx as
|
|
11483
|
+
import { jsx as jsx52 } from "react/jsx-runtime";
|
|
11375
11484
|
function DeleteReportAction({
|
|
11376
11485
|
onRequestDelete
|
|
11377
11486
|
}) {
|
|
11378
|
-
return /* @__PURE__ */
|
|
11487
|
+
return /* @__PURE__ */ jsx52(
|
|
11379
11488
|
MenuItem6,
|
|
11380
11489
|
{
|
|
11381
11490
|
icon: TrashIcon,
|
|
@@ -11391,7 +11500,7 @@ import { DownloadIcon } from "@sanity/icons";
|
|
|
11391
11500
|
import { MenuItem as MenuItem7, useToast as useToast7 } from "@sanity/ui";
|
|
11392
11501
|
import { useCallback as useCallback30, useState as useState22 } from "react";
|
|
11393
11502
|
import { useClient as useClient9 } from "sanity";
|
|
11394
|
-
import { jsx as
|
|
11503
|
+
import { jsx as jsx53 } from "react/jsx-runtime";
|
|
11395
11504
|
function DownloadReportAction({
|
|
11396
11505
|
documentId,
|
|
11397
11506
|
reportId
|
|
@@ -11439,7 +11548,7 @@ function DownloadReportAction({
|
|
|
11439
11548
|
setDownloading(false);
|
|
11440
11549
|
}
|
|
11441
11550
|
}, [client, documentId, reportId, toast]);
|
|
11442
|
-
return /* @__PURE__ */
|
|
11551
|
+
return /* @__PURE__ */ jsx53(
|
|
11443
11552
|
MenuItem7,
|
|
11444
11553
|
{
|
|
11445
11554
|
disabled: downloading,
|
|
@@ -11469,7 +11578,7 @@ function extractEvalScope(provenance) {
|
|
|
11469
11578
|
}
|
|
11470
11579
|
|
|
11471
11580
|
// src/components/report-detail/report-actions/RerunEvaluationAction.tsx
|
|
11472
|
-
import { jsx as
|
|
11581
|
+
import { jsx as jsx54 } from "react/jsx-runtime";
|
|
11473
11582
|
var EVAL_REQUEST_TYPE2 = "ailf.evalRequest";
|
|
11474
11583
|
function slugify2(s) {
|
|
11475
11584
|
return s.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 40);
|
|
@@ -11536,7 +11645,7 @@ function RerunEvaluationAction({
|
|
|
11536
11645
|
setRequesting(false);
|
|
11537
11646
|
}
|
|
11538
11647
|
}, [client, currentUser?.id, provenance, reportId, toast]);
|
|
11539
|
-
return /* @__PURE__ */
|
|
11648
|
+
return /* @__PURE__ */ jsx54(
|
|
11540
11649
|
MenuItem8,
|
|
11541
11650
|
{
|
|
11542
11651
|
disabled: requesting,
|
|
@@ -11551,7 +11660,7 @@ function RerunEvaluationAction({
|
|
|
11551
11660
|
import { LaunchIcon } from "@sanity/icons";
|
|
11552
11661
|
import { MenuItem as MenuItem9 } from "@sanity/ui";
|
|
11553
11662
|
import { useCallback as useCallback32 } from "react";
|
|
11554
|
-
import { jsx as
|
|
11663
|
+
import { jsx as jsx55 } from "react/jsx-runtime";
|
|
11555
11664
|
function commonPathPrefix(paths) {
|
|
11556
11665
|
if (paths.length === 0) return "";
|
|
11557
11666
|
const segmented = paths.map((p) => p.split("/").filter(Boolean));
|
|
@@ -11589,7 +11698,7 @@ function ViewArtifactsAction({ manifest }) {
|
|
|
11589
11698
|
if (url) window.open(url, "_blank", "noopener,noreferrer");
|
|
11590
11699
|
}, [url]);
|
|
11591
11700
|
if (!url) return null;
|
|
11592
|
-
return /* @__PURE__ */
|
|
11701
|
+
return /* @__PURE__ */ jsx55(
|
|
11593
11702
|
MenuItem9,
|
|
11594
11703
|
{
|
|
11595
11704
|
icon: LaunchIcon,
|
|
@@ -11600,7 +11709,7 @@ function ViewArtifactsAction({ manifest }) {
|
|
|
11600
11709
|
}
|
|
11601
11710
|
|
|
11602
11711
|
// src/components/report-detail/report-actions/ReportActions.tsx
|
|
11603
|
-
import { Fragment as
|
|
11712
|
+
import { Fragment as Fragment14, jsx as jsx56, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
11604
11713
|
function ReportActions({
|
|
11605
11714
|
artifactManifest,
|
|
11606
11715
|
documentId,
|
|
@@ -11657,26 +11766,26 @@ function ReportActions({
|
|
|
11657
11766
|
setDeleting(false);
|
|
11658
11767
|
}
|
|
11659
11768
|
}, [client, documentId, onDeleted, toast]);
|
|
11660
|
-
return /* @__PURE__ */
|
|
11661
|
-
/* @__PURE__ */
|
|
11769
|
+
return /* @__PURE__ */ jsxs38(Fragment14, { children: [
|
|
11770
|
+
/* @__PURE__ */ jsx56(
|
|
11662
11771
|
SplitActionButton,
|
|
11663
11772
|
{
|
|
11664
|
-
menu: /* @__PURE__ */
|
|
11665
|
-
/* @__PURE__ */
|
|
11666
|
-
/* @__PURE__ */
|
|
11773
|
+
menu: /* @__PURE__ */ jsxs38(Fragment14, { children: [
|
|
11774
|
+
/* @__PURE__ */ jsx56(CopyReportIdAction, { reportId }),
|
|
11775
|
+
/* @__PURE__ */ jsx56(
|
|
11667
11776
|
RerunEvaluationAction,
|
|
11668
11777
|
{
|
|
11669
11778
|
provenance,
|
|
11670
11779
|
reportId
|
|
11671
11780
|
}
|
|
11672
11781
|
),
|
|
11673
|
-
/* @__PURE__ */
|
|
11674
|
-
/* @__PURE__ */
|
|
11675
|
-
/* @__PURE__ */
|
|
11676
|
-
/* @__PURE__ */
|
|
11677
|
-
/* @__PURE__ */
|
|
11678
|
-
/* @__PURE__ */
|
|
11679
|
-
/* @__PURE__ */
|
|
11782
|
+
/* @__PURE__ */ jsx56(MenuDivider3, {}),
|
|
11783
|
+
/* @__PURE__ */ jsx56(DownloadReportAction, { documentId, reportId }),
|
|
11784
|
+
/* @__PURE__ */ jsx56(ViewArtifactsAction, { manifest: artifactManifest }),
|
|
11785
|
+
/* @__PURE__ */ jsx56(CopyReportAction, { documentId }),
|
|
11786
|
+
/* @__PURE__ */ jsx56(CopyVisionQueryAction, { reportId }),
|
|
11787
|
+
/* @__PURE__ */ jsx56(MenuDivider3, {}),
|
|
11788
|
+
/* @__PURE__ */ jsx56(DeleteReportAction, { onRequestDelete: handleRequestDelete })
|
|
11680
11789
|
] }),
|
|
11681
11790
|
menuId: "report-actions-menu",
|
|
11682
11791
|
primary: {
|
|
@@ -11686,7 +11795,7 @@ function ReportActions({
|
|
|
11686
11795
|
}
|
|
11687
11796
|
}
|
|
11688
11797
|
),
|
|
11689
|
-
deleteDialogOpen && /* @__PURE__ */
|
|
11798
|
+
deleteDialogOpen && /* @__PURE__ */ jsx56(
|
|
11690
11799
|
DeleteConfirmDialog,
|
|
11691
11800
|
{
|
|
11692
11801
|
isDeleting: deleting,
|
|
@@ -11700,8 +11809,8 @@ function ReportActions({
|
|
|
11700
11809
|
|
|
11701
11810
|
// src/components/report-detail/ReportHeader.tsx
|
|
11702
11811
|
import { ArrowLeftIcon as ArrowLeftIcon2 } from "@sanity/icons";
|
|
11703
|
-
import { Button as Button10, Flex as
|
|
11704
|
-
import { jsx as
|
|
11812
|
+
import { Button as Button10, Flex as Flex27, Stack as Stack30, Text as Text39 } from "@sanity/ui";
|
|
11813
|
+
import { jsx as jsx57, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
11705
11814
|
function ReportHeader({
|
|
11706
11815
|
completedAt,
|
|
11707
11816
|
onBack,
|
|
@@ -11711,42 +11820,40 @@ function ReportHeader({
|
|
|
11711
11820
|
const dateLabel = formatCardDate(completedAt);
|
|
11712
11821
|
const displayTitle = title ?? tag ?? dateLabel;
|
|
11713
11822
|
const hasSubtitle = Boolean(title ?? tag);
|
|
11714
|
-
return /* @__PURE__ */
|
|
11715
|
-
/* @__PURE__ */
|
|
11716
|
-
/* @__PURE__ */
|
|
11717
|
-
/* @__PURE__ */
|
|
11718
|
-
hasSubtitle && /* @__PURE__ */
|
|
11823
|
+
return /* @__PURE__ */ jsxs39(Flex27, { align: "center", gap: 3, children: [
|
|
11824
|
+
/* @__PURE__ */ jsx57(Button10, { icon: ArrowLeftIcon2, mode: "bleed", onClick: onBack, text: "Back" }),
|
|
11825
|
+
/* @__PURE__ */ jsxs39(Stack30, { flex: 1, space: 1, children: [
|
|
11826
|
+
/* @__PURE__ */ jsx57(Text39, { size: 4, weight: "bold", children: displayTitle }),
|
|
11827
|
+
hasSubtitle && /* @__PURE__ */ jsx57(Text39, { muted: true, size: 2, children: dateLabel })
|
|
11719
11828
|
] })
|
|
11720
11829
|
] });
|
|
11721
11830
|
}
|
|
11722
11831
|
|
|
11723
11832
|
// src/components/report-detail/ScoreInterpretationPanel.tsx
|
|
11724
11833
|
import React4 from "react";
|
|
11725
|
-
import { Box as
|
|
11726
|
-
import { jsx as
|
|
11834
|
+
import { Box as Box28, Card as Card20, Flex as Flex28, Stack as Stack31, Text as Text40 } from "@sanity/ui";
|
|
11835
|
+
import { jsx as jsx58, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
11727
11836
|
var INTERPRETIVE_CARD_TYPES = /* @__PURE__ */ new Set([
|
|
11728
11837
|
"area-summary",
|
|
11729
11838
|
"failure-mode-summary",
|
|
11730
11839
|
"weakest-area"
|
|
11731
11840
|
]);
|
|
11732
|
-
var
|
|
11733
|
-
|
|
11734
|
-
|
|
11735
|
-
WebkitBoxOrient: "vertical",
|
|
11736
|
-
overflow: "hidden"
|
|
11841
|
+
var WRAPPED_PROSE2 = {
|
|
11842
|
+
overflowWrap: "anywhere",
|
|
11843
|
+
wordBreak: "break-word"
|
|
11737
11844
|
};
|
|
11738
11845
|
function renderAreaSummary(body, _meta) {
|
|
11739
|
-
return /* @__PURE__ */
|
|
11740
|
-
/* @__PURE__ */
|
|
11741
|
-
/* @__PURE__ */
|
|
11846
|
+
return /* @__PURE__ */ jsx58(Card20, { padding: 3, radius: 2, tone: "default", children: /* @__PURE__ */ jsxs40(Stack31, { space: 2, children: [
|
|
11847
|
+
/* @__PURE__ */ jsx58(Text40, { size: 1, muted: true, weight: "semibold", children: "Area summary" }),
|
|
11848
|
+
/* @__PURE__ */ jsx58(Text40, { size: 2, style: WRAPPED_PROSE2, children: /* @__PURE__ */ jsx58(InlineCode, { text: body.summary }) })
|
|
11742
11849
|
] }) });
|
|
11743
11850
|
}
|
|
11744
11851
|
function renderFailureModeSummary(body, _meta) {
|
|
11745
11852
|
const colors = failureModeColor(body.failureMode);
|
|
11746
|
-
return /* @__PURE__ */
|
|
11747
|
-
/* @__PURE__ */
|
|
11748
|
-
/* @__PURE__ */
|
|
11749
|
-
/* @__PURE__ */
|
|
11853
|
+
return /* @__PURE__ */ jsx58(Card20, { padding: 3, radius: 2, tone: "default", children: /* @__PURE__ */ jsxs40(Stack31, { space: 2, children: [
|
|
11854
|
+
/* @__PURE__ */ jsxs40(Flex28, { align: "center", gap: 2, wrap: "wrap", children: [
|
|
11855
|
+
/* @__PURE__ */ jsx58(Text40, { size: 1, muted: true, weight: "semibold", children: "Failure mode" }),
|
|
11856
|
+
/* @__PURE__ */ jsx58(HoverTip, { text: failureModeTip(body.failureMode), children: /* @__PURE__ */ jsx58(
|
|
11750
11857
|
"span",
|
|
11751
11858
|
{
|
|
11752
11859
|
style: {
|
|
@@ -11760,7 +11867,7 @@ function renderFailureModeSummary(body, _meta) {
|
|
|
11760
11867
|
children: body.failureMode
|
|
11761
11868
|
}
|
|
11762
11869
|
) }),
|
|
11763
|
-
/* @__PURE__ */
|
|
11870
|
+
/* @__PURE__ */ jsxs40(Text40, { size: 1, muted: true, children: [
|
|
11764
11871
|
body.dimension,
|
|
11765
11872
|
" \xB7 ",
|
|
11766
11873
|
body.count,
|
|
@@ -11768,16 +11875,16 @@ function renderFailureModeSummary(body, _meta) {
|
|
|
11768
11875
|
body.sampleSize
|
|
11769
11876
|
] })
|
|
11770
11877
|
] }),
|
|
11771
|
-
/* @__PURE__ */
|
|
11878
|
+
/* @__PURE__ */ jsx58(Text40, { size: 2, style: WRAPPED_PROSE2, children: /* @__PURE__ */ jsx58(InlineCode, { text: body.summary }) })
|
|
11772
11879
|
] }) });
|
|
11773
11880
|
}
|
|
11774
11881
|
function renderWeakestArea(body, _meta) {
|
|
11775
11882
|
const colors = failureModeColor(body.failureMode);
|
|
11776
|
-
return /* @__PURE__ */
|
|
11777
|
-
/* @__PURE__ */
|
|
11778
|
-
/* @__PURE__ */
|
|
11779
|
-
/* @__PURE__ */
|
|
11780
|
-
/* @__PURE__ */
|
|
11883
|
+
return /* @__PURE__ */ jsx58(Card20, { padding: 3, radius: 2, tone: "default", children: /* @__PURE__ */ jsxs40(Stack31, { space: 2, children: [
|
|
11884
|
+
/* @__PURE__ */ jsxs40(Flex28, { align: "center", gap: 2, wrap: "wrap", children: [
|
|
11885
|
+
/* @__PURE__ */ jsx58(Text40, { size: 1, muted: true, weight: "semibold", children: "Weakest area" }),
|
|
11886
|
+
/* @__PURE__ */ jsx58(Text40, { size: 2, weight: "semibold", children: body.area }),
|
|
11887
|
+
/* @__PURE__ */ jsx58(HoverTip, { text: failureModeTip(body.failureMode), children: /* @__PURE__ */ jsx58(
|
|
11781
11888
|
"span",
|
|
11782
11889
|
{
|
|
11783
11890
|
style: {
|
|
@@ -11791,17 +11898,17 @@ function renderWeakestArea(body, _meta) {
|
|
|
11791
11898
|
children: body.failureMode
|
|
11792
11899
|
}
|
|
11793
11900
|
) }),
|
|
11794
|
-
/* @__PURE__ */
|
|
11795
|
-
body.confidence,
|
|
11901
|
+
/* @__PURE__ */ jsx58(HoverTip, { text: confidenceTip(body.confidence.level), children: /* @__PURE__ */ jsxs40(Text40, { size: 1, muted: true, children: [
|
|
11902
|
+
body.confidence.level,
|
|
11796
11903
|
" confidence \xB7 n=",
|
|
11797
11904
|
body.sampleSize
|
|
11798
11905
|
] }) })
|
|
11799
11906
|
] }),
|
|
11800
|
-
/* @__PURE__ */
|
|
11907
|
+
/* @__PURE__ */ jsx58(Text40, { size: 2, style: WRAPPED_PROSE2, children: /* @__PURE__ */ jsx58(InlineCode, { text: body.summary }) })
|
|
11801
11908
|
] }) });
|
|
11802
11909
|
}
|
|
11803
11910
|
function renderDegradedCard2(card) {
|
|
11804
|
-
return /* @__PURE__ */
|
|
11911
|
+
return /* @__PURE__ */ jsx58(Card20, { padding: 2, radius: 2, tone: "caution", children: /* @__PURE__ */ jsxs40(Text40, { size: 1, muted: true, children: [
|
|
11805
11912
|
"Card unavailable: ",
|
|
11806
11913
|
card.cardType,
|
|
11807
11914
|
" (",
|
|
@@ -11818,21 +11925,21 @@ function ScoreInterpretationPanel(props) {
|
|
|
11818
11925
|
(c) => (c.status === "ready" || c.status === "degraded") && INTERPRETIVE_CARD_TYPES.has(c.cardType)
|
|
11819
11926
|
);
|
|
11820
11927
|
if (matched.length === 0) return null;
|
|
11821
|
-
return /* @__PURE__ */
|
|
11822
|
-
/* @__PURE__ */
|
|
11823
|
-
/* @__PURE__ */
|
|
11824
|
-
/* @__PURE__ */
|
|
11928
|
+
return /* @__PURE__ */ jsx58(Card20, { padding: 4, radius: 2, shadow: 1, style: neutralCardStyle, children: /* @__PURE__ */ jsxs40(Stack31, { space: 4, children: [
|
|
11929
|
+
/* @__PURE__ */ jsx58(Text40, { size: 2, weight: "semibold", children: "Score Interpretation" }),
|
|
11930
|
+
/* @__PURE__ */ jsx58(Box28, { style: dividerStyle }),
|
|
11931
|
+
/* @__PURE__ */ jsx58(Stack31, { space: 3, children: matched.map((card, idx) => {
|
|
11825
11932
|
const key = `interp-${idx}`;
|
|
11826
11933
|
if (card.status === "degraded") {
|
|
11827
|
-
return /* @__PURE__ */
|
|
11934
|
+
return /* @__PURE__ */ jsx58(React4.Fragment, { children: renderDegradedCard2(card) }, key);
|
|
11828
11935
|
}
|
|
11829
11936
|
switch (card.cardType) {
|
|
11830
11937
|
case "area-summary":
|
|
11831
|
-
return /* @__PURE__ */
|
|
11938
|
+
return /* @__PURE__ */ jsx58(React4.Fragment, { children: renderAreaSummary(card.body, card.meta) }, key);
|
|
11832
11939
|
case "failure-mode-summary":
|
|
11833
|
-
return /* @__PURE__ */
|
|
11940
|
+
return /* @__PURE__ */ jsx58(React4.Fragment, { children: renderFailureModeSummary(card.body, card.meta) }, key);
|
|
11834
11941
|
case "weakest-area":
|
|
11835
|
-
return /* @__PURE__ */
|
|
11942
|
+
return /* @__PURE__ */ jsx58(React4.Fragment, { children: renderWeakestArea(card.body, card.meta) }, key);
|
|
11836
11943
|
default:
|
|
11837
11944
|
return null;
|
|
11838
11945
|
}
|
|
@@ -11843,7 +11950,7 @@ function ScoreInterpretationPanel(props) {
|
|
|
11843
11950
|
// src/components/report-detail/StrengthsList.tsx
|
|
11844
11951
|
import { useMemo as useMemo16 } from "react";
|
|
11845
11952
|
import { CheckmarkCircleIcon as CheckmarkCircleIcon2, SearchIcon as SearchIcon8 } from "@sanity/icons";
|
|
11846
|
-
import { Box as
|
|
11953
|
+
import { Box as Box30, Flex as Flex31, Stack as Stack33, Text as Text43 } from "@sanity/ui";
|
|
11847
11954
|
|
|
11848
11955
|
// src/components/report-detail/AreaScoresGrid.tsx
|
|
11849
11956
|
import React5, {
|
|
@@ -11852,8 +11959,8 @@ import React5, {
|
|
|
11852
11959
|
useState as useState25
|
|
11853
11960
|
} from "react";
|
|
11854
11961
|
import { WarningOutlineIcon as WarningOutlineIcon2 } from "@sanity/icons";
|
|
11855
|
-
import { Box as
|
|
11856
|
-
import { Fragment as
|
|
11962
|
+
import { Box as Box29, Flex as Flex29, Stack as Stack32, Text as Text41 } from "@sanity/ui";
|
|
11963
|
+
import { Fragment as Fragment15, jsx as jsx59, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
11857
11964
|
var DIMENSION_TOOLTIPS2 = {
|
|
11858
11965
|
agentOutput: "Quality and completeness of the agent's output. Graded 0\u2013100.",
|
|
11859
11966
|
assertionPassRate: "Fraction of structural assertions that passed. Graded 0\u2013100.",
|
|
@@ -11945,8 +12052,8 @@ function AreaScoresGrid({
|
|
|
11945
12052
|
}
|
|
11946
12053
|
return map;
|
|
11947
12054
|
}, [perModel]);
|
|
11948
|
-
return /* @__PURE__ */
|
|
11949
|
-
/* @__PURE__ */
|
|
12055
|
+
return /* @__PURE__ */ jsxs41(Box29, { ref: containerRef, style: { ...neutralCardStyle, overflow: "auto" }, children: [
|
|
12056
|
+
/* @__PURE__ */ jsxs41(
|
|
11950
12057
|
"div",
|
|
11951
12058
|
{
|
|
11952
12059
|
style: {
|
|
@@ -11962,7 +12069,7 @@ function AreaScoresGrid({
|
|
|
11962
12069
|
padding: "12px 16px 8px"
|
|
11963
12070
|
},
|
|
11964
12071
|
children: [
|
|
11965
|
-
/* @__PURE__ */
|
|
12072
|
+
/* @__PURE__ */ jsx59(
|
|
11966
12073
|
ColHeader2,
|
|
11967
12074
|
{
|
|
11968
12075
|
active: sortField === "score",
|
|
@@ -11972,7 +12079,7 @@ function AreaScoresGrid({
|
|
|
11972
12079
|
tooltip: GLOSSARY.score
|
|
11973
12080
|
}
|
|
11974
12081
|
),
|
|
11975
|
-
/* @__PURE__ */
|
|
12082
|
+
/* @__PURE__ */ jsx59(
|
|
11976
12083
|
ColHeader2,
|
|
11977
12084
|
{
|
|
11978
12085
|
active: sortField === "area",
|
|
@@ -11981,7 +12088,7 @@ function AreaScoresGrid({
|
|
|
11981
12088
|
onClick: () => handleSort("area")
|
|
11982
12089
|
}
|
|
11983
12090
|
),
|
|
11984
|
-
dimKeys.map((key) => /* @__PURE__ */
|
|
12091
|
+
dimKeys.map((key) => /* @__PURE__ */ jsx59(
|
|
11985
12092
|
ColHeader2,
|
|
11986
12093
|
{
|
|
11987
12094
|
active: sortField === key,
|
|
@@ -11992,7 +12099,7 @@ function AreaScoresGrid({
|
|
|
11992
12099
|
},
|
|
11993
12100
|
key
|
|
11994
12101
|
)),
|
|
11995
|
-
tier !== "narrow" && showLift && /* @__PURE__ */
|
|
12102
|
+
tier !== "narrow" && showLift && /* @__PURE__ */ jsx59(
|
|
11996
12103
|
ColHeader2,
|
|
11997
12104
|
{
|
|
11998
12105
|
active: sortField === "lift",
|
|
@@ -12002,12 +12109,12 @@ function AreaScoresGrid({
|
|
|
12002
12109
|
tooltip: GLOSSARY.docLift
|
|
12003
12110
|
}
|
|
12004
12111
|
),
|
|
12005
|
-
tier === "full" && hasActual && /* @__PURE__ */
|
|
12112
|
+
tier === "full" && hasActual && /* @__PURE__ */ jsx59(ColHeader2, { label: "Actual", tooltip: GLOSSARY.actualScore })
|
|
12006
12113
|
]
|
|
12007
12114
|
}
|
|
12008
12115
|
),
|
|
12009
|
-
sorted.map((area) => /* @__PURE__ */
|
|
12010
|
-
/* @__PURE__ */
|
|
12116
|
+
sorted.map((area) => /* @__PURE__ */ jsxs41(React5.Fragment, { children: [
|
|
12117
|
+
/* @__PURE__ */ jsx59(
|
|
12011
12118
|
AreaRow,
|
|
12012
12119
|
{
|
|
12013
12120
|
area,
|
|
@@ -12018,7 +12125,7 @@ function AreaScoresGrid({
|
|
|
12018
12125
|
tier
|
|
12019
12126
|
}
|
|
12020
12127
|
),
|
|
12021
|
-
modelScoresByFeature && /* @__PURE__ */
|
|
12128
|
+
modelScoresByFeature && /* @__PURE__ */ jsx59(
|
|
12022
12129
|
ModelSubRows,
|
|
12023
12130
|
{
|
|
12024
12131
|
dimKeys,
|
|
@@ -12039,7 +12146,7 @@ function ModelSubRows({
|
|
|
12039
12146
|
tier
|
|
12040
12147
|
}) {
|
|
12041
12148
|
if (!models || models.length === 0) return null;
|
|
12042
|
-
return /* @__PURE__ */
|
|
12149
|
+
return /* @__PURE__ */ jsx59(Fragment15, { children: models.map((entry) => /* @__PURE__ */ jsx59(
|
|
12043
12150
|
ModelRow2,
|
|
12044
12151
|
{
|
|
12045
12152
|
dimKeys,
|
|
@@ -12061,7 +12168,7 @@ function ModelRow2({
|
|
|
12061
12168
|
tier
|
|
12062
12169
|
}) {
|
|
12063
12170
|
const isNarrow = tier === "narrow";
|
|
12064
|
-
return /* @__PURE__ */
|
|
12171
|
+
return /* @__PURE__ */ jsxs41(
|
|
12065
12172
|
"div",
|
|
12066
12173
|
{
|
|
12067
12174
|
style: {
|
|
@@ -12079,7 +12186,7 @@ function ModelRow2({
|
|
|
12079
12186
|
padding: isNarrow ? "6px 12px 6px 20px" : "6px 16px 6px 28px"
|
|
12080
12187
|
},
|
|
12081
12188
|
children: [
|
|
12082
|
-
/* @__PURE__ */
|
|
12189
|
+
/* @__PURE__ */ jsx59(Flex29, { align: "center", children: /* @__PURE__ */ jsx59(
|
|
12083
12190
|
Text41,
|
|
12084
12191
|
{
|
|
12085
12192
|
size: 1,
|
|
@@ -12091,8 +12198,8 @@ function ModelRow2({
|
|
|
12091
12198
|
children: Math.round(scores.totalScore)
|
|
12092
12199
|
}
|
|
12093
12200
|
) }),
|
|
12094
|
-
/* @__PURE__ */
|
|
12095
|
-
dimKeys.map((key) => /* @__PURE__ */
|
|
12201
|
+
/* @__PURE__ */ jsx59(Flex29, { align: "center", gap: 2, children: /* @__PURE__ */ jsx59(Text41, { muted: true, size: 1, children: label }) }),
|
|
12202
|
+
dimKeys.map((key) => /* @__PURE__ */ jsx59(
|
|
12096
12203
|
DimCell,
|
|
12097
12204
|
{
|
|
12098
12205
|
area: label,
|
|
@@ -12102,7 +12209,7 @@ function ModelRow2({
|
|
|
12102
12209
|
},
|
|
12103
12210
|
key
|
|
12104
12211
|
)),
|
|
12105
|
-
!isNarrow && showLift && /* @__PURE__ */
|
|
12212
|
+
!isNarrow && showLift && /* @__PURE__ */ jsxs41(
|
|
12106
12213
|
Text41,
|
|
12107
12214
|
{
|
|
12108
12215
|
size: 1,
|
|
@@ -12117,7 +12224,7 @@ function ModelRow2({
|
|
|
12117
12224
|
]
|
|
12118
12225
|
}
|
|
12119
12226
|
),
|
|
12120
|
-
tier === "full" && hasActual && /* @__PURE__ */
|
|
12227
|
+
tier === "full" && hasActual && /* @__PURE__ */ jsx59(
|
|
12121
12228
|
Text41,
|
|
12122
12229
|
{
|
|
12123
12230
|
size: 1,
|
|
@@ -12142,7 +12249,7 @@ function AreaRow({
|
|
|
12142
12249
|
tier
|
|
12143
12250
|
}) {
|
|
12144
12251
|
const isNarrow = tier === "narrow";
|
|
12145
|
-
return /* @__PURE__ */
|
|
12252
|
+
return /* @__PURE__ */ jsxs41(
|
|
12146
12253
|
"div",
|
|
12147
12254
|
{
|
|
12148
12255
|
style: {
|
|
@@ -12159,15 +12266,15 @@ function AreaRow({
|
|
|
12159
12266
|
padding: isNarrow ? "8px 12px" : "10px 16px"
|
|
12160
12267
|
},
|
|
12161
12268
|
children: [
|
|
12162
|
-
/* @__PURE__ */
|
|
12163
|
-
/* @__PURE__ */
|
|
12269
|
+
/* @__PURE__ */ jsxs41(Flex29, { align: "center", gap: isNarrow ? 0 : 2, children: [
|
|
12270
|
+
/* @__PURE__ */ jsx59(
|
|
12164
12271
|
HoverTip,
|
|
12165
12272
|
{
|
|
12166
|
-
text: /* @__PURE__ */
|
|
12167
|
-
/* @__PURE__ */
|
|
12273
|
+
text: /* @__PURE__ */ jsxs41(Text41, { size: 2, style: { lineHeight: 1.5 }, children: [
|
|
12274
|
+
/* @__PURE__ */ jsx59("span", { style: { fontWeight: 600 }, children: area.feature }),
|
|
12168
12275
|
" score:",
|
|
12169
12276
|
" ",
|
|
12170
|
-
/* @__PURE__ */
|
|
12277
|
+
/* @__PURE__ */ jsx59(
|
|
12171
12278
|
"span",
|
|
12172
12279
|
{
|
|
12173
12280
|
style: {
|
|
@@ -12178,12 +12285,12 @@ function AreaRow({
|
|
|
12178
12285
|
children: Math.round(area.totalScore)
|
|
12179
12286
|
}
|
|
12180
12287
|
),
|
|
12181
|
-
/* @__PURE__ */
|
|
12288
|
+
/* @__PURE__ */ jsx59("span", { style: { color: "var(--card-muted-fg-color)" }, children: "/100" }),
|
|
12182
12289
|
".",
|
|
12183
12290
|
" ",
|
|
12184
12291
|
GLOSSARY.score
|
|
12185
12292
|
] }),
|
|
12186
|
-
children: /* @__PURE__ */
|
|
12293
|
+
children: /* @__PURE__ */ jsx59(
|
|
12187
12294
|
"div",
|
|
12188
12295
|
{
|
|
12189
12296
|
style: {
|
|
@@ -12204,11 +12311,11 @@ function AreaRow({
|
|
|
12204
12311
|
)
|
|
12205
12312
|
}
|
|
12206
12313
|
),
|
|
12207
|
-
!isNarrow && delta != null && delta !== 0 && /* @__PURE__ */
|
|
12314
|
+
!isNarrow && delta != null && delta !== 0 && /* @__PURE__ */ jsx59(HoverTip, { text: GLOSSARY.areaDelta, children: /* @__PURE__ */ jsx59(DeltaIndicator, { delta, icon: true, size: 1 }) })
|
|
12208
12315
|
] }),
|
|
12209
|
-
/* @__PURE__ */
|
|
12210
|
-
/* @__PURE__ */
|
|
12211
|
-
area.negativeDocLift && showLift && /* @__PURE__ */
|
|
12316
|
+
/* @__PURE__ */ jsxs41(Flex29, { align: "center", gap: 2, wrap: "wrap", children: [
|
|
12317
|
+
/* @__PURE__ */ jsx59(Text41, { size: 2, weight: "medium", children: area.feature }),
|
|
12318
|
+
area.negativeDocLift && showLift && /* @__PURE__ */ jsx59(HoverTip, { text: GLOSSARY.docsHurt, children: /* @__PURE__ */ jsx59(
|
|
12212
12319
|
"span",
|
|
12213
12320
|
{
|
|
12214
12321
|
style: {
|
|
@@ -12221,11 +12328,11 @@ function AreaRow({
|
|
|
12221
12328
|
gap: 3,
|
|
12222
12329
|
padding: "1px 5px"
|
|
12223
12330
|
},
|
|
12224
|
-
children: /* @__PURE__ */
|
|
12331
|
+
children: /* @__PURE__ */ jsx59(WarningOutlineIcon2, {})
|
|
12225
12332
|
}
|
|
12226
12333
|
) })
|
|
12227
12334
|
] }),
|
|
12228
|
-
dimKeys.map((key) => /* @__PURE__ */
|
|
12335
|
+
dimKeys.map((key) => /* @__PURE__ */ jsx59(
|
|
12229
12336
|
DimCell,
|
|
12230
12337
|
{
|
|
12231
12338
|
area: area.feature,
|
|
@@ -12234,14 +12341,14 @@ function AreaRow({
|
|
|
12234
12341
|
},
|
|
12235
12342
|
key
|
|
12236
12343
|
)),
|
|
12237
|
-
!isNarrow && showLift && /* @__PURE__ */
|
|
12344
|
+
!isNarrow && showLift && /* @__PURE__ */ jsx59(
|
|
12238
12345
|
HoverTip,
|
|
12239
12346
|
{
|
|
12240
|
-
text: /* @__PURE__ */
|
|
12241
|
-
/* @__PURE__ */
|
|
12347
|
+
text: /* @__PURE__ */ jsxs41(Text41, { size: 2, style: { lineHeight: 1.5 }, children: [
|
|
12348
|
+
/* @__PURE__ */ jsx59("span", { style: { fontWeight: 600 }, children: area.feature }),
|
|
12242
12349
|
" doc lift:",
|
|
12243
12350
|
" ",
|
|
12244
|
-
/* @__PURE__ */
|
|
12351
|
+
/* @__PURE__ */ jsxs41(
|
|
12245
12352
|
"span",
|
|
12246
12353
|
{
|
|
12247
12354
|
style: {
|
|
@@ -12259,7 +12366,7 @@ function AreaRow({
|
|
|
12259
12366
|
"pts. ",
|
|
12260
12367
|
GLOSSARY.docLift
|
|
12261
12368
|
] }),
|
|
12262
|
-
children: /* @__PURE__ */
|
|
12369
|
+
children: /* @__PURE__ */ jsxs41(
|
|
12263
12370
|
Text41,
|
|
12264
12371
|
{
|
|
12265
12372
|
size: 2,
|
|
@@ -12276,11 +12383,11 @@ function AreaRow({
|
|
|
12276
12383
|
)
|
|
12277
12384
|
}
|
|
12278
12385
|
),
|
|
12279
|
-
tier === "full" && hasActual && /* @__PURE__ */
|
|
12386
|
+
tier === "full" && hasActual && /* @__PURE__ */ jsx59(
|
|
12280
12387
|
HoverTip,
|
|
12281
12388
|
{
|
|
12282
12389
|
text: area.actualScore != null ? `${area.feature} actual score: ${Math.round(area.actualScore)}/100. ${GLOSSARY.actualScore}` : `No agentic data for ${area.feature}.`,
|
|
12283
|
-
children: /* @__PURE__ */
|
|
12390
|
+
children: /* @__PURE__ */ jsx59(
|
|
12284
12391
|
Text41,
|
|
12285
12392
|
{
|
|
12286
12393
|
size: 2,
|
|
@@ -12310,17 +12417,17 @@ function DimCell({
|
|
|
12310
12417
|
const tooltip = dimKey ? DIMENSION_TOOLTIPS2[dimKey] : "";
|
|
12311
12418
|
const textSize = size === "small" ? 0 : 1;
|
|
12312
12419
|
const barHeight = size === "small" ? 3 : 4;
|
|
12313
|
-
return /* @__PURE__ */
|
|
12420
|
+
return /* @__PURE__ */ jsx59(
|
|
12314
12421
|
HoverTip,
|
|
12315
12422
|
{
|
|
12316
|
-
text: /* @__PURE__ */
|
|
12317
|
-
/* @__PURE__ */
|
|
12423
|
+
text: /* @__PURE__ */ jsxs41(Text41, { size: 2, style: { lineHeight: 1.5 }, children: [
|
|
12424
|
+
/* @__PURE__ */ jsx59("span", { style: { fontWeight: 600 }, children: area }),
|
|
12318
12425
|
" \u2192",
|
|
12319
12426
|
" ",
|
|
12320
|
-
/* @__PURE__ */
|
|
12427
|
+
/* @__PURE__ */ jsx59("span", { style: { fontWeight: 600 }, children: dim }),
|
|
12321
12428
|
":",
|
|
12322
12429
|
" ",
|
|
12323
|
-
/* @__PURE__ */
|
|
12430
|
+
/* @__PURE__ */ jsx59(
|
|
12324
12431
|
"span",
|
|
12325
12432
|
{
|
|
12326
12433
|
style: {
|
|
@@ -12331,13 +12438,13 @@ function DimCell({
|
|
|
12331
12438
|
children: Math.round(value)
|
|
12332
12439
|
}
|
|
12333
12440
|
),
|
|
12334
|
-
/* @__PURE__ */
|
|
12441
|
+
/* @__PURE__ */ jsx59("span", { style: { color: "var(--card-muted-fg-color)" }, children: "/100" }),
|
|
12335
12442
|
".",
|
|
12336
12443
|
" ",
|
|
12337
12444
|
tooltip
|
|
12338
12445
|
] }),
|
|
12339
|
-
children: /* @__PURE__ */
|
|
12340
|
-
/* @__PURE__ */
|
|
12446
|
+
children: /* @__PURE__ */ jsxs41(Stack32, { space: 1, style: { width: "100%" }, children: [
|
|
12447
|
+
/* @__PURE__ */ jsx59(
|
|
12341
12448
|
Text41,
|
|
12342
12449
|
{
|
|
12343
12450
|
size: textSize,
|
|
@@ -12349,7 +12456,7 @@ function DimCell({
|
|
|
12349
12456
|
children: Math.round(value)
|
|
12350
12457
|
}
|
|
12351
12458
|
),
|
|
12352
|
-
/* @__PURE__ */
|
|
12459
|
+
/* @__PURE__ */ jsx59(
|
|
12353
12460
|
"div",
|
|
12354
12461
|
{
|
|
12355
12462
|
style: {
|
|
@@ -12359,7 +12466,7 @@ function DimCell({
|
|
|
12359
12466
|
overflow: "hidden",
|
|
12360
12467
|
width: "100%"
|
|
12361
12468
|
},
|
|
12362
|
-
children: /* @__PURE__ */
|
|
12469
|
+
children: /* @__PURE__ */ jsx59(
|
|
12363
12470
|
"div",
|
|
12364
12471
|
{
|
|
12365
12472
|
style: {
|
|
@@ -12394,8 +12501,8 @@ function ColHeader2({
|
|
|
12394
12501
|
[onClick]
|
|
12395
12502
|
);
|
|
12396
12503
|
const arrow = active ? direction === "asc" ? " \u2191" : " \u2193" : "";
|
|
12397
|
-
return /* @__PURE__ */
|
|
12398
|
-
/* @__PURE__ */
|
|
12504
|
+
return /* @__PURE__ */ jsxs41(Flex29, { align: "center", gap: 1, children: [
|
|
12505
|
+
/* @__PURE__ */ jsx59(
|
|
12399
12506
|
"div",
|
|
12400
12507
|
{
|
|
12401
12508
|
onClick,
|
|
@@ -12406,7 +12513,7 @@ function ColHeader2({
|
|
|
12406
12513
|
userSelect: "none"
|
|
12407
12514
|
},
|
|
12408
12515
|
tabIndex: onClick ? 0 : void 0,
|
|
12409
|
-
children: /* @__PURE__ */
|
|
12516
|
+
children: /* @__PURE__ */ jsxs41(
|
|
12410
12517
|
Text41,
|
|
12411
12518
|
{
|
|
12412
12519
|
muted: true,
|
|
@@ -12424,14 +12531,14 @@ function ColHeader2({
|
|
|
12424
12531
|
)
|
|
12425
12532
|
}
|
|
12426
12533
|
),
|
|
12427
|
-
tooltip && /* @__PURE__ */
|
|
12534
|
+
tooltip && /* @__PURE__ */ jsx59(InfoTip, { text: tooltip })
|
|
12428
12535
|
] });
|
|
12429
12536
|
}
|
|
12430
12537
|
|
|
12431
12538
|
// src/components/report-detail/ModelSelector.tsx
|
|
12432
12539
|
import { useCallback as useCallback35 } from "react";
|
|
12433
|
-
import { Flex as
|
|
12434
|
-
import { jsx as
|
|
12540
|
+
import { Flex as Flex30, Text as Text42 } from "@sanity/ui";
|
|
12541
|
+
import { jsx as jsx60, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
12435
12542
|
var pillBase = {
|
|
12436
12543
|
borderColor: "var(--card-border-color)",
|
|
12437
12544
|
borderRadius: 999,
|
|
@@ -12462,8 +12569,8 @@ function ModelSelector({
|
|
|
12462
12569
|
selection,
|
|
12463
12570
|
onChange
|
|
12464
12571
|
}) {
|
|
12465
|
-
return /* @__PURE__ */
|
|
12466
|
-
/* @__PURE__ */
|
|
12572
|
+
return /* @__PURE__ */ jsxs42(Flex30, { align: "center", gap: 1, wrap: "wrap", children: [
|
|
12573
|
+
/* @__PURE__ */ jsx60(
|
|
12467
12574
|
Pill2,
|
|
12468
12575
|
{
|
|
12469
12576
|
isSelected: selection === null,
|
|
@@ -12471,7 +12578,7 @@ function ModelSelector({
|
|
|
12471
12578
|
onClick: () => onChange(null)
|
|
12472
12579
|
}
|
|
12473
12580
|
),
|
|
12474
|
-
models.map((model) => /* @__PURE__ */
|
|
12581
|
+
models.map((model) => /* @__PURE__ */ jsx60(
|
|
12475
12582
|
Pill2,
|
|
12476
12583
|
{
|
|
12477
12584
|
isSelected: selection === model.modelId,
|
|
@@ -12480,7 +12587,7 @@ function ModelSelector({
|
|
|
12480
12587
|
},
|
|
12481
12588
|
model.modelId
|
|
12482
12589
|
)),
|
|
12483
|
-
/* @__PURE__ */
|
|
12590
|
+
/* @__PURE__ */ jsx60(
|
|
12484
12591
|
"div",
|
|
12485
12592
|
{
|
|
12486
12593
|
style: {
|
|
@@ -12491,7 +12598,7 @@ function ModelSelector({
|
|
|
12491
12598
|
}
|
|
12492
12599
|
}
|
|
12493
12600
|
),
|
|
12494
|
-
/* @__PURE__ */
|
|
12601
|
+
/* @__PURE__ */ jsx60(
|
|
12495
12602
|
Pill2,
|
|
12496
12603
|
{
|
|
12497
12604
|
isSelected: selection === "expanded",
|
|
@@ -12515,7 +12622,7 @@ function Pill2({
|
|
|
12515
12622
|
},
|
|
12516
12623
|
[onClick]
|
|
12517
12624
|
);
|
|
12518
|
-
return /* @__PURE__ */
|
|
12625
|
+
return /* @__PURE__ */ jsx60(
|
|
12519
12626
|
"span",
|
|
12520
12627
|
{
|
|
12521
12628
|
onClick,
|
|
@@ -12523,7 +12630,7 @@ function Pill2({
|
|
|
12523
12630
|
role: "button",
|
|
12524
12631
|
style: isSelected ? pillSelected : pillDefault,
|
|
12525
12632
|
tabIndex: 0,
|
|
12526
|
-
children: /* @__PURE__ */
|
|
12633
|
+
children: /* @__PURE__ */ jsx60(
|
|
12527
12634
|
Text42,
|
|
12528
12635
|
{
|
|
12529
12636
|
size: 1,
|
|
@@ -12567,7 +12674,7 @@ function useModelSelection({
|
|
|
12567
12674
|
}
|
|
12568
12675
|
|
|
12569
12676
|
// src/components/report-detail/StrengthsList.tsx
|
|
12570
|
-
import { jsx as
|
|
12677
|
+
import { jsx as jsx61, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
12571
12678
|
function StrengthsList({
|
|
12572
12679
|
mode,
|
|
12573
12680
|
scores,
|
|
@@ -12591,13 +12698,13 @@ function StrengthsList({
|
|
|
12591
12698
|
(a, b) => (b.infrastructureEfficiency ?? 0) - (a.infrastructureEfficiency ?? 0)
|
|
12592
12699
|
);
|
|
12593
12700
|
if (displayedScores.length === 0) return null;
|
|
12594
|
-
return /* @__PURE__ */
|
|
12595
|
-
/* @__PURE__ */
|
|
12596
|
-
/* @__PURE__ */
|
|
12597
|
-
/* @__PURE__ */
|
|
12598
|
-
/* @__PURE__ */
|
|
12599
|
-
/* @__PURE__ */
|
|
12600
|
-
hasModels && /* @__PURE__ */
|
|
12701
|
+
return /* @__PURE__ */ jsxs43(Stack33, { space: 5, children: [
|
|
12702
|
+
/* @__PURE__ */ jsxs43(Stack33, { space: 3, children: [
|
|
12703
|
+
/* @__PURE__ */ jsxs43(Flex31, { align: "center", gap: 2, wrap: "wrap", children: [
|
|
12704
|
+
/* @__PURE__ */ jsx61(CheckmarkCircleIcon2, { style: { color: "#34d399" } }),
|
|
12705
|
+
/* @__PURE__ */ jsx61(Text43, { size: 2, weight: "medium", children: "Strong Areas (70+)" }),
|
|
12706
|
+
/* @__PURE__ */ jsx61(InfoTip, { text: GLOSSARY.strengths }),
|
|
12707
|
+
hasModels && /* @__PURE__ */ jsx61(Box30, { style: { marginLeft: "auto" }, children: /* @__PURE__ */ jsx61(
|
|
12601
12708
|
ModelSelector,
|
|
12602
12709
|
{
|
|
12603
12710
|
models: perModel,
|
|
@@ -12606,7 +12713,7 @@ function StrengthsList({
|
|
|
12606
12713
|
}
|
|
12607
12714
|
) })
|
|
12608
12715
|
] }),
|
|
12609
|
-
/* @__PURE__ */
|
|
12716
|
+
/* @__PURE__ */ jsx61(
|
|
12610
12717
|
AreaScoresGrid,
|
|
12611
12718
|
{
|
|
12612
12719
|
mode,
|
|
@@ -12616,33 +12723,33 @@ function StrengthsList({
|
|
|
12616
12723
|
}
|
|
12617
12724
|
)
|
|
12618
12725
|
] }),
|
|
12619
|
-
retrievalSuccesses.length > 0 && /* @__PURE__ */
|
|
12620
|
-
/* @__PURE__ */
|
|
12621
|
-
|
|
12726
|
+
retrievalSuccesses.length > 0 && /* @__PURE__ */ jsxs43(Box30, { style: neutralCardStyle, children: [
|
|
12727
|
+
/* @__PURE__ */ jsx61(
|
|
12728
|
+
Box30,
|
|
12622
12729
|
{
|
|
12623
12730
|
padding: 4,
|
|
12624
12731
|
style: { borderBottom: "1px solid var(--card-border-color)" },
|
|
12625
|
-
children: /* @__PURE__ */
|
|
12626
|
-
/* @__PURE__ */
|
|
12627
|
-
/* @__PURE__ */
|
|
12732
|
+
children: /* @__PURE__ */ jsxs43(Flex31, { align: "center", gap: 2, children: [
|
|
12733
|
+
/* @__PURE__ */ jsx61(SearchIcon8, { style: { color: "#34d399" } }),
|
|
12734
|
+
/* @__PURE__ */ jsxs43(Text43, { size: 2, weight: "medium", children: [
|
|
12628
12735
|
"Retrieval Successes (",
|
|
12629
12736
|
Math.round(EFFICIENCY_POSITIVE * 100),
|
|
12630
12737
|
"%+ efficiency)"
|
|
12631
12738
|
] }),
|
|
12632
|
-
/* @__PURE__ */
|
|
12739
|
+
/* @__PURE__ */ jsx61(InfoTip, { text: GLOSSARY.retrievalExcellence })
|
|
12633
12740
|
] })
|
|
12634
12741
|
}
|
|
12635
12742
|
),
|
|
12636
|
-
/* @__PURE__ */
|
|
12637
|
-
|
|
12743
|
+
/* @__PURE__ */ jsx61(Stack33, { children: retrievalSuccesses.map((area, i) => /* @__PURE__ */ jsxs43(
|
|
12744
|
+
Flex31,
|
|
12638
12745
|
{
|
|
12639
12746
|
align: "center",
|
|
12640
12747
|
justify: "space-between",
|
|
12641
12748
|
padding: 4,
|
|
12642
12749
|
style: i > 0 ? dividerStyle : void 0,
|
|
12643
12750
|
children: [
|
|
12644
|
-
/* @__PURE__ */
|
|
12645
|
-
/* @__PURE__ */
|
|
12751
|
+
/* @__PURE__ */ jsx61(Text43, { size: 2, children: area.feature }),
|
|
12752
|
+
/* @__PURE__ */ jsx61(
|
|
12646
12753
|
"span",
|
|
12647
12754
|
{
|
|
12648
12755
|
style: {
|
|
@@ -12667,8 +12774,8 @@ function StrengthsList({
|
|
|
12667
12774
|
// src/components/report-detail/SynthesisNotGeneratedCTA.tsx
|
|
12668
12775
|
import { useCallback as useCallback37, useState as useState27 } from "react";
|
|
12669
12776
|
import { CopyIcon as CopyIcon4 } from "@sanity/icons";
|
|
12670
|
-
import { Box as
|
|
12671
|
-
import { jsx as
|
|
12777
|
+
import { Box as Box31, Button as Button11, Card as Card21, Code as Code3, Flex as Flex32, Stack as Stack34, Text as Text44 } from "@sanity/ui";
|
|
12778
|
+
import { jsx as jsx62, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
12672
12779
|
function SynthesisNotGeneratedCTA(props) {
|
|
12673
12780
|
const { reportId } = props;
|
|
12674
12781
|
const command = `ailf interpret ${reportId}`;
|
|
@@ -12681,20 +12788,20 @@ function SynthesisNotGeneratedCTA(props) {
|
|
|
12681
12788
|
} catch {
|
|
12682
12789
|
}
|
|
12683
12790
|
}, [command]);
|
|
12684
|
-
return /* @__PURE__ */
|
|
12685
|
-
|
|
12791
|
+
return /* @__PURE__ */ jsx62(
|
|
12792
|
+
Card21,
|
|
12686
12793
|
{
|
|
12687
12794
|
padding: 4,
|
|
12688
12795
|
radius: 2,
|
|
12689
12796
|
shadow: 1,
|
|
12690
12797
|
style: neutralCardStyle,
|
|
12691
12798
|
tone: "primary",
|
|
12692
|
-
children: /* @__PURE__ */
|
|
12693
|
-
/* @__PURE__ */
|
|
12694
|
-
/* @__PURE__ */
|
|
12695
|
-
/* @__PURE__ */
|
|
12696
|
-
/* @__PURE__ */
|
|
12697
|
-
/* @__PURE__ */
|
|
12799
|
+
children: /* @__PURE__ */ jsxs44(Stack34, { space: 3, children: [
|
|
12800
|
+
/* @__PURE__ */ jsx62(Text44, { size: 2, weight: "semibold", children: "Synthesis not yet generated" }),
|
|
12801
|
+
/* @__PURE__ */ jsx62(Text44, { size: 1, muted: true, children: "Run the command below to generate diagnosis cards for this report." }),
|
|
12802
|
+
/* @__PURE__ */ jsxs44(Flex32, { align: "center", gap: 2, children: [
|
|
12803
|
+
/* @__PURE__ */ jsx62(Box31, { flex: 1, children: /* @__PURE__ */ jsx62(Code3, { size: 1, language: "sh", children: command }) }),
|
|
12804
|
+
/* @__PURE__ */ jsx62(
|
|
12698
12805
|
Button11,
|
|
12699
12806
|
{
|
|
12700
12807
|
icon: CopyIcon4,
|
|
@@ -12718,8 +12825,8 @@ import {
|
|
|
12718
12825
|
BoltIcon as BoltIcon2,
|
|
12719
12826
|
ArrowDownIcon as ArrowDownIcon2
|
|
12720
12827
|
} from "@sanity/icons";
|
|
12721
|
-
import { Box as
|
|
12722
|
-
import { jsx as
|
|
12828
|
+
import { Box as Box32, Flex as Flex33, Stack as Stack35, Text as Text45 } from "@sanity/ui";
|
|
12829
|
+
import { jsx as jsx63, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
12723
12830
|
function WeaknessesList({
|
|
12724
12831
|
mode,
|
|
12725
12832
|
scores,
|
|
@@ -12749,13 +12856,13 @@ function WeaknessesList({
|
|
|
12749
12856
|
);
|
|
12750
12857
|
const hasContent = weakAreas.length > 0 || docsHurt.length > 0 || retrievalIssues.length > 0 || dimWeaknesses.length > 0 || FEATURE_FLAGS.showRegressedSinceLastRun.enabled && regressed.length > 0 || efficiencyAnomalies.length > 0;
|
|
12751
12858
|
if (!hasContent) return null;
|
|
12752
|
-
return /* @__PURE__ */
|
|
12753
|
-
weakAreas.length > 0 && /* @__PURE__ */
|
|
12754
|
-
/* @__PURE__ */
|
|
12755
|
-
/* @__PURE__ */
|
|
12756
|
-
/* @__PURE__ */
|
|
12757
|
-
/* @__PURE__ */
|
|
12758
|
-
hasModels && /* @__PURE__ */
|
|
12859
|
+
return /* @__PURE__ */ jsxs45(Stack35, { space: 5, children: [
|
|
12860
|
+
weakAreas.length > 0 && /* @__PURE__ */ jsxs45(Stack35, { space: 3, children: [
|
|
12861
|
+
/* @__PURE__ */ jsxs45(Flex33, { align: "center", gap: 2, wrap: "wrap", children: [
|
|
12862
|
+
/* @__PURE__ */ jsx63(ErrorOutlineIcon3, { style: { color: "#f87171" } }),
|
|
12863
|
+
/* @__PURE__ */ jsx63(Text45, { size: 2, weight: "medium", children: "Weak Areas (<70)" }),
|
|
12864
|
+
/* @__PURE__ */ jsx63(InfoTip, { text: GLOSSARY.weakAreas }),
|
|
12865
|
+
hasModels && /* @__PURE__ */ jsx63(Box32, { style: { marginLeft: "auto" }, children: /* @__PURE__ */ jsx63(
|
|
12759
12866
|
ModelSelector,
|
|
12760
12867
|
{
|
|
12761
12868
|
models: perModel,
|
|
@@ -12764,7 +12871,7 @@ function WeaknessesList({
|
|
|
12764
12871
|
}
|
|
12765
12872
|
) })
|
|
12766
12873
|
] }),
|
|
12767
|
-
/* @__PURE__ */
|
|
12874
|
+
/* @__PURE__ */ jsx63(
|
|
12768
12875
|
AreaScoresGrid,
|
|
12769
12876
|
{
|
|
12770
12877
|
mode,
|
|
@@ -12774,22 +12881,22 @@ function WeaknessesList({
|
|
|
12774
12881
|
}
|
|
12775
12882
|
)
|
|
12776
12883
|
] }),
|
|
12777
|
-
docsHurt.length > 0 && /* @__PURE__ */
|
|
12778
|
-
/* @__PURE__ */
|
|
12779
|
-
/* @__PURE__ */
|
|
12780
|
-
/* @__PURE__ */
|
|
12781
|
-
/* @__PURE__ */
|
|
12884
|
+
docsHurt.length > 0 && /* @__PURE__ */ jsxs45(Stack35, { space: 3, children: [
|
|
12885
|
+
/* @__PURE__ */ jsxs45(Flex33, { align: "center", gap: 2, children: [
|
|
12886
|
+
/* @__PURE__ */ jsx63(ErrorOutlineIcon3, { style: { color: "#f87171" } }),
|
|
12887
|
+
/* @__PURE__ */ jsx63(Text45, { size: 2, weight: "medium", children: "Docs Hurt Performance (Negative Doc Lift)" }),
|
|
12888
|
+
/* @__PURE__ */ jsx63(InfoTip, { text: GLOSSARY.docsHurt })
|
|
12782
12889
|
] }),
|
|
12783
|
-
/* @__PURE__ */
|
|
12784
|
-
|
|
12890
|
+
/* @__PURE__ */ jsx63(Box32, { style: sectionStyle("red"), children: docsHurt.map((area, i) => /* @__PURE__ */ jsxs45(
|
|
12891
|
+
Box32,
|
|
12785
12892
|
{
|
|
12786
12893
|
padding: 4,
|
|
12787
12894
|
style: i > 0 ? { borderTop: "1px solid rgba(239,68,68,0.2)" } : void 0,
|
|
12788
12895
|
children: [
|
|
12789
|
-
/* @__PURE__ */
|
|
12790
|
-
/* @__PURE__ */
|
|
12791
|
-
/* @__PURE__ */
|
|
12792
|
-
/* @__PURE__ */
|
|
12896
|
+
/* @__PURE__ */ jsxs45(Flex33, { align: "center", justify: "space-between", wrap: "wrap", children: [
|
|
12897
|
+
/* @__PURE__ */ jsxs45(Flex33, { align: "center", gap: 2, children: [
|
|
12898
|
+
/* @__PURE__ */ jsx63(Text45, { size: 2, weight: "medium", children: area.feature }),
|
|
12899
|
+
/* @__PURE__ */ jsx63(
|
|
12793
12900
|
"span",
|
|
12794
12901
|
{
|
|
12795
12902
|
style: {
|
|
@@ -12804,7 +12911,7 @@ function WeaknessesList({
|
|
|
12804
12911
|
}
|
|
12805
12912
|
)
|
|
12806
12913
|
] }),
|
|
12807
|
-
/* @__PURE__ */
|
|
12914
|
+
/* @__PURE__ */ jsx63(
|
|
12808
12915
|
"span",
|
|
12809
12916
|
{
|
|
12810
12917
|
style: {
|
|
@@ -12817,8 +12924,8 @@ function WeaknessesList({
|
|
|
12817
12924
|
}
|
|
12818
12925
|
)
|
|
12819
12926
|
] }),
|
|
12820
|
-
/* @__PURE__ */
|
|
12821
|
-
area.invertedRetrievalGap && /* @__PURE__ */
|
|
12927
|
+
/* @__PURE__ */ jsx63(Box32, { paddingTop: 2, children: /* @__PURE__ */ jsxs45(Text45, { muted: true, size: 2, children: [
|
|
12928
|
+
area.invertedRetrievalGap && /* @__PURE__ */ jsxs45("span", { style: { color: "#fbbf24" }, children: [
|
|
12822
12929
|
"Agent does better by NOT finding these docs.",
|
|
12823
12930
|
" "
|
|
12824
12931
|
] }),
|
|
@@ -12833,22 +12940,22 @@ function WeaknessesList({
|
|
|
12833
12940
|
area.feature
|
|
12834
12941
|
)) })
|
|
12835
12942
|
] }),
|
|
12836
|
-
retrievalIssues.length > 0 && /* @__PURE__ */
|
|
12837
|
-
/* @__PURE__ */
|
|
12838
|
-
/* @__PURE__ */
|
|
12839
|
-
/* @__PURE__ */
|
|
12840
|
-
/* @__PURE__ */
|
|
12943
|
+
retrievalIssues.length > 0 && /* @__PURE__ */ jsxs45(Stack35, { space: 3, children: [
|
|
12944
|
+
/* @__PURE__ */ jsxs45(Flex33, { align: "center", gap: 2, children: [
|
|
12945
|
+
/* @__PURE__ */ jsx63(SearchIcon9, { style: { color: "#fbbf24" } }),
|
|
12946
|
+
/* @__PURE__ */ jsx63(Text45, { size: 2, weight: "medium", children: "Retrieval Issues (<70% efficiency)" }),
|
|
12947
|
+
/* @__PURE__ */ jsx63(InfoTip, { text: GLOSSARY.retrievalIssues })
|
|
12841
12948
|
] }),
|
|
12842
|
-
/* @__PURE__ */
|
|
12843
|
-
|
|
12949
|
+
/* @__PURE__ */ jsx63(Box32, { style: sectionStyle("amber"), children: retrievalIssues.map((area, i) => /* @__PURE__ */ jsxs45(
|
|
12950
|
+
Box32,
|
|
12844
12951
|
{
|
|
12845
12952
|
padding: 4,
|
|
12846
12953
|
style: i > 0 ? { borderTop: "1px solid rgba(245,158,11,0.2)" } : void 0,
|
|
12847
12954
|
children: [
|
|
12848
|
-
/* @__PURE__ */
|
|
12849
|
-
/* @__PURE__ */
|
|
12850
|
-
/* @__PURE__ */
|
|
12851
|
-
/* @__PURE__ */
|
|
12955
|
+
/* @__PURE__ */ jsxs45(Flex33, { align: "center", justify: "space-between", wrap: "wrap", children: [
|
|
12956
|
+
/* @__PURE__ */ jsxs45(Flex33, { align: "center", gap: 2, children: [
|
|
12957
|
+
/* @__PURE__ */ jsx63(Text45, { size: 2, weight: "medium", children: area.feature }),
|
|
12958
|
+
/* @__PURE__ */ jsx63(
|
|
12852
12959
|
"span",
|
|
12853
12960
|
{
|
|
12854
12961
|
style: {
|
|
@@ -12863,7 +12970,7 @@ function WeaknessesList({
|
|
|
12863
12970
|
}
|
|
12864
12971
|
)
|
|
12865
12972
|
] }),
|
|
12866
|
-
/* @__PURE__ */
|
|
12973
|
+
/* @__PURE__ */ jsx63(
|
|
12867
12974
|
"span",
|
|
12868
12975
|
{
|
|
12869
12976
|
style: {
|
|
@@ -12876,7 +12983,7 @@ function WeaknessesList({
|
|
|
12876
12983
|
}
|
|
12877
12984
|
)
|
|
12878
12985
|
] }),
|
|
12879
|
-
/* @__PURE__ */
|
|
12986
|
+
/* @__PURE__ */ jsx63(Box32, { paddingTop: 2, children: /* @__PURE__ */ jsxs45(Text45, { muted: true, size: 2, children: [
|
|
12880
12987
|
"Actual score (",
|
|
12881
12988
|
Math.round(area.actualScore ?? 0),
|
|
12882
12989
|
") is much lower than ceiling (",
|
|
@@ -12891,21 +12998,21 @@ function WeaknessesList({
|
|
|
12891
12998
|
area.feature
|
|
12892
12999
|
)) })
|
|
12893
13000
|
] }),
|
|
12894
|
-
dimWeaknesses.length > 0 && /* @__PURE__ */
|
|
12895
|
-
/* @__PURE__ */
|
|
12896
|
-
/* @__PURE__ */
|
|
12897
|
-
/* @__PURE__ */
|
|
12898
|
-
/* @__PURE__ */
|
|
13001
|
+
dimWeaknesses.length > 0 && /* @__PURE__ */ jsxs45(Stack35, { space: 3, children: [
|
|
13002
|
+
/* @__PURE__ */ jsxs45(Flex33, { align: "center", gap: 2, children: [
|
|
13003
|
+
/* @__PURE__ */ jsx63(WarningOutlineIcon3, { style: { color: "#fbbf24" } }),
|
|
13004
|
+
/* @__PURE__ */ jsx63(Text45, { size: 2, weight: "medium", children: "Dimension Weaknesses (<50)" }),
|
|
13005
|
+
/* @__PURE__ */ jsx63(InfoTip, { text: GLOSSARY.dimWeaknesses })
|
|
12899
13006
|
] }),
|
|
12900
|
-
/* @__PURE__ */
|
|
12901
|
-
|
|
13007
|
+
/* @__PURE__ */ jsx63(Box32, { style: neutralCardStyle, children: dimWeaknesses.map(({ area, dims }, i) => /* @__PURE__ */ jsxs45(
|
|
13008
|
+
Box32,
|
|
12902
13009
|
{
|
|
12903
13010
|
padding: 4,
|
|
12904
13011
|
style: i > 0 ? dividerStyle : void 0,
|
|
12905
13012
|
children: [
|
|
12906
|
-
/* @__PURE__ */
|
|
12907
|
-
/* @__PURE__ */
|
|
12908
|
-
/* @__PURE__ */
|
|
13013
|
+
/* @__PURE__ */ jsxs45(Flex33, { align: "center", gap: 2, paddingBottom: 2, children: [
|
|
13014
|
+
/* @__PURE__ */ jsx63(Text45, { size: 2, weight: "medium", children: area.feature }),
|
|
13015
|
+
/* @__PURE__ */ jsx63(
|
|
12909
13016
|
"span",
|
|
12910
13017
|
{
|
|
12911
13018
|
style: {
|
|
@@ -12920,7 +13027,7 @@ function WeaknessesList({
|
|
|
12920
13027
|
}
|
|
12921
13028
|
)
|
|
12922
13029
|
] }),
|
|
12923
|
-
/* @__PURE__ */
|
|
13030
|
+
/* @__PURE__ */ jsx63(Flex33, { gap: 2, wrap: "wrap", children: dims.map((w) => /* @__PURE__ */ jsx63(HoverTip, { text: w.tip, children: /* @__PURE__ */ jsxs45(
|
|
12924
13031
|
"span",
|
|
12925
13032
|
{
|
|
12926
13033
|
style: {
|
|
@@ -12942,35 +13049,35 @@ function WeaknessesList({
|
|
|
12942
13049
|
area.feature
|
|
12943
13050
|
)) })
|
|
12944
13051
|
] }),
|
|
12945
|
-
FEATURE_FLAGS.showRegressedSinceLastRun.enabled && regressed.length > 0 && /* @__PURE__ */
|
|
12946
|
-
/* @__PURE__ */
|
|
12947
|
-
|
|
13052
|
+
FEATURE_FLAGS.showRegressedSinceLastRun.enabled && regressed.length > 0 && /* @__PURE__ */ jsxs45(Box32, { style: neutralCardStyle, children: [
|
|
13053
|
+
/* @__PURE__ */ jsx63(
|
|
13054
|
+
Box32,
|
|
12948
13055
|
{
|
|
12949
13056
|
padding: 4,
|
|
12950
13057
|
style: { borderBottom: "1px solid var(--card-border-color)" },
|
|
12951
|
-
children: /* @__PURE__ */
|
|
12952
|
-
/* @__PURE__ */
|
|
12953
|
-
/* @__PURE__ */
|
|
13058
|
+
children: /* @__PURE__ */ jsxs45(Flex33, { align: "center", gap: 2, children: [
|
|
13059
|
+
/* @__PURE__ */ jsx63(ArrowDownIcon2, { style: { color: "#f87171" } }),
|
|
13060
|
+
/* @__PURE__ */ jsx63(Text45, { size: 2, weight: "medium", children: "Regressed Since Last Run" })
|
|
12954
13061
|
] })
|
|
12955
13062
|
}
|
|
12956
13063
|
),
|
|
12957
|
-
/* @__PURE__ */
|
|
13064
|
+
/* @__PURE__ */ jsx63(Stack35, { children: regressed.map((featureName, i) => {
|
|
12958
13065
|
const area = scores.find((s) => s.feature === featureName);
|
|
12959
13066
|
const areaDelta = perArea.find(
|
|
12960
13067
|
(p) => p.area === featureName
|
|
12961
13068
|
)?.delta;
|
|
12962
|
-
return /* @__PURE__ */
|
|
12963
|
-
|
|
13069
|
+
return /* @__PURE__ */ jsxs45(
|
|
13070
|
+
Flex33,
|
|
12964
13071
|
{
|
|
12965
13072
|
align: "center",
|
|
12966
13073
|
justify: "space-between",
|
|
12967
13074
|
padding: 4,
|
|
12968
13075
|
style: i > 0 ? dividerStyle : void 0,
|
|
12969
13076
|
children: [
|
|
12970
|
-
/* @__PURE__ */
|
|
12971
|
-
/* @__PURE__ */
|
|
12972
|
-
areaDelta != null && /* @__PURE__ */
|
|
12973
|
-
area && /* @__PURE__ */
|
|
13077
|
+
/* @__PURE__ */ jsx63(Text45, { size: 2, children: featureName }),
|
|
13078
|
+
/* @__PURE__ */ jsxs45(Flex33, { align: "center", gap: 3, children: [
|
|
13079
|
+
areaDelta != null && /* @__PURE__ */ jsx63(DeltaIndicator, { delta: areaDelta, icon: true }),
|
|
13080
|
+
area && /* @__PURE__ */ jsx63(
|
|
12974
13081
|
"span",
|
|
12975
13082
|
{
|
|
12976
13083
|
style: {
|
|
@@ -12992,32 +13099,32 @@ function WeaknessesList({
|
|
|
12992
13099
|
);
|
|
12993
13100
|
}) })
|
|
12994
13101
|
] }),
|
|
12995
|
-
efficiencyAnomalies.length > 0 && /* @__PURE__ */
|
|
12996
|
-
/* @__PURE__ */
|
|
12997
|
-
|
|
13102
|
+
efficiencyAnomalies.length > 0 && /* @__PURE__ */ jsxs45(Box32, { style: neutralCardStyle, children: [
|
|
13103
|
+
/* @__PURE__ */ jsx63(
|
|
13104
|
+
Box32,
|
|
12998
13105
|
{
|
|
12999
13106
|
padding: 4,
|
|
13000
13107
|
style: { borderBottom: "1px solid var(--card-border-color)" },
|
|
13001
|
-
children: /* @__PURE__ */
|
|
13002
|
-
/* @__PURE__ */
|
|
13003
|
-
/* @__PURE__ */
|
|
13004
|
-
/* @__PURE__ */
|
|
13005
|
-
/* @__PURE__ */
|
|
13108
|
+
children: /* @__PURE__ */ jsxs45(Stack35, { space: 2, children: [
|
|
13109
|
+
/* @__PURE__ */ jsxs45(Flex33, { align: "center", gap: 2, children: [
|
|
13110
|
+
/* @__PURE__ */ jsx63(BoltIcon2, { style: { color: "#fbbf24" } }),
|
|
13111
|
+
/* @__PURE__ */ jsx63(Text45, { size: 2, weight: "medium", children: "Efficiency Anomalies (>100%)" }),
|
|
13112
|
+
/* @__PURE__ */ jsx63(InfoTip, { text: GLOSSARY.efficiencyAnomalies })
|
|
13006
13113
|
] }),
|
|
13007
|
-
/* @__PURE__ */
|
|
13114
|
+
/* @__PURE__ */ jsx63(Text45, { muted: true, size: 2, children: "Agent outperforms injected docs \u2014 may indicate doc quality issues or agent memorization." })
|
|
13008
13115
|
] })
|
|
13009
13116
|
}
|
|
13010
13117
|
),
|
|
13011
|
-
/* @__PURE__ */
|
|
13012
|
-
|
|
13118
|
+
/* @__PURE__ */ jsx63(Stack35, { children: efficiencyAnomalies.map((area, i) => /* @__PURE__ */ jsxs45(
|
|
13119
|
+
Flex33,
|
|
13013
13120
|
{
|
|
13014
13121
|
align: "center",
|
|
13015
13122
|
justify: "space-between",
|
|
13016
13123
|
padding: 4,
|
|
13017
13124
|
style: i > 0 ? dividerStyle : void 0,
|
|
13018
13125
|
children: [
|
|
13019
|
-
/* @__PURE__ */
|
|
13020
|
-
/* @__PURE__ */
|
|
13126
|
+
/* @__PURE__ */ jsx63(Text45, { size: 2, children: area.feature }),
|
|
13127
|
+
/* @__PURE__ */ jsx63(
|
|
13021
13128
|
"span",
|
|
13022
13129
|
{
|
|
13023
13130
|
style: {
|
|
@@ -13045,12 +13152,12 @@ var tipArea = {
|
|
|
13045
13152
|
fontWeight: 600
|
|
13046
13153
|
};
|
|
13047
13154
|
function dimTip(area, dim, score, description) {
|
|
13048
|
-
return /* @__PURE__ */
|
|
13049
|
-
/* @__PURE__ */
|
|
13155
|
+
return /* @__PURE__ */ jsxs45(Text45, { size: 2, style: { lineHeight: 1.5 }, children: [
|
|
13156
|
+
/* @__PURE__ */ jsx63("span", { style: tipArea, children: area }),
|
|
13050
13157
|
" scores",
|
|
13051
13158
|
" ",
|
|
13052
|
-
/* @__PURE__ */
|
|
13053
|
-
/* @__PURE__ */
|
|
13159
|
+
/* @__PURE__ */ jsx63("span", { style: tipValue, children: score }),
|
|
13160
|
+
/* @__PURE__ */ jsx63("span", { style: { color: "var(--card-muted-fg-color)" }, children: "/100" }),
|
|
13054
13161
|
" on",
|
|
13055
13162
|
" ",
|
|
13056
13163
|
dim.toLowerCase(),
|
|
@@ -13079,7 +13186,7 @@ function getDimensionWeaknesses(area) {
|
|
|
13079
13186
|
}
|
|
13080
13187
|
|
|
13081
13188
|
// src/components/report-detail/ReportDetail.tsx
|
|
13082
|
-
import { Fragment as
|
|
13189
|
+
import { Fragment as Fragment16, jsx as jsx64, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
13083
13190
|
var OVERVIEW_TAB = { id: "overview", label: "Overview" };
|
|
13084
13191
|
var DIAGNOSTICS_TAB = { id: "diagnostics", label: "Diagnostics" };
|
|
13085
13192
|
var ACTIVITY_TAB = { id: "activity", label: "Agent Activity" };
|
|
@@ -13117,11 +13224,6 @@ function ReportDetail({
|
|
|
13117
13224
|
report?.provenance?.runId,
|
|
13118
13225
|
report?.summary?.artifactManifest?.testOutputs
|
|
13119
13226
|
);
|
|
13120
|
-
const diagnosisView = useDiagnosisArtifact(
|
|
13121
|
-
report?.provenance?.runId,
|
|
13122
|
-
reportId,
|
|
13123
|
-
report?.summary?.artifactManifest?.diagnosis
|
|
13124
|
-
);
|
|
13125
13227
|
const { summary } = report ?? {};
|
|
13126
13228
|
const hasWeaknesses = Boolean(
|
|
13127
13229
|
summary?.lowScoringJudgments && summary.lowScoringJudgments.length > 0
|
|
@@ -13154,11 +13256,11 @@ function ReportDetail({
|
|
|
13154
13256
|
[onTabChange]
|
|
13155
13257
|
);
|
|
13156
13258
|
if (loading) {
|
|
13157
|
-
return /* @__PURE__ */
|
|
13259
|
+
return /* @__PURE__ */ jsx64(LoadingState, { message: "Loading report\u2026" });
|
|
13158
13260
|
}
|
|
13159
13261
|
if (!report || !summary) {
|
|
13160
|
-
return /* @__PURE__ */
|
|
13161
|
-
/* @__PURE__ */
|
|
13262
|
+
return /* @__PURE__ */ jsx64(Box33, { padding: 5, children: /* @__PURE__ */ jsxs46(Stack36, { space: 4, children: [
|
|
13263
|
+
/* @__PURE__ */ jsx64(
|
|
13162
13264
|
Button12,
|
|
13163
13265
|
{
|
|
13164
13266
|
icon: ArrowLeftIcon3,
|
|
@@ -13167,18 +13269,18 @@ function ReportDetail({
|
|
|
13167
13269
|
text: "Back"
|
|
13168
13270
|
}
|
|
13169
13271
|
),
|
|
13170
|
-
/* @__PURE__ */
|
|
13272
|
+
/* @__PURE__ */ jsx64(Text46, { align: "center", muted: true, size: 3, children: "Report not found" })
|
|
13171
13273
|
] }) });
|
|
13172
13274
|
}
|
|
13173
13275
|
const { comparison, provenance } = report;
|
|
13174
13276
|
const totalTests = summary.scores.reduce((n, s) => n + s.testCount, 0);
|
|
13175
|
-
return /* @__PURE__ */
|
|
13277
|
+
return /* @__PURE__ */ jsx64(
|
|
13176
13278
|
ReportArtifactProvider,
|
|
13177
13279
|
{
|
|
13178
13280
|
runId: report.provenance?.runId,
|
|
13179
13281
|
manifest: summary?.artifactManifest,
|
|
13180
|
-
children: /* @__PURE__ */
|
|
13181
|
-
/* @__PURE__ */
|
|
13282
|
+
children: /* @__PURE__ */ jsx64(Box33, { padding: 4, children: /* @__PURE__ */ jsxs46(Stack36, { space: 5, children: [
|
|
13283
|
+
/* @__PURE__ */ jsx64(
|
|
13182
13284
|
ReportHeader,
|
|
13183
13285
|
{
|
|
13184
13286
|
completedAt: report.completedAt,
|
|
@@ -13187,11 +13289,11 @@ function ReportDetail({
|
|
|
13187
13289
|
title: report.title
|
|
13188
13290
|
}
|
|
13189
13291
|
),
|
|
13190
|
-
/* @__PURE__ */
|
|
13191
|
-
/* @__PURE__ */
|
|
13292
|
+
/* @__PURE__ */ jsxs46(Flex34, { align: "center", gap: 2, wrap: "wrap", children: [
|
|
13293
|
+
/* @__PURE__ */ jsx64(TabList, { space: 1, children: tabs.map((tab) => {
|
|
13192
13294
|
const isDisabled = disabledTabs.has(tab.id);
|
|
13193
13295
|
const tooltip = getDisabledTabTooltip(tab.id, summary);
|
|
13194
|
-
const tabElement = /* @__PURE__ */
|
|
13296
|
+
const tabElement = /* @__PURE__ */ jsx64(
|
|
13195
13297
|
Tab,
|
|
13196
13298
|
{
|
|
13197
13299
|
"aria-controls": `panel-${tab.id}`,
|
|
@@ -13202,27 +13304,27 @@ function ReportDetail({
|
|
|
13202
13304
|
selected: currentTab === tab.id
|
|
13203
13305
|
}
|
|
13204
13306
|
);
|
|
13205
|
-
return isDisabled && tooltip ? /* @__PURE__ */
|
|
13307
|
+
return isDisabled && tooltip ? /* @__PURE__ */ jsx64(
|
|
13206
13308
|
Tooltip10,
|
|
13207
13309
|
{
|
|
13208
|
-
content: /* @__PURE__ */
|
|
13310
|
+
content: /* @__PURE__ */ jsx64(Box33, { padding: 2, style: { maxWidth: 280 }, children: tooltip }),
|
|
13209
13311
|
placement: "bottom",
|
|
13210
13312
|
portal: true,
|
|
13211
|
-
children: /* @__PURE__ */
|
|
13313
|
+
children: /* @__PURE__ */ jsx64("span", { style: { display: "inline-block" }, children: tabElement })
|
|
13212
13314
|
},
|
|
13213
13315
|
tab.id
|
|
13214
|
-
) : /* @__PURE__ */
|
|
13316
|
+
) : /* @__PURE__ */ jsx64("span", { children: tabElement }, tab.id);
|
|
13215
13317
|
}) }),
|
|
13216
|
-
/* @__PURE__ */
|
|
13217
|
-
/* @__PURE__ */
|
|
13318
|
+
/* @__PURE__ */ jsxs46(Flex34, { align: "center", gap: 2, style: { marginLeft: "auto" }, children: [
|
|
13319
|
+
/* @__PURE__ */ jsx64(
|
|
13218
13320
|
HoverTip,
|
|
13219
13321
|
{
|
|
13220
13322
|
text: SOURCE_TIP[provenance.source.name] ?? GLOSSARY.reportMode,
|
|
13221
|
-
children: /* @__PURE__ */
|
|
13323
|
+
children: /* @__PURE__ */ jsx64(Badge10, { mode: "outline", tone: "default", children: provenance.source.name })
|
|
13222
13324
|
}
|
|
13223
13325
|
),
|
|
13224
|
-
/* @__PURE__ */
|
|
13225
|
-
/* @__PURE__ */
|
|
13326
|
+
/* @__PURE__ */ jsx64(HoverTip, { text: MODE_TIP2[provenance.mode] ?? GLOSSARY.reportMode, children: /* @__PURE__ */ jsx64(Badge10, { tone: "primary", children: provenance.mode }) }),
|
|
13327
|
+
/* @__PURE__ */ jsx64(
|
|
13226
13328
|
ReportActions,
|
|
13227
13329
|
{
|
|
13228
13330
|
artifactManifest: summary.artifactManifest,
|
|
@@ -13234,14 +13336,14 @@ function ReportDetail({
|
|
|
13234
13336
|
)
|
|
13235
13337
|
] })
|
|
13236
13338
|
] }),
|
|
13237
|
-
currentTab === "overview" && /* @__PURE__ */
|
|
13339
|
+
currentTab === "overview" && /* @__PURE__ */ jsx64(
|
|
13238
13340
|
TabPanel,
|
|
13239
13341
|
{
|
|
13240
13342
|
"aria-labelledby": "tab-overview",
|
|
13241
13343
|
hidden: currentTab !== "overview",
|
|
13242
13344
|
id: "panel-overview",
|
|
13243
|
-
children: /* @__PURE__ */
|
|
13244
|
-
/* @__PURE__ */
|
|
13345
|
+
children: /* @__PURE__ */ jsxs46(Stack36, { space: 5, children: [
|
|
13346
|
+
/* @__PURE__ */ jsx64(
|
|
13245
13347
|
DiagnosticsOverview,
|
|
13246
13348
|
{
|
|
13247
13349
|
comparison,
|
|
@@ -13252,36 +13354,28 @@ function ReportDetail({
|
|
|
13252
13354
|
totalTests
|
|
13253
13355
|
}
|
|
13254
13356
|
),
|
|
13255
|
-
|
|
13256
|
-
|
|
13257
|
-
|
|
13258
|
-
|
|
13259
|
-
|
|
13260
|
-
|
|
13261
|
-
|
|
13262
|
-
|
|
13263
|
-
|
|
13264
|
-
|
|
13265
|
-
{
|
|
13266
|
-
availability: diagnosisView.availability,
|
|
13267
|
-
cards: diagnosisView.cards
|
|
13268
|
-
}
|
|
13269
|
-
)
|
|
13270
|
-
] }),
|
|
13271
|
-
/* @__PURE__ */ jsx61(CostLatencyPanel, { testResults: summary.testResults }),
|
|
13272
|
-
/* @__PURE__ */ jsx61(
|
|
13357
|
+
/* @__PURE__ */ jsx64(
|
|
13358
|
+
DiagnosisSection,
|
|
13359
|
+
{
|
|
13360
|
+
artifactRef: summary?.artifactManifest?.diagnosis,
|
|
13361
|
+
reportId,
|
|
13362
|
+
runId: report.provenance?.runId
|
|
13363
|
+
}
|
|
13364
|
+
),
|
|
13365
|
+
/* @__PURE__ */ jsx64(CostLatencyPanel, { testResults: summary.testResults }),
|
|
13366
|
+
/* @__PURE__ */ jsx64(
|
|
13273
13367
|
LineageCard,
|
|
13274
13368
|
{
|
|
13275
13369
|
provenance,
|
|
13276
13370
|
reportId: report.reportId
|
|
13277
13371
|
}
|
|
13278
13372
|
),
|
|
13279
|
-
/* @__PURE__ */
|
|
13280
|
-
/* @__PURE__ */
|
|
13373
|
+
/* @__PURE__ */ jsx64(ProvenanceCard, { provenance }),
|
|
13374
|
+
/* @__PURE__ */ jsx64(PipelineExecutionPanel, {})
|
|
13281
13375
|
] })
|
|
13282
13376
|
}
|
|
13283
13377
|
),
|
|
13284
|
-
currentTab === "diagnostics" && hasDiagnostics && /* @__PURE__ */
|
|
13378
|
+
currentTab === "diagnostics" && hasDiagnostics && /* @__PURE__ */ jsx64(
|
|
13285
13379
|
DiagnosticsPanel,
|
|
13286
13380
|
{
|
|
13287
13381
|
artifactCache,
|
|
@@ -13297,13 +13391,13 @@ function ReportDetail({
|
|
|
13297
13391
|
testResults: summary.testResults
|
|
13298
13392
|
}
|
|
13299
13393
|
),
|
|
13300
|
-
currentTab === "activity" && hasAgentActivity && /* @__PURE__ */
|
|
13394
|
+
currentTab === "activity" && hasAgentActivity && /* @__PURE__ */ jsx64(
|
|
13301
13395
|
TabPanel,
|
|
13302
13396
|
{
|
|
13303
13397
|
"aria-labelledby": "tab-activity",
|
|
13304
13398
|
hidden: currentTab !== "activity",
|
|
13305
13399
|
id: "panel-activity",
|
|
13306
|
-
children: /* @__PURE__ */
|
|
13400
|
+
children: /* @__PURE__ */ jsx64(
|
|
13307
13401
|
AgentBehaviorCard,
|
|
13308
13402
|
{
|
|
13309
13403
|
agentBehavior: summary.agentBehavior,
|
|
@@ -13316,6 +13410,35 @@ function ReportDetail({
|
|
|
13316
13410
|
}
|
|
13317
13411
|
);
|
|
13318
13412
|
}
|
|
13413
|
+
function DiagnosisSection({
|
|
13414
|
+
artifactRef,
|
|
13415
|
+
reportId,
|
|
13416
|
+
runId
|
|
13417
|
+
}) {
|
|
13418
|
+
const view = useDiagnosisArtifact(runId, reportId, artifactRef);
|
|
13419
|
+
if (view.availability === "not-yet-generated") {
|
|
13420
|
+
return /* @__PURE__ */ jsx64(SynthesisNotGeneratedCTA, { reportId });
|
|
13421
|
+
}
|
|
13422
|
+
if (view.status === "idle" || view.status === "loading") {
|
|
13423
|
+
return /* @__PURE__ */ jsx64(DiagnosisSkeleton, {});
|
|
13424
|
+
}
|
|
13425
|
+
return /* @__PURE__ */ jsxs46(Fragment16, { children: [
|
|
13426
|
+
/* @__PURE__ */ jsx64(
|
|
13427
|
+
ScoreInterpretationPanel,
|
|
13428
|
+
{
|
|
13429
|
+
availability: view.availability,
|
|
13430
|
+
cards: view.cards
|
|
13431
|
+
}
|
|
13432
|
+
),
|
|
13433
|
+
/* @__PURE__ */ jsx64(
|
|
13434
|
+
RecommendationsSection,
|
|
13435
|
+
{
|
|
13436
|
+
availability: view.availability,
|
|
13437
|
+
cards: view.cards
|
|
13438
|
+
}
|
|
13439
|
+
)
|
|
13440
|
+
] });
|
|
13441
|
+
}
|
|
13319
13442
|
function parseDiagSubTab(raw) {
|
|
13320
13443
|
if (raw === "issues") return "issues";
|
|
13321
13444
|
return "strengths";
|
|
@@ -13341,9 +13464,9 @@ function DiagnosticsPanel({
|
|
|
13341
13464
|
const issueCount = scores.filter((s) => s.totalScore < SCORE_CAUTION).length + scores.filter((s) => s.negativeDocLift).length + scores.filter(
|
|
13342
13465
|
(s) => s.infrastructureEfficiency != null && s.infrastructureEfficiency < EFFICIENCY_CAUTION && !s.invertedRetrievalGap
|
|
13343
13466
|
).length;
|
|
13344
|
-
return /* @__PURE__ */
|
|
13345
|
-
/* @__PURE__ */
|
|
13346
|
-
|
|
13467
|
+
return /* @__PURE__ */ jsx64(TabPanel, { "aria-labelledby": "tab-diagnostics", id: "panel-diagnostics", children: /* @__PURE__ */ jsxs46(Stack36, { space: 4, children: [
|
|
13468
|
+
/* @__PURE__ */ jsx64(
|
|
13469
|
+
Flex34,
|
|
13347
13470
|
{
|
|
13348
13471
|
align: "center",
|
|
13349
13472
|
gap: 1,
|
|
@@ -13352,7 +13475,7 @@ function DiagnosticsPanel({
|
|
|
13352
13475
|
paddingBottom: 8
|
|
13353
13476
|
},
|
|
13354
13477
|
wrap: "wrap",
|
|
13355
|
-
children: DIAG_TABS.map((tab) => /* @__PURE__ */
|
|
13478
|
+
children: DIAG_TABS.map((tab) => /* @__PURE__ */ jsxs46(
|
|
13356
13479
|
"button",
|
|
13357
13480
|
{
|
|
13358
13481
|
onClick: () => onNavigate(tab.id === "strengths" ? null : tab.id, null),
|
|
@@ -13372,7 +13495,7 @@ function DiagnosticsPanel({
|
|
|
13372
13495
|
type: "button",
|
|
13373
13496
|
children: [
|
|
13374
13497
|
tab.label,
|
|
13375
|
-
tab.id === "issues" && issueCount > 0 && /* @__PURE__ */
|
|
13498
|
+
tab.id === "issues" && issueCount > 0 && /* @__PURE__ */ jsx64(
|
|
13376
13499
|
"span",
|
|
13377
13500
|
{
|
|
13378
13501
|
style: {
|
|
@@ -13392,7 +13515,7 @@ function DiagnosticsPanel({
|
|
|
13392
13515
|
))
|
|
13393
13516
|
}
|
|
13394
13517
|
),
|
|
13395
|
-
subTab === "strengths" && /* @__PURE__ */
|
|
13518
|
+
subTab === "strengths" && /* @__PURE__ */ jsx64(
|
|
13396
13519
|
StrengthsList,
|
|
13397
13520
|
{
|
|
13398
13521
|
comparison,
|
|
@@ -13401,8 +13524,8 @@ function DiagnosticsPanel({
|
|
|
13401
13524
|
scores
|
|
13402
13525
|
}
|
|
13403
13526
|
),
|
|
13404
|
-
subTab === "issues" && /* @__PURE__ */
|
|
13405
|
-
/* @__PURE__ */
|
|
13527
|
+
subTab === "issues" && /* @__PURE__ */ jsxs46(Stack36, { space: 5, children: [
|
|
13528
|
+
/* @__PURE__ */ jsx64(
|
|
13406
13529
|
WeaknessesList,
|
|
13407
13530
|
{
|
|
13408
13531
|
comparison,
|
|
@@ -13411,8 +13534,8 @@ function DiagnosticsPanel({
|
|
|
13411
13534
|
scores
|
|
13412
13535
|
}
|
|
13413
13536
|
),
|
|
13414
|
-
FEATURE_FLAGS.showFailureModes.enabled && /* @__PURE__ */
|
|
13415
|
-
judgments && judgments.length > 0 && /* @__PURE__ */
|
|
13537
|
+
FEATURE_FLAGS.showFailureModes.enabled && /* @__PURE__ */ jsx64(FailureModesPanel, { failureModes }),
|
|
13538
|
+
judgments && judgments.length > 0 && /* @__PURE__ */ jsx64(
|
|
13416
13539
|
JudgmentList,
|
|
13417
13540
|
{
|
|
13418
13541
|
artifactCache,
|
|
@@ -13448,17 +13571,17 @@ function getDisabledTabTooltip(tabId, summary) {
|
|
|
13448
13571
|
if (!summary) return null;
|
|
13449
13572
|
switch (tabId) {
|
|
13450
13573
|
case "diagnostics":
|
|
13451
|
-
return /* @__PURE__ */
|
|
13574
|
+
return /* @__PURE__ */ jsx64(Text46, { muted: true, size: 2, children: "No diagnostic data available. Diagnostics require at least one scored feature area." });
|
|
13452
13575
|
case "activity":
|
|
13453
|
-
return summary.evaluationMode === "baseline" ? /* @__PURE__ */
|
|
13576
|
+
return summary.evaluationMode === "baseline" ? /* @__PURE__ */ jsxs46(Text46, { muted: true, size: 2, children: [
|
|
13454
13577
|
"Not available for baseline-only evaluations. Run with",
|
|
13455
13578
|
" ",
|
|
13456
|
-
/* @__PURE__ */
|
|
13579
|
+
/* @__PURE__ */ jsx64("code", { style: inlineCodeStyle, children: "--mode full" }),
|
|
13457
13580
|
" or",
|
|
13458
13581
|
" ",
|
|
13459
|
-
/* @__PURE__ */
|
|
13582
|
+
/* @__PURE__ */ jsx64("code", { style: inlineCodeStyle, children: "--mode agentic" }),
|
|
13460
13583
|
" to capture agent browsing behavior."
|
|
13461
|
-
] }) : /* @__PURE__ */
|
|
13584
|
+
] }) : /* @__PURE__ */ jsx64(Text46, { muted: true, size: 2, children: "No agent activity data was recorded for this evaluation." });
|
|
13462
13585
|
default:
|
|
13463
13586
|
return null;
|
|
13464
13587
|
}
|
|
@@ -13466,12 +13589,12 @@ function getDisabledTabTooltip(tabId, summary) {
|
|
|
13466
13589
|
|
|
13467
13590
|
// src/components/report-detail/AreaScoreRow.tsx
|
|
13468
13591
|
import { WarningOutlineIcon as WarningOutlineIcon4 } from "@sanity/icons";
|
|
13469
|
-
import { Box as
|
|
13470
|
-
import { jsx as
|
|
13592
|
+
import { Box as Box34, Flex as Flex35, Stack as Stack37, Text as Text47 } from "@sanity/ui";
|
|
13593
|
+
import { jsx as jsx65, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
13471
13594
|
|
|
13472
13595
|
// src/components/report-detail/AreaScoreTable.tsx
|
|
13473
13596
|
import React6 from "react";
|
|
13474
|
-
import { Card as
|
|
13597
|
+
import { Card as Card23, Stack as Stack38, Text as Text49 } from "@sanity/ui";
|
|
13475
13598
|
|
|
13476
13599
|
// src/lib/scoring.ts
|
|
13477
13600
|
var TONE_MAP = {
|
|
@@ -13500,44 +13623,44 @@ function scoreHex(score) {
|
|
|
13500
13623
|
}
|
|
13501
13624
|
|
|
13502
13625
|
// src/components/primitives/ScoreCell.tsx
|
|
13503
|
-
import { Card as
|
|
13504
|
-
import { jsx as
|
|
13626
|
+
import { Card as Card22, Text as Text48 } from "@sanity/ui";
|
|
13627
|
+
import { jsx as jsx66 } from "react/jsx-runtime";
|
|
13505
13628
|
|
|
13506
13629
|
// src/components/report-detail/AreaScoreTable.tsx
|
|
13507
|
-
import { jsx as
|
|
13630
|
+
import { jsx as jsx67, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
13508
13631
|
|
|
13509
13632
|
// src/components/report-detail/AutoComparisonCard.tsx
|
|
13510
|
-
import { Badge as Badge11, Box as
|
|
13511
|
-
import { jsx as
|
|
13633
|
+
import { Badge as Badge11, Box as Box35, Card as Card24, Flex as Flex36, Grid as Grid5, Stack as Stack39, Text as Text50, Tooltip as Tooltip11 } from "@sanity/ui";
|
|
13634
|
+
import { jsx as jsx68, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
13512
13635
|
|
|
13513
13636
|
// src/components/report-detail/OverviewStats.tsx
|
|
13514
13637
|
import { Grid as Grid6 } from "@sanity/ui";
|
|
13515
|
-
import { jsx as
|
|
13638
|
+
import { jsx as jsx69, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
13516
13639
|
|
|
13517
13640
|
// src/components/report-detail/ThreeLayerTable.tsx
|
|
13518
13641
|
import React7 from "react";
|
|
13519
|
-
import { Badge as Badge12, Card as
|
|
13520
|
-
import { jsx as
|
|
13642
|
+
import { Badge as Badge12, Card as Card25, Flex as Flex37, Stack as Stack40, Text as Text51 } from "@sanity/ui";
|
|
13643
|
+
import { jsx as jsx70, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
13521
13644
|
|
|
13522
13645
|
// src/components/report-detail/JudgmentDetailDrawerOutlet.tsx
|
|
13523
|
-
import { Card as
|
|
13646
|
+
import { Card as Card26 } from "@sanity/ui";
|
|
13524
13647
|
import { useCallback as useCallback39, useEffect as useEffect16, useRef as useRef8, useState as useState30 } from "react";
|
|
13525
13648
|
|
|
13526
13649
|
// src/components/report-detail/JudgmentDetailDrawer.tsx
|
|
13527
13650
|
import { useEffect as useEffect15, useState as useState29 } from "react";
|
|
13528
13651
|
import { CloseIcon as CloseIcon3 } from "@sanity/icons";
|
|
13529
13652
|
import {
|
|
13530
|
-
Box as
|
|
13653
|
+
Box as Box36,
|
|
13531
13654
|
Button as Button13,
|
|
13532
|
-
Flex as
|
|
13533
|
-
Stack as
|
|
13655
|
+
Flex as Flex38,
|
|
13656
|
+
Stack as Stack41,
|
|
13534
13657
|
Tab as Tab2,
|
|
13535
13658
|
TabList as TabList2,
|
|
13536
13659
|
TabPanel as TabPanel2,
|
|
13537
13660
|
Text as Text52,
|
|
13538
13661
|
Tooltip as Tooltip12
|
|
13539
13662
|
} from "@sanity/ui";
|
|
13540
|
-
import { jsx as
|
|
13663
|
+
import { jsx as jsx71, jsxs as jsxs52 } from "react/jsx-runtime";
|
|
13541
13664
|
var HEADER_STYLE = {
|
|
13542
13665
|
borderBottom: "1px solid var(--card-border-color)"
|
|
13543
13666
|
};
|
|
@@ -13576,7 +13699,7 @@ function DocBadge({
|
|
|
13576
13699
|
const [hovered, setHovered] = useState29(false);
|
|
13577
13700
|
const isLinked = Boolean(doc.documentId);
|
|
13578
13701
|
const tooltipLabel = isLinked ? `Edit "${doc.title || doc.slug}"` : doc.title || doc.slug;
|
|
13579
|
-
const badge = /* @__PURE__ */
|
|
13702
|
+
const badge = /* @__PURE__ */ jsx71(
|
|
13580
13703
|
"span",
|
|
13581
13704
|
{
|
|
13582
13705
|
style: {
|
|
@@ -13589,13 +13712,13 @@ function DocBadge({
|
|
|
13589
13712
|
children: doc.slug
|
|
13590
13713
|
}
|
|
13591
13714
|
);
|
|
13592
|
-
return /* @__PURE__ */
|
|
13715
|
+
return /* @__PURE__ */ jsx71(
|
|
13593
13716
|
Tooltip12,
|
|
13594
13717
|
{
|
|
13595
|
-
content: /* @__PURE__ */
|
|
13718
|
+
content: /* @__PURE__ */ jsx71(Box36, { padding: 2, children: /* @__PURE__ */ jsx71(Text52, { size: 2, children: tooltipLabel }) }),
|
|
13596
13719
|
placement: "bottom",
|
|
13597
13720
|
portal: true,
|
|
13598
|
-
children: isLinked ? /* @__PURE__ */
|
|
13721
|
+
children: isLinked ? /* @__PURE__ */ jsx71(
|
|
13599
13722
|
"a",
|
|
13600
13723
|
{
|
|
13601
13724
|
href: `/intent/edit/id=${doc.documentId}`,
|
|
@@ -13610,7 +13733,7 @@ function DocBadge({
|
|
|
13610
13733
|
},
|
|
13611
13734
|
children: badge
|
|
13612
13735
|
}
|
|
13613
|
-
) : /* @__PURE__ */
|
|
13736
|
+
) : /* @__PURE__ */ jsx71("span", { children: badge })
|
|
13614
13737
|
}
|
|
13615
13738
|
);
|
|
13616
13739
|
}
|
|
@@ -13675,15 +13798,15 @@ function JudgmentDetailDrawer({
|
|
|
13675
13798
|
window.addEventListener("keydown", onKeyDown);
|
|
13676
13799
|
return () => window.removeEventListener("keydown", onKeyDown);
|
|
13677
13800
|
}, [onClose]);
|
|
13678
|
-
return /* @__PURE__ */
|
|
13679
|
-
|
|
13801
|
+
return /* @__PURE__ */ jsxs52(
|
|
13802
|
+
Flex38,
|
|
13680
13803
|
{
|
|
13681
13804
|
"aria-label": `Judgment detail: ${judgment.score} ${dimLabel}, ${taskName}`,
|
|
13682
13805
|
direction: "column",
|
|
13683
13806
|
role: "dialog",
|
|
13684
13807
|
style: { flex: 1, height: "100%", minHeight: 0, overflow: "hidden" },
|
|
13685
13808
|
children: [
|
|
13686
|
-
/* @__PURE__ */
|
|
13809
|
+
/* @__PURE__ */ jsx71(
|
|
13687
13810
|
"div",
|
|
13688
13811
|
{
|
|
13689
13812
|
"aria-hidden": true,
|
|
@@ -13696,10 +13819,10 @@ function JudgmentDetailDrawer({
|
|
|
13696
13819
|
}
|
|
13697
13820
|
}
|
|
13698
13821
|
),
|
|
13699
|
-
/* @__PURE__ */
|
|
13700
|
-
/* @__PURE__ */
|
|
13701
|
-
/* @__PURE__ */
|
|
13702
|
-
/* @__PURE__ */
|
|
13822
|
+
/* @__PURE__ */ jsxs52(Flex38, { align: "flex-start", gap: 2, padding: 4, style: HEADER_STYLE, children: [
|
|
13823
|
+
/* @__PURE__ */ jsxs52(Stack41, { flex: 1, space: 2, children: [
|
|
13824
|
+
/* @__PURE__ */ jsxs52(Flex38, { align: "center", gap: 2, wrap: "wrap", children: [
|
|
13825
|
+
/* @__PURE__ */ jsx71(
|
|
13703
13826
|
"span",
|
|
13704
13827
|
{
|
|
13705
13828
|
style: {
|
|
@@ -13714,7 +13837,7 @@ function JudgmentDetailDrawer({
|
|
|
13714
13837
|
children: judgment.score
|
|
13715
13838
|
}
|
|
13716
13839
|
),
|
|
13717
|
-
/* @__PURE__ */
|
|
13840
|
+
/* @__PURE__ */ jsx71(
|
|
13718
13841
|
"span",
|
|
13719
13842
|
{
|
|
13720
13843
|
style: {
|
|
@@ -13727,13 +13850,13 @@ function JudgmentDetailDrawer({
|
|
|
13727
13850
|
children: dimLabel
|
|
13728
13851
|
}
|
|
13729
13852
|
),
|
|
13730
|
-
/* @__PURE__ */
|
|
13853
|
+
/* @__PURE__ */ jsx71(
|
|
13731
13854
|
Tooltip12,
|
|
13732
13855
|
{
|
|
13733
|
-
content: /* @__PURE__ */
|
|
13856
|
+
content: /* @__PURE__ */ jsx71(Box36, { padding: 2, children: /* @__PURE__ */ jsx71(Text52, { size: 1, children: judgment.modelId }) }),
|
|
13734
13857
|
placement: "bottom",
|
|
13735
13858
|
portal: true,
|
|
13736
|
-
children: /* @__PURE__ */
|
|
13859
|
+
children: /* @__PURE__ */ jsx71(
|
|
13737
13860
|
"span",
|
|
13738
13861
|
{
|
|
13739
13862
|
style: {
|
|
@@ -13750,7 +13873,7 @@ function JudgmentDetailDrawer({
|
|
|
13750
13873
|
)
|
|
13751
13874
|
}
|
|
13752
13875
|
),
|
|
13753
|
-
(testResult?.latencyMs != null || testResult?.cost != null && testResult.cost > 0) && /* @__PURE__ */
|
|
13876
|
+
(testResult?.latencyMs != null || testResult?.cost != null && testResult.cost > 0) && /* @__PURE__ */ jsx71(
|
|
13754
13877
|
"span",
|
|
13755
13878
|
{
|
|
13756
13879
|
"aria-hidden": true,
|
|
@@ -13762,38 +13885,38 @@ function JudgmentDetailDrawer({
|
|
|
13762
13885
|
}
|
|
13763
13886
|
}
|
|
13764
13887
|
),
|
|
13765
|
-
testResult?.latencyMs != null && /* @__PURE__ */
|
|
13888
|
+
testResult?.latencyMs != null && /* @__PURE__ */ jsx71(
|
|
13766
13889
|
Tooltip12,
|
|
13767
13890
|
{
|
|
13768
|
-
content: /* @__PURE__ */
|
|
13891
|
+
content: /* @__PURE__ */ jsx71(Box36, { padding: 2, children: /* @__PURE__ */ jsx71(Text52, { size: 1, children: "End-to-end generation latency for this model call." }) }),
|
|
13769
13892
|
placement: "bottom",
|
|
13770
13893
|
portal: true,
|
|
13771
|
-
children: /* @__PURE__ */
|
|
13894
|
+
children: /* @__PURE__ */ jsxs52(Text52, { muted: true, size: 1, children: [
|
|
13772
13895
|
(testResult.latencyMs / 1e3).toFixed(1),
|
|
13773
13896
|
"s"
|
|
13774
13897
|
] })
|
|
13775
13898
|
}
|
|
13776
13899
|
),
|
|
13777
|
-
testResult?.cost != null && testResult.cost > 0 && /* @__PURE__ */
|
|
13900
|
+
testResult?.cost != null && testResult.cost > 0 && /* @__PURE__ */ jsx71(
|
|
13778
13901
|
Tooltip12,
|
|
13779
13902
|
{
|
|
13780
|
-
content: /* @__PURE__ */
|
|
13903
|
+
content: /* @__PURE__ */ jsx71(Box36, { padding: 2, children: /* @__PURE__ */ jsx71(Text52, { size: 1, children: "Provider-reported cost for this model call." }) }),
|
|
13781
13904
|
placement: "bottom",
|
|
13782
13905
|
portal: true,
|
|
13783
|
-
children: /* @__PURE__ */
|
|
13906
|
+
children: /* @__PURE__ */ jsxs52(Text52, { muted: true, size: 1, children: [
|
|
13784
13907
|
"$",
|
|
13785
13908
|
testResult.cost.toFixed(4)
|
|
13786
13909
|
] })
|
|
13787
13910
|
}
|
|
13788
13911
|
)
|
|
13789
13912
|
] }),
|
|
13790
|
-
/* @__PURE__ */
|
|
13791
|
-
/* @__PURE__ */
|
|
13792
|
-
/* @__PURE__ */
|
|
13913
|
+
/* @__PURE__ */ jsxs52(Flex38, { align: "center", gap: 2, wrap: "wrap", children: [
|
|
13914
|
+
/* @__PURE__ */ jsx71(Text52, { size: 2, weight: "medium", children: taskName }),
|
|
13915
|
+
/* @__PURE__ */ jsx71(VariantBadge, { variant })
|
|
13793
13916
|
] })
|
|
13794
13917
|
] }),
|
|
13795
|
-
/* @__PURE__ */
|
|
13796
|
-
/* @__PURE__ */
|
|
13918
|
+
/* @__PURE__ */ jsxs52(Flex38, { align: "center", gap: 1, children: [
|
|
13919
|
+
/* @__PURE__ */ jsx71(
|
|
13797
13920
|
"span",
|
|
13798
13921
|
{
|
|
13799
13922
|
style: {
|
|
@@ -13811,7 +13934,7 @@ function JudgmentDetailDrawer({
|
|
|
13811
13934
|
children: "Esc"
|
|
13812
13935
|
}
|
|
13813
13936
|
),
|
|
13814
|
-
/* @__PURE__ */
|
|
13937
|
+
/* @__PURE__ */ jsx71(
|
|
13815
13938
|
Button13,
|
|
13816
13939
|
{
|
|
13817
13940
|
"aria-label": "Close (Esc)",
|
|
@@ -13824,8 +13947,8 @@ function JudgmentDetailDrawer({
|
|
|
13824
13947
|
)
|
|
13825
13948
|
] })
|
|
13826
13949
|
] }),
|
|
13827
|
-
/* @__PURE__ */
|
|
13828
|
-
|
|
13950
|
+
/* @__PURE__ */ jsxs52(
|
|
13951
|
+
Flex38,
|
|
13829
13952
|
{
|
|
13830
13953
|
align: "center",
|
|
13831
13954
|
gap: 2,
|
|
@@ -13834,8 +13957,8 @@ function JudgmentDetailDrawer({
|
|
|
13834
13957
|
paddingY: 2,
|
|
13835
13958
|
style: TAB_BAR_STYLE,
|
|
13836
13959
|
children: [
|
|
13837
|
-
/* @__PURE__ */
|
|
13838
|
-
/* @__PURE__ */
|
|
13960
|
+
/* @__PURE__ */ jsx71(Box36, { flex: 1, style: { minWidth: 0 }, children: /* @__PURE__ */ jsxs52(TabList2, { space: 2, children: [
|
|
13961
|
+
/* @__PURE__ */ jsx71(
|
|
13839
13962
|
Tab2,
|
|
13840
13963
|
{
|
|
13841
13964
|
"aria-controls": "judgment-panel-reasoning",
|
|
@@ -13845,7 +13968,7 @@ function JudgmentDetailDrawer({
|
|
|
13845
13968
|
selected: tab === "reasoning"
|
|
13846
13969
|
}
|
|
13847
13970
|
),
|
|
13848
|
-
hasOutputTab && /* @__PURE__ */
|
|
13971
|
+
hasOutputTab && /* @__PURE__ */ jsx71(
|
|
13849
13972
|
Tab2,
|
|
13850
13973
|
{
|
|
13851
13974
|
"aria-controls": "judgment-panel-output",
|
|
@@ -13856,7 +13979,7 @@ function JudgmentDetailDrawer({
|
|
|
13856
13979
|
}
|
|
13857
13980
|
)
|
|
13858
13981
|
] }) }),
|
|
13859
|
-
/* @__PURE__ */
|
|
13982
|
+
/* @__PURE__ */ jsx71(
|
|
13860
13983
|
JudgmentActions,
|
|
13861
13984
|
{
|
|
13862
13985
|
onShowPrompts: onShowPrompts ? () => onShowPrompts(judgment) : void 0
|
|
@@ -13865,15 +13988,15 @@ function JudgmentDetailDrawer({
|
|
|
13865
13988
|
]
|
|
13866
13989
|
}
|
|
13867
13990
|
),
|
|
13868
|
-
/* @__PURE__ */
|
|
13869
|
-
/* @__PURE__ */
|
|
13991
|
+
/* @__PURE__ */ jsxs52(Box36, { padding: 4, style: CONTENT_STYLE, children: [
|
|
13992
|
+
/* @__PURE__ */ jsx71(
|
|
13870
13993
|
TabPanel2,
|
|
13871
13994
|
{
|
|
13872
13995
|
"aria-labelledby": "judgment-tab-reasoning",
|
|
13873
13996
|
hidden: tab !== "reasoning",
|
|
13874
13997
|
id: "judgment-panel-reasoning",
|
|
13875
|
-
children: /* @__PURE__ */
|
|
13876
|
-
/* @__PURE__ */
|
|
13998
|
+
children: /* @__PURE__ */ jsxs52(Box36, { style: COPYABLE_BLOCK_STYLE, children: [
|
|
13999
|
+
/* @__PURE__ */ jsx71(Box36, { style: COPY_BUTTON_SLOT_STYLE, children: /* @__PURE__ */ jsx71(
|
|
13877
14000
|
CopyButton,
|
|
13878
14001
|
{
|
|
13879
14002
|
copiedLabel: "Reasoning copied",
|
|
@@ -13881,26 +14004,26 @@ function JudgmentDetailDrawer({
|
|
|
13881
14004
|
text: reasoningText
|
|
13882
14005
|
}
|
|
13883
14006
|
) }),
|
|
13884
|
-
/* @__PURE__ */
|
|
13885
|
-
reasoningIsPreview && /* @__PURE__ */
|
|
14007
|
+
/* @__PURE__ */ jsx71(Markdown, { content: reasoningText }),
|
|
14008
|
+
reasoningIsPreview && /* @__PURE__ */ jsx71(Text52, { muted: true, size: 1, style: { marginTop: 8 }, children: fullStatus === "loading" ? "Loading full reasoning\u2026" : "Showing preview (280 chars). Full reasoning not yet loaded." })
|
|
13886
14009
|
] })
|
|
13887
14010
|
}
|
|
13888
14011
|
),
|
|
13889
|
-
hasOutputTab && /* @__PURE__ */
|
|
14012
|
+
hasOutputTab && /* @__PURE__ */ jsxs52(
|
|
13890
14013
|
TabPanel2,
|
|
13891
14014
|
{
|
|
13892
14015
|
"aria-labelledby": "judgment-tab-output",
|
|
13893
14016
|
hidden: tab !== "output",
|
|
13894
14017
|
id: "judgment-panel-output",
|
|
13895
14018
|
children: [
|
|
13896
|
-
!resolvedOutput && fetchInFlight && /* @__PURE__ */
|
|
13897
|
-
!resolvedOutput && fetchFailed && /* @__PURE__ */
|
|
14019
|
+
!resolvedOutput && fetchInFlight && /* @__PURE__ */ jsx71(Text52, { muted: true, size: 1, children: "Fetching model output\u2026" }),
|
|
14020
|
+
!resolvedOutput && fetchFailed && /* @__PURE__ */ jsxs52(Text52, { muted: true, size: 1, style: { color: "#f87171" }, children: [
|
|
13898
14021
|
"Failed to load model output",
|
|
13899
14022
|
artifactCache?.error ? `: ${artifactCache.error}` : ""
|
|
13900
14023
|
] }),
|
|
13901
|
-
!resolvedOutput && entryUnavailable && /* @__PURE__ */
|
|
13902
|
-
resolvedOutput && /* @__PURE__ */
|
|
13903
|
-
/* @__PURE__ */
|
|
14024
|
+
!resolvedOutput && entryUnavailable && /* @__PURE__ */ jsx71(Text52, { muted: true, size: 1, children: "Model output not available for this entry." }),
|
|
14025
|
+
resolvedOutput && /* @__PURE__ */ jsxs52(Box36, { style: COPYABLE_BLOCK_STYLE, children: [
|
|
14026
|
+
/* @__PURE__ */ jsx71(Box36, { style: COPY_BUTTON_SLOT_STYLE, children: /* @__PURE__ */ jsx71(
|
|
13904
14027
|
CopyButton,
|
|
13905
14028
|
{
|
|
13906
14029
|
copiedLabel: "Output copied",
|
|
@@ -13908,7 +14031,7 @@ function JudgmentDetailDrawer({
|
|
|
13908
14031
|
text: resolvedOutput
|
|
13909
14032
|
}
|
|
13910
14033
|
) }),
|
|
13911
|
-
/* @__PURE__ */
|
|
14034
|
+
/* @__PURE__ */ jsx71(Markdown, { content: resolvedOutput })
|
|
13912
14035
|
] })
|
|
13913
14036
|
]
|
|
13914
14037
|
}
|
|
@@ -13916,9 +14039,9 @@ function JudgmentDetailDrawer({
|
|
|
13916
14039
|
] }),
|
|
13917
14040
|
(() => {
|
|
13918
14041
|
const docs = judgment.contextDocs ?? judgment.canonicalDocs;
|
|
13919
|
-
return docs && docs.length > 0 ? /* @__PURE__ */
|
|
13920
|
-
/* @__PURE__ */
|
|
13921
|
-
docs.map((doc) => /* @__PURE__ */
|
|
14042
|
+
return docs && docs.length > 0 ? /* @__PURE__ */ jsx71(Box36, { padding: 4, style: RELATED_DOCS_STYLE, children: /* @__PURE__ */ jsxs52(Flex38, { align: "center", gap: 2, wrap: "wrap", children: [
|
|
14043
|
+
/* @__PURE__ */ jsx71("span", { style: SECTION_LABEL_STYLE, children: "Related docs" }),
|
|
14044
|
+
docs.map((doc) => /* @__PURE__ */ jsx71(DocBadge, { doc }, doc.slug))
|
|
13922
14045
|
] }) }) : null;
|
|
13923
14046
|
})()
|
|
13924
14047
|
]
|
|
@@ -13927,7 +14050,7 @@ function JudgmentDetailDrawer({
|
|
|
13927
14050
|
}
|
|
13928
14051
|
|
|
13929
14052
|
// src/components/report-detail/JudgmentDetailDrawerOutlet.tsx
|
|
13930
|
-
import { jsx as
|
|
14053
|
+
import { jsx as jsx72, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
13931
14054
|
var MIN_WIDTH2 = 480;
|
|
13932
14055
|
var MAX_WIDTH2 = 900;
|
|
13933
14056
|
var OVERLAY_BREAKPOINT2 = 1024;
|
|
@@ -13997,7 +14120,7 @@ function JudgmentDetailDrawerOutlet({
|
|
|
13997
14120
|
const isNarrow = useIsNarrow2();
|
|
13998
14121
|
const { handleMouseDown, width } = useResizable2(computeDefaultWidth());
|
|
13999
14122
|
if (!isOpen || !active) return null;
|
|
14000
|
-
return /* @__PURE__ */
|
|
14123
|
+
return /* @__PURE__ */ jsxs53(
|
|
14001
14124
|
"div",
|
|
14002
14125
|
{
|
|
14003
14126
|
style: isNarrow ? {
|
|
@@ -14023,7 +14146,7 @@ function JudgmentDetailDrawerOutlet({
|
|
|
14023
14146
|
width
|
|
14024
14147
|
},
|
|
14025
14148
|
children: [
|
|
14026
|
-
!isNarrow && /* @__PURE__ */
|
|
14149
|
+
!isNarrow && /* @__PURE__ */ jsx72(
|
|
14027
14150
|
"div",
|
|
14028
14151
|
{
|
|
14029
14152
|
"aria-label": "Resize judgment drawer",
|
|
@@ -14048,8 +14171,8 @@ function JudgmentDetailDrawerOutlet({
|
|
|
14048
14171
|
}
|
|
14049
14172
|
}
|
|
14050
14173
|
),
|
|
14051
|
-
/* @__PURE__ */
|
|
14052
|
-
|
|
14174
|
+
/* @__PURE__ */ jsx72(
|
|
14175
|
+
Card26,
|
|
14053
14176
|
{
|
|
14054
14177
|
borderLeft: !isNarrow,
|
|
14055
14178
|
style: {
|
|
@@ -14058,7 +14181,7 @@ function JudgmentDetailDrawerOutlet({
|
|
|
14058
14181
|
flexDirection: "column",
|
|
14059
14182
|
overflow: "hidden"
|
|
14060
14183
|
},
|
|
14061
|
-
children: /* @__PURE__ */
|
|
14184
|
+
children: /* @__PURE__ */ jsx72(ReportArtifactProvider, { runId: active.runId, manifest: active.manifest, children: /* @__PURE__ */ jsx72(
|
|
14062
14185
|
JudgmentDetailDrawer,
|
|
14063
14186
|
{
|
|
14064
14187
|
artifactCache: active.artifactCache,
|
|
@@ -14076,12 +14199,12 @@ function JudgmentDetailDrawerOutlet({
|
|
|
14076
14199
|
}
|
|
14077
14200
|
|
|
14078
14201
|
// src/components/ScoreTimeline.tsx
|
|
14079
|
-
import { Card as
|
|
14202
|
+
import { Card as Card29, Flex as Flex41, Spinner, Stack as Stack44, Text as Text55 } from "@sanity/ui";
|
|
14080
14203
|
import { useCallback as useCallback43, useMemo as useMemo20, useState as useState33 } from "react";
|
|
14081
14204
|
import { useRouter as useRouter4 } from "sanity/router";
|
|
14082
14205
|
|
|
14083
14206
|
// src/components/timeline/TimelineChart.tsx
|
|
14084
|
-
import { Box as
|
|
14207
|
+
import { Box as Box37, Card as Card27, Flex as Flex39, Stack as Stack42, Text as Text53 } from "@sanity/ui";
|
|
14085
14208
|
import {
|
|
14086
14209
|
useCallback as useCallback40,
|
|
14087
14210
|
useEffect as useEffect17,
|
|
@@ -14331,7 +14454,7 @@ function effectiveStartDate(rangeDays, floor = TIMELINE_DATA_START_DATE) {
|
|
|
14331
14454
|
}
|
|
14332
14455
|
|
|
14333
14456
|
// src/components/timeline/TimelineChart.tsx
|
|
14334
|
-
import { jsx as
|
|
14457
|
+
import { jsx as jsx73, jsxs as jsxs54 } from "react/jsx-runtime";
|
|
14335
14458
|
var CHART_HEIGHT = 280;
|
|
14336
14459
|
var PAD_BOTTOM = 36;
|
|
14337
14460
|
var PAD_LEFT = 44;
|
|
@@ -14480,11 +14603,11 @@ function TimelineChart({
|
|
|
14480
14603
|
const activeIdx = hoverIdx ?? focusIdx;
|
|
14481
14604
|
const active = activeIdx !== null ? computed[activeIdx] : null;
|
|
14482
14605
|
if (computed.length === 0) {
|
|
14483
|
-
return /* @__PURE__ */
|
|
14606
|
+
return /* @__PURE__ */ jsx73(Card27, { padding: 4, radius: 2, shadow: 1, children: /* @__PURE__ */ jsx73(Flex39, { align: "center", justify: "center", style: { height: 220 }, children: /* @__PURE__ */ jsx73(Text53, { muted: true, size: 2, children: "No reports found in this window. Adjust the filters or extend the time range." }) }) });
|
|
14484
14607
|
}
|
|
14485
|
-
return /* @__PURE__ */
|
|
14486
|
-
/* @__PURE__ */
|
|
14487
|
-
/* @__PURE__ */
|
|
14608
|
+
return /* @__PURE__ */ jsx73(Card27, { padding: 3, radius: 2, shadow: 1, children: /* @__PURE__ */ jsxs54(Stack42, { space: 2, children: [
|
|
14609
|
+
/* @__PURE__ */ jsxs54(Box37, { ref: containerRef, style: { position: "relative", width: "100%" }, children: [
|
|
14610
|
+
/* @__PURE__ */ jsxs54(
|
|
14488
14611
|
"svg",
|
|
14489
14612
|
{
|
|
14490
14613
|
"aria-label": "Score timeline chart",
|
|
@@ -14499,8 +14622,8 @@ function TimelineChart({
|
|
|
14499
14622
|
children: [
|
|
14500
14623
|
Y_TICKS.map((tick) => {
|
|
14501
14624
|
const y = yFor(tick);
|
|
14502
|
-
return /* @__PURE__ */
|
|
14503
|
-
/* @__PURE__ */
|
|
14625
|
+
return /* @__PURE__ */ jsxs54("g", { children: [
|
|
14626
|
+
/* @__PURE__ */ jsx73(
|
|
14504
14627
|
"line",
|
|
14505
14628
|
{
|
|
14506
14629
|
stroke: "var(--card-border-color, #ddd)",
|
|
@@ -14511,7 +14634,7 @@ function TimelineChart({
|
|
|
14511
14634
|
y2: y
|
|
14512
14635
|
}
|
|
14513
14636
|
),
|
|
14514
|
-
/* @__PURE__ */
|
|
14637
|
+
/* @__PURE__ */ jsx73(
|
|
14515
14638
|
"text",
|
|
14516
14639
|
{
|
|
14517
14640
|
dominantBaseline: "middle",
|
|
@@ -14525,7 +14648,7 @@ function TimelineChart({
|
|
|
14525
14648
|
)
|
|
14526
14649
|
] }, tick);
|
|
14527
14650
|
}),
|
|
14528
|
-
avgScore > 0 ? /* @__PURE__ */
|
|
14651
|
+
avgScore > 0 ? /* @__PURE__ */ jsx73(
|
|
14529
14652
|
"rect",
|
|
14530
14653
|
{
|
|
14531
14654
|
fill: scoreHex(avgScore),
|
|
@@ -14542,7 +14665,7 @@ function TimelineChart({
|
|
|
14542
14665
|
xLabelIndexes.map((i) => {
|
|
14543
14666
|
const p = computed[i];
|
|
14544
14667
|
if (!p) return null;
|
|
14545
|
-
return /* @__PURE__ */
|
|
14668
|
+
return /* @__PURE__ */ jsx73(
|
|
14546
14669
|
"text",
|
|
14547
14670
|
{
|
|
14548
14671
|
fill: "var(--card-muted-fg-color, #999)",
|
|
@@ -14555,7 +14678,7 @@ function TimelineChart({
|
|
|
14555
14678
|
i
|
|
14556
14679
|
);
|
|
14557
14680
|
}),
|
|
14558
|
-
showMovingAverage && maPoints ? /* @__PURE__ */
|
|
14681
|
+
showMovingAverage && maPoints ? /* @__PURE__ */ jsx73(
|
|
14559
14682
|
"polyline",
|
|
14560
14683
|
{
|
|
14561
14684
|
fill: "none",
|
|
@@ -14566,7 +14689,7 @@ function TimelineChart({
|
|
|
14566
14689
|
strokeWidth: 1.5
|
|
14567
14690
|
}
|
|
14568
14691
|
) : null,
|
|
14569
|
-
/* @__PURE__ */
|
|
14692
|
+
/* @__PURE__ */ jsx73(
|
|
14570
14693
|
"polyline",
|
|
14571
14694
|
{
|
|
14572
14695
|
fill: "none",
|
|
@@ -14576,7 +14699,7 @@ function TimelineChart({
|
|
|
14576
14699
|
strokeWidth: 2.5
|
|
14577
14700
|
}
|
|
14578
14701
|
),
|
|
14579
|
-
active ? /* @__PURE__ */
|
|
14702
|
+
active ? /* @__PURE__ */ jsx73(
|
|
14580
14703
|
"line",
|
|
14581
14704
|
{
|
|
14582
14705
|
stroke: "var(--card-border-color, #bbb)",
|
|
@@ -14589,7 +14712,7 @@ function TimelineChart({
|
|
|
14589
14712
|
) : null,
|
|
14590
14713
|
computed.map((p, idx) => {
|
|
14591
14714
|
const isActive = idx === activeIdx;
|
|
14592
|
-
return /* @__PURE__ */
|
|
14715
|
+
return /* @__PURE__ */ jsx73(
|
|
14593
14716
|
"circle",
|
|
14594
14717
|
{
|
|
14595
14718
|
cx: p.x,
|
|
@@ -14607,11 +14730,11 @@ function TimelineChart({
|
|
|
14607
14730
|
]
|
|
14608
14731
|
}
|
|
14609
14732
|
),
|
|
14610
|
-
active ? /* @__PURE__ */
|
|
14733
|
+
active ? /* @__PURE__ */ jsx73(Tooltip13, { active, chartWidth: width }) : null
|
|
14611
14734
|
] }),
|
|
14612
|
-
/* @__PURE__ */
|
|
14613
|
-
/* @__PURE__ */
|
|
14614
|
-
showMovingAverage ? /* @__PURE__ */
|
|
14735
|
+
/* @__PURE__ */ jsxs54(Flex39, { gap: 3, align: "center", children: [
|
|
14736
|
+
/* @__PURE__ */ jsx73(LegendDot, { color: scoreHex(avgScore), label: "Score" }),
|
|
14737
|
+
showMovingAverage ? /* @__PURE__ */ jsx73(
|
|
14615
14738
|
LegendDot,
|
|
14616
14739
|
{
|
|
14617
14740
|
color: "var(--card-muted-fg-color, #888)",
|
|
@@ -14619,7 +14742,7 @@ function TimelineChart({
|
|
|
14619
14742
|
label: "5-point moving average"
|
|
14620
14743
|
}
|
|
14621
14744
|
) : null,
|
|
14622
|
-
/* @__PURE__ */
|
|
14745
|
+
/* @__PURE__ */ jsx73(Text53, { muted: true, size: 1, children: "Click a point to open the report" })
|
|
14623
14746
|
] })
|
|
14624
14747
|
] }) });
|
|
14625
14748
|
}
|
|
@@ -14628,8 +14751,8 @@ function LegendDot({
|
|
|
14628
14751
|
dashed = false,
|
|
14629
14752
|
label
|
|
14630
14753
|
}) {
|
|
14631
|
-
return /* @__PURE__ */
|
|
14632
|
-
/* @__PURE__ */
|
|
14754
|
+
return /* @__PURE__ */ jsxs54(Flex39, { align: "center", gap: 2, children: [
|
|
14755
|
+
/* @__PURE__ */ jsx73("svg", { height: "10", width: "22", children: /* @__PURE__ */ jsx73(
|
|
14633
14756
|
"line",
|
|
14634
14757
|
{
|
|
14635
14758
|
stroke: color,
|
|
@@ -14641,15 +14764,15 @@ function LegendDot({
|
|
|
14641
14764
|
y2: "5"
|
|
14642
14765
|
}
|
|
14643
14766
|
) }),
|
|
14644
|
-
/* @__PURE__ */
|
|
14767
|
+
/* @__PURE__ */ jsx73(Text53, { muted: true, size: 1, children: label })
|
|
14645
14768
|
] });
|
|
14646
14769
|
}
|
|
14647
14770
|
function Tooltip13({ active, chartWidth }) {
|
|
14648
14771
|
const cssX = active.x;
|
|
14649
14772
|
const isRightEdge = cssX > chartWidth - 220;
|
|
14650
14773
|
const left = isRightEdge ? cssX - 220 : cssX + 12;
|
|
14651
|
-
return /* @__PURE__ */
|
|
14652
|
-
|
|
14774
|
+
return /* @__PURE__ */ jsx73(
|
|
14775
|
+
Box37,
|
|
14653
14776
|
{
|
|
14654
14777
|
style: {
|
|
14655
14778
|
background: "var(--card-bg-color, #fff)",
|
|
@@ -14664,11 +14787,11 @@ function Tooltip13({ active, chartWidth }) {
|
|
|
14664
14787
|
position: "absolute",
|
|
14665
14788
|
top: 8
|
|
14666
14789
|
},
|
|
14667
|
-
children: /* @__PURE__ */
|
|
14668
|
-
/* @__PURE__ */
|
|
14669
|
-
/* @__PURE__ */
|
|
14670
|
-
/* @__PURE__ */
|
|
14671
|
-
|
|
14790
|
+
children: /* @__PURE__ */ jsxs54(Stack42, { space: 2, children: [
|
|
14791
|
+
/* @__PURE__ */ jsx73(Text53, { size: 1, weight: "semibold", children: formatDateTime(active.date) }),
|
|
14792
|
+
/* @__PURE__ */ jsxs54(Flex39, { gap: 2, align: "center", children: [
|
|
14793
|
+
/* @__PURE__ */ jsx73(
|
|
14794
|
+
Box37,
|
|
14672
14795
|
{
|
|
14673
14796
|
style: {
|
|
14674
14797
|
background: scoreHex(active.score),
|
|
@@ -14678,19 +14801,19 @@ function Tooltip13({ active, chartWidth }) {
|
|
|
14678
14801
|
}
|
|
14679
14802
|
}
|
|
14680
14803
|
),
|
|
14681
|
-
/* @__PURE__ */
|
|
14682
|
-
active.count > 1 ? /* @__PURE__ */
|
|
14804
|
+
/* @__PURE__ */ jsx73(Text53, { size: 2, weight: "bold", children: Math.round(active.score) }),
|
|
14805
|
+
active.count > 1 ? /* @__PURE__ */ jsxs54(Text53, { muted: true, size: 1, children: [
|
|
14683
14806
|
"avg of ",
|
|
14684
14807
|
active.count,
|
|
14685
14808
|
" reports"
|
|
14686
14809
|
] }) : null
|
|
14687
14810
|
] }),
|
|
14688
|
-
active.source.title ? /* @__PURE__ */
|
|
14689
|
-
/* @__PURE__ */
|
|
14811
|
+
active.source.title ? /* @__PURE__ */ jsx73(Text53, { size: 1, children: active.source.title }) : null,
|
|
14812
|
+
/* @__PURE__ */ jsxs54(Text53, { muted: true, size: 1, children: [
|
|
14690
14813
|
active.source.mode,
|
|
14691
14814
|
active.source.source ? ` \xB7 ${active.source.source}` : ""
|
|
14692
14815
|
] }),
|
|
14693
|
-
active.source.tag ? /* @__PURE__ */
|
|
14816
|
+
active.source.tag ? /* @__PURE__ */ jsxs54(Text53, { muted: true, size: 1, children: [
|
|
14694
14817
|
"tag: ",
|
|
14695
14818
|
active.source.tag
|
|
14696
14819
|
] }) : null
|
|
@@ -14706,14 +14829,14 @@ import {
|
|
|
14706
14829
|
LinkIcon as LinkIcon4,
|
|
14707
14830
|
RefreshIcon
|
|
14708
14831
|
} from "@sanity/icons";
|
|
14709
|
-
import { Box as
|
|
14832
|
+
import { Box as Box38, Button as Button15, Inline as Inline3, MenuDivider as MenuDivider4, MenuItem as MenuItem11 } from "@sanity/ui";
|
|
14710
14833
|
import { useCallback as useCallback41 } from "react";
|
|
14711
14834
|
|
|
14712
14835
|
// src/components/timeline/SelectChip.tsx
|
|
14713
14836
|
import { ChevronDownIcon as ChevronDownIcon5 } from "@sanity/icons";
|
|
14714
14837
|
import { Button as Button14, Menu as Menu3, MenuButton as MenuButton3, MenuItem as MenuItem10 } from "@sanity/ui";
|
|
14715
14838
|
import { useId as useId2 } from "react";
|
|
14716
|
-
import { jsx as
|
|
14839
|
+
import { jsx as jsx74 } from "react/jsx-runtime";
|
|
14717
14840
|
function SelectChip({
|
|
14718
14841
|
defaultValue,
|
|
14719
14842
|
label,
|
|
@@ -14725,10 +14848,10 @@ function SelectChip({
|
|
|
14725
14848
|
const current = options.find((o) => o.value === value);
|
|
14726
14849
|
const displayValue = current?.label ?? value;
|
|
14727
14850
|
const isActive = defaultValue !== void 0 && value !== defaultValue;
|
|
14728
|
-
return /* @__PURE__ */
|
|
14851
|
+
return /* @__PURE__ */ jsx74(
|
|
14729
14852
|
MenuButton3,
|
|
14730
14853
|
{
|
|
14731
|
-
button: /* @__PURE__ */
|
|
14854
|
+
button: /* @__PURE__ */ jsx74(
|
|
14732
14855
|
Button14,
|
|
14733
14856
|
{
|
|
14734
14857
|
fontSize: 1,
|
|
@@ -14741,7 +14864,7 @@ function SelectChip({
|
|
|
14741
14864
|
}
|
|
14742
14865
|
),
|
|
14743
14866
|
id: menuId,
|
|
14744
|
-
menu: /* @__PURE__ */
|
|
14867
|
+
menu: /* @__PURE__ */ jsx74(Menu3, { style: { minWidth: 160 }, children: options.map((opt) => /* @__PURE__ */ jsx74(
|
|
14745
14868
|
MenuItem10,
|
|
14746
14869
|
{
|
|
14747
14870
|
onClick: () => onChange(opt.value),
|
|
@@ -14761,7 +14884,7 @@ function SelectChip({
|
|
|
14761
14884
|
}
|
|
14762
14885
|
|
|
14763
14886
|
// src/components/timeline/TimelineFilters.tsx
|
|
14764
|
-
import { Fragment as
|
|
14887
|
+
import { Fragment as Fragment17, jsx as jsx75, jsxs as jsxs55 } from "react/jsx-runtime";
|
|
14765
14888
|
var BAR_STYLE2 = {
|
|
14766
14889
|
alignItems: "center",
|
|
14767
14890
|
background: "var(--card-bg-color)",
|
|
@@ -14801,8 +14924,8 @@ function TimelineFilters(props) {
|
|
|
14801
14924
|
const handleMaToggle = useCallback41(() => {
|
|
14802
14925
|
onShowMovingAverageChange(!showMovingAverage);
|
|
14803
14926
|
}, [onShowMovingAverageChange, showMovingAverage]);
|
|
14804
|
-
return /* @__PURE__ */
|
|
14805
|
-
/* @__PURE__ */
|
|
14927
|
+
return /* @__PURE__ */ jsxs55("div", { style: BAR_STYLE2, children: [
|
|
14928
|
+
/* @__PURE__ */ jsx75(
|
|
14806
14929
|
SelectChip,
|
|
14807
14930
|
{
|
|
14808
14931
|
defaultValue: DEFAULT_RANGE,
|
|
@@ -14812,7 +14935,7 @@ function TimelineFilters(props) {
|
|
|
14812
14935
|
value: range
|
|
14813
14936
|
}
|
|
14814
14937
|
),
|
|
14815
|
-
/* @__PURE__ */
|
|
14938
|
+
/* @__PURE__ */ jsx75(
|
|
14816
14939
|
SelectChip,
|
|
14817
14940
|
{
|
|
14818
14941
|
defaultValue: DEFAULT_GRANULARITY,
|
|
@@ -14822,7 +14945,7 @@ function TimelineFilters(props) {
|
|
|
14822
14945
|
value: granularity
|
|
14823
14946
|
}
|
|
14824
14947
|
),
|
|
14825
|
-
areaOptions.length > 0 && /* @__PURE__ */
|
|
14948
|
+
areaOptions.length > 0 && /* @__PURE__ */ jsx75(
|
|
14826
14949
|
FilterChip,
|
|
14827
14950
|
{
|
|
14828
14951
|
label: "Area",
|
|
@@ -14832,7 +14955,7 @@ function TimelineFilters(props) {
|
|
|
14832
14955
|
value: area
|
|
14833
14956
|
}
|
|
14834
14957
|
),
|
|
14835
|
-
modeOptions.length > 0 && /* @__PURE__ */
|
|
14958
|
+
modeOptions.length > 0 && /* @__PURE__ */ jsx75(
|
|
14836
14959
|
FilterChip,
|
|
14837
14960
|
{
|
|
14838
14961
|
label: "Mode",
|
|
@@ -14841,7 +14964,7 @@ function TimelineFilters(props) {
|
|
|
14841
14964
|
value: mode
|
|
14842
14965
|
}
|
|
14843
14966
|
),
|
|
14844
|
-
sourceOptions.length > 0 && /* @__PURE__ */
|
|
14967
|
+
sourceOptions.length > 0 && /* @__PURE__ */ jsx75(
|
|
14845
14968
|
FilterChip,
|
|
14846
14969
|
{
|
|
14847
14970
|
label: "Source",
|
|
@@ -14850,7 +14973,7 @@ function TimelineFilters(props) {
|
|
|
14850
14973
|
value: source
|
|
14851
14974
|
}
|
|
14852
14975
|
),
|
|
14853
|
-
ownerTeamOptions.length > 0 && /* @__PURE__ */
|
|
14976
|
+
ownerTeamOptions.length > 0 && /* @__PURE__ */ jsx75(
|
|
14854
14977
|
FilterChip,
|
|
14855
14978
|
{
|
|
14856
14979
|
label: "Team",
|
|
@@ -14860,9 +14983,9 @@ function TimelineFilters(props) {
|
|
|
14860
14983
|
value: ownerTeam
|
|
14861
14984
|
}
|
|
14862
14985
|
),
|
|
14863
|
-
/* @__PURE__ */
|
|
14864
|
-
/* @__PURE__ */
|
|
14865
|
-
/* @__PURE__ */
|
|
14986
|
+
/* @__PURE__ */ jsx75(Box38, { style: { flex: "1 0 0px" } }),
|
|
14987
|
+
/* @__PURE__ */ jsxs55(Inline3, { space: 1, children: [
|
|
14988
|
+
/* @__PURE__ */ jsx75(
|
|
14866
14989
|
Button15,
|
|
14867
14990
|
{
|
|
14868
14991
|
fontSize: 1,
|
|
@@ -14874,7 +14997,7 @@ function TimelineFilters(props) {
|
|
|
14874
14997
|
tone: showMovingAverage ? "primary" : "default"
|
|
14875
14998
|
}
|
|
14876
14999
|
),
|
|
14877
|
-
/* @__PURE__ */
|
|
15000
|
+
/* @__PURE__ */ jsx75(
|
|
14878
15001
|
Button15,
|
|
14879
15002
|
{
|
|
14880
15003
|
fontSize: 1,
|
|
@@ -14887,12 +15010,12 @@ function TimelineFilters(props) {
|
|
|
14887
15010
|
text: "Refresh"
|
|
14888
15011
|
}
|
|
14889
15012
|
),
|
|
14890
|
-
/* @__PURE__ */
|
|
15013
|
+
/* @__PURE__ */ jsx75(
|
|
14891
15014
|
SplitActionButton,
|
|
14892
15015
|
{
|
|
14893
15016
|
menuId: "timeline-share-actions",
|
|
14894
|
-
menu: /* @__PURE__ */
|
|
14895
|
-
/* @__PURE__ */
|
|
15017
|
+
menu: /* @__PURE__ */ jsxs55(Fragment17, { children: [
|
|
15018
|
+
/* @__PURE__ */ jsx75(
|
|
14896
15019
|
MenuItem11,
|
|
14897
15020
|
{
|
|
14898
15021
|
icon: ClipboardIcon2,
|
|
@@ -14900,8 +15023,8 @@ function TimelineFilters(props) {
|
|
|
14900
15023
|
text: "Copy CSV to clipboard"
|
|
14901
15024
|
}
|
|
14902
15025
|
),
|
|
14903
|
-
/* @__PURE__ */
|
|
14904
|
-
/* @__PURE__ */
|
|
15026
|
+
/* @__PURE__ */ jsx75(MenuDivider4, {}),
|
|
15027
|
+
/* @__PURE__ */ jsx75(
|
|
14905
15028
|
MenuItem11,
|
|
14906
15029
|
{
|
|
14907
15030
|
icon: DownloadIcon2,
|
|
@@ -14924,25 +15047,25 @@ function TimelineFilters(props) {
|
|
|
14924
15047
|
}
|
|
14925
15048
|
|
|
14926
15049
|
// src/components/timeline/TimelineSummary.tsx
|
|
14927
|
-
import { Badge as Badge13, Box as
|
|
14928
|
-
import { jsx as
|
|
15050
|
+
import { Badge as Badge13, Box as Box39, Card as Card28, Flex as Flex40, Grid as Grid7, Stack as Stack43, Text as Text54 } from "@sanity/ui";
|
|
15051
|
+
import { jsx as jsx76, jsxs as jsxs56 } from "react/jsx-runtime";
|
|
14929
15052
|
function TimelineSummary({ area, stats }) {
|
|
14930
15053
|
if (stats.count === 0) return null;
|
|
14931
|
-
return /* @__PURE__ */
|
|
14932
|
-
/* @__PURE__ */
|
|
14933
|
-
/* @__PURE__ */
|
|
14934
|
-
/* @__PURE__ */
|
|
15054
|
+
return /* @__PURE__ */ jsx76(Card28, { padding: 3, radius: 2, shadow: 1, children: /* @__PURE__ */ jsxs56(Stack43, { space: 3, children: [
|
|
15055
|
+
/* @__PURE__ */ jsxs56(Flex40, { align: "center", gap: 2, children: [
|
|
15056
|
+
/* @__PURE__ */ jsx76(Text54, { size: 1, weight: "semibold", children: "Summary" }),
|
|
15057
|
+
/* @__PURE__ */ jsxs56(Text54, { muted: true, size: 1, children: [
|
|
14935
15058
|
area ? `Area: ${area}` : "Overall score",
|
|
14936
15059
|
" \xB7 ",
|
|
14937
15060
|
stats.count,
|
|
14938
15061
|
" report",
|
|
14939
15062
|
stats.count === 1 ? "" : "s"
|
|
14940
15063
|
] }),
|
|
14941
|
-
/* @__PURE__ */
|
|
14942
|
-
/* @__PURE__ */
|
|
15064
|
+
/* @__PURE__ */ jsx76(Box39, { flex: 1 }),
|
|
15065
|
+
/* @__PURE__ */ jsx76(TrendPill, { stats })
|
|
14943
15066
|
] }),
|
|
14944
|
-
/* @__PURE__ */
|
|
14945
|
-
/* @__PURE__ */
|
|
15067
|
+
/* @__PURE__ */ jsxs56(Grid7, { columns: [2, 2, 4], gap: 3, children: [
|
|
15068
|
+
/* @__PURE__ */ jsx76(
|
|
14946
15069
|
StatTile,
|
|
14947
15070
|
{
|
|
14948
15071
|
label: "Mean",
|
|
@@ -14950,8 +15073,8 @@ function TimelineSummary({ area, stats }) {
|
|
|
14950
15073
|
sub: stats.stdev !== null ? `\xB1 ${stats.stdev.toFixed(1)} stdev` : null
|
|
14951
15074
|
}
|
|
14952
15075
|
),
|
|
14953
|
-
/* @__PURE__ */
|
|
14954
|
-
/* @__PURE__ */
|
|
15076
|
+
/* @__PURE__ */ jsx76(StatTile, { label: "Median", score: stats.median, sub: null }),
|
|
15077
|
+
/* @__PURE__ */ jsx76(
|
|
14955
15078
|
StatTile,
|
|
14956
15079
|
{
|
|
14957
15080
|
label: "Best",
|
|
@@ -14959,7 +15082,7 @@ function TimelineSummary({ area, stats }) {
|
|
|
14959
15082
|
sub: stats.max ? formatDateShort(stats.max.date) : null
|
|
14960
15083
|
}
|
|
14961
15084
|
),
|
|
14962
|
-
/* @__PURE__ */
|
|
15085
|
+
/* @__PURE__ */ jsx76(
|
|
14963
15086
|
StatTile,
|
|
14964
15087
|
{
|
|
14965
15088
|
label: "Worst",
|
|
@@ -14972,10 +15095,10 @@ function TimelineSummary({ area, stats }) {
|
|
|
14972
15095
|
}
|
|
14973
15096
|
function TrendPill({ stats }) {
|
|
14974
15097
|
if (stats.delta === null || stats.count < 2) {
|
|
14975
|
-
return /* @__PURE__ */
|
|
15098
|
+
return /* @__PURE__ */ jsx76(Badge13, { fontSize: 1, mode: "outline", tone: "default", children: "Single data point" });
|
|
14976
15099
|
}
|
|
14977
15100
|
const { label, tone } = trendBadgeContent(stats.trend, stats.delta);
|
|
14978
|
-
return /* @__PURE__ */
|
|
15101
|
+
return /* @__PURE__ */ jsx76(Badge13, { fontSize: 1, mode: "default", tone, children: label });
|
|
14979
15102
|
}
|
|
14980
15103
|
function trendBadgeContent(trend, delta) {
|
|
14981
15104
|
switch (trend) {
|
|
@@ -14992,10 +15115,10 @@ function StatTile({
|
|
|
14992
15115
|
score,
|
|
14993
15116
|
sub
|
|
14994
15117
|
}) {
|
|
14995
|
-
return /* @__PURE__ */
|
|
14996
|
-
/* @__PURE__ */
|
|
14997
|
-
score === null ? /* @__PURE__ */
|
|
14998
|
-
score !== null && sub ? /* @__PURE__ */
|
|
15118
|
+
return /* @__PURE__ */ jsxs56(Stack43, { space: 2, children: [
|
|
15119
|
+
/* @__PURE__ */ jsx76(Text54, { muted: true, size: 1, weight: "medium", children: label }),
|
|
15120
|
+
score === null ? /* @__PURE__ */ jsx76(Text54, { muted: true, size: 3, children: "\u2014" }) : /* @__PURE__ */ jsx76(Badge13, { fontSize: 2, mode: "default", tone: scoreTone(score), children: score.toFixed(1) }),
|
|
15121
|
+
score !== null && sub ? /* @__PURE__ */ jsx76(Text54, { muted: true, size: 1, children: sub }) : null
|
|
14999
15122
|
] });
|
|
15000
15123
|
}
|
|
15001
15124
|
|
|
@@ -15055,7 +15178,7 @@ function useTimelineData({
|
|
|
15055
15178
|
}
|
|
15056
15179
|
|
|
15057
15180
|
// src/components/ScoreTimeline.tsx
|
|
15058
|
-
import { Fragment as
|
|
15181
|
+
import { Fragment as Fragment18, jsx as jsx77, jsxs as jsxs57 } from "react/jsx-runtime";
|
|
15059
15182
|
function buildSearchParams2(filters) {
|
|
15060
15183
|
const params = [];
|
|
15061
15184
|
if (filters.range !== DEFAULT_RANGE) params.push(["range", filters.range]);
|
|
@@ -15158,8 +15281,8 @@ function ScoreTimeline({
|
|
|
15158
15281
|
const ts = (/* @__PURE__ */ new Date()).toISOString().replaceAll(":", "-").slice(0, 19);
|
|
15159
15282
|
downloadCsv(csv, `score-timeline-${ts}.csv`);
|
|
15160
15283
|
}, [area, dataPoints]);
|
|
15161
|
-
return /* @__PURE__ */
|
|
15162
|
-
/* @__PURE__ */
|
|
15284
|
+
return /* @__PURE__ */ jsxs57(Stack44, { space: 4, children: [
|
|
15285
|
+
/* @__PURE__ */ jsx77(
|
|
15163
15286
|
TimelineFilters,
|
|
15164
15287
|
{
|
|
15165
15288
|
area,
|
|
@@ -15187,15 +15310,15 @@ function ScoreTimeline({
|
|
|
15187
15310
|
sourceOptions
|
|
15188
15311
|
}
|
|
15189
15312
|
),
|
|
15190
|
-
error ? /* @__PURE__ */
|
|
15313
|
+
error ? /* @__PURE__ */ jsx77(Card29, { padding: 4, radius: 2, tone: "critical", children: /* @__PURE__ */ jsxs57(Text55, { size: 2, children: [
|
|
15191
15314
|
"Failed to load timeline: ",
|
|
15192
15315
|
error
|
|
15193
15316
|
] }) }) : null,
|
|
15194
|
-
loading ? /* @__PURE__ */
|
|
15195
|
-
/* @__PURE__ */
|
|
15196
|
-
/* @__PURE__ */
|
|
15197
|
-
] }) }) : /* @__PURE__ */
|
|
15198
|
-
/* @__PURE__ */
|
|
15317
|
+
loading ? /* @__PURE__ */ jsx77(Card29, { padding: 4, radius: 2, shadow: 1, children: /* @__PURE__ */ jsxs57(Flex41, { align: "center", gap: 2, justify: "center", style: { height: 220 }, children: [
|
|
15318
|
+
/* @__PURE__ */ jsx77(Spinner, { muted: true }),
|
|
15319
|
+
/* @__PURE__ */ jsx77(Text55, { muted: true, size: 2, children: "Loading timeline\u2026" })
|
|
15320
|
+
] }) }) : /* @__PURE__ */ jsxs57(Fragment18, { children: [
|
|
15321
|
+
/* @__PURE__ */ jsx77(
|
|
15199
15322
|
TimelineChart,
|
|
15200
15323
|
{
|
|
15201
15324
|
movingAverage: stats.movingAverage,
|
|
@@ -15204,20 +15327,20 @@ function ScoreTimeline({
|
|
|
15204
15327
|
showMovingAverage
|
|
15205
15328
|
}
|
|
15206
15329
|
),
|
|
15207
|
-
/* @__PURE__ */
|
|
15330
|
+
/* @__PURE__ */ jsx77(TimelineSummary, { area, stats })
|
|
15208
15331
|
] })
|
|
15209
15332
|
] });
|
|
15210
15333
|
}
|
|
15211
15334
|
var ScoreTimeline_default = ScoreTimeline;
|
|
15212
15335
|
|
|
15213
15336
|
// src/components/Dashboard.tsx
|
|
15214
|
-
import { jsx as
|
|
15337
|
+
import { jsx as jsx78, jsxs as jsxs58 } from "react/jsx-runtime";
|
|
15215
15338
|
var VIEW_PARAM_MAP = {
|
|
15216
15339
|
compare: "compare",
|
|
15217
15340
|
timeline: "timeline"
|
|
15218
15341
|
};
|
|
15219
15342
|
function Dashboard() {
|
|
15220
|
-
return /* @__PURE__ */
|
|
15343
|
+
return /* @__PURE__ */ jsx78(HelpProvider, { children: /* @__PURE__ */ jsx78(JudgmentDrawerProvider, { children: /* @__PURE__ */ jsx78(DashboardShell, {}) }) });
|
|
15221
15344
|
}
|
|
15222
15345
|
function DashboardShell() {
|
|
15223
15346
|
const router = useRouter5();
|
|
@@ -15235,10 +15358,10 @@ function DashboardShell() {
|
|
|
15235
15358
|
router.navigate(state);
|
|
15236
15359
|
}
|
|
15237
15360
|
}, [closeDrawer, router]);
|
|
15238
|
-
return /* @__PURE__ */
|
|
15239
|
-
/* @__PURE__ */
|
|
15240
|
-
/* @__PURE__ */
|
|
15241
|
-
/* @__PURE__ */
|
|
15361
|
+
return /* @__PURE__ */ jsxs58(Flex42, { style: { height: "100%" }, children: [
|
|
15362
|
+
/* @__PURE__ */ jsx78(Box40, { flex: 1, overflow: "auto", children: /* @__PURE__ */ jsx78(DashboardContent, {}) }),
|
|
15363
|
+
/* @__PURE__ */ jsx78(JudgmentDetailDrawerOutlet, { onClose: handleJudgmentDrawerClose }),
|
|
15364
|
+
/* @__PURE__ */ jsx78(HelpDrawer, {})
|
|
15242
15365
|
] });
|
|
15243
15366
|
}
|
|
15244
15367
|
function DashboardContent() {
|
|
@@ -15284,13 +15407,13 @@ function DashboardContent() {
|
|
|
15284
15407
|
const handleOpenHelp = useCallback44(() => {
|
|
15285
15408
|
openHelp(defaultTopic);
|
|
15286
15409
|
}, [openHelp, defaultTopic]);
|
|
15287
|
-
return /* @__PURE__ */
|
|
15288
|
-
/* @__PURE__ */
|
|
15289
|
-
/* @__PURE__ */
|
|
15290
|
-
/* @__PURE__ */
|
|
15291
|
-
/* @__PURE__ */
|
|
15410
|
+
return /* @__PURE__ */ jsx78(Container, { width: 4, children: /* @__PURE__ */ jsxs58(Stack45, { padding: 4, space: 4, children: [
|
|
15411
|
+
/* @__PURE__ */ jsxs58(Flex42, { align: "center", gap: 3, children: [
|
|
15412
|
+
/* @__PURE__ */ jsxs58(Stack45, { flex: 1, space: 1, children: [
|
|
15413
|
+
/* @__PURE__ */ jsx78(Text56, { size: 4, weight: "bold", children: "AI Literacy Framework" }),
|
|
15414
|
+
/* @__PURE__ */ jsx78(Text56, { muted: true, size: 2, children: "Evaluation reports and score trends" })
|
|
15292
15415
|
] }),
|
|
15293
|
-
/* @__PURE__ */
|
|
15416
|
+
/* @__PURE__ */ jsx78(
|
|
15294
15417
|
Button16,
|
|
15295
15418
|
{
|
|
15296
15419
|
icon: HelpCircleIcon8,
|
|
@@ -15301,8 +15424,8 @@ function DashboardContent() {
|
|
|
15301
15424
|
}
|
|
15302
15425
|
)
|
|
15303
15426
|
] }),
|
|
15304
|
-
!isDetail && /* @__PURE__ */
|
|
15305
|
-
/* @__PURE__ */
|
|
15427
|
+
!isDetail && /* @__PURE__ */ jsxs58(TabList3, { space: 1, children: [
|
|
15428
|
+
/* @__PURE__ */ jsx78(
|
|
15306
15429
|
Tab3,
|
|
15307
15430
|
{
|
|
15308
15431
|
"aria-controls": "latest-panel",
|
|
@@ -15312,7 +15435,7 @@ function DashboardContent() {
|
|
|
15312
15435
|
selected: activeTab === "latest"
|
|
15313
15436
|
}
|
|
15314
15437
|
),
|
|
15315
|
-
/* @__PURE__ */
|
|
15438
|
+
/* @__PURE__ */ jsx78(
|
|
15316
15439
|
Tab3,
|
|
15317
15440
|
{
|
|
15318
15441
|
"aria-controls": "timeline-panel",
|
|
@@ -15322,7 +15445,7 @@ function DashboardContent() {
|
|
|
15322
15445
|
selected: activeTab === "timeline"
|
|
15323
15446
|
}
|
|
15324
15447
|
),
|
|
15325
|
-
/* @__PURE__ */
|
|
15448
|
+
/* @__PURE__ */ jsx78(
|
|
15326
15449
|
Tab3,
|
|
15327
15450
|
{
|
|
15328
15451
|
"aria-controls": "compare-panel",
|
|
@@ -15333,10 +15456,10 @@ function DashboardContent() {
|
|
|
15333
15456
|
}
|
|
15334
15457
|
)
|
|
15335
15458
|
] }),
|
|
15336
|
-
!isDetail && activeTab === "latest" && /* @__PURE__ */
|
|
15337
|
-
!isDetail && activeTab === "timeline" && /* @__PURE__ */
|
|
15338
|
-
!isDetail && activeTab === "compare" && /* @__PURE__ */
|
|
15339
|
-
isDetail && reportId && /* @__PURE__ */
|
|
15459
|
+
!isDetail && activeTab === "latest" && /* @__PURE__ */ jsx78(TabPanel3, { "aria-labelledby": "latest-tab", id: "latest-panel", children: /* @__PURE__ */ jsx78(LatestReports, { onSelectReport: handleSelectReport }) }),
|
|
15460
|
+
!isDetail && activeTab === "timeline" && /* @__PURE__ */ jsx78(TabPanel3, { "aria-labelledby": "timeline-tab", id: "timeline-panel", children: /* @__PURE__ */ jsx78(ScoreTimeline_default, {}) }),
|
|
15461
|
+
!isDetail && activeTab === "compare" && /* @__PURE__ */ jsx78(TabPanel3, { "aria-labelledby": "compare-tab", id: "compare-panel", children: /* @__PURE__ */ jsx78(ComparisonView, {}) }),
|
|
15462
|
+
isDetail && reportId && /* @__PURE__ */ jsx78(
|
|
15340
15463
|
ReportDetail,
|
|
15341
15464
|
{
|
|
15342
15465
|
activeTab: routerState.tab ?? null,
|