@sanity/ailf-studio 1.8.1 → 1.9.0
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.d.ts +1 -0
- package/dist/index.js +818 -511
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3283,17 +3283,17 @@ import { route } from "sanity/router";
|
|
|
3283
3283
|
// src/components/Dashboard.tsx
|
|
3284
3284
|
import { HelpCircleIcon as HelpCircleIcon8 } from "@sanity/icons";
|
|
3285
3285
|
import {
|
|
3286
|
-
Box as
|
|
3287
|
-
Button as
|
|
3286
|
+
Box as Box32,
|
|
3287
|
+
Button as Button12,
|
|
3288
3288
|
Container,
|
|
3289
|
-
Flex as
|
|
3290
|
-
Stack as
|
|
3289
|
+
Flex as Flex37,
|
|
3290
|
+
Stack as Stack39,
|
|
3291
3291
|
Tab as Tab3,
|
|
3292
3292
|
TabList as TabList3,
|
|
3293
3293
|
TabPanel as TabPanel3,
|
|
3294
|
-
Text as
|
|
3294
|
+
Text as Text49
|
|
3295
3295
|
} from "@sanity/ui";
|
|
3296
|
-
import { useCallback as
|
|
3296
|
+
import { useCallback as useCallback37, useEffect as useEffect16 } from "react";
|
|
3297
3297
|
import { useRouter as useRouter3 } from "sanity/router";
|
|
3298
3298
|
|
|
3299
3299
|
// src/lib/help-context.ts
|
|
@@ -6063,22 +6063,22 @@ function LatestReports({
|
|
|
6063
6063
|
// src/components/report-detail/ReportDetail.tsx
|
|
6064
6064
|
import { ArrowLeftIcon as ArrowLeftIcon3 } from "@sanity/icons";
|
|
6065
6065
|
import {
|
|
6066
|
-
Badge as
|
|
6067
|
-
Box as
|
|
6068
|
-
Button as
|
|
6069
|
-
Flex as
|
|
6070
|
-
Stack as
|
|
6066
|
+
Badge as Badge9,
|
|
6067
|
+
Box as Box27,
|
|
6068
|
+
Button as Button10,
|
|
6069
|
+
Flex as Flex30,
|
|
6070
|
+
Stack as Stack31,
|
|
6071
6071
|
Tab,
|
|
6072
6072
|
TabList,
|
|
6073
6073
|
TabPanel,
|
|
6074
|
-
Text as
|
|
6074
|
+
Text as Text40,
|
|
6075
6075
|
Tooltip as Tooltip10
|
|
6076
6076
|
} from "@sanity/ui";
|
|
6077
6077
|
import {
|
|
6078
|
-
useCallback as
|
|
6078
|
+
useCallback as useCallback34,
|
|
6079
6079
|
useEffect as useEffect12,
|
|
6080
6080
|
useMemo as useMemo15,
|
|
6081
|
-
useState as
|
|
6081
|
+
useState as useState25
|
|
6082
6082
|
} from "react";
|
|
6083
6083
|
import { useClient as useClient10 } from "sanity";
|
|
6084
6084
|
|
|
@@ -7600,20 +7600,22 @@ var NDJSON_TYPES = /* @__PURE__ */ new Set([
|
|
|
7600
7600
|
function useArtifactDetail(type, key) {
|
|
7601
7601
|
const { runId } = useReportArtifactContext();
|
|
7602
7602
|
const ref = useArtifactRef(type);
|
|
7603
|
+
const cacheKey2 = key ?? "";
|
|
7603
7604
|
const [status, setStatus] = useState13(
|
|
7604
|
-
() => runId && getCached({ runId, type, key }) !== null ? "ready" : "idle"
|
|
7605
|
+
() => runId && getCached({ runId, type, key: cacheKey2 }) !== null ? "ready" : "idle"
|
|
7605
7606
|
);
|
|
7606
7607
|
const [, setTick] = useState13(0);
|
|
7607
7608
|
useEffect7(() => {
|
|
7608
7609
|
if (!runId) return void 0;
|
|
7609
|
-
return subscribe({ runId, type, key }, () => {
|
|
7610
|
+
return subscribe({ runId, type, key: cacheKey2 }, () => {
|
|
7610
7611
|
setStatus("ready");
|
|
7611
7612
|
setTick((n) => n + 1);
|
|
7612
7613
|
});
|
|
7613
|
-
}, [runId, type,
|
|
7614
|
+
}, [runId, type, cacheKey2]);
|
|
7614
7615
|
const request = useCallback16(async () => {
|
|
7615
|
-
if (!runId || !ref
|
|
7616
|
-
|
|
7616
|
+
if (!runId || !ref) return;
|
|
7617
|
+
if (ref.layout === "per-entry" && !key) return;
|
|
7618
|
+
const cacheId = { runId, type, key: cacheKey2 };
|
|
7617
7619
|
if (isKnownNotFound(cacheId)) {
|
|
7618
7620
|
setStatus("error");
|
|
7619
7621
|
return;
|
|
@@ -7626,7 +7628,7 @@ function useArtifactDetail(type, key) {
|
|
|
7626
7628
|
setStatus("loading");
|
|
7627
7629
|
try {
|
|
7628
7630
|
await recordInFlight(cacheId, async () => {
|
|
7629
|
-
const url = buildSigningUrl(runId, type, key);
|
|
7631
|
+
const url = key ? buildSigningUrl(runId, type, key) : buildSigningUrl(runId, type);
|
|
7630
7632
|
const body = NDJSON_TYPES.has(type) ? await signAndFetchNdjson(url) : await signAndFetchJson(url);
|
|
7631
7633
|
setCached(cacheId, body);
|
|
7632
7634
|
return body;
|
|
@@ -7638,8 +7640,8 @@ function useArtifactDetail(type, key) {
|
|
|
7638
7640
|
}
|
|
7639
7641
|
setStatus("error");
|
|
7640
7642
|
}
|
|
7641
|
-
}, [runId, ref, type, key]);
|
|
7642
|
-
const full = runId ? getCached({ runId, type, key }) : null;
|
|
7643
|
+
}, [runId, ref, type, key, cacheKey2]);
|
|
7644
|
+
const full = runId ? getCached({ runId, type, key: cacheKey2 }) : null;
|
|
7643
7645
|
return [full, status, request];
|
|
7644
7646
|
}
|
|
7645
7647
|
|
|
@@ -9405,41 +9407,306 @@ function AreaJumpRail({ areas }) {
|
|
|
9405
9407
|
] });
|
|
9406
9408
|
}
|
|
9407
9409
|
|
|
9408
|
-
// src/components/report-detail/
|
|
9409
|
-
import {
|
|
9410
|
-
import {
|
|
9411
|
-
|
|
9410
|
+
// src/components/report-detail/PipelineExecutionPanel.tsx
|
|
9411
|
+
import { ChevronDownIcon as ChevronDownIcon2, ChevronRightIcon as ChevronRightIcon2 } from "@sanity/icons";
|
|
9412
|
+
import { Badge as Badge8, Box as Box22, Button as Button4, Card as Card15, Flex as Flex21, Stack as Stack24, Text as Text32 } from "@sanity/ui";
|
|
9413
|
+
import { useCallback as useCallback23, useState as useState17 } from "react";
|
|
9414
|
+
import { Fragment as Fragment10, jsx as jsx36, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
9415
|
+
var PRE_W0060_HELP_URL = "https://github.com/sanity-labs/ai-literacy-framework/blob/main/docs/design-docs/artifact-data-surfacing.md";
|
|
9416
|
+
function PipelineExecutionPanel() {
|
|
9417
|
+
const ref = useArtifactRef("pipelineContext");
|
|
9418
|
+
const preview = ref?.preview;
|
|
9419
|
+
if (!ref || !preview) {
|
|
9420
|
+
return /* @__PURE__ */ jsx36(EmptyState, {});
|
|
9421
|
+
}
|
|
9422
|
+
return /* @__PURE__ */ jsx36(LoadedPanel, { preview });
|
|
9423
|
+
}
|
|
9424
|
+
function EmptyState() {
|
|
9425
|
+
return /* @__PURE__ */ jsx36(Card15, { padding: 4, radius: 2, shadow: 1, children: /* @__PURE__ */ jsxs28(Stack24, { space: 3, children: [
|
|
9426
|
+
/* @__PURE__ */ jsx36(Text32, { size: 3, weight: "semibold", children: "Pipeline Execution" }),
|
|
9427
|
+
/* @__PURE__ */ jsxs28(Text32, { muted: true, size: 2, children: [
|
|
9428
|
+
"Pipeline context was not captured for this run.",
|
|
9429
|
+
" ",
|
|
9430
|
+
/* @__PURE__ */ jsx36(
|
|
9431
|
+
"a",
|
|
9432
|
+
{
|
|
9433
|
+
href: PRE_W0060_HELP_URL,
|
|
9434
|
+
rel: "noopener noreferrer",
|
|
9435
|
+
target: "_blank",
|
|
9436
|
+
children: "Why?"
|
|
9437
|
+
}
|
|
9438
|
+
)
|
|
9439
|
+
] })
|
|
9440
|
+
] }) });
|
|
9441
|
+
}
|
|
9442
|
+
function LoadedPanel({ preview }) {
|
|
9443
|
+
const [expanded, setExpanded] = useState17(false);
|
|
9444
|
+
const [full, status, request] = useArtifactDetail("pipelineContext");
|
|
9445
|
+
const handleToggle = useCallback23(() => {
|
|
9446
|
+
setExpanded((prev) => {
|
|
9447
|
+
const next = !prev;
|
|
9448
|
+
if (next) {
|
|
9449
|
+
void request();
|
|
9450
|
+
}
|
|
9451
|
+
return next;
|
|
9452
|
+
});
|
|
9453
|
+
}, [request]);
|
|
9412
9454
|
return /* @__PURE__ */ jsx36(Card15, { padding: 4, radius: 2, shadow: 1, children: /* @__PURE__ */ jsxs28(Stack24, { space: 4, children: [
|
|
9413
|
-
/* @__PURE__ */
|
|
9414
|
-
|
|
9415
|
-
/* @__PURE__ */ jsx36(
|
|
9416
|
-
|
|
9455
|
+
/* @__PURE__ */ jsxs28(Flex21, { align: "center", gap: 3, justify: "space-between", wrap: "wrap", children: [
|
|
9456
|
+
/* @__PURE__ */ jsx36(Text32, { size: 3, weight: "semibold", children: "Pipeline Execution" }),
|
|
9457
|
+
preview.belowCritical === true && /* @__PURE__ */ jsx36(Badge8, { tone: "critical", children: "Below critical" })
|
|
9458
|
+
] }),
|
|
9459
|
+
/* @__PURE__ */ jsx36(HeaderRow, { preview }),
|
|
9460
|
+
/* @__PURE__ */ jsx36(Box22, { children: /* @__PURE__ */ jsx36(
|
|
9461
|
+
Button4,
|
|
9462
|
+
{
|
|
9463
|
+
icon: expanded ? ChevronDownIcon2 : ChevronRightIcon2,
|
|
9464
|
+
mode: "bleed",
|
|
9465
|
+
onClick: handleToggle,
|
|
9466
|
+
padding: 2,
|
|
9467
|
+
text: expanded ? "Hide details" : "Show details"
|
|
9468
|
+
}
|
|
9469
|
+
) }),
|
|
9470
|
+
expanded && /* @__PURE__ */ jsx36(Details, { full, preview, status })
|
|
9471
|
+
] }) });
|
|
9472
|
+
}
|
|
9473
|
+
function HeaderRow({ preview }) {
|
|
9474
|
+
const failedCount = preview.failedSteps.length;
|
|
9475
|
+
return /* @__PURE__ */ jsxs28(Flex21, { align: "center", gap: 3, wrap: "wrap", children: [
|
|
9476
|
+
/* @__PURE__ */ jsx36(Stat2, { label: "Steps", value: String(preview.stepCount) }),
|
|
9477
|
+
/* @__PURE__ */ jsx36(Dot, {}),
|
|
9478
|
+
/* @__PURE__ */ jsx36(Stat2, { label: "Duration", value: formatDuration(preview.totalDurationMs) }),
|
|
9479
|
+
/* @__PURE__ */ jsx36(Dot, {}),
|
|
9480
|
+
/* @__PURE__ */ jsxs28(Flex21, { align: "baseline", gap: 2, children: [
|
|
9481
|
+
/* @__PURE__ */ jsx36(SectionTitle, { children: "Failed" }),
|
|
9482
|
+
failedCount > 0 ? /* @__PURE__ */ jsx36(Badge8, { tone: "critical", children: failedCount }) : /* @__PURE__ */ jsx36(Text32, { size: 2, children: "0" })
|
|
9483
|
+
] }),
|
|
9484
|
+
typeof preview.cacheHits === "number" && /* @__PURE__ */ jsxs28(Fragment10, { children: [
|
|
9485
|
+
/* @__PURE__ */ jsx36(Dot, {}),
|
|
9486
|
+
/* @__PURE__ */ jsx36(Stat2, { label: "Cache hits", value: String(preview.cacheHits) })
|
|
9487
|
+
] })
|
|
9488
|
+
] });
|
|
9489
|
+
}
|
|
9490
|
+
function Stat2({ label, value }) {
|
|
9491
|
+
return /* @__PURE__ */ jsxs28(Flex21, { align: "baseline", gap: 2, children: [
|
|
9492
|
+
/* @__PURE__ */ jsx36(SectionTitle, { children: label }),
|
|
9493
|
+
/* @__PURE__ */ jsx36(Text32, { size: 2, children: value })
|
|
9494
|
+
] });
|
|
9495
|
+
}
|
|
9496
|
+
function Dot() {
|
|
9497
|
+
return /* @__PURE__ */ jsx36(Text32, { "aria-hidden": true, muted: true, size: 1, children: "\xB7" });
|
|
9498
|
+
}
|
|
9499
|
+
function Details({
|
|
9500
|
+
full,
|
|
9501
|
+
preview,
|
|
9502
|
+
status
|
|
9503
|
+
}) {
|
|
9504
|
+
if (status === "loading") {
|
|
9505
|
+
return /* @__PURE__ */ jsx36(Text32, { muted: true, size: 2, children: "Loading pipeline context\u2026" });
|
|
9506
|
+
}
|
|
9507
|
+
if (status === "error") {
|
|
9508
|
+
return /* @__PURE__ */ jsx36(Card15, { padding: 3, radius: 2, tone: "critical", children: /* @__PURE__ */ jsx36(Text32, { size: 2, children: "Failed to load pipeline context." }) });
|
|
9509
|
+
}
|
|
9510
|
+
if (!full) {
|
|
9511
|
+
return null;
|
|
9512
|
+
}
|
|
9513
|
+
return /* @__PURE__ */ jsxs28(Stack24, { space: 4, children: [
|
|
9514
|
+
/* @__PURE__ */ jsx36(StepTimeline, { steps: full.steps ?? [] }),
|
|
9515
|
+
/* @__PURE__ */ jsx36(ConfigPane, { config: full.config ?? {} }),
|
|
9516
|
+
/* @__PURE__ */ jsx36(
|
|
9517
|
+
CacheTelemetry,
|
|
9518
|
+
{
|
|
9519
|
+
cacheKeys: full.state?.remoteCacheHits ?? [],
|
|
9520
|
+
preview
|
|
9521
|
+
}
|
|
9522
|
+
)
|
|
9523
|
+
] });
|
|
9524
|
+
}
|
|
9525
|
+
function StepTimeline({ steps }) {
|
|
9526
|
+
if (steps.length === 0) {
|
|
9527
|
+
return /* @__PURE__ */ jsx36(Text32, { muted: true, size: 2, children: "No pipeline steps recorded." });
|
|
9528
|
+
}
|
|
9529
|
+
const maxDuration = Math.max(
|
|
9530
|
+
1,
|
|
9531
|
+
...steps.map((s) => typeof s.durationMs === "number" ? s.durationMs : 0)
|
|
9532
|
+
);
|
|
9533
|
+
return /* @__PURE__ */ jsxs28(Stack24, { space: 3, children: [
|
|
9534
|
+
/* @__PURE__ */ jsx36(SectionTitle, { children: "Steps" }),
|
|
9535
|
+
/* @__PURE__ */ jsx36(Stack24, { space: 2, children: steps.map((step) => /* @__PURE__ */ jsx36(StepRow, { maxDurationMs: maxDuration, step }, step.name)) })
|
|
9536
|
+
] });
|
|
9537
|
+
}
|
|
9538
|
+
function StepRow({
|
|
9539
|
+
maxDurationMs,
|
|
9540
|
+
step
|
|
9541
|
+
}) {
|
|
9542
|
+
const widthPct = typeof step.durationMs === "number" && maxDurationMs > 0 ? Math.max(2, Math.round(step.durationMs / maxDurationMs * 100)) : 0;
|
|
9543
|
+
const tone = step.status === "success" ? "positive" : step.status === "failed" ? "critical" : "default";
|
|
9544
|
+
const barColor = tone === "critical" ? "var(--card-bg-critical-color, #c4314b)" : tone === "positive" ? "var(--card-bg-positive-color, #43d675)" : "var(--card-muted-fg-color, #999)";
|
|
9545
|
+
return /* @__PURE__ */ jsxs28(Flex21, { align: "center", gap: 3, wrap: "nowrap", children: [
|
|
9546
|
+
/* @__PURE__ */ jsx36(Box22, { style: { minWidth: 180, maxWidth: 220 }, children: /* @__PURE__ */ jsx36(
|
|
9547
|
+
Text32,
|
|
9548
|
+
{
|
|
9549
|
+
size: 2,
|
|
9550
|
+
style: { fontFamily: "monospace" },
|
|
9551
|
+
textOverflow: "ellipsis",
|
|
9552
|
+
children: step.name
|
|
9553
|
+
}
|
|
9554
|
+
) }),
|
|
9555
|
+
/* @__PURE__ */ jsx36(Box22, { style: { minWidth: 72 }, children: /* @__PURE__ */ jsx36(Badge8, { tone, children: step.status }) }),
|
|
9556
|
+
/* @__PURE__ */ jsxs28(Box22, { flex: 1, style: { position: "relative", minWidth: 80 }, children: [
|
|
9417
9557
|
/* @__PURE__ */ jsx36(
|
|
9558
|
+
Box22,
|
|
9559
|
+
{
|
|
9560
|
+
style: {
|
|
9561
|
+
backgroundColor: "var(--card-border-color, #e5e5e5)",
|
|
9562
|
+
borderRadius: 3,
|
|
9563
|
+
height: 6,
|
|
9564
|
+
width: "100%"
|
|
9565
|
+
}
|
|
9566
|
+
}
|
|
9567
|
+
),
|
|
9568
|
+
widthPct > 0 && /* @__PURE__ */ jsx36(
|
|
9569
|
+
Box22,
|
|
9570
|
+
{
|
|
9571
|
+
style: {
|
|
9572
|
+
backgroundColor: barColor,
|
|
9573
|
+
borderRadius: 3,
|
|
9574
|
+
height: 6,
|
|
9575
|
+
left: 0,
|
|
9576
|
+
position: "absolute",
|
|
9577
|
+
top: 0,
|
|
9578
|
+
width: `${widthPct}%`
|
|
9579
|
+
}
|
|
9580
|
+
}
|
|
9581
|
+
)
|
|
9582
|
+
] }),
|
|
9583
|
+
/* @__PURE__ */ jsx36(Box22, { style: { minWidth: 80, textAlign: "right" }, children: /* @__PURE__ */ jsx36(Text32, { muted: true, size: 1, style: { fontFamily: "monospace" }, children: typeof step.durationMs === "number" ? formatDuration(step.durationMs) : "\u2014" }) })
|
|
9584
|
+
] });
|
|
9585
|
+
}
|
|
9586
|
+
function ConfigPane({ config }) {
|
|
9587
|
+
const [expanded, setExpanded] = useState17(false);
|
|
9588
|
+
const json = JSON.stringify(config, null, 2);
|
|
9589
|
+
return /* @__PURE__ */ jsxs28(Stack24, { space: 2, children: [
|
|
9590
|
+
/* @__PURE__ */ jsxs28(Flex21, { align: "center", gap: 2, children: [
|
|
9591
|
+
/* @__PURE__ */ jsx36(SectionTitle, { children: "Effective config" }),
|
|
9592
|
+
/* @__PURE__ */ jsx36(
|
|
9593
|
+
Button4,
|
|
9594
|
+
{
|
|
9595
|
+
fontSize: 1,
|
|
9596
|
+
icon: expanded ? ChevronDownIcon2 : ChevronRightIcon2,
|
|
9597
|
+
mode: "bleed",
|
|
9598
|
+
onClick: () => setExpanded((prev) => !prev),
|
|
9599
|
+
padding: 1,
|
|
9600
|
+
text: expanded ? "Collapse" : "Expand"
|
|
9601
|
+
}
|
|
9602
|
+
)
|
|
9603
|
+
] }),
|
|
9604
|
+
expanded && /* @__PURE__ */ jsxs28(Box22, { style: { position: "relative" }, children: [
|
|
9605
|
+
/* @__PURE__ */ jsx36(Card15, { border: true, padding: 3, radius: 2, tone: "transparent", children: /* @__PURE__ */ jsx36(
|
|
9606
|
+
"pre",
|
|
9607
|
+
{
|
|
9608
|
+
style: {
|
|
9609
|
+
fontFamily: "monospace",
|
|
9610
|
+
fontSize: 12,
|
|
9611
|
+
lineHeight: "1.5",
|
|
9612
|
+
margin: 0,
|
|
9613
|
+
maxHeight: 400,
|
|
9614
|
+
overflow: "auto",
|
|
9615
|
+
whiteSpace: "pre-wrap",
|
|
9616
|
+
wordBreak: "break-word"
|
|
9617
|
+
},
|
|
9618
|
+
children: json
|
|
9619
|
+
}
|
|
9620
|
+
) }),
|
|
9621
|
+
/* @__PURE__ */ jsx36(
|
|
9622
|
+
CopyButton,
|
|
9623
|
+
{
|
|
9624
|
+
label: "Copy config",
|
|
9625
|
+
style: { position: "absolute", right: 8, top: 8 },
|
|
9626
|
+
text: json
|
|
9627
|
+
}
|
|
9628
|
+
)
|
|
9629
|
+
] })
|
|
9630
|
+
] });
|
|
9631
|
+
}
|
|
9632
|
+
function CacheTelemetry({
|
|
9633
|
+
cacheKeys,
|
|
9634
|
+
preview
|
|
9635
|
+
}) {
|
|
9636
|
+
const [expanded, setExpanded] = useState17(false);
|
|
9637
|
+
const count = cacheKeys.length || preview.cacheHits || 0;
|
|
9638
|
+
if (count === 0) return null;
|
|
9639
|
+
return /* @__PURE__ */ jsxs28(Stack24, { space: 2, children: [
|
|
9640
|
+
/* @__PURE__ */ jsxs28(Flex21, { align: "center", gap: 2, children: [
|
|
9641
|
+
/* @__PURE__ */ jsx36(SectionTitle, { children: "Remote cache hits" }),
|
|
9642
|
+
/* @__PURE__ */ jsx36(Text32, { size: 2, children: count }),
|
|
9643
|
+
cacheKeys.length > 0 && /* @__PURE__ */ jsx36(
|
|
9644
|
+
Button4,
|
|
9645
|
+
{
|
|
9646
|
+
fontSize: 1,
|
|
9647
|
+
icon: expanded ? ChevronDownIcon2 : ChevronRightIcon2,
|
|
9648
|
+
mode: "bleed",
|
|
9649
|
+
onClick: () => setExpanded((prev) => !prev),
|
|
9650
|
+
padding: 1,
|
|
9651
|
+
text: expanded ? "Hide keys" : "Show keys"
|
|
9652
|
+
}
|
|
9653
|
+
)
|
|
9654
|
+
] }),
|
|
9655
|
+
expanded && cacheKeys.length > 0 && /* @__PURE__ */ jsx36(Stack24, { space: 1, children: cacheKeys.map((k) => /* @__PURE__ */ jsx36(Text32, { size: 1, style: { fontFamily: "monospace" }, children: k }, k)) })
|
|
9656
|
+
] });
|
|
9657
|
+
}
|
|
9658
|
+
function SectionTitle({ children }) {
|
|
9659
|
+
return /* @__PURE__ */ jsx36(
|
|
9660
|
+
Text32,
|
|
9661
|
+
{
|
|
9662
|
+
muted: true,
|
|
9663
|
+
size: 1,
|
|
9664
|
+
style: { letterSpacing: "0.05em", textTransform: "uppercase" },
|
|
9665
|
+
weight: "semibold",
|
|
9666
|
+
children
|
|
9667
|
+
}
|
|
9668
|
+
);
|
|
9669
|
+
}
|
|
9670
|
+
|
|
9671
|
+
// src/components/report-detail/ProvenanceCard.tsx
|
|
9672
|
+
import { Button as Button5, Card as Card16, Flex as Flex22, Grid as Grid4, Stack as Stack25, Text as Text33 } from "@sanity/ui";
|
|
9673
|
+
import { useState as useState18 } from "react";
|
|
9674
|
+
import { jsx as jsx37, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
9675
|
+
var TASK_IDS_INLINE_THRESHOLD = 3;
|
|
9676
|
+
function ProvenanceCard({ provenance }) {
|
|
9677
|
+
return /* @__PURE__ */ jsx37(Card16, { padding: 4, radius: 2, shadow: 1, children: /* @__PURE__ */ jsxs29(Stack25, { space: 4, children: [
|
|
9678
|
+
/* @__PURE__ */ jsx37(Text33, { size: 3, weight: "semibold", children: "Provenance" }),
|
|
9679
|
+
/* @__PURE__ */ jsxs29(Grid4, { columns: [1, 2, 3], gap: 4, children: [
|
|
9680
|
+
/* @__PURE__ */ jsx37(Field, { label: "Mode", value: provenance.mode }),
|
|
9681
|
+
/* @__PURE__ */ jsx37(Field, { label: "Source", value: provenance.source.name }),
|
|
9682
|
+
/* @__PURE__ */ jsx37(
|
|
9418
9683
|
Field,
|
|
9419
9684
|
{
|
|
9420
9685
|
label: "Trigger",
|
|
9421
9686
|
value: provenance.trigger.type + (provenance.trigger.workflow ? ` (${provenance.trigger.workflow})` : "")
|
|
9422
9687
|
}
|
|
9423
9688
|
),
|
|
9424
|
-
/* @__PURE__ */
|
|
9689
|
+
/* @__PURE__ */ jsx37(
|
|
9425
9690
|
Field,
|
|
9426
9691
|
{
|
|
9427
9692
|
label: "Models",
|
|
9428
9693
|
value: provenance.models.map((m) => m.label).join(", ")
|
|
9429
9694
|
}
|
|
9430
9695
|
),
|
|
9431
|
-
/* @__PURE__ */
|
|
9432
|
-
provenance.contextHash && /* @__PURE__ */
|
|
9696
|
+
/* @__PURE__ */ jsx37(Field, { label: "Grader Model", mono: true, value: provenance.graderModel }),
|
|
9697
|
+
provenance.contextHash && /* @__PURE__ */ jsx37(
|
|
9433
9698
|
Field,
|
|
9434
9699
|
{
|
|
9435
9700
|
label: "Context Hash",
|
|
9436
9701
|
mono: true,
|
|
9437
9702
|
value: provenance.contextHash.slice(0, 16) + "\u2026"
|
|
9438
9703
|
}
|
|
9439
|
-
)
|
|
9704
|
+
),
|
|
9705
|
+
provenance.areas.length > 0 && /* @__PURE__ */ jsx37(Field, { label: "Areas", value: provenance.areas.join(", ") }),
|
|
9706
|
+
provenance.taskIds && provenance.taskIds.length > 0 && /* @__PURE__ */ jsx37(TaskIdsField, { taskIds: provenance.taskIds })
|
|
9440
9707
|
] }),
|
|
9441
|
-
provenance.git && /* @__PURE__ */
|
|
9442
|
-
/* @__PURE__ */
|
|
9708
|
+
provenance.git && /* @__PURE__ */ jsx37(GitInfo, { git: provenance.git }),
|
|
9709
|
+
/* @__PURE__ */ jsx37(PromptfooLinks, { provenance })
|
|
9443
9710
|
] }) });
|
|
9444
9711
|
}
|
|
9445
9712
|
function Field({
|
|
@@ -9447,9 +9714,9 @@ function Field({
|
|
|
9447
9714
|
mono,
|
|
9448
9715
|
value
|
|
9449
9716
|
}) {
|
|
9450
|
-
return /* @__PURE__ */
|
|
9451
|
-
/* @__PURE__ */
|
|
9452
|
-
|
|
9717
|
+
return /* @__PURE__ */ jsxs29(Stack25, { space: 1, children: [
|
|
9718
|
+
/* @__PURE__ */ jsx37(
|
|
9719
|
+
Text33,
|
|
9453
9720
|
{
|
|
9454
9721
|
muted: true,
|
|
9455
9722
|
size: 1,
|
|
@@ -9458,7 +9725,46 @@ function Field({
|
|
|
9458
9725
|
children: label
|
|
9459
9726
|
}
|
|
9460
9727
|
),
|
|
9461
|
-
/* @__PURE__ */
|
|
9728
|
+
/* @__PURE__ */ jsx37(Text33, { size: 2, style: mono ? { fontFamily: "monospace" } : void 0, children: value })
|
|
9729
|
+
] });
|
|
9730
|
+
}
|
|
9731
|
+
function TaskIdsField({ taskIds }) {
|
|
9732
|
+
const [expanded, setExpanded] = useState18(false);
|
|
9733
|
+
const count = taskIds.length;
|
|
9734
|
+
const needsToggle = count > TASK_IDS_INLINE_THRESHOLD;
|
|
9735
|
+
const showList = !needsToggle || expanded;
|
|
9736
|
+
return /* @__PURE__ */ jsxs29(Stack25, { space: 1, children: [
|
|
9737
|
+
/* @__PURE__ */ jsxs29(Flex22, { align: "center", gap: 2, children: [
|
|
9738
|
+
/* @__PURE__ */ jsx37(
|
|
9739
|
+
Text33,
|
|
9740
|
+
{
|
|
9741
|
+
muted: true,
|
|
9742
|
+
size: 1,
|
|
9743
|
+
style: {
|
|
9744
|
+
letterSpacing: "0.05em",
|
|
9745
|
+
textTransform: "uppercase"
|
|
9746
|
+
},
|
|
9747
|
+
weight: "semibold",
|
|
9748
|
+
children: "Tasks"
|
|
9749
|
+
}
|
|
9750
|
+
),
|
|
9751
|
+
/* @__PURE__ */ jsxs29(Text33, { muted: true, size: 1, children: [
|
|
9752
|
+
"(",
|
|
9753
|
+
count,
|
|
9754
|
+
")"
|
|
9755
|
+
] })
|
|
9756
|
+
] }),
|
|
9757
|
+
showList && /* @__PURE__ */ jsx37(Stack25, { space: 1, children: taskIds.map((id) => /* @__PURE__ */ jsx37(Text33, { size: 2, style: { fontFamily: "monospace" }, children: id }, id)) }),
|
|
9758
|
+
needsToggle && /* @__PURE__ */ jsx37(
|
|
9759
|
+
Button5,
|
|
9760
|
+
{
|
|
9761
|
+
fontSize: 1,
|
|
9762
|
+
mode: "bleed",
|
|
9763
|
+
onClick: () => setExpanded((prev) => !prev),
|
|
9764
|
+
padding: 1,
|
|
9765
|
+
text: expanded ? "Hide" : `Show all ${count}`
|
|
9766
|
+
}
|
|
9767
|
+
)
|
|
9462
9768
|
] });
|
|
9463
9769
|
}
|
|
9464
9770
|
function GitInfo({ git }) {
|
|
@@ -9466,15 +9772,15 @@ function GitInfo({ git }) {
|
|
|
9466
9772
|
const branchUrl = `${repoUrl}/tree/${git.branch}`;
|
|
9467
9773
|
const commitUrl = `${repoUrl}/commit/${git.sha}`;
|
|
9468
9774
|
const prUrl = git.prNumber ? `${repoUrl}/pull/${git.prNumber}` : null;
|
|
9469
|
-
return /* @__PURE__ */
|
|
9470
|
-
/* @__PURE__ */
|
|
9471
|
-
/* @__PURE__ */
|
|
9472
|
-
/* @__PURE__ */
|
|
9775
|
+
return /* @__PURE__ */ jsx37(Card16, { border: true, padding: 3, radius: 2, tone: "transparent", children: /* @__PURE__ */ jsxs29(Flex22, { align: "center", gap: 3, wrap: "wrap", children: [
|
|
9776
|
+
/* @__PURE__ */ jsx37(Text33, { muted: true, size: 2, weight: "semibold", children: "Git" }),
|
|
9777
|
+
/* @__PURE__ */ jsxs29(Text33, { size: 2, children: [
|
|
9778
|
+
/* @__PURE__ */ jsx37("a", { href: repoUrl, rel: "noopener noreferrer", target: "_blank", children: git.repo }),
|
|
9473
9779
|
" / ",
|
|
9474
|
-
/* @__PURE__ */
|
|
9780
|
+
/* @__PURE__ */ jsx37("a", { href: branchUrl, rel: "noopener noreferrer", target: "_blank", children: git.branch })
|
|
9475
9781
|
] }),
|
|
9476
|
-
/* @__PURE__ */
|
|
9477
|
-
prUrl && /* @__PURE__ */
|
|
9782
|
+
/* @__PURE__ */ jsx37(Text33, { muted: true, size: 2, style: { fontFamily: "monospace" }, children: /* @__PURE__ */ jsx37("a", { href: commitUrl, rel: "noopener noreferrer", target: "_blank", children: git.sha.slice(0, 12) }) }),
|
|
9783
|
+
prUrl && /* @__PURE__ */ jsx37(Text33, { size: 2, children: /* @__PURE__ */ jsxs29("a", { href: prUrl, rel: "noopener noreferrer", target: "_blank", children: [
|
|
9478
9784
|
"PR #",
|
|
9479
9785
|
git.prNumber,
|
|
9480
9786
|
" \u2192"
|
|
@@ -9485,14 +9791,14 @@ function PromptfooLinks({
|
|
|
9485
9791
|
provenance
|
|
9486
9792
|
}) {
|
|
9487
9793
|
if (provenance.promptfooUrls && provenance.promptfooUrls.length > 0) {
|
|
9488
|
-
return /* @__PURE__ */
|
|
9794
|
+
return /* @__PURE__ */ jsx37(Flex22, { align: "center", gap: 3, wrap: "wrap", children: provenance.promptfooUrls.map((entry) => /* @__PURE__ */ jsx37(Text33, { size: 2, children: /* @__PURE__ */ jsxs29("a", { href: entry.url, rel: "noopener noreferrer", target: "_blank", children: [
|
|
9489
9795
|
"View in Promptfoo (",
|
|
9490
9796
|
entry.mode,
|
|
9491
9797
|
") \u2192"
|
|
9492
9798
|
] }) }, entry.mode)) });
|
|
9493
9799
|
}
|
|
9494
9800
|
if (provenance.promptfooUrl) {
|
|
9495
|
-
return /* @__PURE__ */
|
|
9801
|
+
return /* @__PURE__ */ jsx37(Text33, { size: 2, children: /* @__PURE__ */ jsx37(
|
|
9496
9802
|
"a",
|
|
9497
9803
|
{
|
|
9498
9804
|
href: provenance.promptfooUrl,
|
|
@@ -9502,40 +9808,40 @@ function PromptfooLinks({
|
|
|
9502
9808
|
}
|
|
9503
9809
|
) });
|
|
9504
9810
|
}
|
|
9505
|
-
return /* @__PURE__ */
|
|
9811
|
+
return /* @__PURE__ */ jsx37(PromptfooUnavailable, { reason: "not-shared" });
|
|
9506
9812
|
}
|
|
9507
9813
|
var UNAVAILABLE_TOOLTIPS = {
|
|
9508
9814
|
"not-shared": "No Promptfoo share link was generated for this report. This usually means the evaluation was run locally without the --share flag."
|
|
9509
9815
|
};
|
|
9510
9816
|
function PromptfooUnavailable({ reason }) {
|
|
9511
|
-
return /* @__PURE__ */
|
|
9512
|
-
/* @__PURE__ */
|
|
9513
|
-
/* @__PURE__ */
|
|
9817
|
+
return /* @__PURE__ */ jsxs29(Flex22, { align: "center", gap: 2, children: [
|
|
9818
|
+
/* @__PURE__ */ jsx37(Text33, { muted: true, size: 2, children: "Promptfoo report not available" }),
|
|
9819
|
+
/* @__PURE__ */ jsx37(InfoTip, { text: UNAVAILABLE_TOOLTIPS[reason] ?? "" })
|
|
9514
9820
|
] });
|
|
9515
9821
|
}
|
|
9516
9822
|
|
|
9517
9823
|
// src/components/report-detail/report-actions/ActionButton.tsx
|
|
9518
|
-
import { Button as
|
|
9519
|
-
import { jsx as
|
|
9824
|
+
import { Button as Button6, useToast as useToast2 } from "@sanity/ui";
|
|
9825
|
+
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
9520
9826
|
|
|
9521
9827
|
// src/components/report-detail/report-actions/JudgmentActions.tsx
|
|
9522
9828
|
import { DocumentTextIcon, LinkIcon as LinkIcon3 } from "@sanity/icons";
|
|
9523
9829
|
import { MenuDivider, MenuItem, useToast as useToast3 } from "@sanity/ui";
|
|
9524
|
-
import { useCallback as
|
|
9830
|
+
import { useCallback as useCallback24 } from "react";
|
|
9525
9831
|
|
|
9526
9832
|
// src/components/report-detail/report-actions/SplitActionButton.tsx
|
|
9527
|
-
import { ChevronDownIcon as
|
|
9528
|
-
import { Button as
|
|
9529
|
-
import { jsx as
|
|
9833
|
+
import { ChevronDownIcon as ChevronDownIcon3 } from "@sanity/icons";
|
|
9834
|
+
import { Button as Button7, Flex as Flex23, Menu, MenuButton } from "@sanity/ui";
|
|
9835
|
+
import { jsx as jsx39, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
9530
9836
|
function SplitActionButton({
|
|
9531
9837
|
menu,
|
|
9532
9838
|
menuId,
|
|
9533
9839
|
placement = "bottom-end",
|
|
9534
9840
|
primary
|
|
9535
9841
|
}) {
|
|
9536
|
-
return /* @__PURE__ */
|
|
9537
|
-
/* @__PURE__ */
|
|
9538
|
-
|
|
9842
|
+
return /* @__PURE__ */ jsxs30(Flex23, { children: [
|
|
9843
|
+
/* @__PURE__ */ jsx39(
|
|
9844
|
+
Button7,
|
|
9539
9845
|
{
|
|
9540
9846
|
fontSize: primary.fontSize,
|
|
9541
9847
|
icon: primary.icon,
|
|
@@ -9551,13 +9857,13 @@ function SplitActionButton({
|
|
|
9551
9857
|
text: primary.text
|
|
9552
9858
|
}
|
|
9553
9859
|
),
|
|
9554
|
-
/* @__PURE__ */
|
|
9860
|
+
/* @__PURE__ */ jsx39(
|
|
9555
9861
|
MenuButton,
|
|
9556
9862
|
{
|
|
9557
|
-
button: /* @__PURE__ */
|
|
9558
|
-
|
|
9863
|
+
button: /* @__PURE__ */ jsx39(
|
|
9864
|
+
Button7,
|
|
9559
9865
|
{
|
|
9560
|
-
icon:
|
|
9866
|
+
icon: ChevronDownIcon3,
|
|
9561
9867
|
mode: "ghost",
|
|
9562
9868
|
padding: 2,
|
|
9563
9869
|
style: {
|
|
@@ -9568,7 +9874,7 @@ function SplitActionButton({
|
|
|
9568
9874
|
}
|
|
9569
9875
|
),
|
|
9570
9876
|
id: menuId,
|
|
9571
|
-
menu: /* @__PURE__ */
|
|
9877
|
+
menu: /* @__PURE__ */ jsx39(Menu, { children: menu }),
|
|
9572
9878
|
popover: { placement, portal: true }
|
|
9573
9879
|
}
|
|
9574
9880
|
)
|
|
@@ -9576,10 +9882,10 @@ function SplitActionButton({
|
|
|
9576
9882
|
}
|
|
9577
9883
|
|
|
9578
9884
|
// src/components/report-detail/report-actions/JudgmentActions.tsx
|
|
9579
|
-
import { Fragment as
|
|
9885
|
+
import { Fragment as Fragment11, jsx as jsx40, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
9580
9886
|
function JudgmentActions({ onShowPrompts } = {}) {
|
|
9581
9887
|
const toast = useToast3();
|
|
9582
|
-
const handleCopyLink =
|
|
9888
|
+
const handleCopyLink = useCallback24(() => {
|
|
9583
9889
|
navigator.clipboard.writeText(window.location.href).then(
|
|
9584
9890
|
() => {
|
|
9585
9891
|
toast.push({
|
|
@@ -9597,12 +9903,12 @@ function JudgmentActions({ onShowPrompts } = {}) {
|
|
|
9597
9903
|
}
|
|
9598
9904
|
);
|
|
9599
9905
|
}, [toast]);
|
|
9600
|
-
return /* @__PURE__ */
|
|
9906
|
+
return /* @__PURE__ */ jsx40(
|
|
9601
9907
|
SplitActionButton,
|
|
9602
9908
|
{
|
|
9603
|
-
menu: /* @__PURE__ */
|
|
9604
|
-
onShowPrompts && /* @__PURE__ */
|
|
9605
|
-
/* @__PURE__ */
|
|
9909
|
+
menu: /* @__PURE__ */ jsxs31(Fragment11, { children: [
|
|
9910
|
+
onShowPrompts && /* @__PURE__ */ jsxs31(Fragment11, { children: [
|
|
9911
|
+
/* @__PURE__ */ jsx40(
|
|
9606
9912
|
MenuItem,
|
|
9607
9913
|
{
|
|
9608
9914
|
icon: DocumentTextIcon,
|
|
@@ -9610,9 +9916,9 @@ function JudgmentActions({ onShowPrompts } = {}) {
|
|
|
9610
9916
|
text: "Show prompts"
|
|
9611
9917
|
}
|
|
9612
9918
|
),
|
|
9613
|
-
/* @__PURE__ */
|
|
9919
|
+
/* @__PURE__ */ jsx40(MenuDivider, {})
|
|
9614
9920
|
] }),
|
|
9615
|
-
/* @__PURE__ */
|
|
9921
|
+
/* @__PURE__ */ jsx40(MenuItem, { icon: LinkIcon3, onClick: handleCopyLink, text: "Copy link" })
|
|
9616
9922
|
] }),
|
|
9617
9923
|
menuId: "judgment-actions-menu",
|
|
9618
9924
|
primary: {
|
|
@@ -9629,20 +9935,20 @@ function JudgmentActions({ onShowPrompts } = {}) {
|
|
|
9629
9935
|
// src/components/report-detail/report-actions/ReportActions.tsx
|
|
9630
9936
|
import { CopyIcon as CopyIcon3 } from "@sanity/icons";
|
|
9631
9937
|
import { MenuDivider as MenuDivider2, useToast as useToast9 } from "@sanity/ui";
|
|
9632
|
-
import { useCallback as
|
|
9938
|
+
import { useCallback as useCallback30, useState as useState22 } from "react";
|
|
9633
9939
|
import { useClient as useClient9 } from "sanity";
|
|
9634
9940
|
|
|
9635
9941
|
// src/components/report-detail/report-actions/CopyReportAction.tsx
|
|
9636
9942
|
import { ClipboardIcon } from "@sanity/icons";
|
|
9637
9943
|
import { MenuItem as MenuItem2, useToast as useToast4 } from "@sanity/ui";
|
|
9638
|
-
import { useCallback as
|
|
9944
|
+
import { useCallback as useCallback25, useState as useState19 } from "react";
|
|
9639
9945
|
import { useClient as useClient6 } from "sanity";
|
|
9640
|
-
import { jsx as
|
|
9946
|
+
import { jsx as jsx41 } from "react/jsx-runtime";
|
|
9641
9947
|
function CopyReportAction({ documentId }) {
|
|
9642
9948
|
const client = useClient6({ apiVersion: API_VERSION });
|
|
9643
9949
|
const toast = useToast4();
|
|
9644
|
-
const [copying, setCopying] =
|
|
9645
|
-
const handleClick =
|
|
9950
|
+
const [copying, setCopying] = useState19(false);
|
|
9951
|
+
const handleClick = useCallback25(async () => {
|
|
9646
9952
|
setCopying(true);
|
|
9647
9953
|
try {
|
|
9648
9954
|
const doc = await client.fetch(
|
|
@@ -9674,7 +9980,7 @@ function CopyReportAction({ documentId }) {
|
|
|
9674
9980
|
setCopying(false);
|
|
9675
9981
|
}
|
|
9676
9982
|
}, [client, documentId, toast]);
|
|
9677
|
-
return /* @__PURE__ */
|
|
9983
|
+
return /* @__PURE__ */ jsx41(
|
|
9678
9984
|
MenuItem2,
|
|
9679
9985
|
{
|
|
9680
9986
|
disabled: copying,
|
|
@@ -9688,11 +9994,11 @@ function CopyReportAction({ documentId }) {
|
|
|
9688
9994
|
// src/components/report-detail/report-actions/CopyReportIdAction.tsx
|
|
9689
9995
|
import { CopyIcon as CopyIcon2 } from "@sanity/icons";
|
|
9690
9996
|
import { MenuItem as MenuItem3, useToast as useToast5 } from "@sanity/ui";
|
|
9691
|
-
import { useCallback as
|
|
9692
|
-
import { jsx as
|
|
9997
|
+
import { useCallback as useCallback26 } from "react";
|
|
9998
|
+
import { jsx as jsx42 } from "react/jsx-runtime";
|
|
9693
9999
|
function CopyReportIdAction({ reportId }) {
|
|
9694
10000
|
const toast = useToast5();
|
|
9695
|
-
const handleClick =
|
|
10001
|
+
const handleClick = useCallback26(() => {
|
|
9696
10002
|
navigator.clipboard.writeText(reportId).then(
|
|
9697
10003
|
() => {
|
|
9698
10004
|
toast.push({
|
|
@@ -9710,19 +10016,19 @@ function CopyReportIdAction({ reportId }) {
|
|
|
9710
10016
|
}
|
|
9711
10017
|
);
|
|
9712
10018
|
}, [reportId, toast]);
|
|
9713
|
-
return /* @__PURE__ */
|
|
10019
|
+
return /* @__PURE__ */ jsx42(MenuItem3, { icon: CopyIcon2, onClick: handleClick, text: "Copy report ID" });
|
|
9714
10020
|
}
|
|
9715
10021
|
|
|
9716
10022
|
// src/components/report-detail/report-actions/CopyVisionQueryAction.tsx
|
|
9717
10023
|
import { SearchIcon as SearchIcon6 } from "@sanity/icons";
|
|
9718
10024
|
import { MenuItem as MenuItem4, useToast as useToast6 } from "@sanity/ui";
|
|
9719
|
-
import { useCallback as
|
|
9720
|
-
import { jsx as
|
|
10025
|
+
import { useCallback as useCallback27 } from "react";
|
|
10026
|
+
import { jsx as jsx43 } from "react/jsx-runtime";
|
|
9721
10027
|
function CopyVisionQueryAction({
|
|
9722
10028
|
reportId
|
|
9723
10029
|
}) {
|
|
9724
10030
|
const toast = useToast6();
|
|
9725
|
-
const handleClick =
|
|
10031
|
+
const handleClick = useCallback27(() => {
|
|
9726
10032
|
const query = `*[_type == "ailf.report" && reportId == "${reportId}"][0]`;
|
|
9727
10033
|
navigator.clipboard.writeText(query).then(
|
|
9728
10034
|
() => {
|
|
@@ -9742,7 +10048,7 @@ function CopyVisionQueryAction({
|
|
|
9742
10048
|
}
|
|
9743
10049
|
);
|
|
9744
10050
|
}, [reportId, toast]);
|
|
9745
|
-
return /* @__PURE__ */
|
|
10051
|
+
return /* @__PURE__ */ jsx43(
|
|
9746
10052
|
MenuItem4,
|
|
9747
10053
|
{
|
|
9748
10054
|
icon: SearchIcon6,
|
|
@@ -9753,25 +10059,25 @@ function CopyVisionQueryAction({
|
|
|
9753
10059
|
}
|
|
9754
10060
|
|
|
9755
10061
|
// src/components/report-detail/report-actions/DeleteConfirmDialog.tsx
|
|
9756
|
-
import { Box as
|
|
9757
|
-
import { jsx as
|
|
10062
|
+
import { Box as Box23, Button as Button8, Card as Card17, Dialog as Dialog2, Flex as Flex24, Stack as Stack26, Text as Text34 } from "@sanity/ui";
|
|
10063
|
+
import { jsx as jsx44, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
9758
10064
|
function DeleteConfirmDialog({
|
|
9759
10065
|
isDeleting,
|
|
9760
10066
|
onClose,
|
|
9761
10067
|
onConfirm,
|
|
9762
10068
|
reportId
|
|
9763
10069
|
}) {
|
|
9764
|
-
return /* @__PURE__ */
|
|
10070
|
+
return /* @__PURE__ */ jsx44(
|
|
9765
10071
|
Dialog2,
|
|
9766
10072
|
{
|
|
9767
10073
|
header: "Delete Report",
|
|
9768
10074
|
id: "delete-report-dialog",
|
|
9769
10075
|
onClose,
|
|
9770
10076
|
width: 1,
|
|
9771
|
-
children: /* @__PURE__ */
|
|
9772
|
-
/* @__PURE__ */
|
|
9773
|
-
/* @__PURE__ */
|
|
9774
|
-
|
|
10077
|
+
children: /* @__PURE__ */ jsx44(Box23, { padding: 4, children: /* @__PURE__ */ jsxs32(Stack26, { space: 4, children: [
|
|
10078
|
+
/* @__PURE__ */ jsx44(Text34, { children: "Are you sure you want to delete this report? This action cannot be undone." }),
|
|
10079
|
+
/* @__PURE__ */ jsx44(Card17, { border: true, padding: 3, radius: 2, tone: "transparent", children: /* @__PURE__ */ jsx44(
|
|
10080
|
+
Text34,
|
|
9775
10081
|
{
|
|
9776
10082
|
muted: true,
|
|
9777
10083
|
size: 1,
|
|
@@ -9779,9 +10085,9 @@ function DeleteConfirmDialog({
|
|
|
9779
10085
|
children: reportId
|
|
9780
10086
|
}
|
|
9781
10087
|
) }),
|
|
9782
|
-
/* @__PURE__ */
|
|
9783
|
-
/* @__PURE__ */
|
|
9784
|
-
|
|
10088
|
+
/* @__PURE__ */ jsxs32(Flex24, { gap: 2, justify: "flex-end", children: [
|
|
10089
|
+
/* @__PURE__ */ jsx44(
|
|
10090
|
+
Button8,
|
|
9785
10091
|
{
|
|
9786
10092
|
disabled: isDeleting,
|
|
9787
10093
|
mode: "ghost",
|
|
@@ -9789,8 +10095,8 @@ function DeleteConfirmDialog({
|
|
|
9789
10095
|
text: "Cancel"
|
|
9790
10096
|
}
|
|
9791
10097
|
),
|
|
9792
|
-
/* @__PURE__ */
|
|
9793
|
-
|
|
10098
|
+
/* @__PURE__ */ jsx44(
|
|
10099
|
+
Button8,
|
|
9794
10100
|
{
|
|
9795
10101
|
disabled: isDeleting,
|
|
9796
10102
|
onClick: onConfirm,
|
|
@@ -9807,11 +10113,11 @@ function DeleteConfirmDialog({
|
|
|
9807
10113
|
// src/components/report-detail/report-actions/DeleteReportAction.tsx
|
|
9808
10114
|
import { TrashIcon } from "@sanity/icons";
|
|
9809
10115
|
import { MenuItem as MenuItem5 } from "@sanity/ui";
|
|
9810
|
-
import { jsx as
|
|
10116
|
+
import { jsx as jsx45 } from "react/jsx-runtime";
|
|
9811
10117
|
function DeleteReportAction({
|
|
9812
10118
|
onRequestDelete
|
|
9813
10119
|
}) {
|
|
9814
|
-
return /* @__PURE__ */
|
|
10120
|
+
return /* @__PURE__ */ jsx45(
|
|
9815
10121
|
MenuItem5,
|
|
9816
10122
|
{
|
|
9817
10123
|
icon: TrashIcon,
|
|
@@ -9825,17 +10131,17 @@ function DeleteReportAction({
|
|
|
9825
10131
|
// src/components/report-detail/report-actions/DownloadReportAction.tsx
|
|
9826
10132
|
import { DownloadIcon } from "@sanity/icons";
|
|
9827
10133
|
import { MenuItem as MenuItem6, useToast as useToast7 } from "@sanity/ui";
|
|
9828
|
-
import { useCallback as
|
|
10134
|
+
import { useCallback as useCallback28, useState as useState20 } from "react";
|
|
9829
10135
|
import { useClient as useClient7 } from "sanity";
|
|
9830
|
-
import { jsx as
|
|
10136
|
+
import { jsx as jsx46 } from "react/jsx-runtime";
|
|
9831
10137
|
function DownloadReportAction({
|
|
9832
10138
|
documentId,
|
|
9833
10139
|
reportId
|
|
9834
10140
|
}) {
|
|
9835
10141
|
const client = useClient7({ apiVersion: API_VERSION });
|
|
9836
10142
|
const toast = useToast7();
|
|
9837
|
-
const [downloading, setDownloading] =
|
|
9838
|
-
const handleClick =
|
|
10143
|
+
const [downloading, setDownloading] = useState20(false);
|
|
10144
|
+
const handleClick = useCallback28(async () => {
|
|
9839
10145
|
setDownloading(true);
|
|
9840
10146
|
try {
|
|
9841
10147
|
const doc = await client.fetch(
|
|
@@ -9875,7 +10181,7 @@ function DownloadReportAction({
|
|
|
9875
10181
|
setDownloading(false);
|
|
9876
10182
|
}
|
|
9877
10183
|
}, [client, documentId, reportId, toast]);
|
|
9878
|
-
return /* @__PURE__ */
|
|
10184
|
+
return /* @__PURE__ */ jsx46(
|
|
9879
10185
|
MenuItem6,
|
|
9880
10186
|
{
|
|
9881
10187
|
disabled: downloading,
|
|
@@ -9889,7 +10195,7 @@ function DownloadReportAction({
|
|
|
9889
10195
|
// src/components/report-detail/report-actions/RerunEvaluationAction.tsx
|
|
9890
10196
|
import { PlayIcon as PlayIcon2 } from "@sanity/icons";
|
|
9891
10197
|
import { MenuItem as MenuItem7, useToast as useToast8 } from "@sanity/ui";
|
|
9892
|
-
import { useCallback as
|
|
10198
|
+
import { useCallback as useCallback29, useState as useState21 } from "react";
|
|
9893
10199
|
import { useClient as useClient8, useCurrentUser as useCurrentUser3 } from "sanity";
|
|
9894
10200
|
|
|
9895
10201
|
// src/lib/eval-scope.ts
|
|
@@ -9905,7 +10211,7 @@ function extractEvalScope(provenance) {
|
|
|
9905
10211
|
}
|
|
9906
10212
|
|
|
9907
10213
|
// src/components/report-detail/report-actions/RerunEvaluationAction.tsx
|
|
9908
|
-
import { jsx as
|
|
10214
|
+
import { jsx as jsx47 } from "react/jsx-runtime";
|
|
9909
10215
|
var EVAL_REQUEST_TYPE2 = "ailf.evalRequest";
|
|
9910
10216
|
function slugify2(s) {
|
|
9911
10217
|
return s.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 40);
|
|
@@ -9944,8 +10250,8 @@ function RerunEvaluationAction({
|
|
|
9944
10250
|
const client = useClient8({ apiVersion: API_VERSION });
|
|
9945
10251
|
const currentUser = useCurrentUser3();
|
|
9946
10252
|
const toast = useToast8();
|
|
9947
|
-
const [requesting, setRequesting] =
|
|
9948
|
-
const handleClick =
|
|
10253
|
+
const [requesting, setRequesting] = useState21(false);
|
|
10254
|
+
const handleClick = useCallback29(async () => {
|
|
9949
10255
|
setRequesting(true);
|
|
9950
10256
|
try {
|
|
9951
10257
|
const scope = extractEvalScope(provenance);
|
|
@@ -9972,7 +10278,7 @@ function RerunEvaluationAction({
|
|
|
9972
10278
|
setRequesting(false);
|
|
9973
10279
|
}
|
|
9974
10280
|
}, [client, currentUser?.id, provenance, reportId, toast]);
|
|
9975
|
-
return /* @__PURE__ */
|
|
10281
|
+
return /* @__PURE__ */ jsx47(
|
|
9976
10282
|
MenuItem7,
|
|
9977
10283
|
{
|
|
9978
10284
|
disabled: requesting,
|
|
@@ -9984,7 +10290,7 @@ function RerunEvaluationAction({
|
|
|
9984
10290
|
}
|
|
9985
10291
|
|
|
9986
10292
|
// src/components/report-detail/report-actions/ReportActions.tsx
|
|
9987
|
-
import { Fragment as
|
|
10293
|
+
import { Fragment as Fragment12, jsx as jsx48, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
9988
10294
|
function ReportActions({
|
|
9989
10295
|
documentId,
|
|
9990
10296
|
onDeleted,
|
|
@@ -9993,7 +10299,7 @@ function ReportActions({
|
|
|
9993
10299
|
}) {
|
|
9994
10300
|
const client = useClient9({ apiVersion: API_VERSION });
|
|
9995
10301
|
const toast = useToast9();
|
|
9996
|
-
const handleCopyId =
|
|
10302
|
+
const handleCopyId = useCallback30(() => {
|
|
9997
10303
|
navigator.clipboard.writeText(reportId).then(
|
|
9998
10304
|
() => {
|
|
9999
10305
|
toast.push({
|
|
@@ -10011,15 +10317,15 @@ function ReportActions({
|
|
|
10011
10317
|
}
|
|
10012
10318
|
);
|
|
10013
10319
|
}, [reportId, toast]);
|
|
10014
|
-
const [deleteDialogOpen, setDeleteDialogOpen] =
|
|
10015
|
-
const [deleting, setDeleting] =
|
|
10016
|
-
const handleRequestDelete =
|
|
10320
|
+
const [deleteDialogOpen, setDeleteDialogOpen] = useState22(false);
|
|
10321
|
+
const [deleting, setDeleting] = useState22(false);
|
|
10322
|
+
const handleRequestDelete = useCallback30(() => {
|
|
10017
10323
|
setDeleteDialogOpen(true);
|
|
10018
10324
|
}, []);
|
|
10019
|
-
const handleDeleteClose =
|
|
10325
|
+
const handleDeleteClose = useCallback30(() => {
|
|
10020
10326
|
if (!deleting) setDeleteDialogOpen(false);
|
|
10021
10327
|
}, [deleting]);
|
|
10022
|
-
const handleDeleteConfirm =
|
|
10328
|
+
const handleDeleteConfirm = useCallback30(async () => {
|
|
10023
10329
|
setDeleting(true);
|
|
10024
10330
|
try {
|
|
10025
10331
|
await client.delete(documentId);
|
|
@@ -10040,25 +10346,25 @@ function ReportActions({
|
|
|
10040
10346
|
setDeleting(false);
|
|
10041
10347
|
}
|
|
10042
10348
|
}, [client, documentId, onDeleted, toast]);
|
|
10043
|
-
return /* @__PURE__ */
|
|
10044
|
-
/* @__PURE__ */
|
|
10349
|
+
return /* @__PURE__ */ jsxs33(Fragment12, { children: [
|
|
10350
|
+
/* @__PURE__ */ jsx48(
|
|
10045
10351
|
SplitActionButton,
|
|
10046
10352
|
{
|
|
10047
|
-
menu: /* @__PURE__ */
|
|
10048
|
-
/* @__PURE__ */
|
|
10049
|
-
/* @__PURE__ */
|
|
10353
|
+
menu: /* @__PURE__ */ jsxs33(Fragment12, { children: [
|
|
10354
|
+
/* @__PURE__ */ jsx48(CopyReportIdAction, { reportId }),
|
|
10355
|
+
/* @__PURE__ */ jsx48(
|
|
10050
10356
|
RerunEvaluationAction,
|
|
10051
10357
|
{
|
|
10052
10358
|
provenance,
|
|
10053
10359
|
reportId
|
|
10054
10360
|
}
|
|
10055
10361
|
),
|
|
10056
|
-
/* @__PURE__ */
|
|
10057
|
-
/* @__PURE__ */
|
|
10058
|
-
/* @__PURE__ */
|
|
10059
|
-
/* @__PURE__ */
|
|
10060
|
-
/* @__PURE__ */
|
|
10061
|
-
/* @__PURE__ */
|
|
10362
|
+
/* @__PURE__ */ jsx48(MenuDivider2, {}),
|
|
10363
|
+
/* @__PURE__ */ jsx48(DownloadReportAction, { documentId, reportId }),
|
|
10364
|
+
/* @__PURE__ */ jsx48(CopyReportAction, { documentId }),
|
|
10365
|
+
/* @__PURE__ */ jsx48(CopyVisionQueryAction, { reportId }),
|
|
10366
|
+
/* @__PURE__ */ jsx48(MenuDivider2, {}),
|
|
10367
|
+
/* @__PURE__ */ jsx48(DeleteReportAction, { onRequestDelete: handleRequestDelete })
|
|
10062
10368
|
] }),
|
|
10063
10369
|
menuId: "report-actions-menu",
|
|
10064
10370
|
primary: {
|
|
@@ -10068,7 +10374,7 @@ function ReportActions({
|
|
|
10068
10374
|
}
|
|
10069
10375
|
}
|
|
10070
10376
|
),
|
|
10071
|
-
deleteDialogOpen && /* @__PURE__ */
|
|
10377
|
+
deleteDialogOpen && /* @__PURE__ */ jsx48(
|
|
10072
10378
|
DeleteConfirmDialog,
|
|
10073
10379
|
{
|
|
10074
10380
|
isDeleting: deleting,
|
|
@@ -10082,8 +10388,8 @@ function ReportActions({
|
|
|
10082
10388
|
|
|
10083
10389
|
// src/components/report-detail/ReportHeader.tsx
|
|
10084
10390
|
import { ArrowLeftIcon as ArrowLeftIcon2 } from "@sanity/icons";
|
|
10085
|
-
import { Button as
|
|
10086
|
-
import { jsx as
|
|
10391
|
+
import { Button as Button9, Flex as Flex25, Stack as Stack27, Text as Text35 } from "@sanity/ui";
|
|
10392
|
+
import { jsx as jsx49, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
10087
10393
|
function ReportHeader({
|
|
10088
10394
|
completedAt,
|
|
10089
10395
|
onBack,
|
|
@@ -10093,11 +10399,11 @@ function ReportHeader({
|
|
|
10093
10399
|
const dateLabel = formatCardDate(completedAt);
|
|
10094
10400
|
const displayTitle = title ?? tag ?? dateLabel;
|
|
10095
10401
|
const hasSubtitle = Boolean(title ?? tag);
|
|
10096
|
-
return /* @__PURE__ */
|
|
10097
|
-
/* @__PURE__ */
|
|
10098
|
-
/* @__PURE__ */
|
|
10099
|
-
/* @__PURE__ */
|
|
10100
|
-
hasSubtitle && /* @__PURE__ */
|
|
10402
|
+
return /* @__PURE__ */ jsxs34(Flex25, { align: "center", gap: 3, children: [
|
|
10403
|
+
/* @__PURE__ */ jsx49(Button9, { icon: ArrowLeftIcon2, mode: "bleed", onClick: onBack, text: "Back" }),
|
|
10404
|
+
/* @__PURE__ */ jsxs34(Stack27, { flex: 1, space: 1, children: [
|
|
10405
|
+
/* @__PURE__ */ jsx49(Text35, { size: 4, weight: "bold", children: displayTitle }),
|
|
10406
|
+
hasSubtitle && /* @__PURE__ */ jsx49(Text35, { muted: true, size: 2, children: dateLabel })
|
|
10101
10407
|
] })
|
|
10102
10408
|
] });
|
|
10103
10409
|
}
|
|
@@ -10105,17 +10411,17 @@ function ReportHeader({
|
|
|
10105
10411
|
// src/components/report-detail/StrengthsList.tsx
|
|
10106
10412
|
import { useMemo as useMemo14 } from "react";
|
|
10107
10413
|
import { CheckmarkCircleIcon as CheckmarkCircleIcon2, SearchIcon as SearchIcon7 } from "@sanity/icons";
|
|
10108
|
-
import { Box as
|
|
10414
|
+
import { Box as Box25, Flex as Flex28, Stack as Stack29, Text as Text38 } from "@sanity/ui";
|
|
10109
10415
|
|
|
10110
10416
|
// src/components/report-detail/AreaScoresGrid.tsx
|
|
10111
10417
|
import React3, {
|
|
10112
|
-
useCallback as
|
|
10418
|
+
useCallback as useCallback31,
|
|
10113
10419
|
useMemo as useMemo12,
|
|
10114
|
-
useState as
|
|
10420
|
+
useState as useState23
|
|
10115
10421
|
} from "react";
|
|
10116
10422
|
import { WarningOutlineIcon as WarningOutlineIcon2 } from "@sanity/icons";
|
|
10117
|
-
import { Box as
|
|
10118
|
-
import { Fragment as
|
|
10423
|
+
import { Box as Box24, Flex as Flex26, Stack as Stack28, Text as Text36 } from "@sanity/ui";
|
|
10424
|
+
import { Fragment as Fragment13, jsx as jsx50, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
10119
10425
|
var DIMENSION_TOOLTIPS2 = {
|
|
10120
10426
|
agentOutput: "Quality and completeness of the agent's output. Graded 0\u2013100.",
|
|
10121
10427
|
assertionPassRate: "Fraction of structural assertions that passed. Graded 0\u2013100.",
|
|
@@ -10161,9 +10467,9 @@ function AreaScoresGrid({
|
|
|
10161
10467
|
);
|
|
10162
10468
|
const showLift = isLiteracyMode(mode);
|
|
10163
10469
|
const dimKeys = useMemo12(() => collectDimensionKeys(scores), [scores]);
|
|
10164
|
-
const [sortField, setSortField] =
|
|
10165
|
-
const [sortDir, setSortDir] =
|
|
10166
|
-
const handleSort =
|
|
10470
|
+
const [sortField, setSortField] = useState23("score");
|
|
10471
|
+
const [sortDir, setSortDir] = useState23("desc");
|
|
10472
|
+
const handleSort = useCallback31(
|
|
10167
10473
|
(field) => {
|
|
10168
10474
|
if (field === sortField) {
|
|
10169
10475
|
setSortDir((d) => d === "asc" ? "desc" : "asc");
|
|
@@ -10207,8 +10513,8 @@ function AreaScoresGrid({
|
|
|
10207
10513
|
}
|
|
10208
10514
|
return map;
|
|
10209
10515
|
}, [perModel]);
|
|
10210
|
-
return /* @__PURE__ */
|
|
10211
|
-
/* @__PURE__ */
|
|
10516
|
+
return /* @__PURE__ */ jsxs35(Box24, { ref: containerRef, style: { ...neutralCardStyle, overflow: "auto" }, children: [
|
|
10517
|
+
/* @__PURE__ */ jsxs35(
|
|
10212
10518
|
"div",
|
|
10213
10519
|
{
|
|
10214
10520
|
style: {
|
|
@@ -10224,7 +10530,7 @@ function AreaScoresGrid({
|
|
|
10224
10530
|
padding: "12px 16px 8px"
|
|
10225
10531
|
},
|
|
10226
10532
|
children: [
|
|
10227
|
-
/* @__PURE__ */
|
|
10533
|
+
/* @__PURE__ */ jsx50(
|
|
10228
10534
|
ColHeader2,
|
|
10229
10535
|
{
|
|
10230
10536
|
active: sortField === "score",
|
|
@@ -10234,7 +10540,7 @@ function AreaScoresGrid({
|
|
|
10234
10540
|
tooltip: GLOSSARY.score
|
|
10235
10541
|
}
|
|
10236
10542
|
),
|
|
10237
|
-
/* @__PURE__ */
|
|
10543
|
+
/* @__PURE__ */ jsx50(
|
|
10238
10544
|
ColHeader2,
|
|
10239
10545
|
{
|
|
10240
10546
|
active: sortField === "area",
|
|
@@ -10243,7 +10549,7 @@ function AreaScoresGrid({
|
|
|
10243
10549
|
onClick: () => handleSort("area")
|
|
10244
10550
|
}
|
|
10245
10551
|
),
|
|
10246
|
-
dimKeys.map((key) => /* @__PURE__ */
|
|
10552
|
+
dimKeys.map((key) => /* @__PURE__ */ jsx50(
|
|
10247
10553
|
ColHeader2,
|
|
10248
10554
|
{
|
|
10249
10555
|
active: sortField === key,
|
|
@@ -10254,7 +10560,7 @@ function AreaScoresGrid({
|
|
|
10254
10560
|
},
|
|
10255
10561
|
key
|
|
10256
10562
|
)),
|
|
10257
|
-
tier !== "narrow" && showLift && /* @__PURE__ */
|
|
10563
|
+
tier !== "narrow" && showLift && /* @__PURE__ */ jsx50(
|
|
10258
10564
|
ColHeader2,
|
|
10259
10565
|
{
|
|
10260
10566
|
active: sortField === "lift",
|
|
@@ -10264,12 +10570,12 @@ function AreaScoresGrid({
|
|
|
10264
10570
|
tooltip: GLOSSARY.docLift
|
|
10265
10571
|
}
|
|
10266
10572
|
),
|
|
10267
|
-
tier === "full" && hasActual && /* @__PURE__ */
|
|
10573
|
+
tier === "full" && hasActual && /* @__PURE__ */ jsx50(ColHeader2, { label: "Actual", tooltip: GLOSSARY.actualScore })
|
|
10268
10574
|
]
|
|
10269
10575
|
}
|
|
10270
10576
|
),
|
|
10271
|
-
sorted.map((area) => /* @__PURE__ */
|
|
10272
|
-
/* @__PURE__ */
|
|
10577
|
+
sorted.map((area) => /* @__PURE__ */ jsxs35(React3.Fragment, { children: [
|
|
10578
|
+
/* @__PURE__ */ jsx50(
|
|
10273
10579
|
AreaRow,
|
|
10274
10580
|
{
|
|
10275
10581
|
area,
|
|
@@ -10280,7 +10586,7 @@ function AreaScoresGrid({
|
|
|
10280
10586
|
tier
|
|
10281
10587
|
}
|
|
10282
10588
|
),
|
|
10283
|
-
modelScoresByFeature && /* @__PURE__ */
|
|
10589
|
+
modelScoresByFeature && /* @__PURE__ */ jsx50(
|
|
10284
10590
|
ModelSubRows,
|
|
10285
10591
|
{
|
|
10286
10592
|
dimKeys,
|
|
@@ -10301,7 +10607,7 @@ function ModelSubRows({
|
|
|
10301
10607
|
tier
|
|
10302
10608
|
}) {
|
|
10303
10609
|
if (!models || models.length === 0) return null;
|
|
10304
|
-
return /* @__PURE__ */
|
|
10610
|
+
return /* @__PURE__ */ jsx50(Fragment13, { children: models.map((entry) => /* @__PURE__ */ jsx50(
|
|
10305
10611
|
ModelRow2,
|
|
10306
10612
|
{
|
|
10307
10613
|
dimKeys,
|
|
@@ -10323,7 +10629,7 @@ function ModelRow2({
|
|
|
10323
10629
|
tier
|
|
10324
10630
|
}) {
|
|
10325
10631
|
const isNarrow = tier === "narrow";
|
|
10326
|
-
return /* @__PURE__ */
|
|
10632
|
+
return /* @__PURE__ */ jsxs35(
|
|
10327
10633
|
"div",
|
|
10328
10634
|
{
|
|
10329
10635
|
style: {
|
|
@@ -10341,8 +10647,8 @@ function ModelRow2({
|
|
|
10341
10647
|
padding: isNarrow ? "6px 12px 6px 20px" : "6px 16px 6px 28px"
|
|
10342
10648
|
},
|
|
10343
10649
|
children: [
|
|
10344
|
-
/* @__PURE__ */
|
|
10345
|
-
|
|
10650
|
+
/* @__PURE__ */ jsx50(Flex26, { align: "center", children: /* @__PURE__ */ jsx50(
|
|
10651
|
+
Text36,
|
|
10346
10652
|
{
|
|
10347
10653
|
size: 1,
|
|
10348
10654
|
style: {
|
|
@@ -10353,8 +10659,8 @@ function ModelRow2({
|
|
|
10353
10659
|
children: Math.round(scores.totalScore)
|
|
10354
10660
|
}
|
|
10355
10661
|
) }),
|
|
10356
|
-
/* @__PURE__ */
|
|
10357
|
-
dimKeys.map((key) => /* @__PURE__ */
|
|
10662
|
+
/* @__PURE__ */ jsx50(Flex26, { align: "center", gap: 2, children: /* @__PURE__ */ jsx50(Text36, { muted: true, size: 1, children: label }) }),
|
|
10663
|
+
dimKeys.map((key) => /* @__PURE__ */ jsx50(
|
|
10358
10664
|
DimCell,
|
|
10359
10665
|
{
|
|
10360
10666
|
area: label,
|
|
@@ -10364,8 +10670,8 @@ function ModelRow2({
|
|
|
10364
10670
|
},
|
|
10365
10671
|
key
|
|
10366
10672
|
)),
|
|
10367
|
-
!isNarrow && showLift && /* @__PURE__ */
|
|
10368
|
-
|
|
10673
|
+
!isNarrow && showLift && /* @__PURE__ */ jsxs35(
|
|
10674
|
+
Text36,
|
|
10369
10675
|
{
|
|
10370
10676
|
size: 1,
|
|
10371
10677
|
style: {
|
|
@@ -10379,8 +10685,8 @@ function ModelRow2({
|
|
|
10379
10685
|
]
|
|
10380
10686
|
}
|
|
10381
10687
|
),
|
|
10382
|
-
tier === "full" && hasActual && /* @__PURE__ */
|
|
10383
|
-
|
|
10688
|
+
tier === "full" && hasActual && /* @__PURE__ */ jsx50(
|
|
10689
|
+
Text36,
|
|
10384
10690
|
{
|
|
10385
10691
|
size: 1,
|
|
10386
10692
|
style: {
|
|
@@ -10404,7 +10710,7 @@ function AreaRow({
|
|
|
10404
10710
|
tier
|
|
10405
10711
|
}) {
|
|
10406
10712
|
const isNarrow = tier === "narrow";
|
|
10407
|
-
return /* @__PURE__ */
|
|
10713
|
+
return /* @__PURE__ */ jsxs35(
|
|
10408
10714
|
"div",
|
|
10409
10715
|
{
|
|
10410
10716
|
style: {
|
|
@@ -10421,15 +10727,15 @@ function AreaRow({
|
|
|
10421
10727
|
padding: isNarrow ? "8px 12px" : "10px 16px"
|
|
10422
10728
|
},
|
|
10423
10729
|
children: [
|
|
10424
|
-
/* @__PURE__ */
|
|
10425
|
-
/* @__PURE__ */
|
|
10730
|
+
/* @__PURE__ */ jsxs35(Flex26, { align: "center", gap: isNarrow ? 0 : 2, children: [
|
|
10731
|
+
/* @__PURE__ */ jsx50(
|
|
10426
10732
|
HoverTip,
|
|
10427
10733
|
{
|
|
10428
|
-
text: /* @__PURE__ */
|
|
10429
|
-
/* @__PURE__ */
|
|
10734
|
+
text: /* @__PURE__ */ jsxs35(Text36, { size: 2, style: { lineHeight: 1.5 }, children: [
|
|
10735
|
+
/* @__PURE__ */ jsx50("span", { style: { fontWeight: 600 }, children: area.feature }),
|
|
10430
10736
|
" score:",
|
|
10431
10737
|
" ",
|
|
10432
|
-
/* @__PURE__ */
|
|
10738
|
+
/* @__PURE__ */ jsx50(
|
|
10433
10739
|
"span",
|
|
10434
10740
|
{
|
|
10435
10741
|
style: {
|
|
@@ -10440,12 +10746,12 @@ function AreaRow({
|
|
|
10440
10746
|
children: Math.round(area.totalScore)
|
|
10441
10747
|
}
|
|
10442
10748
|
),
|
|
10443
|
-
/* @__PURE__ */
|
|
10749
|
+
/* @__PURE__ */ jsx50("span", { style: { color: "var(--card-muted-fg-color)" }, children: "/100" }),
|
|
10444
10750
|
".",
|
|
10445
10751
|
" ",
|
|
10446
10752
|
GLOSSARY.score
|
|
10447
10753
|
] }),
|
|
10448
|
-
children: /* @__PURE__ */
|
|
10754
|
+
children: /* @__PURE__ */ jsx50(
|
|
10449
10755
|
"div",
|
|
10450
10756
|
{
|
|
10451
10757
|
style: {
|
|
@@ -10466,11 +10772,11 @@ function AreaRow({
|
|
|
10466
10772
|
)
|
|
10467
10773
|
}
|
|
10468
10774
|
),
|
|
10469
|
-
!isNarrow && delta != null && delta !== 0 && /* @__PURE__ */
|
|
10775
|
+
!isNarrow && delta != null && delta !== 0 && /* @__PURE__ */ jsx50(HoverTip, { text: GLOSSARY.areaDelta, children: /* @__PURE__ */ jsx50(DeltaIndicator, { delta, icon: true, size: 1 }) })
|
|
10470
10776
|
] }),
|
|
10471
|
-
/* @__PURE__ */
|
|
10472
|
-
/* @__PURE__ */
|
|
10473
|
-
area.negativeDocLift && showLift && /* @__PURE__ */
|
|
10777
|
+
/* @__PURE__ */ jsxs35(Flex26, { align: "center", gap: 2, wrap: "wrap", children: [
|
|
10778
|
+
/* @__PURE__ */ jsx50(Text36, { size: 2, weight: "medium", children: area.feature }),
|
|
10779
|
+
area.negativeDocLift && showLift && /* @__PURE__ */ jsx50(HoverTip, { text: GLOSSARY.docsHurt, children: /* @__PURE__ */ jsx50(
|
|
10474
10780
|
"span",
|
|
10475
10781
|
{
|
|
10476
10782
|
style: {
|
|
@@ -10483,11 +10789,11 @@ function AreaRow({
|
|
|
10483
10789
|
gap: 3,
|
|
10484
10790
|
padding: "1px 5px"
|
|
10485
10791
|
},
|
|
10486
|
-
children: /* @__PURE__ */
|
|
10792
|
+
children: /* @__PURE__ */ jsx50(WarningOutlineIcon2, {})
|
|
10487
10793
|
}
|
|
10488
10794
|
) })
|
|
10489
10795
|
] }),
|
|
10490
|
-
dimKeys.map((key) => /* @__PURE__ */
|
|
10796
|
+
dimKeys.map((key) => /* @__PURE__ */ jsx50(
|
|
10491
10797
|
DimCell,
|
|
10492
10798
|
{
|
|
10493
10799
|
area: area.feature,
|
|
@@ -10496,14 +10802,14 @@ function AreaRow({
|
|
|
10496
10802
|
},
|
|
10497
10803
|
key
|
|
10498
10804
|
)),
|
|
10499
|
-
!isNarrow && showLift && /* @__PURE__ */
|
|
10805
|
+
!isNarrow && showLift && /* @__PURE__ */ jsx50(
|
|
10500
10806
|
HoverTip,
|
|
10501
10807
|
{
|
|
10502
|
-
text: /* @__PURE__ */
|
|
10503
|
-
/* @__PURE__ */
|
|
10808
|
+
text: /* @__PURE__ */ jsxs35(Text36, { size: 2, style: { lineHeight: 1.5 }, children: [
|
|
10809
|
+
/* @__PURE__ */ jsx50("span", { style: { fontWeight: 600 }, children: area.feature }),
|
|
10504
10810
|
" doc lift:",
|
|
10505
10811
|
" ",
|
|
10506
|
-
/* @__PURE__ */
|
|
10812
|
+
/* @__PURE__ */ jsxs35(
|
|
10507
10813
|
"span",
|
|
10508
10814
|
{
|
|
10509
10815
|
style: {
|
|
@@ -10521,8 +10827,8 @@ function AreaRow({
|
|
|
10521
10827
|
"pts. ",
|
|
10522
10828
|
GLOSSARY.docLift
|
|
10523
10829
|
] }),
|
|
10524
|
-
children: /* @__PURE__ */
|
|
10525
|
-
|
|
10830
|
+
children: /* @__PURE__ */ jsxs35(
|
|
10831
|
+
Text36,
|
|
10526
10832
|
{
|
|
10527
10833
|
size: 2,
|
|
10528
10834
|
style: {
|
|
@@ -10538,12 +10844,12 @@ function AreaRow({
|
|
|
10538
10844
|
)
|
|
10539
10845
|
}
|
|
10540
10846
|
),
|
|
10541
|
-
tier === "full" && hasActual && /* @__PURE__ */
|
|
10847
|
+
tier === "full" && hasActual && /* @__PURE__ */ jsx50(
|
|
10542
10848
|
HoverTip,
|
|
10543
10849
|
{
|
|
10544
10850
|
text: area.actualScore != null ? `${area.feature} actual score: ${Math.round(area.actualScore)}/100. ${GLOSSARY.actualScore}` : `No agentic data for ${area.feature}.`,
|
|
10545
|
-
children: /* @__PURE__ */
|
|
10546
|
-
|
|
10851
|
+
children: /* @__PURE__ */ jsx50(
|
|
10852
|
+
Text36,
|
|
10547
10853
|
{
|
|
10548
10854
|
size: 2,
|
|
10549
10855
|
style: {
|
|
@@ -10572,17 +10878,17 @@ function DimCell({
|
|
|
10572
10878
|
const tooltip = dimKey ? DIMENSION_TOOLTIPS2[dimKey] : "";
|
|
10573
10879
|
const textSize = size === "small" ? 0 : 1;
|
|
10574
10880
|
const barHeight = size === "small" ? 3 : 4;
|
|
10575
|
-
return /* @__PURE__ */
|
|
10881
|
+
return /* @__PURE__ */ jsx50(
|
|
10576
10882
|
HoverTip,
|
|
10577
10883
|
{
|
|
10578
|
-
text: /* @__PURE__ */
|
|
10579
|
-
/* @__PURE__ */
|
|
10884
|
+
text: /* @__PURE__ */ jsxs35(Text36, { size: 2, style: { lineHeight: 1.5 }, children: [
|
|
10885
|
+
/* @__PURE__ */ jsx50("span", { style: { fontWeight: 600 }, children: area }),
|
|
10580
10886
|
" \u2192",
|
|
10581
10887
|
" ",
|
|
10582
|
-
/* @__PURE__ */
|
|
10888
|
+
/* @__PURE__ */ jsx50("span", { style: { fontWeight: 600 }, children: dim }),
|
|
10583
10889
|
":",
|
|
10584
10890
|
" ",
|
|
10585
|
-
/* @__PURE__ */
|
|
10891
|
+
/* @__PURE__ */ jsx50(
|
|
10586
10892
|
"span",
|
|
10587
10893
|
{
|
|
10588
10894
|
style: {
|
|
@@ -10593,14 +10899,14 @@ function DimCell({
|
|
|
10593
10899
|
children: Math.round(value)
|
|
10594
10900
|
}
|
|
10595
10901
|
),
|
|
10596
|
-
/* @__PURE__ */
|
|
10902
|
+
/* @__PURE__ */ jsx50("span", { style: { color: "var(--card-muted-fg-color)" }, children: "/100" }),
|
|
10597
10903
|
".",
|
|
10598
10904
|
" ",
|
|
10599
10905
|
tooltip
|
|
10600
10906
|
] }),
|
|
10601
|
-
children: /* @__PURE__ */
|
|
10602
|
-
/* @__PURE__ */
|
|
10603
|
-
|
|
10907
|
+
children: /* @__PURE__ */ jsxs35(Stack28, { space: 1, style: { width: "100%" }, children: [
|
|
10908
|
+
/* @__PURE__ */ jsx50(
|
|
10909
|
+
Text36,
|
|
10604
10910
|
{
|
|
10605
10911
|
size: textSize,
|
|
10606
10912
|
style: {
|
|
@@ -10611,7 +10917,7 @@ function DimCell({
|
|
|
10611
10917
|
children: Math.round(value)
|
|
10612
10918
|
}
|
|
10613
10919
|
),
|
|
10614
|
-
/* @__PURE__ */
|
|
10920
|
+
/* @__PURE__ */ jsx50(
|
|
10615
10921
|
"div",
|
|
10616
10922
|
{
|
|
10617
10923
|
style: {
|
|
@@ -10621,7 +10927,7 @@ function DimCell({
|
|
|
10621
10927
|
overflow: "hidden",
|
|
10622
10928
|
width: "100%"
|
|
10623
10929
|
},
|
|
10624
|
-
children: /* @__PURE__ */
|
|
10930
|
+
children: /* @__PURE__ */ jsx50(
|
|
10625
10931
|
"div",
|
|
10626
10932
|
{
|
|
10627
10933
|
style: {
|
|
@@ -10646,7 +10952,7 @@ function ColHeader2({
|
|
|
10646
10952
|
onClick,
|
|
10647
10953
|
tooltip
|
|
10648
10954
|
}) {
|
|
10649
|
-
const handleKeyDown =
|
|
10955
|
+
const handleKeyDown = useCallback31(
|
|
10650
10956
|
(e) => {
|
|
10651
10957
|
if (onClick && (e.key === "Enter" || e.key === " ")) {
|
|
10652
10958
|
e.preventDefault();
|
|
@@ -10656,8 +10962,8 @@ function ColHeader2({
|
|
|
10656
10962
|
[onClick]
|
|
10657
10963
|
);
|
|
10658
10964
|
const arrow = active ? direction === "asc" ? " \u2191" : " \u2193" : "";
|
|
10659
|
-
return /* @__PURE__ */
|
|
10660
|
-
/* @__PURE__ */
|
|
10965
|
+
return /* @__PURE__ */ jsxs35(Flex26, { align: "center", gap: 1, children: [
|
|
10966
|
+
/* @__PURE__ */ jsx50(
|
|
10661
10967
|
"div",
|
|
10662
10968
|
{
|
|
10663
10969
|
onClick,
|
|
@@ -10668,8 +10974,8 @@ function ColHeader2({
|
|
|
10668
10974
|
userSelect: "none"
|
|
10669
10975
|
},
|
|
10670
10976
|
tabIndex: onClick ? 0 : void 0,
|
|
10671
|
-
children: /* @__PURE__ */
|
|
10672
|
-
|
|
10977
|
+
children: /* @__PURE__ */ jsxs35(
|
|
10978
|
+
Text36,
|
|
10673
10979
|
{
|
|
10674
10980
|
muted: true,
|
|
10675
10981
|
size: 1,
|
|
@@ -10686,14 +10992,14 @@ function ColHeader2({
|
|
|
10686
10992
|
)
|
|
10687
10993
|
}
|
|
10688
10994
|
),
|
|
10689
|
-
tooltip && /* @__PURE__ */
|
|
10995
|
+
tooltip && /* @__PURE__ */ jsx50(InfoTip, { text: tooltip })
|
|
10690
10996
|
] });
|
|
10691
10997
|
}
|
|
10692
10998
|
|
|
10693
10999
|
// src/components/report-detail/ModelSelector.tsx
|
|
10694
|
-
import { useCallback as
|
|
10695
|
-
import { Flex as
|
|
10696
|
-
import { jsx as
|
|
11000
|
+
import { useCallback as useCallback32 } from "react";
|
|
11001
|
+
import { Flex as Flex27, Text as Text37 } from "@sanity/ui";
|
|
11002
|
+
import { jsx as jsx51, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
10697
11003
|
var pillBase = {
|
|
10698
11004
|
borderColor: "var(--card-border-color)",
|
|
10699
11005
|
borderRadius: 999,
|
|
@@ -10724,8 +11030,8 @@ function ModelSelector({
|
|
|
10724
11030
|
selection,
|
|
10725
11031
|
onChange
|
|
10726
11032
|
}) {
|
|
10727
|
-
return /* @__PURE__ */
|
|
10728
|
-
/* @__PURE__ */
|
|
11033
|
+
return /* @__PURE__ */ jsxs36(Flex27, { align: "center", gap: 1, wrap: "wrap", children: [
|
|
11034
|
+
/* @__PURE__ */ jsx51(
|
|
10729
11035
|
Pill2,
|
|
10730
11036
|
{
|
|
10731
11037
|
isSelected: selection === null,
|
|
@@ -10733,7 +11039,7 @@ function ModelSelector({
|
|
|
10733
11039
|
onClick: () => onChange(null)
|
|
10734
11040
|
}
|
|
10735
11041
|
),
|
|
10736
|
-
models.map((model) => /* @__PURE__ */
|
|
11042
|
+
models.map((model) => /* @__PURE__ */ jsx51(
|
|
10737
11043
|
Pill2,
|
|
10738
11044
|
{
|
|
10739
11045
|
isSelected: selection === model.modelId,
|
|
@@ -10742,7 +11048,7 @@ function ModelSelector({
|
|
|
10742
11048
|
},
|
|
10743
11049
|
model.modelId
|
|
10744
11050
|
)),
|
|
10745
|
-
/* @__PURE__ */
|
|
11051
|
+
/* @__PURE__ */ jsx51(
|
|
10746
11052
|
"div",
|
|
10747
11053
|
{
|
|
10748
11054
|
style: {
|
|
@@ -10753,7 +11059,7 @@ function ModelSelector({
|
|
|
10753
11059
|
}
|
|
10754
11060
|
}
|
|
10755
11061
|
),
|
|
10756
|
-
/* @__PURE__ */
|
|
11062
|
+
/* @__PURE__ */ jsx51(
|
|
10757
11063
|
Pill2,
|
|
10758
11064
|
{
|
|
10759
11065
|
isSelected: selection === "expanded",
|
|
@@ -10768,7 +11074,7 @@ function Pill2({
|
|
|
10768
11074
|
label,
|
|
10769
11075
|
onClick
|
|
10770
11076
|
}) {
|
|
10771
|
-
const handleKeyDown =
|
|
11077
|
+
const handleKeyDown = useCallback32(
|
|
10772
11078
|
(e) => {
|
|
10773
11079
|
if (e.key === "Enter" || e.key === " ") {
|
|
10774
11080
|
e.preventDefault();
|
|
@@ -10777,7 +11083,7 @@ function Pill2({
|
|
|
10777
11083
|
},
|
|
10778
11084
|
[onClick]
|
|
10779
11085
|
);
|
|
10780
|
-
return /* @__PURE__ */
|
|
11086
|
+
return /* @__PURE__ */ jsx51(
|
|
10781
11087
|
"span",
|
|
10782
11088
|
{
|
|
10783
11089
|
onClick,
|
|
@@ -10785,8 +11091,8 @@ function Pill2({
|
|
|
10785
11091
|
role: "button",
|
|
10786
11092
|
style: isSelected ? pillSelected : pillDefault,
|
|
10787
11093
|
tabIndex: 0,
|
|
10788
|
-
children: /* @__PURE__ */
|
|
10789
|
-
|
|
11094
|
+
children: /* @__PURE__ */ jsx51(
|
|
11095
|
+
Text37,
|
|
10790
11096
|
{
|
|
10791
11097
|
size: 1,
|
|
10792
11098
|
style: {
|
|
@@ -10801,13 +11107,13 @@ function Pill2({
|
|
|
10801
11107
|
}
|
|
10802
11108
|
|
|
10803
11109
|
// src/components/report-detail/useModelSelection.ts
|
|
10804
|
-
import { useCallback as
|
|
11110
|
+
import { useCallback as useCallback33, useMemo as useMemo13, useState as useState24 } from "react";
|
|
10805
11111
|
function useModelSelection({
|
|
10806
11112
|
scores,
|
|
10807
11113
|
perModel
|
|
10808
11114
|
}) {
|
|
10809
|
-
const [selection, setSelection] =
|
|
10810
|
-
const onSelectionChange =
|
|
11115
|
+
const [selection, setSelection] = useState24(null);
|
|
11116
|
+
const onSelectionChange = useCallback33((next) => {
|
|
10811
11117
|
setSelection(next);
|
|
10812
11118
|
}, []);
|
|
10813
11119
|
const isExpanded = selection === "expanded";
|
|
@@ -10829,7 +11135,7 @@ function useModelSelection({
|
|
|
10829
11135
|
}
|
|
10830
11136
|
|
|
10831
11137
|
// src/components/report-detail/StrengthsList.tsx
|
|
10832
|
-
import { jsx as
|
|
11138
|
+
import { jsx as jsx52, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
10833
11139
|
function StrengthsList({
|
|
10834
11140
|
mode,
|
|
10835
11141
|
scores,
|
|
@@ -10853,13 +11159,13 @@ function StrengthsList({
|
|
|
10853
11159
|
(a, b) => (b.infrastructureEfficiency ?? 0) - (a.infrastructureEfficiency ?? 0)
|
|
10854
11160
|
);
|
|
10855
11161
|
if (displayedScores.length === 0) return null;
|
|
10856
|
-
return /* @__PURE__ */
|
|
10857
|
-
/* @__PURE__ */
|
|
10858
|
-
/* @__PURE__ */
|
|
10859
|
-
/* @__PURE__ */
|
|
10860
|
-
/* @__PURE__ */
|
|
10861
|
-
/* @__PURE__ */
|
|
10862
|
-
hasModels && /* @__PURE__ */
|
|
11162
|
+
return /* @__PURE__ */ jsxs37(Stack29, { space: 5, children: [
|
|
11163
|
+
/* @__PURE__ */ jsxs37(Stack29, { space: 3, children: [
|
|
11164
|
+
/* @__PURE__ */ jsxs37(Flex28, { align: "center", gap: 2, wrap: "wrap", children: [
|
|
11165
|
+
/* @__PURE__ */ jsx52(CheckmarkCircleIcon2, { style: { color: "#34d399" } }),
|
|
11166
|
+
/* @__PURE__ */ jsx52(Text38, { size: 2, weight: "medium", children: "Strong Areas (70+)" }),
|
|
11167
|
+
/* @__PURE__ */ jsx52(InfoTip, { text: GLOSSARY.strengths }),
|
|
11168
|
+
hasModels && /* @__PURE__ */ jsx52(Box25, { style: { marginLeft: "auto" }, children: /* @__PURE__ */ jsx52(
|
|
10863
11169
|
ModelSelector,
|
|
10864
11170
|
{
|
|
10865
11171
|
models: perModel,
|
|
@@ -10868,7 +11174,7 @@ function StrengthsList({
|
|
|
10868
11174
|
}
|
|
10869
11175
|
) })
|
|
10870
11176
|
] }),
|
|
10871
|
-
/* @__PURE__ */
|
|
11177
|
+
/* @__PURE__ */ jsx52(
|
|
10872
11178
|
AreaScoresGrid,
|
|
10873
11179
|
{
|
|
10874
11180
|
mode,
|
|
@@ -10878,33 +11184,33 @@ function StrengthsList({
|
|
|
10878
11184
|
}
|
|
10879
11185
|
)
|
|
10880
11186
|
] }),
|
|
10881
|
-
retrievalSuccesses.length > 0 && /* @__PURE__ */
|
|
10882
|
-
/* @__PURE__ */
|
|
10883
|
-
|
|
11187
|
+
retrievalSuccesses.length > 0 && /* @__PURE__ */ jsxs37(Box25, { style: neutralCardStyle, children: [
|
|
11188
|
+
/* @__PURE__ */ jsx52(
|
|
11189
|
+
Box25,
|
|
10884
11190
|
{
|
|
10885
11191
|
padding: 4,
|
|
10886
11192
|
style: { borderBottom: "1px solid var(--card-border-color)" },
|
|
10887
|
-
children: /* @__PURE__ */
|
|
10888
|
-
/* @__PURE__ */
|
|
10889
|
-
/* @__PURE__ */
|
|
11193
|
+
children: /* @__PURE__ */ jsxs37(Flex28, { align: "center", gap: 2, children: [
|
|
11194
|
+
/* @__PURE__ */ jsx52(SearchIcon7, { style: { color: "#34d399" } }),
|
|
11195
|
+
/* @__PURE__ */ jsxs37(Text38, { size: 2, weight: "medium", children: [
|
|
10890
11196
|
"Retrieval Successes (",
|
|
10891
11197
|
Math.round(EFFICIENCY_POSITIVE * 100),
|
|
10892
11198
|
"%+ efficiency)"
|
|
10893
11199
|
] }),
|
|
10894
|
-
/* @__PURE__ */
|
|
11200
|
+
/* @__PURE__ */ jsx52(InfoTip, { text: GLOSSARY.retrievalExcellence })
|
|
10895
11201
|
] })
|
|
10896
11202
|
}
|
|
10897
11203
|
),
|
|
10898
|
-
/* @__PURE__ */
|
|
10899
|
-
|
|
11204
|
+
/* @__PURE__ */ jsx52(Stack29, { children: retrievalSuccesses.map((area, i) => /* @__PURE__ */ jsxs37(
|
|
11205
|
+
Flex28,
|
|
10900
11206
|
{
|
|
10901
11207
|
align: "center",
|
|
10902
11208
|
justify: "space-between",
|
|
10903
11209
|
padding: 4,
|
|
10904
11210
|
style: i > 0 ? dividerStyle : void 0,
|
|
10905
11211
|
children: [
|
|
10906
|
-
/* @__PURE__ */
|
|
10907
|
-
/* @__PURE__ */
|
|
11212
|
+
/* @__PURE__ */ jsx52(Text38, { size: 2, children: area.feature }),
|
|
11213
|
+
/* @__PURE__ */ jsx52(
|
|
10908
11214
|
"span",
|
|
10909
11215
|
{
|
|
10910
11216
|
style: {
|
|
@@ -10934,8 +11240,8 @@ import {
|
|
|
10934
11240
|
BoltIcon,
|
|
10935
11241
|
ArrowDownIcon as ArrowDownIcon2
|
|
10936
11242
|
} from "@sanity/icons";
|
|
10937
|
-
import { Box as
|
|
10938
|
-
import { jsx as
|
|
11243
|
+
import { Box as Box26, Flex as Flex29, Stack as Stack30, Text as Text39 } from "@sanity/ui";
|
|
11244
|
+
import { jsx as jsx53, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
10939
11245
|
function WeaknessesList({
|
|
10940
11246
|
mode,
|
|
10941
11247
|
scores,
|
|
@@ -10965,13 +11271,13 @@ function WeaknessesList({
|
|
|
10965
11271
|
);
|
|
10966
11272
|
const hasContent = weakAreas.length > 0 || docsHurt.length > 0 || retrievalIssues.length > 0 || dimWeaknesses.length > 0 || FEATURE_FLAGS.showRegressedSinceLastRun.enabled && regressed.length > 0 || efficiencyAnomalies.length > 0;
|
|
10967
11273
|
if (!hasContent) return null;
|
|
10968
|
-
return /* @__PURE__ */
|
|
10969
|
-
weakAreas.length > 0 && /* @__PURE__ */
|
|
10970
|
-
/* @__PURE__ */
|
|
10971
|
-
/* @__PURE__ */
|
|
10972
|
-
/* @__PURE__ */
|
|
10973
|
-
/* @__PURE__ */
|
|
10974
|
-
hasModels && /* @__PURE__ */
|
|
11274
|
+
return /* @__PURE__ */ jsxs38(Stack30, { space: 5, children: [
|
|
11275
|
+
weakAreas.length > 0 && /* @__PURE__ */ jsxs38(Stack30, { space: 3, children: [
|
|
11276
|
+
/* @__PURE__ */ jsxs38(Flex29, { align: "center", gap: 2, wrap: "wrap", children: [
|
|
11277
|
+
/* @__PURE__ */ jsx53(ErrorOutlineIcon3, { style: { color: "#f87171" } }),
|
|
11278
|
+
/* @__PURE__ */ jsx53(Text39, { size: 2, weight: "medium", children: "Weak Areas (<70)" }),
|
|
11279
|
+
/* @__PURE__ */ jsx53(InfoTip, { text: GLOSSARY.weakAreas }),
|
|
11280
|
+
hasModels && /* @__PURE__ */ jsx53(Box26, { style: { marginLeft: "auto" }, children: /* @__PURE__ */ jsx53(
|
|
10975
11281
|
ModelSelector,
|
|
10976
11282
|
{
|
|
10977
11283
|
models: perModel,
|
|
@@ -10980,7 +11286,7 @@ function WeaknessesList({
|
|
|
10980
11286
|
}
|
|
10981
11287
|
) })
|
|
10982
11288
|
] }),
|
|
10983
|
-
/* @__PURE__ */
|
|
11289
|
+
/* @__PURE__ */ jsx53(
|
|
10984
11290
|
AreaScoresGrid,
|
|
10985
11291
|
{
|
|
10986
11292
|
mode,
|
|
@@ -10990,22 +11296,22 @@ function WeaknessesList({
|
|
|
10990
11296
|
}
|
|
10991
11297
|
)
|
|
10992
11298
|
] }),
|
|
10993
|
-
docsHurt.length > 0 && /* @__PURE__ */
|
|
10994
|
-
/* @__PURE__ */
|
|
10995
|
-
/* @__PURE__ */
|
|
10996
|
-
/* @__PURE__ */
|
|
10997
|
-
/* @__PURE__ */
|
|
11299
|
+
docsHurt.length > 0 && /* @__PURE__ */ jsxs38(Stack30, { space: 3, children: [
|
|
11300
|
+
/* @__PURE__ */ jsxs38(Flex29, { align: "center", gap: 2, children: [
|
|
11301
|
+
/* @__PURE__ */ jsx53(ErrorOutlineIcon3, { style: { color: "#f87171" } }),
|
|
11302
|
+
/* @__PURE__ */ jsx53(Text39, { size: 2, weight: "medium", children: "Docs Hurt Performance (Negative Doc Lift)" }),
|
|
11303
|
+
/* @__PURE__ */ jsx53(InfoTip, { text: GLOSSARY.docsHurt })
|
|
10998
11304
|
] }),
|
|
10999
|
-
/* @__PURE__ */
|
|
11000
|
-
|
|
11305
|
+
/* @__PURE__ */ jsx53(Box26, { style: sectionStyle("red"), children: docsHurt.map((area, i) => /* @__PURE__ */ jsxs38(
|
|
11306
|
+
Box26,
|
|
11001
11307
|
{
|
|
11002
11308
|
padding: 4,
|
|
11003
11309
|
style: i > 0 ? { borderTop: "1px solid rgba(239,68,68,0.2)" } : void 0,
|
|
11004
11310
|
children: [
|
|
11005
|
-
/* @__PURE__ */
|
|
11006
|
-
/* @__PURE__ */
|
|
11007
|
-
/* @__PURE__ */
|
|
11008
|
-
/* @__PURE__ */
|
|
11311
|
+
/* @__PURE__ */ jsxs38(Flex29, { align: "center", justify: "space-between", wrap: "wrap", children: [
|
|
11312
|
+
/* @__PURE__ */ jsxs38(Flex29, { align: "center", gap: 2, children: [
|
|
11313
|
+
/* @__PURE__ */ jsx53(Text39, { size: 2, weight: "medium", children: area.feature }),
|
|
11314
|
+
/* @__PURE__ */ jsx53(
|
|
11009
11315
|
"span",
|
|
11010
11316
|
{
|
|
11011
11317
|
style: {
|
|
@@ -11020,7 +11326,7 @@ function WeaknessesList({
|
|
|
11020
11326
|
}
|
|
11021
11327
|
)
|
|
11022
11328
|
] }),
|
|
11023
|
-
/* @__PURE__ */
|
|
11329
|
+
/* @__PURE__ */ jsx53(
|
|
11024
11330
|
"span",
|
|
11025
11331
|
{
|
|
11026
11332
|
style: {
|
|
@@ -11033,8 +11339,8 @@ function WeaknessesList({
|
|
|
11033
11339
|
}
|
|
11034
11340
|
)
|
|
11035
11341
|
] }),
|
|
11036
|
-
/* @__PURE__ */
|
|
11037
|
-
area.invertedRetrievalGap && /* @__PURE__ */
|
|
11342
|
+
/* @__PURE__ */ jsx53(Box26, { paddingTop: 2, children: /* @__PURE__ */ jsxs38(Text39, { muted: true, size: 2, children: [
|
|
11343
|
+
area.invertedRetrievalGap && /* @__PURE__ */ jsxs38("span", { style: { color: "#fbbf24" }, children: [
|
|
11038
11344
|
"Agent does better by NOT finding these docs.",
|
|
11039
11345
|
" "
|
|
11040
11346
|
] }),
|
|
@@ -11049,22 +11355,22 @@ function WeaknessesList({
|
|
|
11049
11355
|
area.feature
|
|
11050
11356
|
)) })
|
|
11051
11357
|
] }),
|
|
11052
|
-
retrievalIssues.length > 0 && /* @__PURE__ */
|
|
11053
|
-
/* @__PURE__ */
|
|
11054
|
-
/* @__PURE__ */
|
|
11055
|
-
/* @__PURE__ */
|
|
11056
|
-
/* @__PURE__ */
|
|
11358
|
+
retrievalIssues.length > 0 && /* @__PURE__ */ jsxs38(Stack30, { space: 3, children: [
|
|
11359
|
+
/* @__PURE__ */ jsxs38(Flex29, { align: "center", gap: 2, children: [
|
|
11360
|
+
/* @__PURE__ */ jsx53(SearchIcon8, { style: { color: "#fbbf24" } }),
|
|
11361
|
+
/* @__PURE__ */ jsx53(Text39, { size: 2, weight: "medium", children: "Retrieval Issues (<70% efficiency)" }),
|
|
11362
|
+
/* @__PURE__ */ jsx53(InfoTip, { text: GLOSSARY.retrievalIssues })
|
|
11057
11363
|
] }),
|
|
11058
|
-
/* @__PURE__ */
|
|
11059
|
-
|
|
11364
|
+
/* @__PURE__ */ jsx53(Box26, { style: sectionStyle("amber"), children: retrievalIssues.map((area, i) => /* @__PURE__ */ jsxs38(
|
|
11365
|
+
Box26,
|
|
11060
11366
|
{
|
|
11061
11367
|
padding: 4,
|
|
11062
11368
|
style: i > 0 ? { borderTop: "1px solid rgba(245,158,11,0.2)" } : void 0,
|
|
11063
11369
|
children: [
|
|
11064
|
-
/* @__PURE__ */
|
|
11065
|
-
/* @__PURE__ */
|
|
11066
|
-
/* @__PURE__ */
|
|
11067
|
-
/* @__PURE__ */
|
|
11370
|
+
/* @__PURE__ */ jsxs38(Flex29, { align: "center", justify: "space-between", wrap: "wrap", children: [
|
|
11371
|
+
/* @__PURE__ */ jsxs38(Flex29, { align: "center", gap: 2, children: [
|
|
11372
|
+
/* @__PURE__ */ jsx53(Text39, { size: 2, weight: "medium", children: area.feature }),
|
|
11373
|
+
/* @__PURE__ */ jsx53(
|
|
11068
11374
|
"span",
|
|
11069
11375
|
{
|
|
11070
11376
|
style: {
|
|
@@ -11079,7 +11385,7 @@ function WeaknessesList({
|
|
|
11079
11385
|
}
|
|
11080
11386
|
)
|
|
11081
11387
|
] }),
|
|
11082
|
-
/* @__PURE__ */
|
|
11388
|
+
/* @__PURE__ */ jsx53(
|
|
11083
11389
|
"span",
|
|
11084
11390
|
{
|
|
11085
11391
|
style: {
|
|
@@ -11092,7 +11398,7 @@ function WeaknessesList({
|
|
|
11092
11398
|
}
|
|
11093
11399
|
)
|
|
11094
11400
|
] }),
|
|
11095
|
-
/* @__PURE__ */
|
|
11401
|
+
/* @__PURE__ */ jsx53(Box26, { paddingTop: 2, children: /* @__PURE__ */ jsxs38(Text39, { muted: true, size: 2, children: [
|
|
11096
11402
|
"Actual score (",
|
|
11097
11403
|
Math.round(area.actualScore ?? 0),
|
|
11098
11404
|
") is much lower than ceiling (",
|
|
@@ -11107,21 +11413,21 @@ function WeaknessesList({
|
|
|
11107
11413
|
area.feature
|
|
11108
11414
|
)) })
|
|
11109
11415
|
] }),
|
|
11110
|
-
dimWeaknesses.length > 0 && /* @__PURE__ */
|
|
11111
|
-
/* @__PURE__ */
|
|
11112
|
-
/* @__PURE__ */
|
|
11113
|
-
/* @__PURE__ */
|
|
11114
|
-
/* @__PURE__ */
|
|
11416
|
+
dimWeaknesses.length > 0 && /* @__PURE__ */ jsxs38(Stack30, { space: 3, children: [
|
|
11417
|
+
/* @__PURE__ */ jsxs38(Flex29, { align: "center", gap: 2, children: [
|
|
11418
|
+
/* @__PURE__ */ jsx53(WarningOutlineIcon3, { style: { color: "#fbbf24" } }),
|
|
11419
|
+
/* @__PURE__ */ jsx53(Text39, { size: 2, weight: "medium", children: "Dimension Weaknesses (<50)" }),
|
|
11420
|
+
/* @__PURE__ */ jsx53(InfoTip, { text: GLOSSARY.dimWeaknesses })
|
|
11115
11421
|
] }),
|
|
11116
|
-
/* @__PURE__ */
|
|
11117
|
-
|
|
11422
|
+
/* @__PURE__ */ jsx53(Box26, { style: neutralCardStyle, children: dimWeaknesses.map(({ area, dims }, i) => /* @__PURE__ */ jsxs38(
|
|
11423
|
+
Box26,
|
|
11118
11424
|
{
|
|
11119
11425
|
padding: 4,
|
|
11120
11426
|
style: i > 0 ? dividerStyle : void 0,
|
|
11121
11427
|
children: [
|
|
11122
|
-
/* @__PURE__ */
|
|
11123
|
-
/* @__PURE__ */
|
|
11124
|
-
/* @__PURE__ */
|
|
11428
|
+
/* @__PURE__ */ jsxs38(Flex29, { align: "center", gap: 2, paddingBottom: 2, children: [
|
|
11429
|
+
/* @__PURE__ */ jsx53(Text39, { size: 2, weight: "medium", children: area.feature }),
|
|
11430
|
+
/* @__PURE__ */ jsx53(
|
|
11125
11431
|
"span",
|
|
11126
11432
|
{
|
|
11127
11433
|
style: {
|
|
@@ -11136,7 +11442,7 @@ function WeaknessesList({
|
|
|
11136
11442
|
}
|
|
11137
11443
|
)
|
|
11138
11444
|
] }),
|
|
11139
|
-
/* @__PURE__ */
|
|
11445
|
+
/* @__PURE__ */ jsx53(Flex29, { gap: 2, wrap: "wrap", children: dims.map((w) => /* @__PURE__ */ jsx53(HoverTip, { text: w.tip, children: /* @__PURE__ */ jsxs38(
|
|
11140
11446
|
"span",
|
|
11141
11447
|
{
|
|
11142
11448
|
style: {
|
|
@@ -11158,33 +11464,33 @@ function WeaknessesList({
|
|
|
11158
11464
|
area.feature
|
|
11159
11465
|
)) })
|
|
11160
11466
|
] }),
|
|
11161
|
-
FEATURE_FLAGS.showRegressedSinceLastRun.enabled && regressed.length > 0 && /* @__PURE__ */
|
|
11162
|
-
/* @__PURE__ */
|
|
11163
|
-
|
|
11467
|
+
FEATURE_FLAGS.showRegressedSinceLastRun.enabled && regressed.length > 0 && /* @__PURE__ */ jsxs38(Box26, { style: neutralCardStyle, children: [
|
|
11468
|
+
/* @__PURE__ */ jsx53(
|
|
11469
|
+
Box26,
|
|
11164
11470
|
{
|
|
11165
11471
|
padding: 4,
|
|
11166
11472
|
style: { borderBottom: "1px solid var(--card-border-color)" },
|
|
11167
|
-
children: /* @__PURE__ */
|
|
11168
|
-
/* @__PURE__ */
|
|
11169
|
-
/* @__PURE__ */
|
|
11473
|
+
children: /* @__PURE__ */ jsxs38(Flex29, { align: "center", gap: 2, children: [
|
|
11474
|
+
/* @__PURE__ */ jsx53(ArrowDownIcon2, { style: { color: "#f87171" } }),
|
|
11475
|
+
/* @__PURE__ */ jsx53(Text39, { size: 2, weight: "medium", children: "Regressed Since Last Run" })
|
|
11170
11476
|
] })
|
|
11171
11477
|
}
|
|
11172
11478
|
),
|
|
11173
|
-
/* @__PURE__ */
|
|
11479
|
+
/* @__PURE__ */ jsx53(Stack30, { children: regressed.map((featureName, i) => {
|
|
11174
11480
|
const area = scores.find((s) => s.feature === featureName);
|
|
11175
11481
|
const areaDelta = perArea?.[featureName];
|
|
11176
|
-
return /* @__PURE__ */
|
|
11177
|
-
|
|
11482
|
+
return /* @__PURE__ */ jsxs38(
|
|
11483
|
+
Flex29,
|
|
11178
11484
|
{
|
|
11179
11485
|
align: "center",
|
|
11180
11486
|
justify: "space-between",
|
|
11181
11487
|
padding: 4,
|
|
11182
11488
|
style: i > 0 ? dividerStyle : void 0,
|
|
11183
11489
|
children: [
|
|
11184
|
-
/* @__PURE__ */
|
|
11185
|
-
/* @__PURE__ */
|
|
11186
|
-
areaDelta != null && /* @__PURE__ */
|
|
11187
|
-
area && /* @__PURE__ */
|
|
11490
|
+
/* @__PURE__ */ jsx53(Text39, { size: 2, children: featureName }),
|
|
11491
|
+
/* @__PURE__ */ jsxs38(Flex29, { align: "center", gap: 3, children: [
|
|
11492
|
+
areaDelta != null && /* @__PURE__ */ jsx53(DeltaIndicator, { delta: areaDelta, icon: true }),
|
|
11493
|
+
area && /* @__PURE__ */ jsx53(
|
|
11188
11494
|
"span",
|
|
11189
11495
|
{
|
|
11190
11496
|
style: {
|
|
@@ -11206,32 +11512,32 @@ function WeaknessesList({
|
|
|
11206
11512
|
);
|
|
11207
11513
|
}) })
|
|
11208
11514
|
] }),
|
|
11209
|
-
efficiencyAnomalies.length > 0 && /* @__PURE__ */
|
|
11210
|
-
/* @__PURE__ */
|
|
11211
|
-
|
|
11515
|
+
efficiencyAnomalies.length > 0 && /* @__PURE__ */ jsxs38(Box26, { style: neutralCardStyle, children: [
|
|
11516
|
+
/* @__PURE__ */ jsx53(
|
|
11517
|
+
Box26,
|
|
11212
11518
|
{
|
|
11213
11519
|
padding: 4,
|
|
11214
11520
|
style: { borderBottom: "1px solid var(--card-border-color)" },
|
|
11215
|
-
children: /* @__PURE__ */
|
|
11216
|
-
/* @__PURE__ */
|
|
11217
|
-
/* @__PURE__ */
|
|
11218
|
-
/* @__PURE__ */
|
|
11219
|
-
/* @__PURE__ */
|
|
11521
|
+
children: /* @__PURE__ */ jsxs38(Stack30, { space: 2, children: [
|
|
11522
|
+
/* @__PURE__ */ jsxs38(Flex29, { align: "center", gap: 2, children: [
|
|
11523
|
+
/* @__PURE__ */ jsx53(BoltIcon, { style: { color: "#fbbf24" } }),
|
|
11524
|
+
/* @__PURE__ */ jsx53(Text39, { size: 2, weight: "medium", children: "Efficiency Anomalies (>100%)" }),
|
|
11525
|
+
/* @__PURE__ */ jsx53(InfoTip, { text: GLOSSARY.efficiencyAnomalies })
|
|
11220
11526
|
] }),
|
|
11221
|
-
/* @__PURE__ */
|
|
11527
|
+
/* @__PURE__ */ jsx53(Text39, { muted: true, size: 2, children: "Agent outperforms injected docs \u2014 may indicate doc quality issues or agent memorization." })
|
|
11222
11528
|
] })
|
|
11223
11529
|
}
|
|
11224
11530
|
),
|
|
11225
|
-
/* @__PURE__ */
|
|
11226
|
-
|
|
11531
|
+
/* @__PURE__ */ jsx53(Stack30, { children: efficiencyAnomalies.map((area, i) => /* @__PURE__ */ jsxs38(
|
|
11532
|
+
Flex29,
|
|
11227
11533
|
{
|
|
11228
11534
|
align: "center",
|
|
11229
11535
|
justify: "space-between",
|
|
11230
11536
|
padding: 4,
|
|
11231
11537
|
style: i > 0 ? dividerStyle : void 0,
|
|
11232
11538
|
children: [
|
|
11233
|
-
/* @__PURE__ */
|
|
11234
|
-
/* @__PURE__ */
|
|
11539
|
+
/* @__PURE__ */ jsx53(Text39, { size: 2, children: area.feature }),
|
|
11540
|
+
/* @__PURE__ */ jsx53(
|
|
11235
11541
|
"span",
|
|
11236
11542
|
{
|
|
11237
11543
|
style: {
|
|
@@ -11259,12 +11565,12 @@ var tipArea = {
|
|
|
11259
11565
|
fontWeight: 600
|
|
11260
11566
|
};
|
|
11261
11567
|
function dimTip(area, dim, score, description) {
|
|
11262
|
-
return /* @__PURE__ */
|
|
11263
|
-
/* @__PURE__ */
|
|
11568
|
+
return /* @__PURE__ */ jsxs38(Text39, { size: 2, style: { lineHeight: 1.5 }, children: [
|
|
11569
|
+
/* @__PURE__ */ jsx53("span", { style: tipArea, children: area }),
|
|
11264
11570
|
" scores",
|
|
11265
11571
|
" ",
|
|
11266
|
-
/* @__PURE__ */
|
|
11267
|
-
/* @__PURE__ */
|
|
11572
|
+
/* @__PURE__ */ jsx53("span", { style: tipValue, children: score }),
|
|
11573
|
+
/* @__PURE__ */ jsx53("span", { style: { color: "var(--card-muted-fg-color)" }, children: "/100" }),
|
|
11268
11574
|
" on",
|
|
11269
11575
|
" ",
|
|
11270
11576
|
dim.toLowerCase(),
|
|
@@ -11293,7 +11599,7 @@ function getDimensionWeaknesses(area) {
|
|
|
11293
11599
|
}
|
|
11294
11600
|
|
|
11295
11601
|
// src/components/report-detail/ReportDetail.tsx
|
|
11296
|
-
import { jsx as
|
|
11602
|
+
import { jsx as jsx54, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
11297
11603
|
var OVERVIEW_TAB = { id: "overview", label: "Overview" };
|
|
11298
11604
|
var DIAGNOSTICS_TAB = { id: "diagnostics", label: "Diagnostics" };
|
|
11299
11605
|
var ACTIVITY_TAB = { id: "activity", label: "Agent Activity" };
|
|
@@ -11310,8 +11616,8 @@ function ReportDetail({
|
|
|
11310
11616
|
subTab
|
|
11311
11617
|
}) {
|
|
11312
11618
|
const client = useClient10({ apiVersion: API_VERSION });
|
|
11313
|
-
const [loading, setLoading] =
|
|
11314
|
-
const [report, setReport] =
|
|
11619
|
+
const [loading, setLoading] = useState25(true);
|
|
11620
|
+
const [report, setReport] = useState25(null);
|
|
11315
11621
|
useEffect12(() => {
|
|
11316
11622
|
let cancelled = false;
|
|
11317
11623
|
setLoading(true);
|
|
@@ -11356,19 +11662,19 @@ function ReportDetail({
|
|
|
11356
11662
|
if (disabledTabs.has(parsed)) return "overview";
|
|
11357
11663
|
return tabs.some((t) => t.id === parsed) ? parsed : "overview";
|
|
11358
11664
|
}, [activeTab, disabledTabs, tabs]);
|
|
11359
|
-
const handleTabClick =
|
|
11665
|
+
const handleTabClick = useCallback34(
|
|
11360
11666
|
(tabId) => {
|
|
11361
11667
|
onTabChange(tabId === "overview" ? null : tabId, null, null);
|
|
11362
11668
|
},
|
|
11363
11669
|
[onTabChange]
|
|
11364
11670
|
);
|
|
11365
11671
|
if (loading) {
|
|
11366
|
-
return /* @__PURE__ */
|
|
11672
|
+
return /* @__PURE__ */ jsx54(LoadingState, { message: "Loading report\u2026" });
|
|
11367
11673
|
}
|
|
11368
11674
|
if (!report || !summary) {
|
|
11369
|
-
return /* @__PURE__ */
|
|
11370
|
-
/* @__PURE__ */
|
|
11371
|
-
|
|
11675
|
+
return /* @__PURE__ */ jsx54(Box27, { padding: 5, children: /* @__PURE__ */ jsxs39(Stack31, { space: 4, children: [
|
|
11676
|
+
/* @__PURE__ */ jsx54(
|
|
11677
|
+
Button10,
|
|
11372
11678
|
{
|
|
11373
11679
|
icon: ArrowLeftIcon3,
|
|
11374
11680
|
mode: "bleed",
|
|
@@ -11376,18 +11682,18 @@ function ReportDetail({
|
|
|
11376
11682
|
text: "Back"
|
|
11377
11683
|
}
|
|
11378
11684
|
),
|
|
11379
|
-
/* @__PURE__ */
|
|
11685
|
+
/* @__PURE__ */ jsx54(Text40, { align: "center", muted: true, size: 3, children: "Report not found" })
|
|
11380
11686
|
] }) });
|
|
11381
11687
|
}
|
|
11382
11688
|
const { comparison, provenance } = report;
|
|
11383
11689
|
const totalTests = summary.scores.reduce((n, s) => n + s.testCount, 0);
|
|
11384
|
-
return /* @__PURE__ */
|
|
11690
|
+
return /* @__PURE__ */ jsx54(
|
|
11385
11691
|
ReportArtifactProvider,
|
|
11386
11692
|
{
|
|
11387
11693
|
runId: report.provenance?.runId,
|
|
11388
11694
|
manifest: summary?.artifactManifest,
|
|
11389
|
-
children: /* @__PURE__ */
|
|
11390
|
-
/* @__PURE__ */
|
|
11695
|
+
children: /* @__PURE__ */ jsx54(Box27, { padding: 4, children: /* @__PURE__ */ jsxs39(Stack31, { space: 5, children: [
|
|
11696
|
+
/* @__PURE__ */ jsx54(
|
|
11391
11697
|
ReportHeader,
|
|
11392
11698
|
{
|
|
11393
11699
|
completedAt: report.completedAt,
|
|
@@ -11396,11 +11702,11 @@ function ReportDetail({
|
|
|
11396
11702
|
title: report.title
|
|
11397
11703
|
}
|
|
11398
11704
|
),
|
|
11399
|
-
/* @__PURE__ */
|
|
11400
|
-
/* @__PURE__ */
|
|
11705
|
+
/* @__PURE__ */ jsxs39(Flex30, { align: "center", gap: 2, wrap: "wrap", children: [
|
|
11706
|
+
/* @__PURE__ */ jsx54(TabList, { space: 1, children: tabs.map((tab) => {
|
|
11401
11707
|
const isDisabled = disabledTabs.has(tab.id);
|
|
11402
11708
|
const tooltip = getDisabledTabTooltip(tab.id, summary);
|
|
11403
|
-
const tabElement = /* @__PURE__ */
|
|
11709
|
+
const tabElement = /* @__PURE__ */ jsx54(
|
|
11404
11710
|
Tab,
|
|
11405
11711
|
{
|
|
11406
11712
|
"aria-controls": `panel-${tab.id}`,
|
|
@@ -11411,27 +11717,27 @@ function ReportDetail({
|
|
|
11411
11717
|
selected: currentTab === tab.id
|
|
11412
11718
|
}
|
|
11413
11719
|
);
|
|
11414
|
-
return isDisabled && tooltip ? /* @__PURE__ */
|
|
11720
|
+
return isDisabled && tooltip ? /* @__PURE__ */ jsx54(
|
|
11415
11721
|
Tooltip10,
|
|
11416
11722
|
{
|
|
11417
|
-
content: /* @__PURE__ */
|
|
11723
|
+
content: /* @__PURE__ */ jsx54(Box27, { padding: 2, style: { maxWidth: 280 }, children: tooltip }),
|
|
11418
11724
|
placement: "bottom",
|
|
11419
11725
|
portal: true,
|
|
11420
|
-
children: /* @__PURE__ */
|
|
11726
|
+
children: /* @__PURE__ */ jsx54("span", { style: { display: "inline-block" }, children: tabElement })
|
|
11421
11727
|
},
|
|
11422
11728
|
tab.id
|
|
11423
|
-
) : /* @__PURE__ */
|
|
11729
|
+
) : /* @__PURE__ */ jsx54("span", { children: tabElement }, tab.id);
|
|
11424
11730
|
}) }),
|
|
11425
|
-
/* @__PURE__ */
|
|
11426
|
-
/* @__PURE__ */
|
|
11731
|
+
/* @__PURE__ */ jsxs39(Flex30, { align: "center", gap: 2, style: { marginLeft: "auto" }, children: [
|
|
11732
|
+
/* @__PURE__ */ jsx54(
|
|
11427
11733
|
HoverTip,
|
|
11428
11734
|
{
|
|
11429
11735
|
text: SOURCE_TIP[provenance.source.name] ?? GLOSSARY.reportMode,
|
|
11430
|
-
children: /* @__PURE__ */
|
|
11736
|
+
children: /* @__PURE__ */ jsx54(Badge9, { mode: "outline", tone: "default", children: provenance.source.name })
|
|
11431
11737
|
}
|
|
11432
11738
|
),
|
|
11433
|
-
/* @__PURE__ */
|
|
11434
|
-
/* @__PURE__ */
|
|
11739
|
+
/* @__PURE__ */ jsx54(HoverTip, { text: MODE_TIP2[provenance.mode] ?? GLOSSARY.reportMode, children: /* @__PURE__ */ jsx54(Badge9, { tone: "primary", children: provenance.mode }) }),
|
|
11740
|
+
/* @__PURE__ */ jsx54(
|
|
11435
11741
|
ReportActions,
|
|
11436
11742
|
{
|
|
11437
11743
|
documentId: report._id,
|
|
@@ -11442,14 +11748,14 @@ function ReportDetail({
|
|
|
11442
11748
|
)
|
|
11443
11749
|
] })
|
|
11444
11750
|
] }),
|
|
11445
|
-
currentTab === "overview" && /* @__PURE__ */
|
|
11751
|
+
currentTab === "overview" && /* @__PURE__ */ jsx54(
|
|
11446
11752
|
TabPanel,
|
|
11447
11753
|
{
|
|
11448
11754
|
"aria-labelledby": "tab-overview",
|
|
11449
11755
|
hidden: currentTab !== "overview",
|
|
11450
11756
|
id: "panel-overview",
|
|
11451
|
-
children: /* @__PURE__ */
|
|
11452
|
-
/* @__PURE__ */
|
|
11757
|
+
children: /* @__PURE__ */ jsxs39(Stack31, { space: 5, children: [
|
|
11758
|
+
/* @__PURE__ */ jsx54(
|
|
11453
11759
|
DiagnosticsOverview,
|
|
11454
11760
|
{
|
|
11455
11761
|
comparison,
|
|
@@ -11460,19 +11766,20 @@ function ReportDetail({
|
|
|
11460
11766
|
totalTests
|
|
11461
11767
|
}
|
|
11462
11768
|
),
|
|
11463
|
-
/* @__PURE__ */
|
|
11464
|
-
/* @__PURE__ */
|
|
11769
|
+
/* @__PURE__ */ jsx54(CostLatencyPanel, { testResults: summary.testResults }),
|
|
11770
|
+
/* @__PURE__ */ jsx54(
|
|
11465
11771
|
LineageCard,
|
|
11466
11772
|
{
|
|
11467
11773
|
provenance,
|
|
11468
11774
|
reportId: report.reportId
|
|
11469
11775
|
}
|
|
11470
11776
|
),
|
|
11471
|
-
/* @__PURE__ */
|
|
11777
|
+
/* @__PURE__ */ jsx54(ProvenanceCard, { provenance }),
|
|
11778
|
+
/* @__PURE__ */ jsx54(PipelineExecutionPanel, {})
|
|
11472
11779
|
] })
|
|
11473
11780
|
}
|
|
11474
11781
|
),
|
|
11475
|
-
currentTab === "diagnostics" && hasDiagnostics && /* @__PURE__ */
|
|
11782
|
+
currentTab === "diagnostics" && hasDiagnostics && /* @__PURE__ */ jsx54(
|
|
11476
11783
|
DiagnosticsPanel,
|
|
11477
11784
|
{
|
|
11478
11785
|
artifactCache,
|
|
@@ -11488,13 +11795,13 @@ function ReportDetail({
|
|
|
11488
11795
|
testResults: summary.testResults
|
|
11489
11796
|
}
|
|
11490
11797
|
),
|
|
11491
|
-
currentTab === "activity" && hasAgentActivity && /* @__PURE__ */
|
|
11798
|
+
currentTab === "activity" && hasAgentActivity && /* @__PURE__ */ jsx54(
|
|
11492
11799
|
TabPanel,
|
|
11493
11800
|
{
|
|
11494
11801
|
"aria-labelledby": "tab-activity",
|
|
11495
11802
|
hidden: currentTab !== "activity",
|
|
11496
11803
|
id: "panel-activity",
|
|
11497
|
-
children: /* @__PURE__ */
|
|
11804
|
+
children: /* @__PURE__ */ jsx54(
|
|
11498
11805
|
AgentBehaviorCard,
|
|
11499
11806
|
{
|
|
11500
11807
|
agentBehavior: summary.agentBehavior,
|
|
@@ -11532,9 +11839,9 @@ function DiagnosticsPanel({
|
|
|
11532
11839
|
const issueCount = scores.filter((s) => s.totalScore < SCORE_CAUTION).length + scores.filter((s) => s.negativeDocLift).length + scores.filter(
|
|
11533
11840
|
(s) => s.infrastructureEfficiency != null && s.infrastructureEfficiency < EFFICIENCY_CAUTION && !s.invertedRetrievalGap
|
|
11534
11841
|
).length;
|
|
11535
|
-
return /* @__PURE__ */
|
|
11536
|
-
/* @__PURE__ */
|
|
11537
|
-
|
|
11842
|
+
return /* @__PURE__ */ jsx54(TabPanel, { "aria-labelledby": "tab-diagnostics", id: "panel-diagnostics", children: /* @__PURE__ */ jsxs39(Stack31, { space: 4, children: [
|
|
11843
|
+
/* @__PURE__ */ jsx54(
|
|
11844
|
+
Flex30,
|
|
11538
11845
|
{
|
|
11539
11846
|
align: "center",
|
|
11540
11847
|
gap: 1,
|
|
@@ -11543,7 +11850,7 @@ function DiagnosticsPanel({
|
|
|
11543
11850
|
paddingBottom: 8
|
|
11544
11851
|
},
|
|
11545
11852
|
wrap: "wrap",
|
|
11546
|
-
children: DIAG_TABS.map((tab) => /* @__PURE__ */
|
|
11853
|
+
children: DIAG_TABS.map((tab) => /* @__PURE__ */ jsxs39(
|
|
11547
11854
|
"button",
|
|
11548
11855
|
{
|
|
11549
11856
|
onClick: () => onNavigate(tab.id === "strengths" ? null : tab.id, null),
|
|
@@ -11563,7 +11870,7 @@ function DiagnosticsPanel({
|
|
|
11563
11870
|
type: "button",
|
|
11564
11871
|
children: [
|
|
11565
11872
|
tab.label,
|
|
11566
|
-
tab.id === "issues" && issueCount > 0 && /* @__PURE__ */
|
|
11873
|
+
tab.id === "issues" && issueCount > 0 && /* @__PURE__ */ jsx54(
|
|
11567
11874
|
"span",
|
|
11568
11875
|
{
|
|
11569
11876
|
style: {
|
|
@@ -11583,7 +11890,7 @@ function DiagnosticsPanel({
|
|
|
11583
11890
|
))
|
|
11584
11891
|
}
|
|
11585
11892
|
),
|
|
11586
|
-
subTab === "strengths" && /* @__PURE__ */
|
|
11893
|
+
subTab === "strengths" && /* @__PURE__ */ jsx54(
|
|
11587
11894
|
StrengthsList,
|
|
11588
11895
|
{
|
|
11589
11896
|
comparison,
|
|
@@ -11592,8 +11899,8 @@ function DiagnosticsPanel({
|
|
|
11592
11899
|
scores
|
|
11593
11900
|
}
|
|
11594
11901
|
),
|
|
11595
|
-
subTab === "issues" && /* @__PURE__ */
|
|
11596
|
-
/* @__PURE__ */
|
|
11902
|
+
subTab === "issues" && /* @__PURE__ */ jsxs39(Stack31, { space: 5, children: [
|
|
11903
|
+
/* @__PURE__ */ jsx54(
|
|
11597
11904
|
WeaknessesList,
|
|
11598
11905
|
{
|
|
11599
11906
|
comparison,
|
|
@@ -11602,8 +11909,8 @@ function DiagnosticsPanel({
|
|
|
11602
11909
|
scores
|
|
11603
11910
|
}
|
|
11604
11911
|
),
|
|
11605
|
-
FEATURE_FLAGS.showFailureModes.enabled && /* @__PURE__ */
|
|
11606
|
-
judgments && judgments.length > 0 && /* @__PURE__ */
|
|
11912
|
+
FEATURE_FLAGS.showFailureModes.enabled && /* @__PURE__ */ jsx54(FailureModesPanel, { failureModes }),
|
|
11913
|
+
judgments && judgments.length > 0 && /* @__PURE__ */ jsx54(
|
|
11607
11914
|
JudgmentList,
|
|
11608
11915
|
{
|
|
11609
11916
|
artifactCache,
|
|
@@ -11639,17 +11946,17 @@ function getDisabledTabTooltip(tabId, summary) {
|
|
|
11639
11946
|
if (!summary) return null;
|
|
11640
11947
|
switch (tabId) {
|
|
11641
11948
|
case "diagnostics":
|
|
11642
|
-
return /* @__PURE__ */
|
|
11949
|
+
return /* @__PURE__ */ jsx54(Text40, { muted: true, size: 2, children: "No diagnostic data available. Diagnostics require at least one scored feature area." });
|
|
11643
11950
|
case "activity":
|
|
11644
|
-
return summary.evaluationMode === "baseline" ? /* @__PURE__ */
|
|
11951
|
+
return summary.evaluationMode === "baseline" ? /* @__PURE__ */ jsxs39(Text40, { muted: true, size: 2, children: [
|
|
11645
11952
|
"Not available for baseline-only evaluations. Run with",
|
|
11646
11953
|
" ",
|
|
11647
|
-
/* @__PURE__ */
|
|
11954
|
+
/* @__PURE__ */ jsx54("code", { style: inlineCodeStyle, children: "--mode full" }),
|
|
11648
11955
|
" or",
|
|
11649
11956
|
" ",
|
|
11650
|
-
/* @__PURE__ */
|
|
11957
|
+
/* @__PURE__ */ jsx54("code", { style: inlineCodeStyle, children: "--mode agentic" }),
|
|
11651
11958
|
" to capture agent browsing behavior."
|
|
11652
|
-
] }) : /* @__PURE__ */
|
|
11959
|
+
] }) : /* @__PURE__ */ jsx54(Text40, { muted: true, size: 2, children: "No agent activity data was recorded for this evaluation." });
|
|
11653
11960
|
default:
|
|
11654
11961
|
return null;
|
|
11655
11962
|
}
|
|
@@ -11657,12 +11964,12 @@ function getDisabledTabTooltip(tabId, summary) {
|
|
|
11657
11964
|
|
|
11658
11965
|
// src/components/report-detail/AreaScoreRow.tsx
|
|
11659
11966
|
import { WarningOutlineIcon as WarningOutlineIcon4 } from "@sanity/icons";
|
|
11660
|
-
import { Box as
|
|
11661
|
-
import { jsx as
|
|
11967
|
+
import { Box as Box28, Flex as Flex31, Stack as Stack32, Text as Text41 } from "@sanity/ui";
|
|
11968
|
+
import { jsx as jsx55, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
11662
11969
|
|
|
11663
11970
|
// src/components/report-detail/AreaScoreTable.tsx
|
|
11664
11971
|
import React4 from "react";
|
|
11665
|
-
import { Card as
|
|
11972
|
+
import { Card as Card19, Stack as Stack33, Text as Text43 } from "@sanity/ui";
|
|
11666
11973
|
|
|
11667
11974
|
// src/lib/scoring.ts
|
|
11668
11975
|
var HEX_MAP = {
|
|
@@ -11679,49 +11986,49 @@ function scoreHex(score) {
|
|
|
11679
11986
|
}
|
|
11680
11987
|
|
|
11681
11988
|
// src/components/primitives/ScoreCell.tsx
|
|
11682
|
-
import { Card as
|
|
11683
|
-
import { jsx as
|
|
11989
|
+
import { Card as Card18, Text as Text42 } from "@sanity/ui";
|
|
11990
|
+
import { jsx as jsx56 } from "react/jsx-runtime";
|
|
11684
11991
|
|
|
11685
11992
|
// src/components/report-detail/AreaScoreTable.tsx
|
|
11686
|
-
import { jsx as
|
|
11993
|
+
import { jsx as jsx57, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
11687
11994
|
|
|
11688
11995
|
// src/components/report-detail/AutoComparisonCard.tsx
|
|
11689
|
-
import { Badge as
|
|
11690
|
-
import { jsx as
|
|
11996
|
+
import { Badge as Badge10, Box as Box29, Card as Card20, Flex as Flex32, Grid as Grid5, Stack as Stack34, Text as Text44, Tooltip as Tooltip11 } from "@sanity/ui";
|
|
11997
|
+
import { jsx as jsx58, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
11691
11998
|
|
|
11692
11999
|
// src/components/report-detail/OverviewStats.tsx
|
|
11693
12000
|
import { Grid as Grid6 } from "@sanity/ui";
|
|
11694
|
-
import { jsx as
|
|
12001
|
+
import { jsx as jsx59, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
11695
12002
|
|
|
11696
12003
|
// src/components/report-detail/RecommendationsSection.tsx
|
|
11697
12004
|
import { BoltIcon as BoltIcon2 } from "@sanity/icons";
|
|
11698
|
-
import { Box as
|
|
11699
|
-
import { jsx as
|
|
12005
|
+
import { Box as Box30, Flex as Flex33, Stack as Stack35, Text as Text45 } from "@sanity/ui";
|
|
12006
|
+
import { jsx as jsx60, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
11700
12007
|
|
|
11701
12008
|
// src/components/report-detail/ThreeLayerTable.tsx
|
|
11702
12009
|
import React5 from "react";
|
|
11703
|
-
import { Badge as
|
|
11704
|
-
import { jsx as
|
|
12010
|
+
import { Badge as Badge11, Card as Card21, Flex as Flex34, Stack as Stack36, Text as Text46 } from "@sanity/ui";
|
|
12011
|
+
import { jsx as jsx61, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
11705
12012
|
|
|
11706
12013
|
// src/components/report-detail/JudgmentDetailDrawerOutlet.tsx
|
|
11707
|
-
import { Card as
|
|
11708
|
-
import { useCallback as
|
|
12014
|
+
import { Card as Card22 } from "@sanity/ui";
|
|
12015
|
+
import { useCallback as useCallback35, useEffect as useEffect14, useRef as useRef8, useState as useState27 } from "react";
|
|
11709
12016
|
|
|
11710
12017
|
// src/components/report-detail/JudgmentDetailDrawer.tsx
|
|
11711
|
-
import { useEffect as useEffect13, useState as
|
|
12018
|
+
import { useEffect as useEffect13, useState as useState26 } from "react";
|
|
11712
12019
|
import { CloseIcon as CloseIcon2 } from "@sanity/icons";
|
|
11713
12020
|
import {
|
|
11714
|
-
Box as
|
|
11715
|
-
Button as
|
|
11716
|
-
Flex as
|
|
11717
|
-
Stack as
|
|
12021
|
+
Box as Box31,
|
|
12022
|
+
Button as Button11,
|
|
12023
|
+
Flex as Flex35,
|
|
12024
|
+
Stack as Stack37,
|
|
11718
12025
|
Tab as Tab2,
|
|
11719
12026
|
TabList as TabList2,
|
|
11720
12027
|
TabPanel as TabPanel2,
|
|
11721
|
-
Text as
|
|
12028
|
+
Text as Text47,
|
|
11722
12029
|
Tooltip as Tooltip12
|
|
11723
12030
|
} from "@sanity/ui";
|
|
11724
|
-
import { jsx as
|
|
12031
|
+
import { jsx as jsx62, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
11725
12032
|
var HEADER_STYLE = {
|
|
11726
12033
|
borderBottom: "1px solid var(--card-border-color)"
|
|
11727
12034
|
};
|
|
@@ -11757,10 +12064,10 @@ var COPY_BUTTON_SLOT_STYLE = {
|
|
|
11757
12064
|
function DocBadge({
|
|
11758
12065
|
doc
|
|
11759
12066
|
}) {
|
|
11760
|
-
const [hovered, setHovered] =
|
|
12067
|
+
const [hovered, setHovered] = useState26(false);
|
|
11761
12068
|
const isLinked = Boolean(doc.documentId);
|
|
11762
12069
|
const tooltipLabel = isLinked ? `Edit "${doc.title || doc.slug}"` : doc.title || doc.slug;
|
|
11763
|
-
const badge = /* @__PURE__ */
|
|
12070
|
+
const badge = /* @__PURE__ */ jsx62(
|
|
11764
12071
|
"span",
|
|
11765
12072
|
{
|
|
11766
12073
|
style: {
|
|
@@ -11773,13 +12080,13 @@ function DocBadge({
|
|
|
11773
12080
|
children: doc.slug
|
|
11774
12081
|
}
|
|
11775
12082
|
);
|
|
11776
|
-
return /* @__PURE__ */
|
|
12083
|
+
return /* @__PURE__ */ jsx62(
|
|
11777
12084
|
Tooltip12,
|
|
11778
12085
|
{
|
|
11779
|
-
content: /* @__PURE__ */
|
|
12086
|
+
content: /* @__PURE__ */ jsx62(Box31, { padding: 2, children: /* @__PURE__ */ jsx62(Text47, { size: 2, children: tooltipLabel }) }),
|
|
11780
12087
|
placement: "bottom",
|
|
11781
12088
|
portal: true,
|
|
11782
|
-
children: isLinked ? /* @__PURE__ */
|
|
12089
|
+
children: isLinked ? /* @__PURE__ */ jsx62(
|
|
11783
12090
|
"a",
|
|
11784
12091
|
{
|
|
11785
12092
|
href: `/intent/edit/id=${doc.documentId}`,
|
|
@@ -11794,7 +12101,7 @@ function DocBadge({
|
|
|
11794
12101
|
},
|
|
11795
12102
|
children: badge
|
|
11796
12103
|
}
|
|
11797
|
-
) : /* @__PURE__ */
|
|
12104
|
+
) : /* @__PURE__ */ jsx62("span", { children: badge })
|
|
11798
12105
|
}
|
|
11799
12106
|
);
|
|
11800
12107
|
}
|
|
@@ -11805,7 +12112,7 @@ function JudgmentDetailDrawer({
|
|
|
11805
12112
|
onShowPrompts,
|
|
11806
12113
|
testResult
|
|
11807
12114
|
}) {
|
|
11808
|
-
const [tab, setTab] =
|
|
12115
|
+
const [tab, setTab] = useState26("reasoning");
|
|
11809
12116
|
const sep = judgment.taskId.indexOf(" - ");
|
|
11810
12117
|
const rawTaskName = sep > 0 ? judgment.taskId.substring(sep + 3) : judgment.taskId;
|
|
11811
12118
|
const { name: taskName, variant } = splitVariant(rawTaskName);
|
|
@@ -11823,7 +12130,7 @@ function JudgmentDetailDrawer({
|
|
|
11823
12130
|
useEffect13(() => {
|
|
11824
12131
|
setTab("reasoning");
|
|
11825
12132
|
}, [judgment.taskId, judgment.dimension, judgment.modelId]);
|
|
11826
|
-
const [fetchDispatched, setFetchDispatched] =
|
|
12133
|
+
const [fetchDispatched, setFetchDispatched] = useState26(false);
|
|
11827
12134
|
useEffect13(() => {
|
|
11828
12135
|
setFetchDispatched(false);
|
|
11829
12136
|
}, [judgment.taskId, judgment.dimension, judgment.modelId]);
|
|
@@ -11859,15 +12166,15 @@ function JudgmentDetailDrawer({
|
|
|
11859
12166
|
window.addEventListener("keydown", onKeyDown);
|
|
11860
12167
|
return () => window.removeEventListener("keydown", onKeyDown);
|
|
11861
12168
|
}, [onClose]);
|
|
11862
|
-
return /* @__PURE__ */
|
|
11863
|
-
|
|
12169
|
+
return /* @__PURE__ */ jsxs46(
|
|
12170
|
+
Flex35,
|
|
11864
12171
|
{
|
|
11865
12172
|
"aria-label": `Judgment detail: ${judgment.score} ${dimLabel}, ${taskName}`,
|
|
11866
12173
|
direction: "column",
|
|
11867
12174
|
role: "dialog",
|
|
11868
12175
|
style: { flex: 1, height: "100%", minHeight: 0, overflow: "hidden" },
|
|
11869
12176
|
children: [
|
|
11870
|
-
/* @__PURE__ */
|
|
12177
|
+
/* @__PURE__ */ jsx62(
|
|
11871
12178
|
"div",
|
|
11872
12179
|
{
|
|
11873
12180
|
"aria-hidden": true,
|
|
@@ -11880,10 +12187,10 @@ function JudgmentDetailDrawer({
|
|
|
11880
12187
|
}
|
|
11881
12188
|
}
|
|
11882
12189
|
),
|
|
11883
|
-
/* @__PURE__ */
|
|
11884
|
-
/* @__PURE__ */
|
|
11885
|
-
/* @__PURE__ */
|
|
11886
|
-
/* @__PURE__ */
|
|
12190
|
+
/* @__PURE__ */ jsxs46(Flex35, { align: "flex-start", gap: 2, padding: 4, style: HEADER_STYLE, children: [
|
|
12191
|
+
/* @__PURE__ */ jsxs46(Stack37, { flex: 1, space: 2, children: [
|
|
12192
|
+
/* @__PURE__ */ jsxs46(Flex35, { align: "center", gap: 2, wrap: "wrap", children: [
|
|
12193
|
+
/* @__PURE__ */ jsx62(
|
|
11887
12194
|
"span",
|
|
11888
12195
|
{
|
|
11889
12196
|
style: {
|
|
@@ -11898,7 +12205,7 @@ function JudgmentDetailDrawer({
|
|
|
11898
12205
|
children: judgment.score
|
|
11899
12206
|
}
|
|
11900
12207
|
),
|
|
11901
|
-
/* @__PURE__ */
|
|
12208
|
+
/* @__PURE__ */ jsx62(
|
|
11902
12209
|
"span",
|
|
11903
12210
|
{
|
|
11904
12211
|
style: {
|
|
@@ -11911,13 +12218,13 @@ function JudgmentDetailDrawer({
|
|
|
11911
12218
|
children: dimLabel
|
|
11912
12219
|
}
|
|
11913
12220
|
),
|
|
11914
|
-
/* @__PURE__ */
|
|
12221
|
+
/* @__PURE__ */ jsx62(
|
|
11915
12222
|
Tooltip12,
|
|
11916
12223
|
{
|
|
11917
|
-
content: /* @__PURE__ */
|
|
12224
|
+
content: /* @__PURE__ */ jsx62(Box31, { padding: 2, children: /* @__PURE__ */ jsx62(Text47, { size: 1, children: judgment.modelId }) }),
|
|
11918
12225
|
placement: "bottom",
|
|
11919
12226
|
portal: true,
|
|
11920
|
-
children: /* @__PURE__ */
|
|
12227
|
+
children: /* @__PURE__ */ jsx62(
|
|
11921
12228
|
"span",
|
|
11922
12229
|
{
|
|
11923
12230
|
style: {
|
|
@@ -11934,7 +12241,7 @@ function JudgmentDetailDrawer({
|
|
|
11934
12241
|
)
|
|
11935
12242
|
}
|
|
11936
12243
|
),
|
|
11937
|
-
(testResult?.latencyMs != null || testResult?.cost != null && testResult.cost > 0) && /* @__PURE__ */
|
|
12244
|
+
(testResult?.latencyMs != null || testResult?.cost != null && testResult.cost > 0) && /* @__PURE__ */ jsx62(
|
|
11938
12245
|
"span",
|
|
11939
12246
|
{
|
|
11940
12247
|
"aria-hidden": true,
|
|
@@ -11946,38 +12253,38 @@ function JudgmentDetailDrawer({
|
|
|
11946
12253
|
}
|
|
11947
12254
|
}
|
|
11948
12255
|
),
|
|
11949
|
-
testResult?.latencyMs != null && /* @__PURE__ */
|
|
12256
|
+
testResult?.latencyMs != null && /* @__PURE__ */ jsx62(
|
|
11950
12257
|
Tooltip12,
|
|
11951
12258
|
{
|
|
11952
|
-
content: /* @__PURE__ */
|
|
12259
|
+
content: /* @__PURE__ */ jsx62(Box31, { padding: 2, children: /* @__PURE__ */ jsx62(Text47, { size: 1, children: "End-to-end generation latency for this model call." }) }),
|
|
11953
12260
|
placement: "bottom",
|
|
11954
12261
|
portal: true,
|
|
11955
|
-
children: /* @__PURE__ */
|
|
12262
|
+
children: /* @__PURE__ */ jsxs46(Text47, { muted: true, size: 1, children: [
|
|
11956
12263
|
(testResult.latencyMs / 1e3).toFixed(1),
|
|
11957
12264
|
"s"
|
|
11958
12265
|
] })
|
|
11959
12266
|
}
|
|
11960
12267
|
),
|
|
11961
|
-
testResult?.cost != null && testResult.cost > 0 && /* @__PURE__ */
|
|
12268
|
+
testResult?.cost != null && testResult.cost > 0 && /* @__PURE__ */ jsx62(
|
|
11962
12269
|
Tooltip12,
|
|
11963
12270
|
{
|
|
11964
|
-
content: /* @__PURE__ */
|
|
12271
|
+
content: /* @__PURE__ */ jsx62(Box31, { padding: 2, children: /* @__PURE__ */ jsx62(Text47, { size: 1, children: "Provider-reported cost for this model call." }) }),
|
|
11965
12272
|
placement: "bottom",
|
|
11966
12273
|
portal: true,
|
|
11967
|
-
children: /* @__PURE__ */
|
|
12274
|
+
children: /* @__PURE__ */ jsxs46(Text47, { muted: true, size: 1, children: [
|
|
11968
12275
|
"$",
|
|
11969
12276
|
testResult.cost.toFixed(4)
|
|
11970
12277
|
] })
|
|
11971
12278
|
}
|
|
11972
12279
|
)
|
|
11973
12280
|
] }),
|
|
11974
|
-
/* @__PURE__ */
|
|
11975
|
-
/* @__PURE__ */
|
|
11976
|
-
/* @__PURE__ */
|
|
12281
|
+
/* @__PURE__ */ jsxs46(Flex35, { align: "center", gap: 2, wrap: "wrap", children: [
|
|
12282
|
+
/* @__PURE__ */ jsx62(Text47, { size: 2, weight: "medium", children: taskName }),
|
|
12283
|
+
/* @__PURE__ */ jsx62(VariantBadge, { variant })
|
|
11977
12284
|
] })
|
|
11978
12285
|
] }),
|
|
11979
|
-
/* @__PURE__ */
|
|
11980
|
-
/* @__PURE__ */
|
|
12286
|
+
/* @__PURE__ */ jsxs46(Flex35, { align: "center", gap: 1, children: [
|
|
12287
|
+
/* @__PURE__ */ jsx62(
|
|
11981
12288
|
"span",
|
|
11982
12289
|
{
|
|
11983
12290
|
style: {
|
|
@@ -11995,8 +12302,8 @@ function JudgmentDetailDrawer({
|
|
|
11995
12302
|
children: "Esc"
|
|
11996
12303
|
}
|
|
11997
12304
|
),
|
|
11998
|
-
/* @__PURE__ */
|
|
11999
|
-
|
|
12305
|
+
/* @__PURE__ */ jsx62(
|
|
12306
|
+
Button11,
|
|
12000
12307
|
{
|
|
12001
12308
|
"aria-label": "Close (Esc)",
|
|
12002
12309
|
autoFocus: true,
|
|
@@ -12008,8 +12315,8 @@ function JudgmentDetailDrawer({
|
|
|
12008
12315
|
)
|
|
12009
12316
|
] })
|
|
12010
12317
|
] }),
|
|
12011
|
-
/* @__PURE__ */
|
|
12012
|
-
|
|
12318
|
+
/* @__PURE__ */ jsxs46(
|
|
12319
|
+
Flex35,
|
|
12013
12320
|
{
|
|
12014
12321
|
align: "center",
|
|
12015
12322
|
gap: 2,
|
|
@@ -12018,8 +12325,8 @@ function JudgmentDetailDrawer({
|
|
|
12018
12325
|
paddingY: 2,
|
|
12019
12326
|
style: TAB_BAR_STYLE,
|
|
12020
12327
|
children: [
|
|
12021
|
-
/* @__PURE__ */
|
|
12022
|
-
/* @__PURE__ */
|
|
12328
|
+
/* @__PURE__ */ jsx62(Box31, { flex: 1, style: { minWidth: 0 }, children: /* @__PURE__ */ jsxs46(TabList2, { space: 2, children: [
|
|
12329
|
+
/* @__PURE__ */ jsx62(
|
|
12023
12330
|
Tab2,
|
|
12024
12331
|
{
|
|
12025
12332
|
"aria-controls": "judgment-panel-reasoning",
|
|
@@ -12029,7 +12336,7 @@ function JudgmentDetailDrawer({
|
|
|
12029
12336
|
selected: tab === "reasoning"
|
|
12030
12337
|
}
|
|
12031
12338
|
),
|
|
12032
|
-
hasOutputTab && /* @__PURE__ */
|
|
12339
|
+
hasOutputTab && /* @__PURE__ */ jsx62(
|
|
12033
12340
|
Tab2,
|
|
12034
12341
|
{
|
|
12035
12342
|
"aria-controls": "judgment-panel-output",
|
|
@@ -12040,7 +12347,7 @@ function JudgmentDetailDrawer({
|
|
|
12040
12347
|
}
|
|
12041
12348
|
)
|
|
12042
12349
|
] }) }),
|
|
12043
|
-
/* @__PURE__ */
|
|
12350
|
+
/* @__PURE__ */ jsx62(
|
|
12044
12351
|
JudgmentActions,
|
|
12045
12352
|
{
|
|
12046
12353
|
onShowPrompts: onShowPrompts ? () => onShowPrompts(judgment) : void 0
|
|
@@ -12049,15 +12356,15 @@ function JudgmentDetailDrawer({
|
|
|
12049
12356
|
]
|
|
12050
12357
|
}
|
|
12051
12358
|
),
|
|
12052
|
-
/* @__PURE__ */
|
|
12053
|
-
/* @__PURE__ */
|
|
12359
|
+
/* @__PURE__ */ jsxs46(Box31, { padding: 4, style: CONTENT_STYLE, children: [
|
|
12360
|
+
/* @__PURE__ */ jsx62(
|
|
12054
12361
|
TabPanel2,
|
|
12055
12362
|
{
|
|
12056
12363
|
"aria-labelledby": "judgment-tab-reasoning",
|
|
12057
12364
|
hidden: tab !== "reasoning",
|
|
12058
12365
|
id: "judgment-panel-reasoning",
|
|
12059
|
-
children: /* @__PURE__ */
|
|
12060
|
-
/* @__PURE__ */
|
|
12366
|
+
children: /* @__PURE__ */ jsxs46(Box31, { style: COPYABLE_BLOCK_STYLE, children: [
|
|
12367
|
+
/* @__PURE__ */ jsx62(Box31, { style: COPY_BUTTON_SLOT_STYLE, children: /* @__PURE__ */ jsx62(
|
|
12061
12368
|
CopyButton,
|
|
12062
12369
|
{
|
|
12063
12370
|
copiedLabel: "Reasoning copied",
|
|
@@ -12065,26 +12372,26 @@ function JudgmentDetailDrawer({
|
|
|
12065
12372
|
text: reasoningText
|
|
12066
12373
|
}
|
|
12067
12374
|
) }),
|
|
12068
|
-
/* @__PURE__ */
|
|
12069
|
-
reasoningIsPreview && /* @__PURE__ */
|
|
12375
|
+
/* @__PURE__ */ jsx62(Markdown, { content: reasoningText }),
|
|
12376
|
+
reasoningIsPreview && /* @__PURE__ */ jsx62(Text47, { muted: true, size: 1, style: { marginTop: 8 }, children: fullStatus === "loading" ? "Loading full reasoning\u2026" : "Showing preview (280 chars). Full reasoning not yet loaded." })
|
|
12070
12377
|
] })
|
|
12071
12378
|
}
|
|
12072
12379
|
),
|
|
12073
|
-
hasOutputTab && /* @__PURE__ */
|
|
12380
|
+
hasOutputTab && /* @__PURE__ */ jsxs46(
|
|
12074
12381
|
TabPanel2,
|
|
12075
12382
|
{
|
|
12076
12383
|
"aria-labelledby": "judgment-tab-output",
|
|
12077
12384
|
hidden: tab !== "output",
|
|
12078
12385
|
id: "judgment-panel-output",
|
|
12079
12386
|
children: [
|
|
12080
|
-
!resolvedOutput && fetchInFlight && /* @__PURE__ */
|
|
12081
|
-
!resolvedOutput && fetchFailed && /* @__PURE__ */
|
|
12387
|
+
!resolvedOutput && fetchInFlight && /* @__PURE__ */ jsx62(Text47, { muted: true, size: 1, children: "Fetching model output\u2026" }),
|
|
12388
|
+
!resolvedOutput && fetchFailed && /* @__PURE__ */ jsxs46(Text47, { muted: true, size: 1, style: { color: "#f87171" }, children: [
|
|
12082
12389
|
"Failed to load model output",
|
|
12083
12390
|
artifactCache?.error ? `: ${artifactCache.error}` : ""
|
|
12084
12391
|
] }),
|
|
12085
|
-
!resolvedOutput && entryUnavailable && /* @__PURE__ */
|
|
12086
|
-
resolvedOutput && /* @__PURE__ */
|
|
12087
|
-
/* @__PURE__ */
|
|
12392
|
+
!resolvedOutput && entryUnavailable && /* @__PURE__ */ jsx62(Text47, { muted: true, size: 1, children: "Model output not available for this entry." }),
|
|
12393
|
+
resolvedOutput && /* @__PURE__ */ jsxs46(Box31, { style: COPYABLE_BLOCK_STYLE, children: [
|
|
12394
|
+
/* @__PURE__ */ jsx62(Box31, { style: COPY_BUTTON_SLOT_STYLE, children: /* @__PURE__ */ jsx62(
|
|
12088
12395
|
CopyButton,
|
|
12089
12396
|
{
|
|
12090
12397
|
copiedLabel: "Output copied",
|
|
@@ -12092,15 +12399,15 @@ function JudgmentDetailDrawer({
|
|
|
12092
12399
|
text: resolvedOutput
|
|
12093
12400
|
}
|
|
12094
12401
|
) }),
|
|
12095
|
-
/* @__PURE__ */
|
|
12402
|
+
/* @__PURE__ */ jsx62(Markdown, { content: resolvedOutput })
|
|
12096
12403
|
] })
|
|
12097
12404
|
]
|
|
12098
12405
|
}
|
|
12099
12406
|
)
|
|
12100
12407
|
] }),
|
|
12101
|
-
judgment.canonicalDocs && judgment.canonicalDocs.length > 0 && /* @__PURE__ */
|
|
12102
|
-
/* @__PURE__ */
|
|
12103
|
-
judgment.canonicalDocs.map((doc) => /* @__PURE__ */
|
|
12408
|
+
judgment.canonicalDocs && judgment.canonicalDocs.length > 0 && /* @__PURE__ */ jsx62(Box31, { padding: 4, style: RELATED_DOCS_STYLE, children: /* @__PURE__ */ jsxs46(Flex35, { align: "center", gap: 2, wrap: "wrap", children: [
|
|
12409
|
+
/* @__PURE__ */ jsx62("span", { style: SECTION_LABEL_STYLE, children: "Related docs" }),
|
|
12410
|
+
judgment.canonicalDocs.map((doc) => /* @__PURE__ */ jsx62(DocBadge, { doc }, doc.slug))
|
|
12104
12411
|
] }) })
|
|
12105
12412
|
]
|
|
12106
12413
|
}
|
|
@@ -12108,7 +12415,7 @@ function JudgmentDetailDrawer({
|
|
|
12108
12415
|
}
|
|
12109
12416
|
|
|
12110
12417
|
// src/components/report-detail/JudgmentDetailDrawerOutlet.tsx
|
|
12111
|
-
import { jsx as
|
|
12418
|
+
import { jsx as jsx63, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
12112
12419
|
var MIN_WIDTH2 = 480;
|
|
12113
12420
|
var MAX_WIDTH2 = 900;
|
|
12114
12421
|
var OVERLAY_BREAKPOINT2 = 1024;
|
|
@@ -12118,7 +12425,7 @@ function computeDefaultWidth() {
|
|
|
12118
12425
|
return Math.min(MAX_WIDTH2, Math.max(MIN_WIDTH2, target));
|
|
12119
12426
|
}
|
|
12120
12427
|
function useIsNarrow2() {
|
|
12121
|
-
const [narrow, setNarrow] =
|
|
12428
|
+
const [narrow, setNarrow] = useState27(
|
|
12122
12429
|
() => typeof window !== "undefined" && window.innerWidth < OVERLAY_BREAKPOINT2
|
|
12123
12430
|
);
|
|
12124
12431
|
useEffect14(() => {
|
|
@@ -12131,11 +12438,11 @@ function useIsNarrow2() {
|
|
|
12131
12438
|
return narrow;
|
|
12132
12439
|
}
|
|
12133
12440
|
function useResizable2(defaultWidth) {
|
|
12134
|
-
const [width, setWidth] =
|
|
12441
|
+
const [width, setWidth] = useState27(defaultWidth);
|
|
12135
12442
|
const dragging = useRef8(false);
|
|
12136
12443
|
const startX = useRef8(0);
|
|
12137
12444
|
const startWidth = useRef8(0);
|
|
12138
|
-
const handleMouseDown =
|
|
12445
|
+
const handleMouseDown = useCallback35(
|
|
12139
12446
|
(e) => {
|
|
12140
12447
|
e.preventDefault();
|
|
12141
12448
|
dragging.current = true;
|
|
@@ -12178,7 +12485,7 @@ function JudgmentDetailDrawerOutlet({
|
|
|
12178
12485
|
const isNarrow = useIsNarrow2();
|
|
12179
12486
|
const { handleMouseDown, width } = useResizable2(computeDefaultWidth());
|
|
12180
12487
|
if (!isOpen || !active) return null;
|
|
12181
|
-
return /* @__PURE__ */
|
|
12488
|
+
return /* @__PURE__ */ jsxs47(
|
|
12182
12489
|
"div",
|
|
12183
12490
|
{
|
|
12184
12491
|
style: isNarrow ? {
|
|
@@ -12204,7 +12511,7 @@ function JudgmentDetailDrawerOutlet({
|
|
|
12204
12511
|
width
|
|
12205
12512
|
},
|
|
12206
12513
|
children: [
|
|
12207
|
-
!isNarrow && /* @__PURE__ */
|
|
12514
|
+
!isNarrow && /* @__PURE__ */ jsx63(
|
|
12208
12515
|
"div",
|
|
12209
12516
|
{
|
|
12210
12517
|
"aria-label": "Resize judgment drawer",
|
|
@@ -12229,8 +12536,8 @@ function JudgmentDetailDrawerOutlet({
|
|
|
12229
12536
|
}
|
|
12230
12537
|
}
|
|
12231
12538
|
),
|
|
12232
|
-
/* @__PURE__ */
|
|
12233
|
-
|
|
12539
|
+
/* @__PURE__ */ jsx63(
|
|
12540
|
+
Card22,
|
|
12234
12541
|
{
|
|
12235
12542
|
borderLeft: !isNarrow,
|
|
12236
12543
|
style: {
|
|
@@ -12239,7 +12546,7 @@ function JudgmentDetailDrawerOutlet({
|
|
|
12239
12546
|
flexDirection: "column",
|
|
12240
12547
|
overflow: "hidden"
|
|
12241
12548
|
},
|
|
12242
|
-
children: /* @__PURE__ */
|
|
12549
|
+
children: /* @__PURE__ */ jsx63(ReportArtifactProvider, { runId: active.runId, manifest: active.manifest, children: /* @__PURE__ */ jsx63(
|
|
12243
12550
|
JudgmentDetailDrawer,
|
|
12244
12551
|
{
|
|
12245
12552
|
artifactCache: active.artifactCache,
|
|
@@ -12257,10 +12564,10 @@ function JudgmentDetailDrawerOutlet({
|
|
|
12257
12564
|
}
|
|
12258
12565
|
|
|
12259
12566
|
// src/components/ScoreTimeline.tsx
|
|
12260
|
-
import { Card as
|
|
12261
|
-
import { useCallback as
|
|
12567
|
+
import { Card as Card23, Flex as Flex36, Select as Select2, Stack as Stack38, Text as Text48 } from "@sanity/ui";
|
|
12568
|
+
import { useCallback as useCallback36, useEffect as useEffect15, useMemo as useMemo16, useState as useState28 } from "react";
|
|
12262
12569
|
import { useClient as useClient11 } from "sanity";
|
|
12263
|
-
import { jsx as
|
|
12570
|
+
import { jsx as jsx64, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
12264
12571
|
var CHART_HEIGHT = 220;
|
|
12265
12572
|
var CHART_WIDTH = 800;
|
|
12266
12573
|
var PAD_BOTTOM = 30;
|
|
@@ -12295,10 +12602,10 @@ function scoreForPoint(point, area) {
|
|
|
12295
12602
|
}
|
|
12296
12603
|
function ScoreTimeline({ mode = null, source = null }) {
|
|
12297
12604
|
const client = useClient11({ apiVersion: API_VERSION });
|
|
12298
|
-
const [dataPoints, setDataPoints] =
|
|
12299
|
-
const [loading, setLoading] =
|
|
12300
|
-
const [rangeDays, setRangeDays] =
|
|
12301
|
-
const [selectedArea, setSelectedArea] =
|
|
12605
|
+
const [dataPoints, setDataPoints] = useState28([]);
|
|
12606
|
+
const [loading, setLoading] = useState28(true);
|
|
12607
|
+
const [rangeDays, setRangeDays] = useState28(30);
|
|
12608
|
+
const [selectedArea, setSelectedArea] = useState28(null);
|
|
12302
12609
|
const areaNames = useMemo16(() => {
|
|
12303
12610
|
const names = /* @__PURE__ */ new Set();
|
|
12304
12611
|
for (const dp of dataPoints) {
|
|
@@ -12308,7 +12615,7 @@ function ScoreTimeline({ mode = null, source = null }) {
|
|
|
12308
12615
|
}
|
|
12309
12616
|
return Array.from(names).sort();
|
|
12310
12617
|
}, [dataPoints]);
|
|
12311
|
-
const fetchData =
|
|
12618
|
+
const fetchData = useCallback36(async () => {
|
|
12312
12619
|
setLoading(true);
|
|
12313
12620
|
try {
|
|
12314
12621
|
const startDate = rangeDays ? daysAgo(rangeDays) : "1970-01-01T00:00:00Z";
|
|
@@ -12344,14 +12651,14 @@ function ScoreTimeline({ mode = null, source = null }) {
|
|
|
12344
12651
|
if (chartPoints.length === 0) return 0;
|
|
12345
12652
|
return chartPoints.reduce((sum, p) => sum + p.score, 0) / chartPoints.length;
|
|
12346
12653
|
}, [chartPoints]);
|
|
12347
|
-
const handleRangeChange =
|
|
12654
|
+
const handleRangeChange = useCallback36(
|
|
12348
12655
|
(e) => {
|
|
12349
12656
|
const val = e.currentTarget.value;
|
|
12350
12657
|
setRangeDays(val === "all" ? null : Number(val));
|
|
12351
12658
|
},
|
|
12352
12659
|
[]
|
|
12353
12660
|
);
|
|
12354
|
-
const handleAreaChange =
|
|
12661
|
+
const handleAreaChange = useCallback36(
|
|
12355
12662
|
(e) => {
|
|
12356
12663
|
const val = e.currentTarget.value;
|
|
12357
12664
|
setSelectedArea(val || null);
|
|
@@ -12359,22 +12666,22 @@ function ScoreTimeline({ mode = null, source = null }) {
|
|
|
12359
12666
|
[]
|
|
12360
12667
|
);
|
|
12361
12668
|
const polylinePoints = chartPoints.map((p) => `${p.x},${p.y}`).join(" ");
|
|
12362
|
-
return /* @__PURE__ */
|
|
12363
|
-
/* @__PURE__ */
|
|
12364
|
-
/* @__PURE__ */
|
|
12669
|
+
return /* @__PURE__ */ jsxs48(Stack38, { space: 4, children: [
|
|
12670
|
+
/* @__PURE__ */ jsxs48(Flex36, { gap: 3, children: [
|
|
12671
|
+
/* @__PURE__ */ jsx64(
|
|
12365
12672
|
Select2,
|
|
12366
12673
|
{
|
|
12367
12674
|
onChange: handleRangeChange,
|
|
12368
12675
|
value: rangeDays?.toString() ?? "all",
|
|
12369
|
-
children: TIME_RANGES.map((r) => /* @__PURE__ */
|
|
12676
|
+
children: TIME_RANGES.map((r) => /* @__PURE__ */ jsx64("option", { value: r.days?.toString() ?? "all", children: r.label }, r.label))
|
|
12370
12677
|
}
|
|
12371
12678
|
),
|
|
12372
|
-
/* @__PURE__ */
|
|
12373
|
-
/* @__PURE__ */
|
|
12374
|
-
areaNames.map((name) => /* @__PURE__ */
|
|
12679
|
+
/* @__PURE__ */ jsxs48(Select2, { onChange: handleAreaChange, value: selectedArea ?? "", children: [
|
|
12680
|
+
/* @__PURE__ */ jsx64("option", { value: "", children: "Overall" }),
|
|
12681
|
+
areaNames.map((name) => /* @__PURE__ */ jsx64("option", { value: name, children: name }, name))
|
|
12375
12682
|
] })
|
|
12376
12683
|
] }),
|
|
12377
|
-
/* @__PURE__ */
|
|
12684
|
+
/* @__PURE__ */ jsx64(Card23, { padding: 3, radius: 2, shadow: 1, children: loading ? /* @__PURE__ */ jsx64(Flex36, { align: "center", justify: "center", style: { height: 200 }, children: /* @__PURE__ */ jsx64(Text48, { muted: true, size: 2, children: "Loading\u2026" }) }) : chartPoints.length === 0 ? /* @__PURE__ */ jsx64(Flex36, { align: "center", justify: "center", style: { height: 200 }, children: /* @__PURE__ */ jsx64(Text48, { muted: true, size: 2, children: "No reports found for this time range" }) }) : /* @__PURE__ */ jsxs48(
|
|
12378
12685
|
"svg",
|
|
12379
12686
|
{
|
|
12380
12687
|
style: { display: "block", width: "100%" },
|
|
@@ -12382,8 +12689,8 @@ function ScoreTimeline({ mode = null, source = null }) {
|
|
|
12382
12689
|
children: [
|
|
12383
12690
|
Y_TICKS.map((tick) => {
|
|
12384
12691
|
const y = PAD_TOP + PLOT_HEIGHT - tick / Y_MAX * PLOT_HEIGHT;
|
|
12385
|
-
return /* @__PURE__ */
|
|
12386
|
-
/* @__PURE__ */
|
|
12692
|
+
return /* @__PURE__ */ jsxs48("g", { children: [
|
|
12693
|
+
/* @__PURE__ */ jsx64(
|
|
12387
12694
|
"line",
|
|
12388
12695
|
{
|
|
12389
12696
|
stroke: "#ccc",
|
|
@@ -12394,7 +12701,7 @@ function ScoreTimeline({ mode = null, source = null }) {
|
|
|
12394
12701
|
y2: y
|
|
12395
12702
|
}
|
|
12396
12703
|
),
|
|
12397
|
-
/* @__PURE__ */
|
|
12704
|
+
/* @__PURE__ */ jsx64(
|
|
12398
12705
|
"text",
|
|
12399
12706
|
{
|
|
12400
12707
|
dominantBaseline: "middle",
|
|
@@ -12414,7 +12721,7 @@ function ScoreTimeline({ mode = null, source = null }) {
|
|
|
12414
12721
|
chartPoints.length - 1
|
|
12415
12722
|
].map((idx) => {
|
|
12416
12723
|
const p = chartPoints[idx];
|
|
12417
|
-
return /* @__PURE__ */
|
|
12724
|
+
return /* @__PURE__ */ jsx64(
|
|
12418
12725
|
"text",
|
|
12419
12726
|
{
|
|
12420
12727
|
fill: "#999",
|
|
@@ -12426,7 +12733,7 @@ function ScoreTimeline({ mode = null, source = null }) {
|
|
|
12426
12733
|
},
|
|
12427
12734
|
idx
|
|
12428
12735
|
);
|
|
12429
|
-
}) : chartPoints.map((p, idx) => /* @__PURE__ */
|
|
12736
|
+
}) : chartPoints.map((p, idx) => /* @__PURE__ */ jsx64(
|
|
12430
12737
|
"text",
|
|
12431
12738
|
{
|
|
12432
12739
|
fill: "#999",
|
|
@@ -12438,7 +12745,7 @@ function ScoreTimeline({ mode = null, source = null }) {
|
|
|
12438
12745
|
},
|
|
12439
12746
|
idx
|
|
12440
12747
|
)),
|
|
12441
|
-
/* @__PURE__ */
|
|
12748
|
+
/* @__PURE__ */ jsx64(
|
|
12442
12749
|
"polyline",
|
|
12443
12750
|
{
|
|
12444
12751
|
fill: "none",
|
|
@@ -12448,7 +12755,7 @@ function ScoreTimeline({ mode = null, source = null }) {
|
|
|
12448
12755
|
strokeWidth: 2.5
|
|
12449
12756
|
}
|
|
12450
12757
|
),
|
|
12451
|
-
chartPoints.map((p, idx) => /* @__PURE__ */
|
|
12758
|
+
chartPoints.map((p, idx) => /* @__PURE__ */ jsx64(
|
|
12452
12759
|
"circle",
|
|
12453
12760
|
{
|
|
12454
12761
|
cx: p.x,
|
|
@@ -12457,7 +12764,7 @@ function ScoreTimeline({ mode = null, source = null }) {
|
|
|
12457
12764
|
r: 4,
|
|
12458
12765
|
stroke: "#fff",
|
|
12459
12766
|
strokeWidth: 1.5,
|
|
12460
|
-
children: /* @__PURE__ */
|
|
12767
|
+
children: /* @__PURE__ */ jsxs48("title", { children: [
|
|
12461
12768
|
formatDate(p.date),
|
|
12462
12769
|
": ",
|
|
12463
12770
|
Math.round(p.score)
|
|
@@ -12468,7 +12775,7 @@ function ScoreTimeline({ mode = null, source = null }) {
|
|
|
12468
12775
|
]
|
|
12469
12776
|
}
|
|
12470
12777
|
) }),
|
|
12471
|
-
/* @__PURE__ */
|
|
12778
|
+
/* @__PURE__ */ jsxs48(Text48, { muted: true, size: 2, children: [
|
|
12472
12779
|
chartPoints.length,
|
|
12473
12780
|
" data point",
|
|
12474
12781
|
chartPoints.length !== 1 ? "s" : ""
|
|
@@ -12478,13 +12785,13 @@ function ScoreTimeline({ mode = null, source = null }) {
|
|
|
12478
12785
|
var ScoreTimeline_default = ScoreTimeline;
|
|
12479
12786
|
|
|
12480
12787
|
// src/components/Dashboard.tsx
|
|
12481
|
-
import { jsx as
|
|
12788
|
+
import { jsx as jsx65, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
12482
12789
|
var VIEW_PARAM_MAP = {
|
|
12483
12790
|
compare: "compare",
|
|
12484
12791
|
timeline: "timeline"
|
|
12485
12792
|
};
|
|
12486
12793
|
function Dashboard() {
|
|
12487
|
-
return /* @__PURE__ */
|
|
12794
|
+
return /* @__PURE__ */ jsx65(HelpProvider, { children: /* @__PURE__ */ jsx65(JudgmentDrawerProvider, { children: /* @__PURE__ */ jsx65(DashboardShell, {}) }) });
|
|
12488
12795
|
}
|
|
12489
12796
|
function DashboardShell() {
|
|
12490
12797
|
const router = useRouter3();
|
|
@@ -12494,7 +12801,7 @@ function DashboardShell() {
|
|
|
12494
12801
|
useEffect16(() => {
|
|
12495
12802
|
if (!reportId) closeDrawer();
|
|
12496
12803
|
}, [reportId, closeDrawer]);
|
|
12497
|
-
const handleJudgmentDrawerClose =
|
|
12804
|
+
const handleJudgmentDrawerClose = useCallback37(() => {
|
|
12498
12805
|
closeDrawer();
|
|
12499
12806
|
const state = { ...router.state };
|
|
12500
12807
|
if (state.focus) {
|
|
@@ -12502,10 +12809,10 @@ function DashboardShell() {
|
|
|
12502
12809
|
router.navigate(state);
|
|
12503
12810
|
}
|
|
12504
12811
|
}, [closeDrawer, router]);
|
|
12505
|
-
return /* @__PURE__ */
|
|
12506
|
-
/* @__PURE__ */
|
|
12507
|
-
/* @__PURE__ */
|
|
12508
|
-
/* @__PURE__ */
|
|
12812
|
+
return /* @__PURE__ */ jsxs49(Flex37, { style: { height: "100%" }, children: [
|
|
12813
|
+
/* @__PURE__ */ jsx65(Box32, { flex: 1, overflow: "auto", children: /* @__PURE__ */ jsx65(DashboardContent, {}) }),
|
|
12814
|
+
/* @__PURE__ */ jsx65(JudgmentDetailDrawerOutlet, { onClose: handleJudgmentDrawerClose }),
|
|
12815
|
+
/* @__PURE__ */ jsx65(HelpDrawer, {})
|
|
12509
12816
|
] });
|
|
12510
12817
|
}
|
|
12511
12818
|
function DashboardContent() {
|
|
@@ -12516,7 +12823,7 @@ function DashboardContent() {
|
|
|
12516
12823
|
const isDetail = reportId !== null;
|
|
12517
12824
|
const activeTab = isDetail ? "latest" : VIEW_PARAM_MAP[routerState.view ?? ""] ?? "latest";
|
|
12518
12825
|
const defaultTopic = deriveHelpTopic(routerState);
|
|
12519
|
-
const navigateToTab =
|
|
12826
|
+
const navigateToTab = useCallback37(
|
|
12520
12827
|
(tab) => {
|
|
12521
12828
|
if (tab === "latest") {
|
|
12522
12829
|
router.navigate({});
|
|
@@ -12526,13 +12833,13 @@ function DashboardContent() {
|
|
|
12526
12833
|
},
|
|
12527
12834
|
[router]
|
|
12528
12835
|
);
|
|
12529
|
-
const handleSelectReport =
|
|
12836
|
+
const handleSelectReport = useCallback37(
|
|
12530
12837
|
(id) => {
|
|
12531
12838
|
router.navigate({ reportId: id });
|
|
12532
12839
|
},
|
|
12533
12840
|
[router]
|
|
12534
12841
|
);
|
|
12535
|
-
const handleTabChange =
|
|
12842
|
+
const handleTabChange = useCallback37(
|
|
12536
12843
|
(tab, subTab, focus) => {
|
|
12537
12844
|
if (!routerState.reportId) return;
|
|
12538
12845
|
const state = {
|
|
@@ -12545,20 +12852,20 @@ function DashboardContent() {
|
|
|
12545
12852
|
},
|
|
12546
12853
|
[router, routerState.reportId]
|
|
12547
12854
|
);
|
|
12548
|
-
const handleBack =
|
|
12855
|
+
const handleBack = useCallback37(() => {
|
|
12549
12856
|
router.navigate({});
|
|
12550
12857
|
}, [router]);
|
|
12551
|
-
const handleOpenHelp =
|
|
12858
|
+
const handleOpenHelp = useCallback37(() => {
|
|
12552
12859
|
openHelp(defaultTopic);
|
|
12553
12860
|
}, [openHelp, defaultTopic]);
|
|
12554
|
-
return /* @__PURE__ */
|
|
12555
|
-
/* @__PURE__ */
|
|
12556
|
-
/* @__PURE__ */
|
|
12557
|
-
/* @__PURE__ */
|
|
12558
|
-
/* @__PURE__ */
|
|
12861
|
+
return /* @__PURE__ */ jsx65(Container, { width: 4, children: /* @__PURE__ */ jsxs49(Stack39, { padding: 4, space: 4, children: [
|
|
12862
|
+
/* @__PURE__ */ jsxs49(Flex37, { align: "center", gap: 3, children: [
|
|
12863
|
+
/* @__PURE__ */ jsxs49(Stack39, { flex: 1, space: 1, children: [
|
|
12864
|
+
/* @__PURE__ */ jsx65(Text49, { size: 4, weight: "bold", children: "AI Literacy Framework" }),
|
|
12865
|
+
/* @__PURE__ */ jsx65(Text49, { muted: true, size: 2, children: "Evaluation reports and score trends" })
|
|
12559
12866
|
] }),
|
|
12560
|
-
/* @__PURE__ */
|
|
12561
|
-
|
|
12867
|
+
/* @__PURE__ */ jsx65(
|
|
12868
|
+
Button12,
|
|
12562
12869
|
{
|
|
12563
12870
|
icon: HelpCircleIcon8,
|
|
12564
12871
|
mode: "bleed",
|
|
@@ -12568,8 +12875,8 @@ function DashboardContent() {
|
|
|
12568
12875
|
}
|
|
12569
12876
|
)
|
|
12570
12877
|
] }),
|
|
12571
|
-
!isDetail && /* @__PURE__ */
|
|
12572
|
-
/* @__PURE__ */
|
|
12878
|
+
!isDetail && /* @__PURE__ */ jsxs49(TabList3, { space: 1, children: [
|
|
12879
|
+
/* @__PURE__ */ jsx65(
|
|
12573
12880
|
Tab3,
|
|
12574
12881
|
{
|
|
12575
12882
|
"aria-controls": "latest-panel",
|
|
@@ -12579,7 +12886,7 @@ function DashboardContent() {
|
|
|
12579
12886
|
selected: activeTab === "latest"
|
|
12580
12887
|
}
|
|
12581
12888
|
),
|
|
12582
|
-
/* @__PURE__ */
|
|
12889
|
+
/* @__PURE__ */ jsx65(
|
|
12583
12890
|
Tab3,
|
|
12584
12891
|
{
|
|
12585
12892
|
"aria-controls": "timeline-panel",
|
|
@@ -12589,7 +12896,7 @@ function DashboardContent() {
|
|
|
12589
12896
|
selected: activeTab === "timeline"
|
|
12590
12897
|
}
|
|
12591
12898
|
),
|
|
12592
|
-
/* @__PURE__ */
|
|
12899
|
+
/* @__PURE__ */ jsx65(
|
|
12593
12900
|
Tab3,
|
|
12594
12901
|
{
|
|
12595
12902
|
"aria-controls": "compare-panel",
|
|
@@ -12600,10 +12907,10 @@ function DashboardContent() {
|
|
|
12600
12907
|
}
|
|
12601
12908
|
)
|
|
12602
12909
|
] }),
|
|
12603
|
-
!isDetail && activeTab === "latest" && /* @__PURE__ */
|
|
12604
|
-
!isDetail && activeTab === "timeline" && /* @__PURE__ */
|
|
12605
|
-
!isDetail && activeTab === "compare" && /* @__PURE__ */
|
|
12606
|
-
isDetail && reportId && /* @__PURE__ */
|
|
12910
|
+
!isDetail && activeTab === "latest" && /* @__PURE__ */ jsx65(TabPanel3, { "aria-labelledby": "latest-tab", id: "latest-panel", children: /* @__PURE__ */ jsx65(LatestReports, { onSelectReport: handleSelectReport }) }),
|
|
12911
|
+
!isDetail && activeTab === "timeline" && /* @__PURE__ */ jsx65(TabPanel3, { "aria-labelledby": "timeline-tab", id: "timeline-panel", children: /* @__PURE__ */ jsx65(ScoreTimeline_default, {}) }),
|
|
12912
|
+
!isDetail && activeTab === "compare" && /* @__PURE__ */ jsx65(TabPanel3, { "aria-labelledby": "compare-tab", id: "compare-panel", children: /* @__PURE__ */ jsx65(ComparisonView, {}) }),
|
|
12913
|
+
isDetail && reportId && /* @__PURE__ */ jsx65(
|
|
12607
12914
|
ReportDetail,
|
|
12608
12915
|
{
|
|
12609
12916
|
activeTab: routerState.tab ?? null,
|
|
@@ -12639,7 +12946,7 @@ function ailfTool(options = {}) {
|
|
|
12639
12946
|
// src/actions/RunEvaluationAction.tsx
|
|
12640
12947
|
import { BarChartIcon as BarChartIcon2 } from "@sanity/icons";
|
|
12641
12948
|
import { useToast as useToast10 } from "@sanity/ui";
|
|
12642
|
-
import { useCallback as
|
|
12949
|
+
import { useCallback as useCallback38, useEffect as useEffect17, useRef as useRef9, useState as useState29 } from "react";
|
|
12643
12950
|
import {
|
|
12644
12951
|
getReleaseIdFromReleaseDocumentId as getReleaseIdFromReleaseDocumentId3,
|
|
12645
12952
|
useClient as useClient12,
|
|
@@ -12670,7 +12977,7 @@ function createRunEvaluationAction(options = {}) {
|
|
|
12670
12977
|
const projectId = useProjectId2();
|
|
12671
12978
|
const currentUser = useCurrentUser4();
|
|
12672
12979
|
const toast = useToast10();
|
|
12673
|
-
const [state, setState] =
|
|
12980
|
+
const [state, setState] = useState29({ status: "loading" });
|
|
12674
12981
|
const requestedAtRef = useRef9(null);
|
|
12675
12982
|
const perspectiveId = getReleaseIdFromReleaseDocumentId3(release._id);
|
|
12676
12983
|
useEffect17(() => {
|
|
@@ -12766,7 +13073,7 @@ function createRunEvaluationAction(options = {}) {
|
|
|
12766
13073
|
}, 15e3);
|
|
12767
13074
|
return () => clearTimeout(timer);
|
|
12768
13075
|
}, [client, perspectiveId, state]);
|
|
12769
|
-
const handleRequest =
|
|
13076
|
+
const handleRequest = useCallback38(async () => {
|
|
12770
13077
|
const releaseTitle = release.metadata?.title ?? perspectiveId ?? "release";
|
|
12771
13078
|
const tag = `release-${slugify3(releaseTitle)}-${dateStamp3()}`;
|
|
12772
13079
|
const now = Date.now();
|