@sanity/ailf-studio 1.2.1 → 1.3.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.js CHANGED
@@ -9,6 +9,8 @@ import { useClient, useCurrentUser } from "sanity";
9
9
 
10
10
  // src/lib/constants.ts
11
11
  var API_VERSION = "2026-03-11";
12
+ var isProduction = process.env.NODE_ENV === "production";
13
+ var ARTIFACT_API_BASE_URL = isProduction ? "https://ailf-api.sanity.build/v1" : "http://localhost:4100/v1";
12
14
 
13
15
  // src/actions/GraduateToNativeAction.tsx
14
16
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -721,6 +723,22 @@ function documentRefSchema() {
721
723
  type: "object"
722
724
  };
723
725
  }
726
+ function artifactRefSchema() {
727
+ return {
728
+ fields: [
729
+ defineField4({ name: "store", title: "Store", type: "string" }),
730
+ defineField4({ name: "bucket", title: "Bucket", type: "string" }),
731
+ defineField4({ name: "path", title: "Path", type: "string" }),
732
+ defineField4({ name: "bytes", title: "Size (bytes)", type: "number" }),
733
+ defineField4({
734
+ name: "entryCount",
735
+ title: "Entry Count",
736
+ type: "number"
737
+ })
738
+ ],
739
+ type: "object"
740
+ };
741
+ }
724
742
  var reportSchema = defineType4({
725
743
  groups: [
726
744
  { name: "main", title: "Main", default: true },
@@ -1321,6 +1339,12 @@ var reportSchema = defineType4({
1321
1339
  title: "Model ID",
1322
1340
  type: "string"
1323
1341
  }),
1342
+ defineField4({
1343
+ description: "True when the model failed to produce output (empty response, API error, or refusal) rather than producing incorrect output.",
1344
+ name: "outputFailure",
1345
+ title: "Output Failure",
1346
+ type: "boolean"
1347
+ }),
1324
1348
  defineField4({
1325
1349
  description: "Documentation pages the task expected the model to use.",
1326
1350
  name: "canonicalDocs",
@@ -1335,6 +1359,128 @@ var reportSchema = defineType4({
1335
1359
  title: "Low-Scoring Judgments",
1336
1360
  type: "array"
1337
1361
  }),
1362
+ defineField4({
1363
+ description: "Per-test results with model output, grader reasoning, and metadata. One entry per test \xD7 model combination. See D0029.",
1364
+ name: "testResults",
1365
+ of: [
1366
+ {
1367
+ fields: [
1368
+ defineField4({
1369
+ name: "taskId",
1370
+ title: "Task",
1371
+ type: "string"
1372
+ }),
1373
+ defineField4({
1374
+ name: "modelId",
1375
+ title: "Model ID",
1376
+ type: "string"
1377
+ }),
1378
+ defineField4({
1379
+ name: "area",
1380
+ title: "Feature Area",
1381
+ type: "string"
1382
+ }),
1383
+ defineField4({
1384
+ name: "variant",
1385
+ options: { list: ["gold", "baseline"] },
1386
+ title: "Variant",
1387
+ type: "string"
1388
+ }),
1389
+ defineField4({
1390
+ name: "dimensions",
1391
+ of: [
1392
+ {
1393
+ fields: [
1394
+ defineField4({
1395
+ name: "dimension",
1396
+ title: "Dimension",
1397
+ type: "string"
1398
+ }),
1399
+ defineField4({
1400
+ name: "score",
1401
+ title: "Score (0\u2013100)",
1402
+ type: "number"
1403
+ }),
1404
+ defineField4({
1405
+ name: "reason",
1406
+ title: "Reason",
1407
+ type: "text"
1408
+ })
1409
+ ],
1410
+ type: "object"
1411
+ }
1412
+ ],
1413
+ title: "Dimensions",
1414
+ type: "array"
1415
+ }),
1416
+ defineField4({
1417
+ name: "compositeScore",
1418
+ title: "Composite Score",
1419
+ type: "number"
1420
+ }),
1421
+ defineField4({
1422
+ description: "The model's generated code/response (truncated to 8000 chars).",
1423
+ name: "responseOutput",
1424
+ title: "Response Output",
1425
+ type: "text"
1426
+ }),
1427
+ defineField4({
1428
+ name: "responseOutputTruncated",
1429
+ title: "Truncated",
1430
+ type: "boolean"
1431
+ }),
1432
+ defineField4({
1433
+ name: "latencyMs",
1434
+ title: "Latency (ms)",
1435
+ type: "number"
1436
+ }),
1437
+ defineField4({
1438
+ name: "tokenUsage",
1439
+ fields: [
1440
+ defineField4({
1441
+ name: "prompt",
1442
+ title: "Prompt",
1443
+ type: "number"
1444
+ }),
1445
+ defineField4({
1446
+ name: "completion",
1447
+ title: "Completion",
1448
+ type: "number"
1449
+ }),
1450
+ defineField4({
1451
+ name: "total",
1452
+ title: "Total",
1453
+ type: "number"
1454
+ })
1455
+ ],
1456
+ title: "Token Usage",
1457
+ type: "object"
1458
+ }),
1459
+ defineField4({
1460
+ name: "cost",
1461
+ title: "Cost",
1462
+ type: "number"
1463
+ }),
1464
+ defineField4({
1465
+ description: "True when the model failed to produce output (empty response, API error, or refusal).",
1466
+ name: "outputFailure",
1467
+ title: "Output Failure",
1468
+ type: "boolean"
1469
+ }),
1470
+ defineField4({
1471
+ description: "Documentation pages the task expected the model to use.",
1472
+ name: "canonicalDocs",
1473
+ of: [documentRefSchema()],
1474
+ title: "Canonical Docs",
1475
+ type: "array"
1476
+ })
1477
+ ],
1478
+ type: "object"
1479
+ }
1480
+ ],
1481
+ title: "Test Results",
1482
+ type: "array"
1483
+ }),
1338
1484
  defineField4({
1339
1485
  name: "perModel",
1340
1486
  of: [
@@ -1513,6 +1659,34 @@ var reportSchema = defineType4({
1513
1659
  ],
1514
1660
  title: "Agent Behavior",
1515
1661
  type: "array"
1662
+ }),
1663
+ defineField4({
1664
+ description: "External artifact references \u2014 points to large data in GCS that was too big for inline storage (D0030).",
1665
+ fields: [
1666
+ defineField4({
1667
+ ...artifactRefSchema(),
1668
+ name: "testOutputs",
1669
+ title: "Test Outputs"
1670
+ }),
1671
+ defineField4({
1672
+ ...artifactRefSchema(),
1673
+ name: "renderedPrompts",
1674
+ title: "Rendered Prompts"
1675
+ }),
1676
+ defineField4({
1677
+ ...artifactRefSchema(),
1678
+ name: "rawResults",
1679
+ title: "Raw Results"
1680
+ }),
1681
+ defineField4({
1682
+ ...artifactRefSchema(),
1683
+ name: "traces",
1684
+ title: "Traces"
1685
+ })
1686
+ ],
1687
+ name: "artifacts",
1688
+ title: "Artifacts",
1689
+ type: "object"
1516
1690
  })
1517
1691
  ],
1518
1692
  group: ["main", "all-fields"],
@@ -3083,7 +3257,7 @@ import {
3083
3257
  TabPanel as TabPanel2,
3084
3258
  Text as Text41
3085
3259
  } from "@sanity/ui";
3086
- import { useCallback as useCallback27 } from "react";
3260
+ import { useCallback as useCallback28 } from "react";
3087
3261
  import { useRouter as useRouter3 } from "sanity/router";
3088
3262
 
3089
3263
  // src/lib/help-context.ts
@@ -3746,7 +3920,18 @@ var reportDetailQuery = (
3746
3920
  title,
3747
3921
  provenance,
3748
3922
  summary,
3749
- comparison
3923
+ "comparison": comparison {
3924
+ areas,
3925
+ deltas,
3926
+ generatedAt,
3927
+ improved,
3928
+ mismatched,
3929
+ noiseThreshold,
3930
+ noiseThresholdEmpirical,
3931
+ notEvaluated,
3932
+ regressed,
3933
+ unchanged
3934
+ }
3750
3935
  }
3751
3936
  `
3752
3937
  );
@@ -5696,24 +5881,93 @@ function LatestReports({
5696
5881
  import { ArrowLeftIcon as ArrowLeftIcon3 } from "@sanity/icons";
5697
5882
  import {
5698
5883
  Badge as Badge7,
5699
- Box as Box22,
5884
+ Box as Box21,
5700
5885
  Button as Button8,
5701
- Flex as Flex26,
5702
- Stack as Stack28,
5886
+ Flex as Flex25,
5887
+ Stack as Stack27,
5703
5888
  Tab,
5704
5889
  TabList,
5705
5890
  TabPanel,
5706
- Text as Text34,
5891
+ Text as Text33,
5707
5892
  Tooltip as Tooltip8
5708
5893
  } from "@sanity/ui";
5709
5894
  import {
5710
- useCallback as useCallback25,
5895
+ useCallback as useCallback26,
5711
5896
  useEffect as useEffect9,
5712
5897
  useMemo as useMemo9,
5713
- useState as useState19
5898
+ useState as useState20
5714
5899
  } from "react";
5715
5900
  import { useClient as useClient10 } from "sanity";
5716
5901
 
5902
+ // src/lib/useArtifactCache.ts
5903
+ import { useCallback as useCallback14, useRef as useRef5, useState as useState10 } from "react";
5904
+ function useArtifactCache(reportId, artifactRef, client) {
5905
+ const cacheRef = useRef5(/* @__PURE__ */ new Map());
5906
+ const [status, setStatus] = useState10("idle");
5907
+ const [error, setError] = useState10(null);
5908
+ const fetchingRef = useRef5(false);
5909
+ const fetchArtifacts = useCallback14(async () => {
5910
+ if (fetchingRef.current || cacheRef.current.size > 0) return;
5911
+ if (!artifactRef) return;
5912
+ fetchingRef.current = true;
5913
+ setStatus("loading");
5914
+ setError(null);
5915
+ try {
5916
+ const token = client.config().token;
5917
+ const signingRes = await fetch(
5918
+ `${ARTIFACT_API_BASE_URL}/artifacts/${encodeURIComponent(reportId)}?type=testOutputs`,
5919
+ {
5920
+ credentials: "omit",
5921
+ headers: {
5922
+ Accept: "application/json",
5923
+ ...token ? { Authorization: `Bearer ${token}` } : {}
5924
+ }
5925
+ }
5926
+ );
5927
+ if (!signingRes.ok) {
5928
+ const body = await signingRes.text().catch(() => "");
5929
+ throw new Error(
5930
+ `Artifact signing failed: ${signingRes.status} ${signingRes.statusText}${body ? ` \u2014 ${body.slice(0, 200)}` : ""}`
5931
+ );
5932
+ }
5933
+ const envelope = await signingRes.json();
5934
+ if (!envelope.ok || !envelope.data?.url) {
5935
+ throw new Error(
5936
+ envelope.error ?? "Invalid signing response \u2014 missing signed URL"
5937
+ );
5938
+ }
5939
+ const artifactRes = await fetch(envelope.data.url, {
5940
+ credentials: "omit"
5941
+ });
5942
+ if (!artifactRes.ok) {
5943
+ throw new Error(
5944
+ `GCS artifact fetch failed: ${artifactRes.status} ${artifactRes.statusText}`
5945
+ );
5946
+ }
5947
+ const artifact = await artifactRes.json();
5948
+ const map = /* @__PURE__ */ new Map();
5949
+ for (const [key, entry] of Object.entries(artifact.entries)) {
5950
+ map.set(key, entry);
5951
+ }
5952
+ cacheRef.current = map;
5953
+ setStatus("ready");
5954
+ } catch (err) {
5955
+ const message = err instanceof Error ? err.message : String(err);
5956
+ setError(message);
5957
+ setStatus("error");
5958
+ } finally {
5959
+ fetchingRef.current = false;
5960
+ }
5961
+ }, [reportId, artifactRef, client]);
5962
+ const getOutput = useCallback14(
5963
+ (taskId, modelId) => {
5964
+ return cacheRef.current.get(`${taskId}::${modelId}`) ?? null;
5965
+ },
5966
+ []
5967
+ );
5968
+ return { status, error, getOutput, fetchArtifacts };
5969
+ }
5970
+
5717
5971
  // src/lib/thresholds.ts
5718
5972
  var SCORE_POSITIVE = 80;
5719
5973
  var SCORE_CAUTION = 70;
@@ -5755,7 +6009,7 @@ function negativeDocLiftSentiment(count) {
5755
6009
  }
5756
6010
 
5757
6011
  // src/components/report-detail/AgentActivitySection.tsx
5758
- import { useMemo as useMemo5, useState as useState10 } from "react";
6012
+ import { useMemo as useMemo5, useState as useState11 } from "react";
5759
6013
  import { HelpCircleIcon as HelpCircleIcon6, SearchIcon as SearchIcon4 } from "@sanity/icons";
5760
6014
  import {
5761
6015
  Badge as Badge5,
@@ -5930,7 +6184,7 @@ function FeatureActivityCard({
5930
6184
  ] }) });
5931
6185
  }
5932
6186
  function SearchQueryList({ queries }) {
5933
- const [filter, setFilter] = useState10("");
6187
+ const [filter, setFilter] = useState11("");
5934
6188
  const filtered = useMemo5(() => {
5935
6189
  if (!filter) return queries;
5936
6190
  const lower = filter.toLowerCase();
@@ -6185,15 +6439,7 @@ function DiagnosticsOverview({
6185
6439
  value: Math.round(overall.avgDocLift)
6186
6440
  }
6187
6441
  ) }),
6188
- showDocMetrics ? /* @__PURE__ */ jsx25(HoverTip, { display: "block", text: GLOSSARY.floor, children: /* @__PURE__ */ jsx25(
6189
- ScoreCard,
6190
- {
6191
- label: "FLOOR",
6192
- sentiment: scoreSentiment(overall.avgFloorScore ?? 0),
6193
- subtitle: "Without docs baseline",
6194
- value: Math.round(overall.avgFloorScore ?? 0)
6195
- }
6196
- ) }) : /* @__PURE__ */ jsx25(HoverTip, { display: "block", text: GLOSSARY.tests, children: /* @__PURE__ */ jsx25(
6442
+ /* @__PURE__ */ jsx25(HoverTip, { display: "block", text: GLOSSARY.tests, children: /* @__PURE__ */ jsx25(
6197
6443
  ScoreCard,
6198
6444
  {
6199
6445
  label: "TESTS",
@@ -6210,7 +6456,7 @@ function DiagnosticsOverview({
6210
6456
  style: {
6211
6457
  display: "grid",
6212
6458
  gap: 12,
6213
- gridTemplateColumns: showDocMetrics ? "repeat(3, 1fr)" : "repeat(2, 1fr)"
6459
+ gridTemplateColumns: showDocMetrics ? "repeat(2, 1fr)" : "1fr"
6214
6460
  },
6215
6461
  children: [
6216
6462
  showDocMetrics && /* @__PURE__ */ jsx25(HoverTip, { display: "block", text: GLOSSARY.negativeDocLiftMetric, children: /* @__PURE__ */ jsx25(
@@ -6221,7 +6467,6 @@ function DiagnosticsOverview({
6221
6467
  value: `${negativeDocLiftCount} area${negativeDocLiftCount === 1 ? "" : "s"}`
6222
6468
  }
6223
6469
  ) }),
6224
- showDocMetrics && /* @__PURE__ */ jsx25(HoverTip, { display: "block", text: GLOSSARY.tests, children: /* @__PURE__ */ jsx25(MetricCard, { label: "Tests", value: String(totalTests ?? 0) }) }),
6225
6470
  durationMs != null && durationMs > 0 ? /* @__PURE__ */ jsx25(
6226
6471
  HoverTip,
6227
6472
  {
@@ -6585,7 +6830,7 @@ function Pill({
6585
6830
  // src/components/report-detail/LineageCard.tsx
6586
6831
  import { LinkIcon as LinkIcon2 } from "@sanity/icons";
6587
6832
  import { Badge as Badge6, Card as Card13, Flex as Flex15, Stack as Stack19, Text as Text24 } from "@sanity/ui";
6588
- import { useCallback as useCallback14, useEffect as useEffect7, useState as useState11 } from "react";
6833
+ import { useCallback as useCallback15, useEffect as useEffect7, useState as useState12 } from "react";
6589
6834
  import { useClient as useClient5 } from "sanity";
6590
6835
  import { useRouter as useRouter2 } from "sanity/router";
6591
6836
  import { jsx as jsx26, jsxs as jsxs22 } from "react/jsx-runtime";
@@ -6605,7 +6850,7 @@ function LineageCard({ provenance, reportId }) {
6605
6850
  const { lineage } = provenance;
6606
6851
  const router = useRouter2();
6607
6852
  const client = useClient5({ apiVersion: API_VERSION });
6608
- const [spawned, setSpawned] = useState11([]);
6853
+ const [spawned, setSpawned] = useState12([]);
6609
6854
  useEffect7(() => {
6610
6855
  let cancelled = false;
6611
6856
  client.fetch(SPAWNED_REPORTS_QUERY, {
@@ -6653,7 +6898,7 @@ function LineageLink({
6653
6898
  reportId,
6654
6899
  router
6655
6900
  }) {
6656
- const handleClick = useCallback14(() => {
6901
+ const handleClick = useCallback15(() => {
6657
6902
  router.navigate({ reportId });
6658
6903
  }, [reportId, router]);
6659
6904
  return /* @__PURE__ */ jsxs22(Flex15, { align: "center", gap: 2, children: [
@@ -6682,7 +6927,7 @@ function SpawnedReportRow({
6682
6927
  report,
6683
6928
  router
6684
6929
  }) {
6685
- const handleClick = useCallback14(() => {
6930
+ const handleClick = useCallback15(() => {
6686
6931
  router.navigate({ reportId: report.reportId });
6687
6932
  }, [report.reportId, router]);
6688
6933
  const dateLabel = formatShortDate(report.completedAt);
@@ -6717,7 +6962,7 @@ function formatShortDate(iso) {
6717
6962
  }
6718
6963
 
6719
6964
  // src/components/report-detail/JudgmentList.tsx
6720
- import { useCallback as useCallback15, useEffect as useEffect8, useRef as useRef5, useState as useState12 } from "react";
6965
+ import React2, { useCallback as useCallback16, useEffect as useEffect8, useRef as useRef6, useState as useState13 } from "react";
6721
6966
  import { CopyIcon, ErrorOutlineIcon as ErrorOutlineIcon2, HelpCircleIcon as HelpCircleIcon7 } from "@sanity/icons";
6722
6967
  import { Box as Box16, Button as Button3, Flex as Flex16, Stack as Stack20, Text as Text25, Tooltip as Tooltip7, useToast as useToast2 } from "@sanity/ui";
6723
6968
 
@@ -6751,6 +6996,13 @@ function judgmentSlug(j) {
6751
6996
  const slugify4 = (s) => s.toLowerCase().replace(/[()]/g, "").replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
6752
6997
  return `${slugify4(area)}--${slugify4(task)}--${slugify4(j.dimension)}--${slugify4(j.modelId)}`;
6753
6998
  }
6999
+ function isOutputFailure(j) {
7000
+ if (j.outputFailure) return true;
7001
+ return j.score === 0 && j.taskId.includes("(baseline)");
7002
+ }
7003
+ function pruneNoise(judgments) {
7004
+ return judgments.filter((j) => !isOutputFailure(j));
7005
+ }
6754
7006
  function groupByArea(judgments) {
6755
7007
  const byArea = /* @__PURE__ */ new Map();
6756
7008
  for (const j of judgments) {
@@ -6759,18 +7011,36 @@ function groupByArea(judgments) {
6759
7011
  if (!byArea.has(area)) byArea.set(area, []);
6760
7012
  byArea.get(area).push(j);
6761
7013
  }
6762
- return [...byArea.entries()].sort(([a], [b]) => a.localeCompare(b)).map(([area, js]) => [area, js.sort((a, b) => a.score - b.score)]);
7014
+ return [...byArea.entries()].sort(([a], [b]) => a.localeCompare(b)).map(([area, js]) => [area, js.sort((a, b) => b.score - a.score)]);
6763
7015
  }
6764
7016
  function dimensionLabel2(dim) {
6765
7017
  return dim.split("-").map((w) => w.charAt(0).toUpperCase() + w.slice(1)).join(" ");
6766
7018
  }
7019
+ function testResultKey(taskId, dimension, modelId) {
7020
+ return `${taskId}::${dimension}::${modelId}`;
7021
+ }
6767
7022
  function JudgmentList({
7023
+ artifactCache,
6768
7024
  focus,
6769
7025
  judgments,
6770
- onFocusChange
7026
+ onFocusChange,
7027
+ testResults
6771
7028
  }) {
6772
7029
  if (judgments.length === 0) return null;
6773
- const grouped = groupByArea(judgments);
7030
+ const pruned = pruneNoise(judgments);
7031
+ if (pruned.length === 0) return null;
7032
+ const testResultMap = React2.useMemo(() => {
7033
+ const map = /* @__PURE__ */ new Map();
7034
+ if (!testResults) return map;
7035
+ for (const tr of testResults) {
7036
+ for (const dim of tr.dimensions) {
7037
+ map.set(testResultKey(tr.taskId, dim.dimension, tr.modelId), tr);
7038
+ }
7039
+ }
7040
+ return map;
7041
+ }, [testResults]);
7042
+ const outputFailureCount = judgments.length - pruned.length;
7043
+ const grouped = groupByArea(pruned);
6774
7044
  return /* @__PURE__ */ jsxs23(Stack20, { space: 3, children: [
6775
7045
  /* @__PURE__ */ jsxs23(Flex16, { align: "center", gap: 2, children: [
6776
7046
  /* @__PURE__ */ jsx28(ErrorOutlineIcon2, { style: { color: "#f87171" } }),
@@ -6797,10 +7067,42 @@ function JudgmentList({
6797
7067
  padding: "2px 10px"
6798
7068
  },
6799
7069
  children: [
6800
- judgments.length,
7070
+ pruned.length,
6801
7071
  " below 70"
6802
7072
  ]
6803
7073
  }
7074
+ ),
7075
+ outputFailureCount > 0 && /* @__PURE__ */ jsx28(
7076
+ Tooltip7,
7077
+ {
7078
+ content: /* @__PURE__ */ jsx28(Box16, { padding: 2, style: { maxWidth: 280 }, children: /* @__PURE__ */ jsxs23(Text25, { size: 2, children: [
7079
+ outputFailureCount,
7080
+ " judgment",
7081
+ outputFailureCount === 1 ? "" : "s",
7082
+ " hidden where the model failed to produce output (empty response, API error, or token exhaustion). These are infrastructure issues, not content quality problems."
7083
+ ] }) }),
7084
+ placement: "bottom",
7085
+ portal: true,
7086
+ children: /* @__PURE__ */ jsxs23(
7087
+ "span",
7088
+ {
7089
+ style: {
7090
+ backgroundColor: "var(--card-muted-bg-color, rgba(255,255,255,0.06))",
7091
+ borderRadius: 999,
7092
+ color: "var(--card-muted-fg-color)",
7093
+ fontSize: 13,
7094
+ fontWeight: 500,
7095
+ padding: "2px 10px"
7096
+ },
7097
+ children: [
7098
+ outputFailureCount,
7099
+ " output failure",
7100
+ outputFailureCount === 1 ? "" : "s",
7101
+ " hidden"
7102
+ ]
7103
+ }
7104
+ )
7105
+ }
6804
7106
  )
6805
7107
  ] }),
6806
7108
  /* @__PURE__ */ jsx28(Box16, { style: neutralCardStyle, children: grouped.map(([area, areaJudgments], groupIndex) => /* @__PURE__ */ jsx28(
@@ -6829,13 +7131,18 @@ function JudgmentList({
6829
7131
  ] }),
6830
7132
  /* @__PURE__ */ jsx28(Stack20, { space: 2, children: areaJudgments.map((j) => {
6831
7133
  const slug = judgmentSlug(j);
7134
+ const matchedResult = testResultMap.get(
7135
+ testResultKey(j.taskId, j.dimension, j.modelId)
7136
+ );
6832
7137
  return /* @__PURE__ */ jsx28(
6833
7138
  JudgmentCard,
6834
7139
  {
7140
+ artifactCache,
6835
7141
  focused: slug === focus,
6836
7142
  judgment: j,
6837
7143
  onFocusChange,
6838
- slug
7144
+ slug,
7145
+ testResult: matchedResult
6839
7146
  },
6840
7147
  slug
6841
7148
  );
@@ -6847,17 +7154,29 @@ function JudgmentList({
6847
7154
  ] });
6848
7155
  }
6849
7156
  function JudgmentCard({
7157
+ artifactCache,
6850
7158
  focused,
6851
7159
  judgment,
6852
7160
  onFocusChange,
6853
- slug
7161
+ slug,
7162
+ testResult
6854
7163
  }) {
6855
- const [expanded, setExpanded] = useState12(focused);
6856
- const cardRef = useRef5(null);
7164
+ const [expanded, setExpanded] = useState13(focused);
7165
+ const [outputExpanded, setOutputExpanded] = useState13(false);
7166
+ const cardRef = useRef6(null);
6857
7167
  const toast = useToast2();
6858
7168
  const dimLabel = dimensionLabel2(judgment.dimension);
6859
7169
  const sep = judgment.taskId.indexOf(" - ");
6860
7170
  const taskName = sep > 0 ? judgment.taskId.substring(sep + 3) : judgment.taskId;
7171
+ const inlineOutput = testResult?.responseOutput;
7172
+ const artifactEntry = artifactCache?.getOutput(
7173
+ judgment.taskId,
7174
+ judgment.modelId
7175
+ );
7176
+ const resolvedOutput = inlineOutput ?? artifactEntry?.responseOutput ?? null;
7177
+ const resolvedTruncated = testResult?.responseOutputTruncated ?? artifactEntry?.responseOutputTruncated ?? false;
7178
+ const canFetchArtifact = !inlineOutput && !artifactEntry && artifactCache != null && artifactCache.status !== "ready";
7179
+ const hasOutputOrCanFetch = resolvedOutput != null || canFetchArtifact;
6861
7180
  useEffect8(() => {
6862
7181
  if (focused) {
6863
7182
  setExpanded(true);
@@ -6867,10 +7186,10 @@ function JudgmentCard({
6867
7186
  return () => clearTimeout(timer);
6868
7187
  }
6869
7188
  }, []);
6870
- const handleToggle = useCallback15(() => {
7189
+ const handleToggle = useCallback16(() => {
6871
7190
  setExpanded((prev) => !prev);
6872
7191
  }, []);
6873
- const handleCopyLink = useCallback15(
7192
+ const handleCopyLink = useCallback16(
6874
7193
  (e) => {
6875
7194
  e.stopPropagation();
6876
7195
  onFocusChange?.(slug);
@@ -6894,6 +7213,39 @@ function JudgmentCard({
6894
7213
  },
6895
7214
  [toast]
6896
7215
  );
7216
+ const handleCopyOutput = useCallback16(
7217
+ (e) => {
7218
+ e.stopPropagation();
7219
+ if (!resolvedOutput) return;
7220
+ navigator.clipboard.writeText(resolvedOutput).then(
7221
+ () => {
7222
+ toast.push({
7223
+ closable: true,
7224
+ status: "success",
7225
+ title: "Model output copied to clipboard"
7226
+ });
7227
+ },
7228
+ () => {
7229
+ toast.push({
7230
+ closable: true,
7231
+ status: "error",
7232
+ title: "Failed to copy output"
7233
+ });
7234
+ }
7235
+ );
7236
+ },
7237
+ [resolvedOutput, toast]
7238
+ );
7239
+ const handleToggleOutput = useCallback16(
7240
+ (e) => {
7241
+ e.stopPropagation();
7242
+ if (!outputExpanded && !resolvedOutput && artifactCache) {
7243
+ artifactCache.fetchArtifacts();
7244
+ }
7245
+ setOutputExpanded((prev) => !prev);
7246
+ },
7247
+ [outputExpanded, resolvedOutput, artifactCache]
7248
+ );
6897
7249
  return /* @__PURE__ */ jsx28(
6898
7250
  Box16,
6899
7251
  {
@@ -6974,22 +7326,115 @@ function JudgmentCard({
6974
7326
  )
6975
7327
  }
6976
7328
  ),
7329
+ hasOutputOrCanFetch && /* @__PURE__ */ jsxs23(Box16, { children: [
7330
+ /* @__PURE__ */ jsxs23(Flex16, { align: "center", gap: 2, children: [
7331
+ /* @__PURE__ */ jsxs23(
7332
+ "button",
7333
+ {
7334
+ onClick: handleToggleOutput,
7335
+ style: {
7336
+ alignItems: "center",
7337
+ background: "none",
7338
+ border: "none",
7339
+ color: "var(--card-muted-fg-color)",
7340
+ cursor: "pointer",
7341
+ display: "flex",
7342
+ fontSize: 13,
7343
+ gap: 4,
7344
+ padding: 0
7345
+ },
7346
+ children: [
7347
+ /* @__PURE__ */ jsx28("span", { children: outputExpanded ? "\u25BE" : "\u25B8" }),
7348
+ /* @__PURE__ */ jsx28("span", { style: { fontWeight: 500 }, children: "Model Output" })
7349
+ ]
7350
+ }
7351
+ ),
7352
+ resolvedTruncated && /* @__PURE__ */ jsx28(
7353
+ "span",
7354
+ {
7355
+ style: {
7356
+ backgroundColor: "rgba(251,191,36,0.15)",
7357
+ borderRadius: 4,
7358
+ color: "#fbbf24",
7359
+ fontSize: 11,
7360
+ padding: "1px 6px"
7361
+ },
7362
+ children: "truncated"
7363
+ }
7364
+ ),
7365
+ testResult?.latencyMs != null && /* @__PURE__ */ jsxs23(Text25, { muted: true, size: 0, children: [
7366
+ (testResult.latencyMs / 1e3).toFixed(1),
7367
+ "s"
7368
+ ] }),
7369
+ testResult?.cost != null && testResult.cost > 0 && /* @__PURE__ */ jsxs23(Text25, { muted: true, size: 0, children: [
7370
+ "$",
7371
+ testResult.cost.toFixed(4)
7372
+ ] })
7373
+ ] }),
7374
+ outputExpanded && /* @__PURE__ */ jsxs23(
7375
+ Box16,
7376
+ {
7377
+ marginTop: 2,
7378
+ style: {
7379
+ backgroundColor: "var(--card-muted-bg-color, rgba(255,255,255,0.04))",
7380
+ borderRadius: 4,
7381
+ maxHeight: 400,
7382
+ overflowY: "auto",
7383
+ padding: 12
7384
+ },
7385
+ children: [
7386
+ !resolvedOutput && artifactCache?.status === "loading" && /* @__PURE__ */ jsx28(Text25, { muted: true, size: 1, children: "Fetching model output\u2026" }),
7387
+ !resolvedOutput && artifactCache?.status === "error" && /* @__PURE__ */ jsxs23(Text25, { muted: true, size: 1, style: { color: "#f87171" }, children: [
7388
+ "Failed to load model output",
7389
+ artifactCache.error ? `: ${artifactCache.error}` : ""
7390
+ ] }),
7391
+ resolvedOutput && /* @__PURE__ */ jsx28(
7392
+ "pre",
7393
+ {
7394
+ style: {
7395
+ fontFamily: "var(--font-code-family, 'SF Mono', 'Fira Code', monospace)",
7396
+ fontSize: 13,
7397
+ lineHeight: 1.5,
7398
+ margin: 0,
7399
+ whiteSpace: "pre-wrap",
7400
+ wordBreak: "break-word"
7401
+ },
7402
+ children: resolvedOutput
7403
+ }
7404
+ )
7405
+ ]
7406
+ }
7407
+ )
7408
+ ] }),
6977
7409
  /* @__PURE__ */ jsxs23(Flex16, { align: "center", gap: 2, wrap: "wrap", children: [
6978
7410
  judgment.canonicalDocs && judgment.canonicalDocs.length > 0 && /* @__PURE__ */ jsxs23(Fragment9, { children: [
6979
7411
  /* @__PURE__ */ jsx28(Text25, { muted: true, size: 1, children: "Docs:" }),
6980
7412
  judgment.canonicalDocs.map((doc) => /* @__PURE__ */ jsx28(DocBadge, { doc }, doc.slug))
6981
7413
  ] }),
6982
- /* @__PURE__ */ jsx28("span", { style: { marginLeft: "auto" }, children: /* @__PURE__ */ jsx28(
6983
- Button3,
6984
- {
6985
- fontSize: 1,
6986
- icon: CopyIcon,
6987
- mode: "ghost",
6988
- onClick: handleCopyLink,
6989
- padding: 2,
6990
- text: "Copy Link"
6991
- }
6992
- ) })
7414
+ /* @__PURE__ */ jsxs23("span", { style: { display: "flex", gap: 4, marginLeft: "auto" }, children: [
7415
+ resolvedOutput && /* @__PURE__ */ jsx28(
7416
+ Button3,
7417
+ {
7418
+ fontSize: 1,
7419
+ icon: CopyIcon,
7420
+ mode: "ghost",
7421
+ onClick: handleCopyOutput,
7422
+ padding: 2,
7423
+ text: "Copy Output"
7424
+ }
7425
+ ),
7426
+ /* @__PURE__ */ jsx28(
7427
+ Button3,
7428
+ {
7429
+ fontSize: 1,
7430
+ icon: CopyIcon,
7431
+ mode: "ghost",
7432
+ onClick: handleCopyLink,
7433
+ padding: 2,
7434
+ text: "Copy Link"
7435
+ }
7436
+ )
7437
+ ] })
6993
7438
  ] })
6994
7439
  ] })
6995
7440
  ] })
@@ -6999,7 +7444,7 @@ function JudgmentCard({
6999
7444
  function DocBadge({
7000
7445
  doc
7001
7446
  }) {
7002
- const [hovered, setHovered] = useState12(false);
7447
+ const [hovered, setHovered] = useState13(false);
7003
7448
  const isLinked = Boolean(doc.documentId);
7004
7449
  const tooltipLabel = isLinked ? `Edit "${doc.title || doc.slug}"` : doc.title || doc.slug;
7005
7450
  const badge = /* @__PURE__ */ jsx28(
@@ -7151,232 +7596,34 @@ function PromptfooUnavailable({ reason }) {
7151
7596
  ] });
7152
7597
  }
7153
7598
 
7154
- // src/components/report-detail/RecommendationsSection.tsx
7155
- import { BoltIcon } from "@sanity/icons";
7156
- import { Box as Box17, Flex as Flex18, Stack as Stack22, Text as Text27 } from "@sanity/ui";
7157
- import { jsx as jsx30, jsxs as jsxs25 } from "react/jsx-runtime";
7158
- function tableTier(width) {
7159
- if (width >= 800) return "full";
7160
- if (width >= 600) return "compact";
7161
- return "narrow";
7162
- }
7163
- var GRID2 = {
7164
- full: "1fr 1fr 2fr 72px 90px",
7165
- compact: "1fr 1fr 2fr 90px",
7166
- narrow: "1fr 1fr"
7167
- };
7168
- function RecommendationsSection({
7169
- recommendations
7170
- }) {
7171
- const { ref, width } = useContainerWidth();
7172
- const tier = tableTier(width);
7173
- if (recommendations.gaps.length === 0) return null;
7174
- return /* @__PURE__ */ jsxs25(Stack22, { space: 3, children: [
7175
- /* @__PURE__ */ jsxs25(Flex18, { align: "center", gap: 2, children: [
7176
- /* @__PURE__ */ jsx30(BoltIcon, { style: { color: "#fbbf24" } }),
7177
- /* @__PURE__ */ jsx30(Text27, { size: 2, weight: "medium", children: "Recommendations" }),
7178
- /* @__PURE__ */ jsx30(InfoTip, { text: GLOSSARY.recommendations }),
7179
- /* @__PURE__ */ jsxs25(
7180
- "span",
7181
- {
7182
- style: {
7183
- backgroundColor: "rgba(16,185,129,0.2)",
7184
- borderRadius: 999,
7185
- color: "#34d399",
7186
- fontSize: 13,
7187
- fontWeight: 500,
7188
- marginLeft: 4,
7189
- padding: "2px 10px"
7190
- },
7191
- children: [
7192
- "+",
7193
- recommendations.totalPotentialLift.toFixed(1),
7194
- " pts lift"
7195
- ]
7196
- }
7197
- )
7198
- ] }),
7199
- /* @__PURE__ */ jsxs25(Box17, { ref, style: { ...neutralCardStyle, overflow: "auto" }, children: [
7200
- /* @__PURE__ */ jsxs25(
7201
- "div",
7202
- {
7203
- style: {
7204
- borderBottom: "1px solid var(--card-border-color)",
7205
- display: "grid",
7206
- gap: "0 12px",
7207
- gridTemplateColumns: GRID2[tier],
7208
- padding: "12px 16px 8px"
7209
- },
7210
- children: [
7211
- /* @__PURE__ */ jsx30(ColHeader2, { label: "Area" }),
7212
- /* @__PURE__ */ jsx30(ColHeader2, { label: "Failure Mode", tooltip: GLOSSARY.failureMode }),
7213
- tier !== "narrow" && /* @__PURE__ */ jsx30(ColHeader2, { label: "Action" }),
7214
- tier === "full" && /* @__PURE__ */ jsx30(ColHeader2, { label: "Lift", tooltip: GLOSSARY.estimatedLift }),
7215
- tier !== "narrow" && /* @__PURE__ */ jsx30(ColHeader2, { label: "Confidence", tooltip: GLOSSARY.confidence })
7216
- ]
7217
- }
7218
- ),
7219
- recommendations.gaps.map((gap, i) => /* @__PURE__ */ jsx30(RecommendationRow, { gap, index: i, tier }, `gap-${i}`))
7220
- ] })
7221
- ] });
7222
- }
7223
- function ColHeader2({ label, tooltip }) {
7224
- return /* @__PURE__ */ jsxs25(Flex18, { align: "center", gap: 1, children: [
7225
- /* @__PURE__ */ jsx30(
7226
- Text27,
7227
- {
7228
- muted: true,
7229
- size: 1,
7230
- style: {
7231
- letterSpacing: "0.06em",
7232
- textTransform: "uppercase"
7233
- },
7234
- weight: "semibold",
7235
- children: label
7236
- }
7237
- ),
7238
- tooltip && /* @__PURE__ */ jsx30(InfoTip, { text: tooltip })
7239
- ] });
7240
- }
7241
- var FAILURE_MODE_COLORS = {
7242
- "missing-docs": { bg: "rgba(239,68,68,0.2)", text: "#f87171" },
7243
- "incorrect-docs": { bg: "rgba(239,68,68,0.2)", text: "#f87171" },
7244
- "outdated-docs": { bg: "rgba(245,158,11,0.2)", text: "#fbbf24" },
7245
- "poor-structure": { bg: "rgba(245,158,11,0.2)", text: "#fbbf24" }
7246
- };
7247
- var fmLabel = {
7248
- fontWeight: 600
7249
- };
7250
- var FAILURE_MODE_DESCS = {
7251
- "missing-docs": "This feature has no documentation at all. AI agents have nothing to reference when implementing it.",
7252
- "incorrect-docs": "The documentation contains factual errors \u2014 wrong API signatures, incorrect parameters, or misleading examples.",
7253
- "outdated-docs": "The docs describe old APIs or deprecated patterns. AI agents follow them and produce code that doesn't work with current versions.",
7254
- "poor-structure": "The docs exist but are hard to find or understand. AI agents struggle to locate the right information or misinterpret it."
7255
- };
7256
- function failureModeTip(mode) {
7257
- const desc = FAILURE_MODE_DESCS[mode];
7258
- if (!desc) return GLOSSARY.failureMode;
7259
- return /* @__PURE__ */ jsxs25(Text27, { size: 2, style: { lineHeight: 1.5 }, children: [
7260
- /* @__PURE__ */ jsx30("span", { style: fmLabel, children: mode }),
7261
- " \u2014 ",
7262
- desc
7263
- ] });
7264
- }
7265
- var CONFIDENCE_DESCS = {
7266
- high: "Strong keyword and structural signal agreement \u2014 this diagnosis is reliable.",
7267
- medium: "Partial signal agreement \u2014 likely correct but worth verifying manually.",
7268
- low: "Weak signals only \u2014 treat as a hypothesis to investigate, not a confirmed diagnosis."
7269
- };
7270
- function confidenceTip(level) {
7271
- const desc = CONFIDENCE_DESCS[level];
7272
- if (!desc) return GLOSSARY.confidence;
7273
- const icons = { high: "\u{1F7E2}", medium: "\u{1F7E1}", low: "\u{1F534}" };
7274
- return /* @__PURE__ */ jsxs25(Text27, { size: 2, style: { lineHeight: 1.5 }, children: [
7275
- icons[level],
7276
- " ",
7277
- /* @__PURE__ */ jsxs25("span", { style: fmLabel, children: [
7278
- level,
7279
- " confidence"
7280
- ] }),
7281
- " \u2014 ",
7282
- desc
7283
- ] });
7284
- }
7285
- function RecommendationRow({
7286
- gap,
7287
- index,
7288
- tier
7289
- }) {
7290
- const confIcon = gap.confidence === "high" ? "\u{1F7E2}" : gap.confidence === "medium" ? "\u{1F7E1}" : "\u{1F534}";
7291
- const fmColors = FAILURE_MODE_COLORS[gap.failureMode] ?? {
7292
- bg: "var(--card-muted-bg-color)",
7293
- text: "var(--card-muted-fg-color)"
7294
- };
7295
- return /* @__PURE__ */ jsxs25(
7296
- "div",
7297
- {
7298
- style: {
7299
- alignItems: "center",
7300
- display: "grid",
7301
- gap: "0 12px",
7302
- gridTemplateColumns: GRID2[tier],
7303
- padding: "10px 16px",
7304
- ...index > 0 ? dividerStyle : {}
7305
- },
7306
- children: [
7307
- /* @__PURE__ */ jsx30(Text27, { size: 2, weight: "medium", children: gap.area }),
7308
- /* @__PURE__ */ jsx30(HoverTip, { text: failureModeTip(gap.failureMode), children: /* @__PURE__ */ jsx30(
7309
- "span",
7310
- {
7311
- style: {
7312
- backgroundColor: fmColors.bg,
7313
- borderRadius: 4,
7314
- color: fmColors.text,
7315
- fontSize: 13,
7316
- fontWeight: 500,
7317
- padding: "3px 8px"
7318
- },
7319
- children: gap.failureMode
7320
- }
7321
- ) }),
7322
- tier !== "narrow" && /* @__PURE__ */ jsx30(Text27, { muted: true, size: 2, children: gap.remediation }),
7323
- tier === "full" && /* @__PURE__ */ jsxs25(
7324
- "span",
7325
- {
7326
- style: {
7327
- backgroundColor: "rgba(16,185,129,0.2)",
7328
- borderRadius: 4,
7329
- color: "#34d399",
7330
- fontFamily: "var(--font-code-size, monospace)",
7331
- fontSize: 14,
7332
- fontWeight: 600,
7333
- padding: "3px 8px",
7334
- textAlign: "right"
7335
- },
7336
- children: [
7337
- "+",
7338
- gap.estimatedLift.toFixed(1)
7339
- ]
7340
- }
7341
- ),
7342
- tier !== "narrow" && /* @__PURE__ */ jsx30(HoverTip, { text: confidenceTip(gap.confidence), children: /* @__PURE__ */ jsxs25(Text27, { size: 2, children: [
7343
- confIcon,
7344
- " ",
7345
- gap.confidence
7346
- ] }) })
7347
- ]
7348
- }
7349
- );
7350
- }
7351
-
7352
7599
  // src/components/report-detail/report-actions/ActionButton.tsx
7353
7600
  import { Button as Button4, useToast as useToast3 } from "@sanity/ui";
7354
- import { jsx as jsx31 } from "react/jsx-runtime";
7601
+ import { jsx as jsx30 } from "react/jsx-runtime";
7355
7602
 
7356
7603
  // src/components/report-detail/report-actions/ReportActions.tsx
7357
7604
  import { ChevronDownIcon, CopyIcon as CopyIcon3 } from "@sanity/icons";
7358
7605
  import {
7359
7606
  Button as Button6,
7360
- Flex as Flex20,
7607
+ Flex as Flex19,
7361
7608
  Menu,
7362
7609
  MenuButton,
7363
7610
  MenuDivider,
7364
7611
  useToast as useToast9
7365
7612
  } from "@sanity/ui";
7366
- import { useCallback as useCallback21, useState as useState16 } from "react";
7613
+ import { useCallback as useCallback22, useState as useState17 } from "react";
7367
7614
  import { useClient as useClient9 } from "sanity";
7368
7615
 
7369
7616
  // src/components/report-detail/report-actions/CopyReportAction.tsx
7370
7617
  import { ClipboardIcon } from "@sanity/icons";
7371
7618
  import { MenuItem, useToast as useToast4 } from "@sanity/ui";
7372
- import { useCallback as useCallback16, useState as useState13 } from "react";
7619
+ import { useCallback as useCallback17, useState as useState14 } from "react";
7373
7620
  import { useClient as useClient6 } from "sanity";
7374
- import { jsx as jsx32 } from "react/jsx-runtime";
7621
+ import { jsx as jsx31 } from "react/jsx-runtime";
7375
7622
  function CopyReportAction({ documentId }) {
7376
7623
  const client = useClient6({ apiVersion: API_VERSION });
7377
7624
  const toast = useToast4();
7378
- const [copying, setCopying] = useState13(false);
7379
- const handleClick = useCallback16(async () => {
7625
+ const [copying, setCopying] = useState14(false);
7626
+ const handleClick = useCallback17(async () => {
7380
7627
  setCopying(true);
7381
7628
  try {
7382
7629
  const doc = await client.fetch(
@@ -7408,7 +7655,7 @@ function CopyReportAction({ documentId }) {
7408
7655
  setCopying(false);
7409
7656
  }
7410
7657
  }, [client, documentId, toast]);
7411
- return /* @__PURE__ */ jsx32(
7658
+ return /* @__PURE__ */ jsx31(
7412
7659
  MenuItem,
7413
7660
  {
7414
7661
  disabled: copying,
@@ -7422,11 +7669,11 @@ function CopyReportAction({ documentId }) {
7422
7669
  // src/components/report-detail/report-actions/CopyReportIdAction.tsx
7423
7670
  import { CopyIcon as CopyIcon2 } from "@sanity/icons";
7424
7671
  import { MenuItem as MenuItem2, useToast as useToast5 } from "@sanity/ui";
7425
- import { useCallback as useCallback17 } from "react";
7426
- import { jsx as jsx33 } from "react/jsx-runtime";
7672
+ import { useCallback as useCallback18 } from "react";
7673
+ import { jsx as jsx32 } from "react/jsx-runtime";
7427
7674
  function CopyReportIdAction({ reportId }) {
7428
7675
  const toast = useToast5();
7429
- const handleClick = useCallback17(() => {
7676
+ const handleClick = useCallback18(() => {
7430
7677
  navigator.clipboard.writeText(reportId).then(
7431
7678
  () => {
7432
7679
  toast.push({
@@ -7444,19 +7691,19 @@ function CopyReportIdAction({ reportId }) {
7444
7691
  }
7445
7692
  );
7446
7693
  }, [reportId, toast]);
7447
- return /* @__PURE__ */ jsx33(MenuItem2, { icon: CopyIcon2, onClick: handleClick, text: "Copy report ID" });
7694
+ return /* @__PURE__ */ jsx32(MenuItem2, { icon: CopyIcon2, onClick: handleClick, text: "Copy report ID" });
7448
7695
  }
7449
7696
 
7450
7697
  // src/components/report-detail/report-actions/CopyVisionQueryAction.tsx
7451
7698
  import { SearchIcon as SearchIcon5 } from "@sanity/icons";
7452
7699
  import { MenuItem as MenuItem3, useToast as useToast6 } from "@sanity/ui";
7453
- import { useCallback as useCallback18 } from "react";
7454
- import { jsx as jsx34 } from "react/jsx-runtime";
7700
+ import { useCallback as useCallback19 } from "react";
7701
+ import { jsx as jsx33 } from "react/jsx-runtime";
7455
7702
  function CopyVisionQueryAction({
7456
7703
  reportId
7457
7704
  }) {
7458
7705
  const toast = useToast6();
7459
- const handleClick = useCallback18(() => {
7706
+ const handleClick = useCallback19(() => {
7460
7707
  const query = `*[_type == "ailf.report" && reportId == "${reportId}"][0]`;
7461
7708
  navigator.clipboard.writeText(query).then(
7462
7709
  () => {
@@ -7476,7 +7723,7 @@ function CopyVisionQueryAction({
7476
7723
  }
7477
7724
  );
7478
7725
  }, [reportId, toast]);
7479
- return /* @__PURE__ */ jsx34(
7726
+ return /* @__PURE__ */ jsx33(
7480
7727
  MenuItem3,
7481
7728
  {
7482
7729
  icon: SearchIcon5,
@@ -7487,25 +7734,25 @@ function CopyVisionQueryAction({
7487
7734
  }
7488
7735
 
7489
7736
  // src/components/report-detail/report-actions/DeleteConfirmDialog.tsx
7490
- import { Box as Box18, Button as Button5, Card as Card15, Dialog, Flex as Flex19, Stack as Stack23, Text as Text28 } from "@sanity/ui";
7491
- import { jsx as jsx35, jsxs as jsxs26 } from "react/jsx-runtime";
7737
+ import { Box as Box17, Button as Button5, Card as Card15, Dialog, Flex as Flex18, Stack as Stack22, Text as Text27 } from "@sanity/ui";
7738
+ import { jsx as jsx34, jsxs as jsxs25 } from "react/jsx-runtime";
7492
7739
  function DeleteConfirmDialog({
7493
7740
  isDeleting,
7494
7741
  onClose,
7495
7742
  onConfirm,
7496
7743
  reportId
7497
7744
  }) {
7498
- return /* @__PURE__ */ jsx35(
7745
+ return /* @__PURE__ */ jsx34(
7499
7746
  Dialog,
7500
7747
  {
7501
7748
  header: "Delete Report",
7502
7749
  id: "delete-report-dialog",
7503
7750
  onClose,
7504
7751
  width: 1,
7505
- children: /* @__PURE__ */ jsx35(Box18, { padding: 4, children: /* @__PURE__ */ jsxs26(Stack23, { space: 4, children: [
7506
- /* @__PURE__ */ jsx35(Text28, { children: "Are you sure you want to delete this report? This action cannot be undone." }),
7507
- /* @__PURE__ */ jsx35(Card15, { border: true, padding: 3, radius: 2, tone: "transparent", children: /* @__PURE__ */ jsx35(
7508
- Text28,
7752
+ children: /* @__PURE__ */ jsx34(Box17, { padding: 4, children: /* @__PURE__ */ jsxs25(Stack22, { space: 4, children: [
7753
+ /* @__PURE__ */ jsx34(Text27, { children: "Are you sure you want to delete this report? This action cannot be undone." }),
7754
+ /* @__PURE__ */ jsx34(Card15, { border: true, padding: 3, radius: 2, tone: "transparent", children: /* @__PURE__ */ jsx34(
7755
+ Text27,
7509
7756
  {
7510
7757
  muted: true,
7511
7758
  size: 1,
@@ -7513,8 +7760,8 @@ function DeleteConfirmDialog({
7513
7760
  children: reportId
7514
7761
  }
7515
7762
  ) }),
7516
- /* @__PURE__ */ jsxs26(Flex19, { gap: 2, justify: "flex-end", children: [
7517
- /* @__PURE__ */ jsx35(
7763
+ /* @__PURE__ */ jsxs25(Flex18, { gap: 2, justify: "flex-end", children: [
7764
+ /* @__PURE__ */ jsx34(
7518
7765
  Button5,
7519
7766
  {
7520
7767
  disabled: isDeleting,
@@ -7523,7 +7770,7 @@ function DeleteConfirmDialog({
7523
7770
  text: "Cancel"
7524
7771
  }
7525
7772
  ),
7526
- /* @__PURE__ */ jsx35(
7773
+ /* @__PURE__ */ jsx34(
7527
7774
  Button5,
7528
7775
  {
7529
7776
  disabled: isDeleting,
@@ -7541,11 +7788,11 @@ function DeleteConfirmDialog({
7541
7788
  // src/components/report-detail/report-actions/DeleteReportAction.tsx
7542
7789
  import { TrashIcon } from "@sanity/icons";
7543
7790
  import { MenuItem as MenuItem4 } from "@sanity/ui";
7544
- import { jsx as jsx36 } from "react/jsx-runtime";
7791
+ import { jsx as jsx35 } from "react/jsx-runtime";
7545
7792
  function DeleteReportAction({
7546
7793
  onRequestDelete
7547
7794
  }) {
7548
- return /* @__PURE__ */ jsx36(
7795
+ return /* @__PURE__ */ jsx35(
7549
7796
  MenuItem4,
7550
7797
  {
7551
7798
  icon: TrashIcon,
@@ -7559,17 +7806,17 @@ function DeleteReportAction({
7559
7806
  // src/components/report-detail/report-actions/DownloadReportAction.tsx
7560
7807
  import { DownloadIcon } from "@sanity/icons";
7561
7808
  import { MenuItem as MenuItem5, useToast as useToast7 } from "@sanity/ui";
7562
- import { useCallback as useCallback19, useState as useState14 } from "react";
7809
+ import { useCallback as useCallback20, useState as useState15 } from "react";
7563
7810
  import { useClient as useClient7 } from "sanity";
7564
- import { jsx as jsx37 } from "react/jsx-runtime";
7811
+ import { jsx as jsx36 } from "react/jsx-runtime";
7565
7812
  function DownloadReportAction({
7566
7813
  documentId,
7567
7814
  reportId
7568
7815
  }) {
7569
7816
  const client = useClient7({ apiVersion: API_VERSION });
7570
7817
  const toast = useToast7();
7571
- const [downloading, setDownloading] = useState14(false);
7572
- const handleClick = useCallback19(async () => {
7818
+ const [downloading, setDownloading] = useState15(false);
7819
+ const handleClick = useCallback20(async () => {
7573
7820
  setDownloading(true);
7574
7821
  try {
7575
7822
  const doc = await client.fetch(
@@ -7609,7 +7856,7 @@ function DownloadReportAction({
7609
7856
  setDownloading(false);
7610
7857
  }
7611
7858
  }, [client, documentId, reportId, toast]);
7612
- return /* @__PURE__ */ jsx37(
7859
+ return /* @__PURE__ */ jsx36(
7613
7860
  MenuItem5,
7614
7861
  {
7615
7862
  disabled: downloading,
@@ -7623,7 +7870,7 @@ function DownloadReportAction({
7623
7870
  // src/components/report-detail/report-actions/RerunEvaluationAction.tsx
7624
7871
  import { PlayIcon as PlayIcon2 } from "@sanity/icons";
7625
7872
  import { MenuItem as MenuItem6, useToast as useToast8 } from "@sanity/ui";
7626
- import { useCallback as useCallback20, useState as useState15 } from "react";
7873
+ import { useCallback as useCallback21, useState as useState16 } from "react";
7627
7874
  import { useClient as useClient8, useCurrentUser as useCurrentUser3 } from "sanity";
7628
7875
 
7629
7876
  // src/lib/eval-scope.ts
@@ -7639,7 +7886,7 @@ function extractEvalScope(provenance) {
7639
7886
  }
7640
7887
 
7641
7888
  // src/components/report-detail/report-actions/RerunEvaluationAction.tsx
7642
- import { jsx as jsx38 } from "react/jsx-runtime";
7889
+ import { jsx as jsx37 } from "react/jsx-runtime";
7643
7890
  var EVAL_REQUEST_TYPE2 = "ailf.evalRequest";
7644
7891
  function slugify2(s) {
7645
7892
  return s.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 40);
@@ -7678,8 +7925,8 @@ function RerunEvaluationAction({
7678
7925
  const client = useClient8({ apiVersion: API_VERSION });
7679
7926
  const currentUser = useCurrentUser3();
7680
7927
  const toast = useToast8();
7681
- const [requesting, setRequesting] = useState15(false);
7682
- const handleClick = useCallback20(async () => {
7928
+ const [requesting, setRequesting] = useState16(false);
7929
+ const handleClick = useCallback21(async () => {
7683
7930
  setRequesting(true);
7684
7931
  try {
7685
7932
  const scope = extractEvalScope(provenance);
@@ -7706,7 +7953,7 @@ function RerunEvaluationAction({
7706
7953
  setRequesting(false);
7707
7954
  }
7708
7955
  }, [client, currentUser?.id, provenance, reportId, toast]);
7709
- return /* @__PURE__ */ jsx38(
7956
+ return /* @__PURE__ */ jsx37(
7710
7957
  MenuItem6,
7711
7958
  {
7712
7959
  disabled: requesting,
@@ -7718,7 +7965,7 @@ function RerunEvaluationAction({
7718
7965
  }
7719
7966
 
7720
7967
  // src/components/report-detail/report-actions/ReportActions.tsx
7721
- import { Fragment as Fragment10, jsx as jsx39, jsxs as jsxs27 } from "react/jsx-runtime";
7968
+ import { Fragment as Fragment10, jsx as jsx38, jsxs as jsxs26 } from "react/jsx-runtime";
7722
7969
  function ReportActions({
7723
7970
  documentId,
7724
7971
  onDeleted,
@@ -7727,7 +7974,7 @@ function ReportActions({
7727
7974
  }) {
7728
7975
  const client = useClient9({ apiVersion: API_VERSION });
7729
7976
  const toast = useToast9();
7730
- const handleCopyId = useCallback21(() => {
7977
+ const handleCopyId = useCallback22(() => {
7731
7978
  navigator.clipboard.writeText(reportId).then(
7732
7979
  () => {
7733
7980
  toast.push({
@@ -7745,15 +7992,15 @@ function ReportActions({
7745
7992
  }
7746
7993
  );
7747
7994
  }, [reportId, toast]);
7748
- const [deleteDialogOpen, setDeleteDialogOpen] = useState16(false);
7749
- const [deleting, setDeleting] = useState16(false);
7750
- const handleRequestDelete = useCallback21(() => {
7995
+ const [deleteDialogOpen, setDeleteDialogOpen] = useState17(false);
7996
+ const [deleting, setDeleting] = useState17(false);
7997
+ const handleRequestDelete = useCallback22(() => {
7751
7998
  setDeleteDialogOpen(true);
7752
7999
  }, []);
7753
- const handleDeleteClose = useCallback21(() => {
8000
+ const handleDeleteClose = useCallback22(() => {
7754
8001
  if (!deleting) setDeleteDialogOpen(false);
7755
8002
  }, [deleting]);
7756
- const handleDeleteConfirm = useCallback21(async () => {
8003
+ const handleDeleteConfirm = useCallback22(async () => {
7757
8004
  setDeleting(true);
7758
8005
  try {
7759
8006
  await client.delete(documentId);
@@ -7774,9 +8021,9 @@ function ReportActions({
7774
8021
  setDeleting(false);
7775
8022
  }
7776
8023
  }, [client, documentId, onDeleted, toast]);
7777
- return /* @__PURE__ */ jsxs27(Fragment10, { children: [
7778
- /* @__PURE__ */ jsxs27(Flex20, { children: [
7779
- /* @__PURE__ */ jsx39(
8024
+ return /* @__PURE__ */ jsxs26(Fragment10, { children: [
8025
+ /* @__PURE__ */ jsxs26(Flex19, { children: [
8026
+ /* @__PURE__ */ jsx38(
7780
8027
  Button6,
7781
8028
  {
7782
8029
  icon: CopyIcon3,
@@ -7790,10 +8037,10 @@ function ReportActions({
7790
8037
  text: "Copy Report ID"
7791
8038
  }
7792
8039
  ),
7793
- /* @__PURE__ */ jsx39(
8040
+ /* @__PURE__ */ jsx38(
7794
8041
  MenuButton,
7795
8042
  {
7796
- button: /* @__PURE__ */ jsx39(
8043
+ button: /* @__PURE__ */ jsx38(
7797
8044
  Button6,
7798
8045
  {
7799
8046
  icon: ChevronDownIcon,
@@ -7806,33 +8053,33 @@ function ReportActions({
7806
8053
  }
7807
8054
  ),
7808
8055
  id: "report-actions-menu",
7809
- menu: /* @__PURE__ */ jsxs27(Menu, { children: [
7810
- /* @__PURE__ */ jsx39(CopyReportIdAction, { reportId }),
7811
- /* @__PURE__ */ jsx39(
8056
+ menu: /* @__PURE__ */ jsxs26(Menu, { children: [
8057
+ /* @__PURE__ */ jsx38(CopyReportIdAction, { reportId }),
8058
+ /* @__PURE__ */ jsx38(
7812
8059
  RerunEvaluationAction,
7813
8060
  {
7814
8061
  provenance,
7815
8062
  reportId
7816
8063
  }
7817
8064
  ),
7818
- /* @__PURE__ */ jsx39(MenuDivider, {}),
7819
- /* @__PURE__ */ jsx39(
8065
+ /* @__PURE__ */ jsx38(MenuDivider, {}),
8066
+ /* @__PURE__ */ jsx38(
7820
8067
  DownloadReportAction,
7821
8068
  {
7822
8069
  documentId,
7823
8070
  reportId
7824
8071
  }
7825
8072
  ),
7826
- /* @__PURE__ */ jsx39(CopyReportAction, { documentId }),
7827
- /* @__PURE__ */ jsx39(CopyVisionQueryAction, { reportId }),
7828
- /* @__PURE__ */ jsx39(MenuDivider, {}),
7829
- /* @__PURE__ */ jsx39(DeleteReportAction, { onRequestDelete: handleRequestDelete })
8073
+ /* @__PURE__ */ jsx38(CopyReportAction, { documentId }),
8074
+ /* @__PURE__ */ jsx38(CopyVisionQueryAction, { reportId }),
8075
+ /* @__PURE__ */ jsx38(MenuDivider, {}),
8076
+ /* @__PURE__ */ jsx38(DeleteReportAction, { onRequestDelete: handleRequestDelete })
7830
8077
  ] }),
7831
8078
  popover: { placement: "bottom-end", portal: true }
7832
8079
  }
7833
8080
  )
7834
8081
  ] }),
7835
- deleteDialogOpen && /* @__PURE__ */ jsx39(
8082
+ deleteDialogOpen && /* @__PURE__ */ jsx38(
7836
8083
  DeleteConfirmDialog,
7837
8084
  {
7838
8085
  isDeleting: deleting,
@@ -7846,8 +8093,8 @@ function ReportActions({
7846
8093
 
7847
8094
  // src/components/report-detail/ReportHeader.tsx
7848
8095
  import { ArrowLeftIcon as ArrowLeftIcon2 } from "@sanity/icons";
7849
- import { Button as Button7, Flex as Flex21, Stack as Stack24, Text as Text29 } from "@sanity/ui";
7850
- import { jsx as jsx40, jsxs as jsxs28 } from "react/jsx-runtime";
8096
+ import { Button as Button7, Flex as Flex20, Stack as Stack23, Text as Text28 } from "@sanity/ui";
8097
+ import { jsx as jsx39, jsxs as jsxs27 } from "react/jsx-runtime";
7851
8098
  function ReportHeader({
7852
8099
  completedAt,
7853
8100
  onBack,
@@ -7857,11 +8104,11 @@ function ReportHeader({
7857
8104
  const dateLabel = formatCardDate(completedAt);
7858
8105
  const displayTitle = title ?? tag ?? dateLabel;
7859
8106
  const hasSubtitle = Boolean(title ?? tag);
7860
- return /* @__PURE__ */ jsxs28(Flex21, { align: "center", gap: 3, children: [
7861
- /* @__PURE__ */ jsx40(Button7, { icon: ArrowLeftIcon2, mode: "bleed", onClick: onBack, text: "Back" }),
7862
- /* @__PURE__ */ jsxs28(Stack24, { flex: 1, space: 1, children: [
7863
- /* @__PURE__ */ jsx40(Text29, { size: 4, weight: "bold", children: displayTitle }),
7864
- hasSubtitle && /* @__PURE__ */ jsx40(Text29, { muted: true, size: 2, children: dateLabel })
8107
+ return /* @__PURE__ */ jsxs27(Flex20, { align: "center", gap: 3, children: [
8108
+ /* @__PURE__ */ jsx39(Button7, { icon: ArrowLeftIcon2, mode: "bleed", onClick: onBack, text: "Back" }),
8109
+ /* @__PURE__ */ jsxs27(Stack23, { flex: 1, space: 1, children: [
8110
+ /* @__PURE__ */ jsx39(Text28, { size: 4, weight: "bold", children: displayTitle }),
8111
+ hasSubtitle && /* @__PURE__ */ jsx39(Text28, { muted: true, size: 2, children: dateLabel })
7865
8112
  ] })
7866
8113
  ] });
7867
8114
  }
@@ -7869,17 +8116,17 @@ function ReportHeader({
7869
8116
  // src/components/report-detail/StrengthsList.tsx
7870
8117
  import { useMemo as useMemo8 } from "react";
7871
8118
  import { CheckmarkCircleIcon as CheckmarkCircleIcon2, SearchIcon as SearchIcon6 } from "@sanity/icons";
7872
- import { Box as Box20, Flex as Flex24, Stack as Stack26, Text as Text32 } from "@sanity/ui";
8119
+ import { Box as Box19, Flex as Flex23, Stack as Stack25, Text as Text31 } from "@sanity/ui";
7873
8120
 
7874
8121
  // src/components/report-detail/AreaScoresGrid.tsx
7875
8122
  import React3, {
7876
- useCallback as useCallback22,
8123
+ useCallback as useCallback23,
7877
8124
  useMemo as useMemo6,
7878
- useState as useState17
8125
+ useState as useState18
7879
8126
  } from "react";
7880
8127
  import { WarningOutlineIcon as WarningOutlineIcon2 } from "@sanity/icons";
7881
- import { Box as Box19, Flex as Flex22, Stack as Stack25, Text as Text30 } from "@sanity/ui";
7882
- import { Fragment as Fragment11, jsx as jsx41, jsxs as jsxs29 } from "react/jsx-runtime";
8128
+ import { Box as Box18, Flex as Flex21, Stack as Stack24, Text as Text29 } from "@sanity/ui";
8129
+ import { Fragment as Fragment11, jsx as jsx40, jsxs as jsxs28 } from "react/jsx-runtime";
7883
8130
  var DIMENSION_TOOLTIPS2 = {
7884
8131
  agentOutput: "Quality and completeness of the agent's output. Graded 0\u2013100.",
7885
8132
  assertionPassRate: "Fraction of structural assertions that passed. Graded 0\u2013100.",
@@ -7888,7 +8135,7 @@ var DIMENSION_TOOLTIPS2 = {
7888
8135
  taskCompletion: GLOSSARY.taskCompletion,
7889
8136
  toolUsage: "How effectively the agent used available tools (file read/write, shell, etc.). Graded 0\u2013100."
7890
8137
  };
7891
- function tableTier2(width) {
8138
+ function tableTier(width) {
7892
8139
  if (width >= 900) return "full";
7893
8140
  if (width >= 600) return "compact";
7894
8141
  return "narrow";
@@ -7899,7 +8146,6 @@ function gridColumns(tier, dimCount, showLift, hasActual) {
7899
8146
  case "full": {
7900
8147
  const parts = ["120px", "1fr", dims];
7901
8148
  if (showLift) parts.push("80px");
7902
- if (showLift) parts.push("72px");
7903
8149
  if (hasActual) parts.push("72px");
7904
8150
  return parts.join(" ");
7905
8151
  }
@@ -7919,16 +8165,16 @@ function AreaScoresGrid({
7919
8165
  perModel
7920
8166
  }) {
7921
8167
  const { ref: containerRef, width } = useContainerWidth();
7922
- const tier = tableTier2(width);
8168
+ const tier = tableTier(width);
7923
8169
  const hasActual = useMemo6(
7924
8170
  () => scores.some((s) => s.actualScore != null),
7925
8171
  [scores]
7926
8172
  );
7927
8173
  const showLift = isLiteracyMode(mode);
7928
8174
  const dimKeys = useMemo6(() => collectDimensionKeys(scores), [scores]);
7929
- const [sortField, setSortField] = useState17("score");
7930
- const [sortDir, setSortDir] = useState17("desc");
7931
- const handleSort = useCallback22(
8175
+ const [sortField, setSortField] = useState18("score");
8176
+ const [sortDir, setSortDir] = useState18("desc");
8177
+ const handleSort = useCallback23(
7932
8178
  (field) => {
7933
8179
  if (field === sortField) {
7934
8180
  setSortDir((d) => d === "asc" ? "desc" : "asc");
@@ -7972,8 +8218,8 @@ function AreaScoresGrid({
7972
8218
  }
7973
8219
  return map;
7974
8220
  }, [perModel]);
7975
- return /* @__PURE__ */ jsxs29(Box19, { ref: containerRef, style: { ...neutralCardStyle, overflow: "auto" }, children: [
7976
- /* @__PURE__ */ jsxs29(
8221
+ return /* @__PURE__ */ jsxs28(Box18, { ref: containerRef, style: { ...neutralCardStyle, overflow: "auto" }, children: [
8222
+ /* @__PURE__ */ jsxs28(
7977
8223
  "div",
7978
8224
  {
7979
8225
  style: {
@@ -7989,8 +8235,8 @@ function AreaScoresGrid({
7989
8235
  padding: "12px 16px 8px"
7990
8236
  },
7991
8237
  children: [
7992
- /* @__PURE__ */ jsx41(
7993
- ColHeader3,
8238
+ /* @__PURE__ */ jsx40(
8239
+ ColHeader2,
7994
8240
  {
7995
8241
  active: sortField === "score",
7996
8242
  direction: sortDir,
@@ -7999,8 +8245,8 @@ function AreaScoresGrid({
7999
8245
  tooltip: GLOSSARY.score
8000
8246
  }
8001
8247
  ),
8002
- /* @__PURE__ */ jsx41(
8003
- ColHeader3,
8248
+ /* @__PURE__ */ jsx40(
8249
+ ColHeader2,
8004
8250
  {
8005
8251
  active: sortField === "area",
8006
8252
  direction: sortDir,
@@ -8008,8 +8254,8 @@ function AreaScoresGrid({
8008
8254
  onClick: () => handleSort("area")
8009
8255
  }
8010
8256
  ),
8011
- dimKeys.map((key) => /* @__PURE__ */ jsx41(
8012
- ColHeader3,
8257
+ dimKeys.map((key) => /* @__PURE__ */ jsx40(
8258
+ ColHeader2,
8013
8259
  {
8014
8260
  active: sortField === key,
8015
8261
  direction: sortDir,
@@ -8019,8 +8265,8 @@ function AreaScoresGrid({
8019
8265
  },
8020
8266
  key
8021
8267
  )),
8022
- tier !== "narrow" && showLift && /* @__PURE__ */ jsx41(
8023
- ColHeader3,
8268
+ tier !== "narrow" && showLift && /* @__PURE__ */ jsx40(
8269
+ ColHeader2,
8024
8270
  {
8025
8271
  active: sortField === "lift",
8026
8272
  direction: sortDir,
@@ -8029,13 +8275,12 @@ function AreaScoresGrid({
8029
8275
  tooltip: GLOSSARY.docLift
8030
8276
  }
8031
8277
  ),
8032
- tier === "full" && showLift && /* @__PURE__ */ jsx41(ColHeader3, { label: "Floor", tooltip: GLOSSARY.floor }),
8033
- tier === "full" && hasActual && /* @__PURE__ */ jsx41(ColHeader3, { label: "Actual", tooltip: GLOSSARY.actualScore })
8278
+ tier === "full" && hasActual && /* @__PURE__ */ jsx40(ColHeader2, { label: "Actual", tooltip: GLOSSARY.actualScore })
8034
8279
  ]
8035
8280
  }
8036
8281
  ),
8037
- sorted.map((area) => /* @__PURE__ */ jsxs29(React3.Fragment, { children: [
8038
- /* @__PURE__ */ jsx41(
8282
+ sorted.map((area) => /* @__PURE__ */ jsxs28(React3.Fragment, { children: [
8283
+ /* @__PURE__ */ jsx40(
8039
8284
  AreaRow,
8040
8285
  {
8041
8286
  area,
@@ -8046,7 +8291,7 @@ function AreaScoresGrid({
8046
8291
  tier
8047
8292
  }
8048
8293
  ),
8049
- modelScoresByFeature && /* @__PURE__ */ jsx41(
8294
+ modelScoresByFeature && /* @__PURE__ */ jsx40(
8050
8295
  ModelSubRows,
8051
8296
  {
8052
8297
  dimKeys,
@@ -8067,7 +8312,7 @@ function ModelSubRows({
8067
8312
  tier
8068
8313
  }) {
8069
8314
  if (!models || models.length === 0) return null;
8070
- return /* @__PURE__ */ jsx41(Fragment11, { children: models.map((entry) => /* @__PURE__ */ jsx41(
8315
+ return /* @__PURE__ */ jsx40(Fragment11, { children: models.map((entry) => /* @__PURE__ */ jsx40(
8071
8316
  ModelRow,
8072
8317
  {
8073
8318
  dimKeys,
@@ -8089,7 +8334,7 @@ function ModelRow({
8089
8334
  tier
8090
8335
  }) {
8091
8336
  const isNarrow = tier === "narrow";
8092
- return /* @__PURE__ */ jsxs29(
8337
+ return /* @__PURE__ */ jsxs28(
8093
8338
  "div",
8094
8339
  {
8095
8340
  style: {
@@ -8107,8 +8352,8 @@ function ModelRow({
8107
8352
  padding: isNarrow ? "6px 12px 6px 20px" : "6px 16px 6px 28px"
8108
8353
  },
8109
8354
  children: [
8110
- /* @__PURE__ */ jsx41(Flex22, { align: "center", children: /* @__PURE__ */ jsx41(
8111
- Text30,
8355
+ /* @__PURE__ */ jsx40(Flex21, { align: "center", children: /* @__PURE__ */ jsx40(
8356
+ Text29,
8112
8357
  {
8113
8358
  size: 1,
8114
8359
  style: {
@@ -8119,8 +8364,8 @@ function ModelRow({
8119
8364
  children: Math.round(scores.totalScore)
8120
8365
  }
8121
8366
  ) }),
8122
- /* @__PURE__ */ jsx41(Flex22, { align: "center", gap: 2, children: /* @__PURE__ */ jsx41(Text30, { muted: true, size: 1, children: label }) }),
8123
- dimKeys.map((key) => /* @__PURE__ */ jsx41(
8367
+ /* @__PURE__ */ jsx40(Flex21, { align: "center", gap: 2, children: /* @__PURE__ */ jsx40(Text29, { muted: true, size: 1, children: label }) }),
8368
+ dimKeys.map((key) => /* @__PURE__ */ jsx40(
8124
8369
  DimCell,
8125
8370
  {
8126
8371
  area: label,
@@ -8130,8 +8375,8 @@ function ModelRow({
8130
8375
  },
8131
8376
  key
8132
8377
  )),
8133
- !isNarrow && showLift && /* @__PURE__ */ jsxs29(
8134
- Text30,
8378
+ !isNarrow && showLift && /* @__PURE__ */ jsxs28(
8379
+ Text29,
8135
8380
  {
8136
8381
  size: 1,
8137
8382
  style: {
@@ -8145,17 +8390,8 @@ function ModelRow({
8145
8390
  ]
8146
8391
  }
8147
8392
  ),
8148
- tier === "full" && showLift && /* @__PURE__ */ jsx41(
8149
- Text30,
8150
- {
8151
- muted: true,
8152
- size: 1,
8153
- style: { fontFamily: "var(--font-code-size, monospace)" },
8154
- children: Math.round(scores.floorScore ?? 0)
8155
- }
8156
- ),
8157
- tier === "full" && hasActual && /* @__PURE__ */ jsx41(
8158
- Text30,
8393
+ tier === "full" && hasActual && /* @__PURE__ */ jsx40(
8394
+ Text29,
8159
8395
  {
8160
8396
  size: 1,
8161
8397
  style: {
@@ -8179,7 +8415,7 @@ function AreaRow({
8179
8415
  tier
8180
8416
  }) {
8181
8417
  const isNarrow = tier === "narrow";
8182
- return /* @__PURE__ */ jsxs29(
8418
+ return /* @__PURE__ */ jsxs28(
8183
8419
  "div",
8184
8420
  {
8185
8421
  style: {
@@ -8196,15 +8432,15 @@ function AreaRow({
8196
8432
  padding: isNarrow ? "8px 12px" : "10px 16px"
8197
8433
  },
8198
8434
  children: [
8199
- /* @__PURE__ */ jsxs29(Flex22, { align: "center", gap: isNarrow ? 0 : 2, children: [
8200
- /* @__PURE__ */ jsx41(
8435
+ /* @__PURE__ */ jsxs28(Flex21, { align: "center", gap: isNarrow ? 0 : 2, children: [
8436
+ /* @__PURE__ */ jsx40(
8201
8437
  HoverTip,
8202
8438
  {
8203
- text: /* @__PURE__ */ jsxs29(Text30, { size: 2, style: { lineHeight: 1.5 }, children: [
8204
- /* @__PURE__ */ jsx41("span", { style: { fontWeight: 600 }, children: area.feature }),
8439
+ text: /* @__PURE__ */ jsxs28(Text29, { size: 2, style: { lineHeight: 1.5 }, children: [
8440
+ /* @__PURE__ */ jsx40("span", { style: { fontWeight: 600 }, children: area.feature }),
8205
8441
  " score:",
8206
8442
  " ",
8207
- /* @__PURE__ */ jsx41(
8443
+ /* @__PURE__ */ jsx40(
8208
8444
  "span",
8209
8445
  {
8210
8446
  style: {
@@ -8215,12 +8451,12 @@ function AreaRow({
8215
8451
  children: Math.round(area.totalScore)
8216
8452
  }
8217
8453
  ),
8218
- /* @__PURE__ */ jsx41("span", { style: { color: "var(--card-muted-fg-color)" }, children: "/100" }),
8454
+ /* @__PURE__ */ jsx40("span", { style: { color: "var(--card-muted-fg-color)" }, children: "/100" }),
8219
8455
  ".",
8220
8456
  " ",
8221
8457
  GLOSSARY.score
8222
8458
  ] }),
8223
- children: /* @__PURE__ */ jsx41(
8459
+ children: /* @__PURE__ */ jsx40(
8224
8460
  "div",
8225
8461
  {
8226
8462
  style: {
@@ -8241,11 +8477,11 @@ function AreaRow({
8241
8477
  )
8242
8478
  }
8243
8479
  ),
8244
- !isNarrow && delta != null && delta !== 0 && /* @__PURE__ */ jsx41(HoverTip, { text: GLOSSARY.areaDelta, children: /* @__PURE__ */ jsx41(DeltaIndicator, { delta, icon: true, size: 1 }) })
8480
+ !isNarrow && delta != null && delta !== 0 && /* @__PURE__ */ jsx40(HoverTip, { text: GLOSSARY.areaDelta, children: /* @__PURE__ */ jsx40(DeltaIndicator, { delta, icon: true, size: 1 }) })
8245
8481
  ] }),
8246
- /* @__PURE__ */ jsxs29(Flex22, { align: "center", gap: 2, wrap: "wrap", children: [
8247
- /* @__PURE__ */ jsx41(Text30, { size: 2, weight: "medium", children: area.feature }),
8248
- area.negativeDocLift && showLift && /* @__PURE__ */ jsx41(HoverTip, { text: GLOSSARY.docsHurt, children: /* @__PURE__ */ jsx41(
8482
+ /* @__PURE__ */ jsxs28(Flex21, { align: "center", gap: 2, wrap: "wrap", children: [
8483
+ /* @__PURE__ */ jsx40(Text29, { size: 2, weight: "medium", children: area.feature }),
8484
+ area.negativeDocLift && showLift && /* @__PURE__ */ jsx40(HoverTip, { text: GLOSSARY.docsHurt, children: /* @__PURE__ */ jsx40(
8249
8485
  "span",
8250
8486
  {
8251
8487
  style: {
@@ -8258,11 +8494,11 @@ function AreaRow({
8258
8494
  gap: 3,
8259
8495
  padding: "1px 5px"
8260
8496
  },
8261
- children: /* @__PURE__ */ jsx41(WarningOutlineIcon2, {})
8497
+ children: /* @__PURE__ */ jsx40(WarningOutlineIcon2, {})
8262
8498
  }
8263
8499
  ) })
8264
8500
  ] }),
8265
- dimKeys.map((key) => /* @__PURE__ */ jsx41(
8501
+ dimKeys.map((key) => /* @__PURE__ */ jsx40(
8266
8502
  DimCell,
8267
8503
  {
8268
8504
  area: area.feature,
@@ -8271,14 +8507,14 @@ function AreaRow({
8271
8507
  },
8272
8508
  key
8273
8509
  )),
8274
- !isNarrow && showLift && /* @__PURE__ */ jsx41(
8510
+ !isNarrow && showLift && /* @__PURE__ */ jsx40(
8275
8511
  HoverTip,
8276
8512
  {
8277
- text: /* @__PURE__ */ jsxs29(Text30, { size: 2, style: { lineHeight: 1.5 }, children: [
8278
- /* @__PURE__ */ jsx41("span", { style: { fontWeight: 600 }, children: area.feature }),
8513
+ text: /* @__PURE__ */ jsxs28(Text29, { size: 2, style: { lineHeight: 1.5 }, children: [
8514
+ /* @__PURE__ */ jsx40("span", { style: { fontWeight: 600 }, children: area.feature }),
8279
8515
  " doc lift:",
8280
8516
  " ",
8281
- /* @__PURE__ */ jsxs29(
8517
+ /* @__PURE__ */ jsxs28(
8282
8518
  "span",
8283
8519
  {
8284
8520
  style: {
@@ -8296,8 +8532,8 @@ function AreaRow({
8296
8532
  "pts. ",
8297
8533
  GLOSSARY.docLift
8298
8534
  ] }),
8299
- children: /* @__PURE__ */ jsxs29(
8300
- Text30,
8535
+ children: /* @__PURE__ */ jsxs28(
8536
+ Text29,
8301
8537
  {
8302
8538
  size: 2,
8303
8539
  style: {
@@ -8313,21 +8549,12 @@ function AreaRow({
8313
8549
  )
8314
8550
  }
8315
8551
  ),
8316
- tier === "full" && showLift && /* @__PURE__ */ jsx41(
8317
- Text30,
8318
- {
8319
- muted: true,
8320
- size: 2,
8321
- style: { fontFamily: "var(--font-code-size, monospace)" },
8322
- children: Math.round(area.floorScore ?? 0)
8323
- }
8324
- ),
8325
- tier === "full" && hasActual && /* @__PURE__ */ jsx41(
8552
+ tier === "full" && hasActual && /* @__PURE__ */ jsx40(
8326
8553
  HoverTip,
8327
8554
  {
8328
8555
  text: area.actualScore != null ? `${area.feature} actual score: ${Math.round(area.actualScore)}/100. ${GLOSSARY.actualScore}` : `No agentic data for ${area.feature}.`,
8329
- children: /* @__PURE__ */ jsx41(
8330
- Text30,
8556
+ children: /* @__PURE__ */ jsx40(
8557
+ Text29,
8331
8558
  {
8332
8559
  size: 2,
8333
8560
  style: {
@@ -8356,17 +8583,17 @@ function DimCell({
8356
8583
  const tooltip = dimKey ? DIMENSION_TOOLTIPS2[dimKey] : "";
8357
8584
  const textSize = size === "small" ? 0 : 1;
8358
8585
  const barHeight = size === "small" ? 3 : 4;
8359
- return /* @__PURE__ */ jsx41(
8586
+ return /* @__PURE__ */ jsx40(
8360
8587
  HoverTip,
8361
8588
  {
8362
- text: /* @__PURE__ */ jsxs29(Text30, { size: 2, style: { lineHeight: 1.5 }, children: [
8363
- /* @__PURE__ */ jsx41("span", { style: { fontWeight: 600 }, children: area }),
8589
+ text: /* @__PURE__ */ jsxs28(Text29, { size: 2, style: { lineHeight: 1.5 }, children: [
8590
+ /* @__PURE__ */ jsx40("span", { style: { fontWeight: 600 }, children: area }),
8364
8591
  " \u2192",
8365
8592
  " ",
8366
- /* @__PURE__ */ jsx41("span", { style: { fontWeight: 600 }, children: dim }),
8593
+ /* @__PURE__ */ jsx40("span", { style: { fontWeight: 600 }, children: dim }),
8367
8594
  ":",
8368
8595
  " ",
8369
- /* @__PURE__ */ jsx41(
8596
+ /* @__PURE__ */ jsx40(
8370
8597
  "span",
8371
8598
  {
8372
8599
  style: {
@@ -8377,14 +8604,14 @@ function DimCell({
8377
8604
  children: Math.round(value)
8378
8605
  }
8379
8606
  ),
8380
- /* @__PURE__ */ jsx41("span", { style: { color: "var(--card-muted-fg-color)" }, children: "/100" }),
8607
+ /* @__PURE__ */ jsx40("span", { style: { color: "var(--card-muted-fg-color)" }, children: "/100" }),
8381
8608
  ".",
8382
8609
  " ",
8383
8610
  tooltip
8384
8611
  ] }),
8385
- children: /* @__PURE__ */ jsxs29(Stack25, { space: 1, style: { width: "100%" }, children: [
8386
- /* @__PURE__ */ jsx41(
8387
- Text30,
8612
+ children: /* @__PURE__ */ jsxs28(Stack24, { space: 1, style: { width: "100%" }, children: [
8613
+ /* @__PURE__ */ jsx40(
8614
+ Text29,
8388
8615
  {
8389
8616
  size: textSize,
8390
8617
  style: {
@@ -8395,7 +8622,7 @@ function DimCell({
8395
8622
  children: Math.round(value)
8396
8623
  }
8397
8624
  ),
8398
- /* @__PURE__ */ jsx41(
8625
+ /* @__PURE__ */ jsx40(
8399
8626
  "div",
8400
8627
  {
8401
8628
  style: {
@@ -8405,7 +8632,7 @@ function DimCell({
8405
8632
  overflow: "hidden",
8406
8633
  width: "100%"
8407
8634
  },
8408
- children: /* @__PURE__ */ jsx41(
8635
+ children: /* @__PURE__ */ jsx40(
8409
8636
  "div",
8410
8637
  {
8411
8638
  style: {
@@ -8423,14 +8650,14 @@ function DimCell({
8423
8650
  }
8424
8651
  );
8425
8652
  }
8426
- function ColHeader3({
8653
+ function ColHeader2({
8427
8654
  active,
8428
8655
  direction,
8429
8656
  label,
8430
8657
  onClick,
8431
8658
  tooltip
8432
8659
  }) {
8433
- const handleKeyDown = useCallback22(
8660
+ const handleKeyDown = useCallback23(
8434
8661
  (e) => {
8435
8662
  if (onClick && (e.key === "Enter" || e.key === " ")) {
8436
8663
  e.preventDefault();
@@ -8440,8 +8667,8 @@ function ColHeader3({
8440
8667
  [onClick]
8441
8668
  );
8442
8669
  const arrow = active ? direction === "asc" ? " \u2191" : " \u2193" : "";
8443
- return /* @__PURE__ */ jsxs29(Flex22, { align: "center", gap: 1, children: [
8444
- /* @__PURE__ */ jsx41(
8670
+ return /* @__PURE__ */ jsxs28(Flex21, { align: "center", gap: 1, children: [
8671
+ /* @__PURE__ */ jsx40(
8445
8672
  "div",
8446
8673
  {
8447
8674
  onClick,
@@ -8452,8 +8679,8 @@ function ColHeader3({
8452
8679
  userSelect: "none"
8453
8680
  },
8454
8681
  tabIndex: onClick ? 0 : void 0,
8455
- children: /* @__PURE__ */ jsxs29(
8456
- Text30,
8682
+ children: /* @__PURE__ */ jsxs28(
8683
+ Text29,
8457
8684
  {
8458
8685
  muted: true,
8459
8686
  size: 1,
@@ -8470,14 +8697,14 @@ function ColHeader3({
8470
8697
  )
8471
8698
  }
8472
8699
  ),
8473
- tooltip && /* @__PURE__ */ jsx41(InfoTip, { text: tooltip })
8700
+ tooltip && /* @__PURE__ */ jsx40(InfoTip, { text: tooltip })
8474
8701
  ] });
8475
8702
  }
8476
8703
 
8477
8704
  // src/components/report-detail/ModelSelector.tsx
8478
- import { useCallback as useCallback23 } from "react";
8479
- import { Flex as Flex23, Text as Text31 } from "@sanity/ui";
8480
- import { jsx as jsx42, jsxs as jsxs30 } from "react/jsx-runtime";
8705
+ import { useCallback as useCallback24 } from "react";
8706
+ import { Flex as Flex22, Text as Text30 } from "@sanity/ui";
8707
+ import { jsx as jsx41, jsxs as jsxs29 } from "react/jsx-runtime";
8481
8708
  var pillBase = {
8482
8709
  borderColor: "var(--card-border-color)",
8483
8710
  borderRadius: 999,
@@ -8508,8 +8735,8 @@ function ModelSelector({
8508
8735
  selection,
8509
8736
  onChange
8510
8737
  }) {
8511
- return /* @__PURE__ */ jsxs30(Flex23, { align: "center", gap: 1, wrap: "wrap", children: [
8512
- /* @__PURE__ */ jsx42(
8738
+ return /* @__PURE__ */ jsxs29(Flex22, { align: "center", gap: 1, wrap: "wrap", children: [
8739
+ /* @__PURE__ */ jsx41(
8513
8740
  Pill2,
8514
8741
  {
8515
8742
  isSelected: selection === null,
@@ -8517,7 +8744,7 @@ function ModelSelector({
8517
8744
  onClick: () => onChange(null)
8518
8745
  }
8519
8746
  ),
8520
- models.map((model) => /* @__PURE__ */ jsx42(
8747
+ models.map((model) => /* @__PURE__ */ jsx41(
8521
8748
  Pill2,
8522
8749
  {
8523
8750
  isSelected: selection === model.modelId,
@@ -8526,7 +8753,7 @@ function ModelSelector({
8526
8753
  },
8527
8754
  model.modelId
8528
8755
  )),
8529
- /* @__PURE__ */ jsx42(
8756
+ /* @__PURE__ */ jsx41(
8530
8757
  "div",
8531
8758
  {
8532
8759
  style: {
@@ -8537,7 +8764,7 @@ function ModelSelector({
8537
8764
  }
8538
8765
  }
8539
8766
  ),
8540
- /* @__PURE__ */ jsx42(
8767
+ /* @__PURE__ */ jsx41(
8541
8768
  Pill2,
8542
8769
  {
8543
8770
  isSelected: selection === "expanded",
@@ -8552,7 +8779,7 @@ function Pill2({
8552
8779
  label,
8553
8780
  onClick
8554
8781
  }) {
8555
- const handleKeyDown = useCallback23(
8782
+ const handleKeyDown = useCallback24(
8556
8783
  (e) => {
8557
8784
  if (e.key === "Enter" || e.key === " ") {
8558
8785
  e.preventDefault();
@@ -8561,7 +8788,7 @@ function Pill2({
8561
8788
  },
8562
8789
  [onClick]
8563
8790
  );
8564
- return /* @__PURE__ */ jsx42(
8791
+ return /* @__PURE__ */ jsx41(
8565
8792
  "span",
8566
8793
  {
8567
8794
  onClick,
@@ -8569,8 +8796,8 @@ function Pill2({
8569
8796
  role: "button",
8570
8797
  style: isSelected ? pillSelected : pillDefault,
8571
8798
  tabIndex: 0,
8572
- children: /* @__PURE__ */ jsx42(
8573
- Text31,
8799
+ children: /* @__PURE__ */ jsx41(
8800
+ Text30,
8574
8801
  {
8575
8802
  size: 1,
8576
8803
  style: {
@@ -8585,13 +8812,13 @@ function Pill2({
8585
8812
  }
8586
8813
 
8587
8814
  // src/components/report-detail/useModelSelection.ts
8588
- import { useCallback as useCallback24, useMemo as useMemo7, useState as useState18 } from "react";
8815
+ import { useCallback as useCallback25, useMemo as useMemo7, useState as useState19 } from "react";
8589
8816
  function useModelSelection({
8590
8817
  scores,
8591
8818
  perModel
8592
8819
  }) {
8593
- const [selection, setSelection] = useState18(null);
8594
- const onSelectionChange = useCallback24((next) => {
8820
+ const [selection, setSelection] = useState19(null);
8821
+ const onSelectionChange = useCallback25((next) => {
8595
8822
  setSelection(next);
8596
8823
  }, []);
8597
8824
  const isExpanded = selection === "expanded";
@@ -8613,7 +8840,7 @@ function useModelSelection({
8613
8840
  }
8614
8841
 
8615
8842
  // src/components/report-detail/StrengthsList.tsx
8616
- import { jsx as jsx43, jsxs as jsxs31 } from "react/jsx-runtime";
8843
+ import { jsx as jsx42, jsxs as jsxs30 } from "react/jsx-runtime";
8617
8844
  function StrengthsList({
8618
8845
  mode,
8619
8846
  scores,
@@ -8637,13 +8864,13 @@ function StrengthsList({
8637
8864
  (a, b) => (b.infrastructureEfficiency ?? 0) - (a.infrastructureEfficiency ?? 0)
8638
8865
  );
8639
8866
  if (displayedScores.length === 0) return null;
8640
- return /* @__PURE__ */ jsxs31(Stack26, { space: 5, children: [
8641
- /* @__PURE__ */ jsxs31(Stack26, { space: 3, children: [
8642
- /* @__PURE__ */ jsxs31(Flex24, { align: "center", gap: 2, wrap: "wrap", children: [
8643
- /* @__PURE__ */ jsx43(CheckmarkCircleIcon2, { style: { color: "#34d399" } }),
8644
- /* @__PURE__ */ jsx43(Text32, { size: 2, weight: "medium", children: "Strong Areas (70+)" }),
8645
- /* @__PURE__ */ jsx43(InfoTip, { text: GLOSSARY.strengths }),
8646
- hasModels && /* @__PURE__ */ jsx43(Box20, { style: { marginLeft: "auto" }, children: /* @__PURE__ */ jsx43(
8867
+ return /* @__PURE__ */ jsxs30(Stack25, { space: 5, children: [
8868
+ /* @__PURE__ */ jsxs30(Stack25, { space: 3, children: [
8869
+ /* @__PURE__ */ jsxs30(Flex23, { align: "center", gap: 2, wrap: "wrap", children: [
8870
+ /* @__PURE__ */ jsx42(CheckmarkCircleIcon2, { style: { color: "#34d399" } }),
8871
+ /* @__PURE__ */ jsx42(Text31, { size: 2, weight: "medium", children: "Strong Areas (70+)" }),
8872
+ /* @__PURE__ */ jsx42(InfoTip, { text: GLOSSARY.strengths }),
8873
+ hasModels && /* @__PURE__ */ jsx42(Box19, { style: { marginLeft: "auto" }, children: /* @__PURE__ */ jsx42(
8647
8874
  ModelSelector,
8648
8875
  {
8649
8876
  models: perModel,
@@ -8652,7 +8879,7 @@ function StrengthsList({
8652
8879
  }
8653
8880
  ) })
8654
8881
  ] }),
8655
- /* @__PURE__ */ jsx43(
8882
+ /* @__PURE__ */ jsx42(
8656
8883
  AreaScoresGrid,
8657
8884
  {
8658
8885
  mode,
@@ -8662,33 +8889,33 @@ function StrengthsList({
8662
8889
  }
8663
8890
  )
8664
8891
  ] }),
8665
- retrievalSuccesses.length > 0 && /* @__PURE__ */ jsxs31(Box20, { style: neutralCardStyle, children: [
8666
- /* @__PURE__ */ jsx43(
8667
- Box20,
8892
+ retrievalSuccesses.length > 0 && /* @__PURE__ */ jsxs30(Box19, { style: neutralCardStyle, children: [
8893
+ /* @__PURE__ */ jsx42(
8894
+ Box19,
8668
8895
  {
8669
8896
  padding: 4,
8670
8897
  style: { borderBottom: "1px solid var(--card-border-color)" },
8671
- children: /* @__PURE__ */ jsxs31(Flex24, { align: "center", gap: 2, children: [
8672
- /* @__PURE__ */ jsx43(SearchIcon6, { style: { color: "#34d399" } }),
8673
- /* @__PURE__ */ jsxs31(Text32, { size: 2, weight: "medium", children: [
8898
+ children: /* @__PURE__ */ jsxs30(Flex23, { align: "center", gap: 2, children: [
8899
+ /* @__PURE__ */ jsx42(SearchIcon6, { style: { color: "#34d399" } }),
8900
+ /* @__PURE__ */ jsxs30(Text31, { size: 2, weight: "medium", children: [
8674
8901
  "Retrieval Successes (",
8675
8902
  Math.round(EFFICIENCY_POSITIVE * 100),
8676
8903
  "%+ efficiency)"
8677
8904
  ] }),
8678
- /* @__PURE__ */ jsx43(InfoTip, { text: GLOSSARY.retrievalExcellence })
8905
+ /* @__PURE__ */ jsx42(InfoTip, { text: GLOSSARY.retrievalExcellence })
8679
8906
  ] })
8680
8907
  }
8681
8908
  ),
8682
- /* @__PURE__ */ jsx43(Stack26, { children: retrievalSuccesses.map((area, i) => /* @__PURE__ */ jsxs31(
8683
- Flex24,
8909
+ /* @__PURE__ */ jsx42(Stack25, { children: retrievalSuccesses.map((area, i) => /* @__PURE__ */ jsxs30(
8910
+ Flex23,
8684
8911
  {
8685
8912
  align: "center",
8686
8913
  justify: "space-between",
8687
8914
  padding: 4,
8688
8915
  style: i > 0 ? dividerStyle : void 0,
8689
8916
  children: [
8690
- /* @__PURE__ */ jsx43(Text32, { size: 2, children: area.feature }),
8691
- /* @__PURE__ */ jsx43(
8917
+ /* @__PURE__ */ jsx42(Text31, { size: 2, children: area.feature }),
8918
+ /* @__PURE__ */ jsx42(
8692
8919
  "span",
8693
8920
  {
8694
8921
  style: {
@@ -8715,11 +8942,11 @@ import {
8715
8942
  ErrorOutlineIcon as ErrorOutlineIcon3,
8716
8943
  SearchIcon as SearchIcon7,
8717
8944
  WarningOutlineIcon as WarningOutlineIcon3,
8718
- BoltIcon as BoltIcon2,
8945
+ BoltIcon,
8719
8946
  ArrowDownIcon as ArrowDownIcon2
8720
8947
  } from "@sanity/icons";
8721
- import { Box as Box21, Flex as Flex25, Stack as Stack27, Text as Text33 } from "@sanity/ui";
8722
- import { jsx as jsx44, jsxs as jsxs32 } from "react/jsx-runtime";
8948
+ import { Box as Box20, Flex as Flex24, Stack as Stack26, Text as Text32 } from "@sanity/ui";
8949
+ import { jsx as jsx43, jsxs as jsxs31 } from "react/jsx-runtime";
8723
8950
  function WeaknessesList({
8724
8951
  mode,
8725
8952
  scores,
@@ -8749,13 +8976,13 @@ function WeaknessesList({
8749
8976
  );
8750
8977
  const hasContent = weakAreas.length > 0 || docsHurt.length > 0 || retrievalIssues.length > 0 || dimWeaknesses.length > 0 || regressed.length > 0 || efficiencyAnomalies.length > 0;
8751
8978
  if (!hasContent) return null;
8752
- return /* @__PURE__ */ jsxs32(Stack27, { space: 5, children: [
8753
- weakAreas.length > 0 && /* @__PURE__ */ jsxs32(Stack27, { space: 3, children: [
8754
- /* @__PURE__ */ jsxs32(Flex25, { align: "center", gap: 2, wrap: "wrap", children: [
8755
- /* @__PURE__ */ jsx44(ErrorOutlineIcon3, { style: { color: "#f87171" } }),
8756
- /* @__PURE__ */ jsx44(Text33, { size: 2, weight: "medium", children: "Weak Areas (<70)" }),
8757
- /* @__PURE__ */ jsx44(InfoTip, { text: GLOSSARY.weakAreas }),
8758
- hasModels && /* @__PURE__ */ jsx44(Box21, { style: { marginLeft: "auto" }, children: /* @__PURE__ */ jsx44(
8979
+ return /* @__PURE__ */ jsxs31(Stack26, { space: 5, children: [
8980
+ weakAreas.length > 0 && /* @__PURE__ */ jsxs31(Stack26, { space: 3, children: [
8981
+ /* @__PURE__ */ jsxs31(Flex24, { align: "center", gap: 2, wrap: "wrap", children: [
8982
+ /* @__PURE__ */ jsx43(ErrorOutlineIcon3, { style: { color: "#f87171" } }),
8983
+ /* @__PURE__ */ jsx43(Text32, { size: 2, weight: "medium", children: "Weak Areas (<70)" }),
8984
+ /* @__PURE__ */ jsx43(InfoTip, { text: GLOSSARY.weakAreas }),
8985
+ hasModels && /* @__PURE__ */ jsx43(Box20, { style: { marginLeft: "auto" }, children: /* @__PURE__ */ jsx43(
8759
8986
  ModelSelector,
8760
8987
  {
8761
8988
  models: perModel,
@@ -8764,7 +8991,7 @@ function WeaknessesList({
8764
8991
  }
8765
8992
  ) })
8766
8993
  ] }),
8767
- /* @__PURE__ */ jsx44(
8994
+ /* @__PURE__ */ jsx43(
8768
8995
  AreaScoresGrid,
8769
8996
  {
8770
8997
  mode,
@@ -8774,22 +9001,22 @@ function WeaknessesList({
8774
9001
  }
8775
9002
  )
8776
9003
  ] }),
8777
- docsHurt.length > 0 && /* @__PURE__ */ jsxs32(Stack27, { space: 3, children: [
8778
- /* @__PURE__ */ jsxs32(Flex25, { align: "center", gap: 2, children: [
8779
- /* @__PURE__ */ jsx44(ErrorOutlineIcon3, { style: { color: "#f87171" } }),
8780
- /* @__PURE__ */ jsx44(Text33, { size: 2, weight: "medium", children: "Docs Hurt Performance (Negative Doc Lift)" }),
8781
- /* @__PURE__ */ jsx44(InfoTip, { text: GLOSSARY.docsHurt })
9004
+ docsHurt.length > 0 && /* @__PURE__ */ jsxs31(Stack26, { space: 3, children: [
9005
+ /* @__PURE__ */ jsxs31(Flex24, { align: "center", gap: 2, children: [
9006
+ /* @__PURE__ */ jsx43(ErrorOutlineIcon3, { style: { color: "#f87171" } }),
9007
+ /* @__PURE__ */ jsx43(Text32, { size: 2, weight: "medium", children: "Docs Hurt Performance (Negative Doc Lift)" }),
9008
+ /* @__PURE__ */ jsx43(InfoTip, { text: GLOSSARY.docsHurt })
8782
9009
  ] }),
8783
- /* @__PURE__ */ jsx44(Box21, { style: sectionStyle("red"), children: docsHurt.map((area, i) => /* @__PURE__ */ jsxs32(
8784
- Box21,
9010
+ /* @__PURE__ */ jsx43(Box20, { style: sectionStyle("red"), children: docsHurt.map((area, i) => /* @__PURE__ */ jsxs31(
9011
+ Box20,
8785
9012
  {
8786
9013
  padding: 4,
8787
9014
  style: i > 0 ? { borderTop: "1px solid rgba(239,68,68,0.2)" } : void 0,
8788
9015
  children: [
8789
- /* @__PURE__ */ jsxs32(Flex25, { align: "center", justify: "space-between", wrap: "wrap", children: [
8790
- /* @__PURE__ */ jsxs32(Flex25, { align: "center", gap: 2, children: [
8791
- /* @__PURE__ */ jsx44(Text33, { size: 2, weight: "medium", children: area.feature }),
8792
- /* @__PURE__ */ jsx44(
9016
+ /* @__PURE__ */ jsxs31(Flex24, { align: "center", justify: "space-between", wrap: "wrap", children: [
9017
+ /* @__PURE__ */ jsxs31(Flex24, { align: "center", gap: 2, children: [
9018
+ /* @__PURE__ */ jsx43(Text32, { size: 2, weight: "medium", children: area.feature }),
9019
+ /* @__PURE__ */ jsx43(
8793
9020
  "span",
8794
9021
  {
8795
9022
  style: {
@@ -8804,7 +9031,7 @@ function WeaknessesList({
8804
9031
  }
8805
9032
  )
8806
9033
  ] }),
8807
- /* @__PURE__ */ jsx44(
9034
+ /* @__PURE__ */ jsx43(
8808
9035
  "span",
8809
9036
  {
8810
9037
  style: {
@@ -8817,8 +9044,8 @@ function WeaknessesList({
8817
9044
  }
8818
9045
  )
8819
9046
  ] }),
8820
- /* @__PURE__ */ jsx44(Box21, { paddingTop: 2, children: /* @__PURE__ */ jsxs32(Text33, { muted: true, size: 2, children: [
8821
- area.invertedRetrievalGap && /* @__PURE__ */ jsxs32("span", { style: { color: "#fbbf24" }, children: [
9047
+ /* @__PURE__ */ jsx43(Box20, { paddingTop: 2, children: /* @__PURE__ */ jsxs31(Text32, { muted: true, size: 2, children: [
9048
+ area.invertedRetrievalGap && /* @__PURE__ */ jsxs31("span", { style: { color: "#fbbf24" }, children: [
8822
9049
  "Agent does better by NOT finding these docs.",
8823
9050
  " "
8824
9051
  ] }),
@@ -8833,22 +9060,22 @@ function WeaknessesList({
8833
9060
  area.feature
8834
9061
  )) })
8835
9062
  ] }),
8836
- retrievalIssues.length > 0 && /* @__PURE__ */ jsxs32(Stack27, { space: 3, children: [
8837
- /* @__PURE__ */ jsxs32(Flex25, { align: "center", gap: 2, children: [
8838
- /* @__PURE__ */ jsx44(SearchIcon7, { style: { color: "#fbbf24" } }),
8839
- /* @__PURE__ */ jsx44(Text33, { size: 2, weight: "medium", children: "Retrieval Issues (<70% efficiency)" }),
8840
- /* @__PURE__ */ jsx44(InfoTip, { text: GLOSSARY.retrievalIssues })
9063
+ retrievalIssues.length > 0 && /* @__PURE__ */ jsxs31(Stack26, { space: 3, children: [
9064
+ /* @__PURE__ */ jsxs31(Flex24, { align: "center", gap: 2, children: [
9065
+ /* @__PURE__ */ jsx43(SearchIcon7, { style: { color: "#fbbf24" } }),
9066
+ /* @__PURE__ */ jsx43(Text32, { size: 2, weight: "medium", children: "Retrieval Issues (<70% efficiency)" }),
9067
+ /* @__PURE__ */ jsx43(InfoTip, { text: GLOSSARY.retrievalIssues })
8841
9068
  ] }),
8842
- /* @__PURE__ */ jsx44(Box21, { style: sectionStyle("amber"), children: retrievalIssues.map((area, i) => /* @__PURE__ */ jsxs32(
8843
- Box21,
9069
+ /* @__PURE__ */ jsx43(Box20, { style: sectionStyle("amber"), children: retrievalIssues.map((area, i) => /* @__PURE__ */ jsxs31(
9070
+ Box20,
8844
9071
  {
8845
9072
  padding: 4,
8846
9073
  style: i > 0 ? { borderTop: "1px solid rgba(245,158,11,0.2)" } : void 0,
8847
9074
  children: [
8848
- /* @__PURE__ */ jsxs32(Flex25, { align: "center", justify: "space-between", wrap: "wrap", children: [
8849
- /* @__PURE__ */ jsxs32(Flex25, { align: "center", gap: 2, children: [
8850
- /* @__PURE__ */ jsx44(Text33, { size: 2, weight: "medium", children: area.feature }),
8851
- /* @__PURE__ */ jsx44(
9075
+ /* @__PURE__ */ jsxs31(Flex24, { align: "center", justify: "space-between", wrap: "wrap", children: [
9076
+ /* @__PURE__ */ jsxs31(Flex24, { align: "center", gap: 2, children: [
9077
+ /* @__PURE__ */ jsx43(Text32, { size: 2, weight: "medium", children: area.feature }),
9078
+ /* @__PURE__ */ jsx43(
8852
9079
  "span",
8853
9080
  {
8854
9081
  style: {
@@ -8863,7 +9090,7 @@ function WeaknessesList({
8863
9090
  }
8864
9091
  )
8865
9092
  ] }),
8866
- /* @__PURE__ */ jsx44(
9093
+ /* @__PURE__ */ jsx43(
8867
9094
  "span",
8868
9095
  {
8869
9096
  style: {
@@ -8876,7 +9103,7 @@ function WeaknessesList({
8876
9103
  }
8877
9104
  )
8878
9105
  ] }),
8879
- /* @__PURE__ */ jsx44(Box21, { paddingTop: 2, children: /* @__PURE__ */ jsxs32(Text33, { muted: true, size: 2, children: [
9106
+ /* @__PURE__ */ jsx43(Box20, { paddingTop: 2, children: /* @__PURE__ */ jsxs31(Text32, { muted: true, size: 2, children: [
8880
9107
  "Actual score (",
8881
9108
  Math.round(area.actualScore ?? 0),
8882
9109
  ") is much lower than ceiling (",
@@ -8891,21 +9118,21 @@ function WeaknessesList({
8891
9118
  area.feature
8892
9119
  )) })
8893
9120
  ] }),
8894
- dimWeaknesses.length > 0 && /* @__PURE__ */ jsxs32(Stack27, { space: 3, children: [
8895
- /* @__PURE__ */ jsxs32(Flex25, { align: "center", gap: 2, children: [
8896
- /* @__PURE__ */ jsx44(WarningOutlineIcon3, { style: { color: "#fbbf24" } }),
8897
- /* @__PURE__ */ jsx44(Text33, { size: 2, weight: "medium", children: "Dimension Weaknesses (<50)" }),
8898
- /* @__PURE__ */ jsx44(InfoTip, { text: GLOSSARY.dimWeaknesses })
9121
+ dimWeaknesses.length > 0 && /* @__PURE__ */ jsxs31(Stack26, { space: 3, children: [
9122
+ /* @__PURE__ */ jsxs31(Flex24, { align: "center", gap: 2, children: [
9123
+ /* @__PURE__ */ jsx43(WarningOutlineIcon3, { style: { color: "#fbbf24" } }),
9124
+ /* @__PURE__ */ jsx43(Text32, { size: 2, weight: "medium", children: "Dimension Weaknesses (<50)" }),
9125
+ /* @__PURE__ */ jsx43(InfoTip, { text: GLOSSARY.dimWeaknesses })
8899
9126
  ] }),
8900
- /* @__PURE__ */ jsx44(Box21, { style: neutralCardStyle, children: dimWeaknesses.map(({ area, dims }, i) => /* @__PURE__ */ jsxs32(
8901
- Box21,
9127
+ /* @__PURE__ */ jsx43(Box20, { style: neutralCardStyle, children: dimWeaknesses.map(({ area, dims }, i) => /* @__PURE__ */ jsxs31(
9128
+ Box20,
8902
9129
  {
8903
9130
  padding: 4,
8904
9131
  style: i > 0 ? dividerStyle : void 0,
8905
9132
  children: [
8906
- /* @__PURE__ */ jsxs32(Flex25, { align: "center", gap: 2, paddingBottom: 2, children: [
8907
- /* @__PURE__ */ jsx44(Text33, { size: 2, weight: "medium", children: area.feature }),
8908
- /* @__PURE__ */ jsx44(
9133
+ /* @__PURE__ */ jsxs31(Flex24, { align: "center", gap: 2, paddingBottom: 2, children: [
9134
+ /* @__PURE__ */ jsx43(Text32, { size: 2, weight: "medium", children: area.feature }),
9135
+ /* @__PURE__ */ jsx43(
8909
9136
  "span",
8910
9137
  {
8911
9138
  style: {
@@ -8920,7 +9147,7 @@ function WeaknessesList({
8920
9147
  }
8921
9148
  )
8922
9149
  ] }),
8923
- /* @__PURE__ */ jsx44(Flex25, { gap: 2, wrap: "wrap", children: dims.map((w) => /* @__PURE__ */ jsx44(HoverTip, { text: w.tip, children: /* @__PURE__ */ jsxs32(
9150
+ /* @__PURE__ */ jsx43(Flex24, { gap: 2, wrap: "wrap", children: dims.map((w) => /* @__PURE__ */ jsx43(HoverTip, { text: w.tip, children: /* @__PURE__ */ jsxs31(
8924
9151
  "span",
8925
9152
  {
8926
9153
  style: {
@@ -8942,33 +9169,33 @@ function WeaknessesList({
8942
9169
  area.feature
8943
9170
  )) })
8944
9171
  ] }),
8945
- regressed.length > 0 && /* @__PURE__ */ jsxs32(Box21, { style: neutralCardStyle, children: [
8946
- /* @__PURE__ */ jsx44(
8947
- Box21,
9172
+ regressed.length > 0 && /* @__PURE__ */ jsxs31(Box20, { style: neutralCardStyle, children: [
9173
+ /* @__PURE__ */ jsx43(
9174
+ Box20,
8948
9175
  {
8949
9176
  padding: 4,
8950
9177
  style: { borderBottom: "1px solid var(--card-border-color)" },
8951
- children: /* @__PURE__ */ jsxs32(Flex25, { align: "center", gap: 2, children: [
8952
- /* @__PURE__ */ jsx44(ArrowDownIcon2, { style: { color: "#f87171" } }),
8953
- /* @__PURE__ */ jsx44(Text33, { size: 2, weight: "medium", children: "Regressed Since Last Run" })
9178
+ children: /* @__PURE__ */ jsxs31(Flex24, { align: "center", gap: 2, children: [
9179
+ /* @__PURE__ */ jsx43(ArrowDownIcon2, { style: { color: "#f87171" } }),
9180
+ /* @__PURE__ */ jsx43(Text32, { size: 2, weight: "medium", children: "Regressed Since Last Run" })
8954
9181
  ] })
8955
9182
  }
8956
9183
  ),
8957
- /* @__PURE__ */ jsx44(Stack27, { children: regressed.map((featureName, i) => {
9184
+ /* @__PURE__ */ jsx43(Stack26, { children: regressed.map((featureName, i) => {
8958
9185
  const area = scores.find((s) => s.feature === featureName);
8959
9186
  const areaDelta = perArea?.[featureName];
8960
- return /* @__PURE__ */ jsxs32(
8961
- Flex25,
9187
+ return /* @__PURE__ */ jsxs31(
9188
+ Flex24,
8962
9189
  {
8963
9190
  align: "center",
8964
9191
  justify: "space-between",
8965
9192
  padding: 4,
8966
9193
  style: i > 0 ? dividerStyle : void 0,
8967
9194
  children: [
8968
- /* @__PURE__ */ jsx44(Text33, { size: 2, children: featureName }),
8969
- /* @__PURE__ */ jsxs32(Flex25, { align: "center", gap: 3, children: [
8970
- areaDelta != null && /* @__PURE__ */ jsx44(DeltaIndicator, { delta: areaDelta, icon: true }),
8971
- area && /* @__PURE__ */ jsx44(
9195
+ /* @__PURE__ */ jsx43(Text32, { size: 2, children: featureName }),
9196
+ /* @__PURE__ */ jsxs31(Flex24, { align: "center", gap: 3, children: [
9197
+ areaDelta != null && /* @__PURE__ */ jsx43(DeltaIndicator, { delta: areaDelta, icon: true }),
9198
+ area && /* @__PURE__ */ jsx43(
8972
9199
  "span",
8973
9200
  {
8974
9201
  style: {
@@ -8990,32 +9217,32 @@ function WeaknessesList({
8990
9217
  );
8991
9218
  }) })
8992
9219
  ] }),
8993
- efficiencyAnomalies.length > 0 && /* @__PURE__ */ jsxs32(Box21, { style: neutralCardStyle, children: [
8994
- /* @__PURE__ */ jsx44(
8995
- Box21,
9220
+ efficiencyAnomalies.length > 0 && /* @__PURE__ */ jsxs31(Box20, { style: neutralCardStyle, children: [
9221
+ /* @__PURE__ */ jsx43(
9222
+ Box20,
8996
9223
  {
8997
9224
  padding: 4,
8998
9225
  style: { borderBottom: "1px solid var(--card-border-color)" },
8999
- children: /* @__PURE__ */ jsxs32(Stack27, { space: 2, children: [
9000
- /* @__PURE__ */ jsxs32(Flex25, { align: "center", gap: 2, children: [
9001
- /* @__PURE__ */ jsx44(BoltIcon2, { style: { color: "#fbbf24" } }),
9002
- /* @__PURE__ */ jsx44(Text33, { size: 2, weight: "medium", children: "Efficiency Anomalies (>100%)" }),
9003
- /* @__PURE__ */ jsx44(InfoTip, { text: GLOSSARY.efficiencyAnomalies })
9226
+ children: /* @__PURE__ */ jsxs31(Stack26, { space: 2, children: [
9227
+ /* @__PURE__ */ jsxs31(Flex24, { align: "center", gap: 2, children: [
9228
+ /* @__PURE__ */ jsx43(BoltIcon, { style: { color: "#fbbf24" } }),
9229
+ /* @__PURE__ */ jsx43(Text32, { size: 2, weight: "medium", children: "Efficiency Anomalies (>100%)" }),
9230
+ /* @__PURE__ */ jsx43(InfoTip, { text: GLOSSARY.efficiencyAnomalies })
9004
9231
  ] }),
9005
- /* @__PURE__ */ jsx44(Text33, { muted: true, size: 2, children: "Agent outperforms injected docs \u2014 may indicate doc quality issues or agent memorization." })
9232
+ /* @__PURE__ */ jsx43(Text32, { muted: true, size: 2, children: "Agent outperforms injected docs \u2014 may indicate doc quality issues or agent memorization." })
9006
9233
  ] })
9007
9234
  }
9008
9235
  ),
9009
- /* @__PURE__ */ jsx44(Stack27, { children: efficiencyAnomalies.map((area, i) => /* @__PURE__ */ jsxs32(
9010
- Flex25,
9236
+ /* @__PURE__ */ jsx43(Stack26, { children: efficiencyAnomalies.map((area, i) => /* @__PURE__ */ jsxs31(
9237
+ Flex24,
9011
9238
  {
9012
9239
  align: "center",
9013
9240
  justify: "space-between",
9014
9241
  padding: 4,
9015
9242
  style: i > 0 ? dividerStyle : void 0,
9016
9243
  children: [
9017
- /* @__PURE__ */ jsx44(Text33, { size: 2, children: area.feature }),
9018
- /* @__PURE__ */ jsx44(
9244
+ /* @__PURE__ */ jsx43(Text32, { size: 2, children: area.feature }),
9245
+ /* @__PURE__ */ jsx43(
9019
9246
  "span",
9020
9247
  {
9021
9248
  style: {
@@ -9043,12 +9270,12 @@ var tipArea = {
9043
9270
  fontWeight: 600
9044
9271
  };
9045
9272
  function dimTip(area, dim, score, description) {
9046
- return /* @__PURE__ */ jsxs32(Text33, { size: 2, style: { lineHeight: 1.5 }, children: [
9047
- /* @__PURE__ */ jsx44("span", { style: tipArea, children: area }),
9273
+ return /* @__PURE__ */ jsxs31(Text32, { size: 2, style: { lineHeight: 1.5 }, children: [
9274
+ /* @__PURE__ */ jsx43("span", { style: tipArea, children: area }),
9048
9275
  " scores",
9049
9276
  " ",
9050
- /* @__PURE__ */ jsx44("span", { style: tipValue, children: score }),
9051
- /* @__PURE__ */ jsx44("span", { style: { color: "var(--card-muted-fg-color)" }, children: "/100" }),
9277
+ /* @__PURE__ */ jsx43("span", { style: tipValue, children: score }),
9278
+ /* @__PURE__ */ jsx43("span", { style: { color: "var(--card-muted-fg-color)" }, children: "/100" }),
9052
9279
  " on",
9053
9280
  " ",
9054
9281
  dim.toLowerCase(),
@@ -9077,7 +9304,7 @@ function getDimensionWeaknesses(area) {
9077
9304
  }
9078
9305
 
9079
9306
  // src/components/report-detail/ReportDetail.tsx
9080
- import { jsx as jsx45, jsxs as jsxs33 } from "react/jsx-runtime";
9307
+ import { jsx as jsx44, jsxs as jsxs32 } from "react/jsx-runtime";
9081
9308
  var OVERVIEW_TAB = { id: "overview", label: "Overview" };
9082
9309
  var DIAGNOSTICS_TAB = { id: "diagnostics", label: "Diagnostics" };
9083
9310
  var ACTIVITY_TAB = { id: "activity", label: "Agent Activity" };
@@ -9094,8 +9321,8 @@ function ReportDetail({
9094
9321
  subTab
9095
9322
  }) {
9096
9323
  const client = useClient10({ apiVersion: API_VERSION });
9097
- const [loading, setLoading] = useState19(true);
9098
- const [report, setReport] = useState19(null);
9324
+ const [loading, setLoading] = useState20(true);
9325
+ const [report, setReport] = useState20(null);
9099
9326
  useEffect9(() => {
9100
9327
  let cancelled = false;
9101
9328
  setLoading(true);
@@ -9111,9 +9338,14 @@ function ReportDetail({
9111
9338
  cancelled = true;
9112
9339
  };
9113
9340
  }, [client, reportId]);
9341
+ const artifactCache = useArtifactCache(
9342
+ reportId,
9343
+ report?.summary?.artifacts?.testOutputs,
9344
+ client
9345
+ );
9114
9346
  const { summary } = report ?? {};
9115
9347
  const hasWeaknesses = Boolean(
9116
- summary?.recommendations && summary.recommendations.gaps.length > 0 || summary?.lowScoringJudgments && summary.lowScoringJudgments.length > 0
9348
+ summary?.lowScoringJudgments && summary.lowScoringJudgments.length > 0
9117
9349
  );
9118
9350
  const hasDiagnostics = Boolean(
9119
9351
  summary?.scores && summary.scores.length > 0 || hasWeaknesses
@@ -9136,18 +9368,18 @@ function ReportDetail({
9136
9368
  if (disabledTabs.has(parsed)) return "overview";
9137
9369
  return tabs.some((t) => t.id === parsed) ? parsed : "overview";
9138
9370
  }, [activeTab, disabledTabs, tabs]);
9139
- const handleTabClick = useCallback25(
9371
+ const handleTabClick = useCallback26(
9140
9372
  (tabId) => {
9141
9373
  onTabChange(tabId === "overview" ? null : tabId, null, null);
9142
9374
  },
9143
9375
  [onTabChange]
9144
9376
  );
9145
9377
  if (loading) {
9146
- return /* @__PURE__ */ jsx45(LoadingState, { message: "Loading report\u2026" });
9378
+ return /* @__PURE__ */ jsx44(LoadingState, { message: "Loading report\u2026" });
9147
9379
  }
9148
9380
  if (!report || !summary) {
9149
- return /* @__PURE__ */ jsx45(Box22, { padding: 5, children: /* @__PURE__ */ jsxs33(Stack28, { space: 4, children: [
9150
- /* @__PURE__ */ jsx45(
9381
+ return /* @__PURE__ */ jsx44(Box21, { padding: 5, children: /* @__PURE__ */ jsxs32(Stack27, { space: 4, children: [
9382
+ /* @__PURE__ */ jsx44(
9151
9383
  Button8,
9152
9384
  {
9153
9385
  icon: ArrowLeftIcon3,
@@ -9156,13 +9388,13 @@ function ReportDetail({
9156
9388
  text: "Back"
9157
9389
  }
9158
9390
  ),
9159
- /* @__PURE__ */ jsx45(Text34, { align: "center", muted: true, size: 3, children: "Report not found" })
9391
+ /* @__PURE__ */ jsx44(Text33, { align: "center", muted: true, size: 3, children: "Report not found" })
9160
9392
  ] }) });
9161
9393
  }
9162
9394
  const { comparison, provenance } = report;
9163
9395
  const totalTests = summary.scores.reduce((n, s) => n + s.testCount, 0);
9164
- return /* @__PURE__ */ jsx45(Box22, { padding: 4, children: /* @__PURE__ */ jsxs33(Stack28, { space: 5, children: [
9165
- /* @__PURE__ */ jsx45(
9396
+ return /* @__PURE__ */ jsx44(Box21, { padding: 4, children: /* @__PURE__ */ jsxs32(Stack27, { space: 5, children: [
9397
+ /* @__PURE__ */ jsx44(
9166
9398
  ReportHeader,
9167
9399
  {
9168
9400
  completedAt: report.completedAt,
@@ -9171,11 +9403,11 @@ function ReportDetail({
9171
9403
  title: report.title
9172
9404
  }
9173
9405
  ),
9174
- /* @__PURE__ */ jsxs33(Flex26, { align: "center", gap: 2, wrap: "wrap", children: [
9175
- /* @__PURE__ */ jsx45(TabList, { space: 1, children: tabs.map((tab) => {
9406
+ /* @__PURE__ */ jsxs32(Flex25, { align: "center", gap: 2, wrap: "wrap", children: [
9407
+ /* @__PURE__ */ jsx44(TabList, { space: 1, children: tabs.map((tab) => {
9176
9408
  const isDisabled = disabledTabs.has(tab.id);
9177
9409
  const tooltip = getDisabledTabTooltip(tab.id, summary);
9178
- const tabElement = /* @__PURE__ */ jsx45(
9410
+ const tabElement = /* @__PURE__ */ jsx44(
9179
9411
  Tab,
9180
9412
  {
9181
9413
  "aria-controls": `panel-${tab.id}`,
@@ -9186,27 +9418,27 @@ function ReportDetail({
9186
9418
  selected: currentTab === tab.id
9187
9419
  }
9188
9420
  );
9189
- return isDisabled && tooltip ? /* @__PURE__ */ jsx45(
9421
+ return isDisabled && tooltip ? /* @__PURE__ */ jsx44(
9190
9422
  Tooltip8,
9191
9423
  {
9192
- content: /* @__PURE__ */ jsx45(Box22, { padding: 2, style: { maxWidth: 280 }, children: tooltip }),
9424
+ content: /* @__PURE__ */ jsx44(Box21, { padding: 2, style: { maxWidth: 280 }, children: tooltip }),
9193
9425
  placement: "bottom",
9194
9426
  portal: true,
9195
- children: /* @__PURE__ */ jsx45("span", { style: { display: "inline-block" }, children: tabElement })
9427
+ children: /* @__PURE__ */ jsx44("span", { style: { display: "inline-block" }, children: tabElement })
9196
9428
  },
9197
9429
  tab.id
9198
- ) : /* @__PURE__ */ jsx45("span", { children: tabElement }, tab.id);
9430
+ ) : /* @__PURE__ */ jsx44("span", { children: tabElement }, tab.id);
9199
9431
  }) }),
9200
- /* @__PURE__ */ jsxs33(Flex26, { align: "center", gap: 2, style: { marginLeft: "auto" }, children: [
9201
- /* @__PURE__ */ jsx45(
9432
+ /* @__PURE__ */ jsxs32(Flex25, { align: "center", gap: 2, style: { marginLeft: "auto" }, children: [
9433
+ /* @__PURE__ */ jsx44(
9202
9434
  HoverTip,
9203
9435
  {
9204
9436
  text: SOURCE_TIP[provenance.source.name] ?? GLOSSARY.reportMode,
9205
- children: /* @__PURE__ */ jsx45(Badge7, { mode: "outline", tone: "default", children: provenance.source.name })
9437
+ children: /* @__PURE__ */ jsx44(Badge7, { mode: "outline", tone: "default", children: provenance.source.name })
9206
9438
  }
9207
9439
  ),
9208
- /* @__PURE__ */ jsx45(HoverTip, { text: MODE_TIP2[provenance.mode] ?? GLOSSARY.reportMode, children: /* @__PURE__ */ jsx45(Badge7, { tone: "primary", children: provenance.mode }) }),
9209
- /* @__PURE__ */ jsx45(
9440
+ /* @__PURE__ */ jsx44(HoverTip, { text: MODE_TIP2[provenance.mode] ?? GLOSSARY.reportMode, children: /* @__PURE__ */ jsx44(Badge7, { tone: "primary", children: provenance.mode }) }),
9441
+ /* @__PURE__ */ jsx44(
9210
9442
  ReportActions,
9211
9443
  {
9212
9444
  documentId: report._id,
@@ -9217,14 +9449,14 @@ function ReportDetail({
9217
9449
  )
9218
9450
  ] })
9219
9451
  ] }),
9220
- currentTab === "overview" && /* @__PURE__ */ jsx45(
9452
+ currentTab === "overview" && /* @__PURE__ */ jsx44(
9221
9453
  TabPanel,
9222
9454
  {
9223
9455
  "aria-labelledby": "tab-overview",
9224
9456
  hidden: currentTab !== "overview",
9225
9457
  id: "panel-overview",
9226
- children: /* @__PURE__ */ jsxs33(Stack28, { space: 5, children: [
9227
- /* @__PURE__ */ jsx45(
9458
+ children: /* @__PURE__ */ jsxs32(Stack27, { space: 5, children: [
9459
+ /* @__PURE__ */ jsx44(
9228
9460
  DiagnosticsOverview,
9229
9461
  {
9230
9462
  comparison,
@@ -9235,32 +9467,33 @@ function ReportDetail({
9235
9467
  totalTests
9236
9468
  }
9237
9469
  ),
9238
- /* @__PURE__ */ jsx45(LineageCard, { provenance, reportId: report.reportId }),
9239
- /* @__PURE__ */ jsx45(ProvenanceCard, { provenance })
9470
+ /* @__PURE__ */ jsx44(LineageCard, { provenance, reportId: report.reportId }),
9471
+ /* @__PURE__ */ jsx44(ProvenanceCard, { provenance })
9240
9472
  ] })
9241
9473
  }
9242
9474
  ),
9243
- currentTab === "diagnostics" && hasDiagnostics && /* @__PURE__ */ jsx45(
9475
+ currentTab === "diagnostics" && hasDiagnostics && /* @__PURE__ */ jsx44(
9244
9476
  DiagnosticsPanel,
9245
9477
  {
9478
+ artifactCache,
9246
9479
  comparison,
9247
9480
  focus,
9248
9481
  judgments: summary.lowScoringJudgments,
9249
9482
  mode: provenance.mode,
9250
9483
  onNavigate: (newSubTab, newFocus) => onTabChange("diagnostics", newSubTab, newFocus),
9251
9484
  perModel: summary.perModel,
9252
- recommendations: summary.recommendations,
9253
9485
  scores: summary.scores,
9254
- subTab
9486
+ subTab,
9487
+ testResults: summary.testResults
9255
9488
  }
9256
9489
  ),
9257
- currentTab === "activity" && hasAgentActivity && /* @__PURE__ */ jsx45(
9490
+ currentTab === "activity" && hasAgentActivity && /* @__PURE__ */ jsx44(
9258
9491
  TabPanel,
9259
9492
  {
9260
9493
  "aria-labelledby": "tab-activity",
9261
9494
  hidden: currentTab !== "activity",
9262
9495
  id: "panel-activity",
9263
- children: /* @__PURE__ */ jsx45(
9496
+ children: /* @__PURE__ */ jsx44(
9264
9497
  AgentActivitySection,
9265
9498
  {
9266
9499
  agentBehavior: summary.agentBehavior,
@@ -9280,23 +9513,24 @@ var DIAG_TABS = [
9280
9513
  { id: "issues", label: "Issues" }
9281
9514
  ];
9282
9515
  function DiagnosticsPanel({
9516
+ artifactCache,
9283
9517
  comparison,
9284
9518
  focus,
9285
9519
  judgments,
9286
9520
  mode,
9287
9521
  onNavigate,
9288
9522
  perModel,
9289
- recommendations,
9290
9523
  scores,
9291
- subTab: subTabParam
9524
+ subTab: subTabParam,
9525
+ testResults
9292
9526
  }) {
9293
9527
  const subTab = parseDiagSubTab(subTabParam);
9294
9528
  const issueCount = scores.filter((s) => s.totalScore < SCORE_CAUTION).length + scores.filter((s) => s.negativeDocLift).length + scores.filter(
9295
9529
  (s) => s.infrastructureEfficiency != null && s.infrastructureEfficiency < EFFICIENCY_CAUTION && !s.invertedRetrievalGap
9296
9530
  ).length;
9297
- return /* @__PURE__ */ jsx45(TabPanel, { "aria-labelledby": "tab-diagnostics", id: "panel-diagnostics", children: /* @__PURE__ */ jsxs33(Stack28, { space: 4, children: [
9298
- /* @__PURE__ */ jsx45(
9299
- Flex26,
9531
+ return /* @__PURE__ */ jsx44(TabPanel, { "aria-labelledby": "tab-diagnostics", id: "panel-diagnostics", children: /* @__PURE__ */ jsxs32(Stack27, { space: 4, children: [
9532
+ /* @__PURE__ */ jsx44(
9533
+ Flex25,
9300
9534
  {
9301
9535
  align: "center",
9302
9536
  gap: 1,
@@ -9305,7 +9539,7 @@ function DiagnosticsPanel({
9305
9539
  paddingBottom: 8
9306
9540
  },
9307
9541
  wrap: "wrap",
9308
- children: DIAG_TABS.map((tab) => /* @__PURE__ */ jsxs33(
9542
+ children: DIAG_TABS.map((tab) => /* @__PURE__ */ jsxs32(
9309
9543
  "button",
9310
9544
  {
9311
9545
  onClick: () => onNavigate(tab.id === "strengths" ? null : tab.id, null),
@@ -9325,7 +9559,7 @@ function DiagnosticsPanel({
9325
9559
  type: "button",
9326
9560
  children: [
9327
9561
  tab.label,
9328
- tab.id === "issues" && issueCount > 0 && /* @__PURE__ */ jsx45(
9562
+ tab.id === "issues" && issueCount > 0 && /* @__PURE__ */ jsx44(
9329
9563
  "span",
9330
9564
  {
9331
9565
  style: {
@@ -9345,7 +9579,7 @@ function DiagnosticsPanel({
9345
9579
  ))
9346
9580
  }
9347
9581
  ),
9348
- subTab === "strengths" && /* @__PURE__ */ jsx45(
9582
+ subTab === "strengths" && /* @__PURE__ */ jsx44(
9349
9583
  StrengthsList,
9350
9584
  {
9351
9585
  comparison,
@@ -9354,8 +9588,8 @@ function DiagnosticsPanel({
9354
9588
  scores
9355
9589
  }
9356
9590
  ),
9357
- subTab === "issues" && /* @__PURE__ */ jsxs33(Stack28, { space: 5, children: [
9358
- /* @__PURE__ */ jsx45(
9591
+ subTab === "issues" && /* @__PURE__ */ jsxs32(Stack27, { space: 5, children: [
9592
+ /* @__PURE__ */ jsx44(
9359
9593
  WeaknessesList,
9360
9594
  {
9361
9595
  comparison,
@@ -9364,13 +9598,14 @@ function DiagnosticsPanel({
9364
9598
  scores
9365
9599
  }
9366
9600
  ),
9367
- recommendations && recommendations.gaps.length > 0 && /* @__PURE__ */ jsx45(RecommendationsSection, { recommendations }),
9368
- judgments && judgments.length > 0 && /* @__PURE__ */ jsx45(
9601
+ judgments && judgments.length > 0 && /* @__PURE__ */ jsx44(
9369
9602
  JudgmentList,
9370
9603
  {
9604
+ artifactCache,
9371
9605
  focus,
9372
9606
  judgments,
9373
- onFocusChange: (slug) => onNavigate("issues", slug)
9607
+ onFocusChange: (slug) => onNavigate("issues", slug),
9608
+ testResults
9374
9609
  }
9375
9610
  )
9376
9611
  ] })
@@ -9399,17 +9634,17 @@ function getDisabledTabTooltip(tabId, summary) {
9399
9634
  if (!summary) return null;
9400
9635
  switch (tabId) {
9401
9636
  case "diagnostics":
9402
- return /* @__PURE__ */ jsx45(Text34, { muted: true, size: 2, children: "No diagnostic data available. Diagnostics require at least one scored feature area." });
9637
+ return /* @__PURE__ */ jsx44(Text33, { muted: true, size: 2, children: "No diagnostic data available. Diagnostics require at least one scored feature area." });
9403
9638
  case "activity":
9404
- return summary.evaluationMode === "baseline" ? /* @__PURE__ */ jsxs33(Text34, { muted: true, size: 2, children: [
9639
+ return summary.evaluationMode === "baseline" ? /* @__PURE__ */ jsxs32(Text33, { muted: true, size: 2, children: [
9405
9640
  "Not available for baseline-only evaluations. Run with",
9406
9641
  " ",
9407
- /* @__PURE__ */ jsx45("code", { style: inlineCodeStyle, children: "--mode full" }),
9642
+ /* @__PURE__ */ jsx44("code", { style: inlineCodeStyle, children: "--mode full" }),
9408
9643
  " or",
9409
9644
  " ",
9410
- /* @__PURE__ */ jsx45("code", { style: inlineCodeStyle, children: "--mode agentic" }),
9645
+ /* @__PURE__ */ jsx44("code", { style: inlineCodeStyle, children: "--mode agentic" }),
9411
9646
  " to capture agent browsing behavior."
9412
- ] }) : /* @__PURE__ */ jsx45(Text34, { muted: true, size: 2, children: "No agent activity data was recorded for this evaluation." });
9647
+ ] }) : /* @__PURE__ */ jsx44(Text33, { muted: true, size: 2, children: "No agent activity data was recorded for this evaluation." });
9413
9648
  default:
9414
9649
  return null;
9415
9650
  }
@@ -9417,12 +9652,12 @@ function getDisabledTabTooltip(tabId, summary) {
9417
9652
 
9418
9653
  // src/components/report-detail/AreaScoreRow.tsx
9419
9654
  import { WarningOutlineIcon as WarningOutlineIcon4 } from "@sanity/icons";
9420
- import { Box as Box23, Flex as Flex27, Stack as Stack29, Text as Text35 } from "@sanity/ui";
9421
- import { jsx as jsx46, jsxs as jsxs34 } from "react/jsx-runtime";
9655
+ import { Box as Box22, Flex as Flex26, Stack as Stack28, Text as Text34 } from "@sanity/ui";
9656
+ import { jsx as jsx45, jsxs as jsxs33 } from "react/jsx-runtime";
9422
9657
 
9423
9658
  // src/components/report-detail/AreaScoreTable.tsx
9424
9659
  import React4 from "react";
9425
- import { Card as Card17, Stack as Stack30, Text as Text37 } from "@sanity/ui";
9660
+ import { Card as Card17, Stack as Stack29, Text as Text36 } from "@sanity/ui";
9426
9661
 
9427
9662
  // src/lib/scoring.ts
9428
9663
  var HEX_MAP = {
@@ -9439,18 +9674,23 @@ function scoreHex(score) {
9439
9674
  }
9440
9675
 
9441
9676
  // src/components/primitives/ScoreCell.tsx
9442
- import { Card as Card16, Text as Text36 } from "@sanity/ui";
9443
- import { jsx as jsx47 } from "react/jsx-runtime";
9677
+ import { Card as Card16, Text as Text35 } from "@sanity/ui";
9678
+ import { jsx as jsx46 } from "react/jsx-runtime";
9444
9679
 
9445
9680
  // src/components/report-detail/AreaScoreTable.tsx
9446
- import { jsx as jsx48, jsxs as jsxs35 } from "react/jsx-runtime";
9681
+ import { jsx as jsx47, jsxs as jsxs34 } from "react/jsx-runtime";
9447
9682
 
9448
9683
  // src/components/report-detail/ComparisonSummary.tsx
9449
- import { Badge as Badge8, Box as Box24, Card as Card18, Flex as Flex28, Grid as Grid4, Stack as Stack31, Text as Text38, Tooltip as Tooltip9 } from "@sanity/ui";
9450
- import { jsx as jsx49, jsxs as jsxs36 } from "react/jsx-runtime";
9684
+ import { Badge as Badge8, Box as Box23, Card as Card18, Flex as Flex27, Grid as Grid4, Stack as Stack30, Text as Text37, Tooltip as Tooltip9 } from "@sanity/ui";
9685
+ import { jsx as jsx48, jsxs as jsxs35 } from "react/jsx-runtime";
9451
9686
 
9452
9687
  // src/components/report-detail/OverviewStats.tsx
9453
9688
  import { Grid as Grid5 } from "@sanity/ui";
9689
+ import { jsx as jsx49, jsxs as jsxs36 } from "react/jsx-runtime";
9690
+
9691
+ // src/components/report-detail/RecommendationsSection.tsx
9692
+ import { BoltIcon as BoltIcon2 } from "@sanity/icons";
9693
+ import { Box as Box24, Flex as Flex28, Stack as Stack31, Text as Text38 } from "@sanity/ui";
9454
9694
  import { jsx as jsx50, jsxs as jsxs37 } from "react/jsx-runtime";
9455
9695
 
9456
9696
  // src/components/report-detail/ThreeLayerTable.tsx
@@ -9460,7 +9700,7 @@ import { jsx as jsx51, jsxs as jsxs38 } from "react/jsx-runtime";
9460
9700
 
9461
9701
  // src/components/ScoreTimeline.tsx
9462
9702
  import { Card as Card20, Flex as Flex30, Select as Select2, Stack as Stack33, Text as Text40 } from "@sanity/ui";
9463
- import { useCallback as useCallback26, useEffect as useEffect10, useMemo as useMemo10, useState as useState20 } from "react";
9703
+ import { useCallback as useCallback27, useEffect as useEffect10, useMemo as useMemo10, useState as useState21 } from "react";
9464
9704
  import { useClient as useClient11 } from "sanity";
9465
9705
  import { jsx as jsx52, jsxs as jsxs39 } from "react/jsx-runtime";
9466
9706
  var CHART_HEIGHT = 220;
@@ -9497,10 +9737,10 @@ function scoreForPoint(point, area) {
9497
9737
  }
9498
9738
  function ScoreTimeline({ mode = null, source = null }) {
9499
9739
  const client = useClient11({ apiVersion: API_VERSION });
9500
- const [dataPoints, setDataPoints] = useState20([]);
9501
- const [loading, setLoading] = useState20(true);
9502
- const [rangeDays, setRangeDays] = useState20(30);
9503
- const [selectedArea, setSelectedArea] = useState20(null);
9740
+ const [dataPoints, setDataPoints] = useState21([]);
9741
+ const [loading, setLoading] = useState21(true);
9742
+ const [rangeDays, setRangeDays] = useState21(30);
9743
+ const [selectedArea, setSelectedArea] = useState21(null);
9504
9744
  const areaNames = useMemo10(() => {
9505
9745
  const names = /* @__PURE__ */ new Set();
9506
9746
  for (const dp of dataPoints) {
@@ -9510,7 +9750,7 @@ function ScoreTimeline({ mode = null, source = null }) {
9510
9750
  }
9511
9751
  return Array.from(names).sort();
9512
9752
  }, [dataPoints]);
9513
- const fetchData = useCallback26(async () => {
9753
+ const fetchData = useCallback27(async () => {
9514
9754
  setLoading(true);
9515
9755
  try {
9516
9756
  const startDate = rangeDays ? daysAgo(rangeDays) : "1970-01-01T00:00:00Z";
@@ -9546,14 +9786,14 @@ function ScoreTimeline({ mode = null, source = null }) {
9546
9786
  if (chartPoints.length === 0) return 0;
9547
9787
  return chartPoints.reduce((sum, p) => sum + p.score, 0) / chartPoints.length;
9548
9788
  }, [chartPoints]);
9549
- const handleRangeChange = useCallback26(
9789
+ const handleRangeChange = useCallback27(
9550
9790
  (e) => {
9551
9791
  const val = e.currentTarget.value;
9552
9792
  setRangeDays(val === "all" ? null : Number(val));
9553
9793
  },
9554
9794
  []
9555
9795
  );
9556
- const handleAreaChange = useCallback26(
9796
+ const handleAreaChange = useCallback27(
9557
9797
  (e) => {
9558
9798
  const val = e.currentTarget.value;
9559
9799
  setSelectedArea(val || null);
@@ -9699,7 +9939,7 @@ function DashboardContent() {
9699
9939
  const isDetail = reportId !== null;
9700
9940
  const activeTab = isDetail ? "latest" : VIEW_PARAM_MAP[routerState.view ?? ""] ?? "latest";
9701
9941
  const defaultTopic = deriveHelpTopic(routerState);
9702
- const navigateToTab = useCallback27(
9942
+ const navigateToTab = useCallback28(
9703
9943
  (tab) => {
9704
9944
  if (tab === "latest") {
9705
9945
  router.navigate({});
@@ -9709,13 +9949,13 @@ function DashboardContent() {
9709
9949
  },
9710
9950
  [router]
9711
9951
  );
9712
- const handleSelectReport = useCallback27(
9952
+ const handleSelectReport = useCallback28(
9713
9953
  (id) => {
9714
9954
  router.navigate({ reportId: id });
9715
9955
  },
9716
9956
  [router]
9717
9957
  );
9718
- const handleTabChange = useCallback27(
9958
+ const handleTabChange = useCallback28(
9719
9959
  (tab, subTab, focus) => {
9720
9960
  if (!routerState.reportId) return;
9721
9961
  const state = {
@@ -9728,10 +9968,10 @@ function DashboardContent() {
9728
9968
  },
9729
9969
  [router, routerState.reportId]
9730
9970
  );
9731
- const handleBack = useCallback27(() => {
9971
+ const handleBack = useCallback28(() => {
9732
9972
  router.navigate({});
9733
9973
  }, [router]);
9734
- const handleOpenHelp = useCallback27(() => {
9974
+ const handleOpenHelp = useCallback28(() => {
9735
9975
  openHelp(defaultTopic);
9736
9976
  }, [openHelp, defaultTopic]);
9737
9977
  return /* @__PURE__ */ jsx53(Container, { width: 4, children: /* @__PURE__ */ jsxs40(Stack34, { padding: 4, space: 4, children: [
@@ -9822,7 +10062,7 @@ function ailfTool(options = {}) {
9822
10062
  // src/actions/RunEvaluationAction.tsx
9823
10063
  import { BarChartIcon as BarChartIcon2 } from "@sanity/icons";
9824
10064
  import { useToast as useToast10 } from "@sanity/ui";
9825
- import { useCallback as useCallback28, useEffect as useEffect11, useRef as useRef6, useState as useState21 } from "react";
10065
+ import { useCallback as useCallback29, useEffect as useEffect11, useRef as useRef7, useState as useState22 } from "react";
9826
10066
  import {
9827
10067
  getReleaseIdFromReleaseDocumentId as getReleaseIdFromReleaseDocumentId3,
9828
10068
  useClient as useClient12,
@@ -9853,8 +10093,8 @@ function createRunEvaluationAction(options = {}) {
9853
10093
  const projectId = useProjectId2();
9854
10094
  const currentUser = useCurrentUser4();
9855
10095
  const toast = useToast10();
9856
- const [state, setState] = useState21({ status: "loading" });
9857
- const requestedAtRef = useRef6(null);
10096
+ const [state, setState] = useState22({ status: "loading" });
10097
+ const requestedAtRef = useRef7(null);
9858
10098
  const perspectiveId = getReleaseIdFromReleaseDocumentId3(release._id);
9859
10099
  useEffect11(() => {
9860
10100
  let cancelled = false;
@@ -9949,7 +10189,7 @@ function createRunEvaluationAction(options = {}) {
9949
10189
  }, 15e3);
9950
10190
  return () => clearTimeout(timer);
9951
10191
  }, [client, perspectiveId, state]);
9952
- const handleRequest = useCallback28(async () => {
10192
+ const handleRequest = useCallback29(async () => {
9953
10193
  const releaseTitle = release.metadata?.title ?? perspectiveId ?? "release";
9954
10194
  const tag = `release-${slugify3(releaseTitle)}-${dateStamp3()}`;
9955
10195
  const now = Date.now();