@sanity/ailf-studio 0.1.16 → 0.1.18
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/README.md +37 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.js +516 -333
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -486,6 +486,14 @@ var evalRequestSchema = defineType({
|
|
|
486
486
|
title: "Report ID",
|
|
487
487
|
type: "string"
|
|
488
488
|
}),
|
|
489
|
+
defineField({
|
|
490
|
+
description: "The report ID this request was re-run from (lineage tracking)",
|
|
491
|
+
group: ["optional", "all-fields"],
|
|
492
|
+
name: "sourceReportId",
|
|
493
|
+
readOnly: true,
|
|
494
|
+
title: "Source Report ID",
|
|
495
|
+
type: "string"
|
|
496
|
+
}),
|
|
489
497
|
defineField({
|
|
490
498
|
description: "ISO timestamp of when the request was created",
|
|
491
499
|
group: ["main", "all-fields"],
|
|
@@ -891,6 +899,25 @@ var reportSchema = defineType4({
|
|
|
891
899
|
name: "git",
|
|
892
900
|
title: "Git Metadata",
|
|
893
901
|
type: "object"
|
|
902
|
+
}),
|
|
903
|
+
defineField4({
|
|
904
|
+
fields: [
|
|
905
|
+
defineField4({
|
|
906
|
+
description: "Report ID this report was re-run from",
|
|
907
|
+
name: "rerunOf",
|
|
908
|
+
title: "Re-run Of",
|
|
909
|
+
type: "string"
|
|
910
|
+
}),
|
|
911
|
+
defineField4({
|
|
912
|
+
description: "Report ID this report was explicitly compared against",
|
|
913
|
+
name: "comparedAgainst",
|
|
914
|
+
title: "Compared Against",
|
|
915
|
+
type: "string"
|
|
916
|
+
})
|
|
917
|
+
],
|
|
918
|
+
name: "lineage",
|
|
919
|
+
title: "Lineage",
|
|
920
|
+
type: "object"
|
|
894
921
|
})
|
|
895
922
|
],
|
|
896
923
|
group: ["main", "all-fields"],
|
|
@@ -2454,6 +2481,26 @@ var taskSchema = defineType5({
|
|
|
2454
2481
|
}),
|
|
2455
2482
|
// -----------------------------------------------------------------------
|
|
2456
2483
|
// Execution controls
|
|
2484
|
+
//
|
|
2485
|
+
// Pipeline support status:
|
|
2486
|
+
// - `enabled` → ✅ used in GROQ filter (execution.enabled != false)
|
|
2487
|
+
// - `blocking` → 🔮 forward-looking — schema reserved, not yet enforced
|
|
2488
|
+
// by the pipeline. PR check workflow reports scores but
|
|
2489
|
+
// does not gate merges on this flag.
|
|
2490
|
+
// - `trigger.branches`, `trigger.paths` → ✅ used by repo-based task
|
|
2491
|
+
// threshold evaluator (RepoThresholdEvaluator)
|
|
2492
|
+
// - `trigger.labels`, `trigger.schedule` → 🔮 forward-looking — schema
|
|
2493
|
+
// reserved, not yet read by the pipeline GROQ query or
|
|
2494
|
+
// mapped to TaskDefinition.
|
|
2495
|
+
// - `threshold.score` → ✅ used by repo-based threshold evaluator
|
|
2496
|
+
// - `threshold.dimensions` → 🔮 forward-looking — schema reserved, not
|
|
2497
|
+
// yet read by the pipeline GROQ query or mapped to
|
|
2498
|
+
// TaskDefinition.
|
|
2499
|
+
//
|
|
2500
|
+
// When implementing a forward-looking field, update the GROQ query in
|
|
2501
|
+
// content-lake-task-source.ts, the ContentLakeTask interface, the
|
|
2502
|
+
// mapToTaskDefinition() mapping, and (if pipeline-relevant) the
|
|
2503
|
+
// TaskDefinition port type in @sanity/ailf-core.
|
|
2457
2504
|
// -----------------------------------------------------------------------
|
|
2458
2505
|
defineField5({
|
|
2459
2506
|
description: "Controls when and how this task runs in the pipeline. Tasks without execution controls use defaults: enabled, non-blocking, no filters, no threshold.",
|
|
@@ -2780,17 +2827,17 @@ import { route } from "sanity/router";
|
|
|
2780
2827
|
// src/components/Dashboard.tsx
|
|
2781
2828
|
import {
|
|
2782
2829
|
Container,
|
|
2783
|
-
Flex as
|
|
2830
|
+
Flex as Flex29,
|
|
2784
2831
|
Select as Select3,
|
|
2785
|
-
Stack as
|
|
2832
|
+
Stack as Stack27,
|
|
2786
2833
|
Tab as Tab2,
|
|
2787
2834
|
TabList as TabList2,
|
|
2788
2835
|
TabPanel as TabPanel2,
|
|
2789
|
-
Text as
|
|
2836
|
+
Text as Text36
|
|
2790
2837
|
} from "@sanity/ui";
|
|
2791
|
-
import { useCallback as
|
|
2792
|
-
import { useClient as
|
|
2793
|
-
import { useRouter } from "sanity/router";
|
|
2838
|
+
import { useCallback as useCallback22, useEffect as useEffect11, useState as useState17 } from "react";
|
|
2839
|
+
import { useClient as useClient14 } from "sanity";
|
|
2840
|
+
import { useRouter as useRouter2 } from "sanity/router";
|
|
2794
2841
|
|
|
2795
2842
|
// src/queries.ts
|
|
2796
2843
|
var REPORT_TYPE = "ailf.report";
|
|
@@ -4768,20 +4815,20 @@ import { ArrowLeftIcon as ArrowLeftIcon2 } from "@sanity/icons";
|
|
|
4768
4815
|
import {
|
|
4769
4816
|
Box as Box15,
|
|
4770
4817
|
Button as Button5,
|
|
4771
|
-
Stack as
|
|
4818
|
+
Stack as Stack25,
|
|
4772
4819
|
Tab,
|
|
4773
4820
|
TabList,
|
|
4774
4821
|
TabPanel,
|
|
4775
|
-
Text as
|
|
4822
|
+
Text as Text34,
|
|
4776
4823
|
Tooltip as Tooltip8
|
|
4777
4824
|
} from "@sanity/ui";
|
|
4778
4825
|
import {
|
|
4779
|
-
useCallback as
|
|
4780
|
-
useEffect as
|
|
4826
|
+
useCallback as useCallback20,
|
|
4827
|
+
useEffect as useEffect9,
|
|
4781
4828
|
useMemo as useMemo7,
|
|
4782
|
-
useState as
|
|
4829
|
+
useState as useState15
|
|
4783
4830
|
} from "react";
|
|
4784
|
-
import { useClient as
|
|
4831
|
+
import { useClient as useClient12 } from "sanity";
|
|
4785
4832
|
|
|
4786
4833
|
// src/components/report-detail/AgentActivitySection.tsx
|
|
4787
4834
|
import { useMemo as useMemo6, useState as useState8 } from "react";
|
|
@@ -5316,17 +5363,150 @@ function AreaBadgeGroup({
|
|
|
5316
5363
|
] });
|
|
5317
5364
|
}
|
|
5318
5365
|
|
|
5366
|
+
// src/components/report-detail/LineageCard.tsx
|
|
5367
|
+
import { LinkIcon as LinkIcon2 } from "@sanity/icons";
|
|
5368
|
+
import { Badge as Badge18, Card as Card18, Flex as Flex20, Stack as Stack18, Text as Text27 } from "@sanity/ui";
|
|
5369
|
+
import { useCallback as useCallback13, useEffect as useEffect8, useState as useState9 } from "react";
|
|
5370
|
+
import { useClient as useClient7 } from "sanity";
|
|
5371
|
+
import { useRouter } from "sanity/router";
|
|
5372
|
+
import { jsx as jsx32, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
5373
|
+
var REPORT_TYPE2 = "ailf.report";
|
|
5374
|
+
var SPAWNED_REPORTS_QUERY = (
|
|
5375
|
+
/* groq */
|
|
5376
|
+
`
|
|
5377
|
+
*[_type == $type && provenance.lineage.rerunOf == $reportId] | order(completedAt desc) {
|
|
5378
|
+
reportId,
|
|
5379
|
+
completedAt,
|
|
5380
|
+
tag
|
|
5381
|
+
}
|
|
5382
|
+
`
|
|
5383
|
+
);
|
|
5384
|
+
function LineageCard({ provenance, reportId }) {
|
|
5385
|
+
const { lineage } = provenance;
|
|
5386
|
+
const router = useRouter();
|
|
5387
|
+
const client = useClient7({ apiVersion: API_VERSION });
|
|
5388
|
+
const [spawned, setSpawned] = useState9([]);
|
|
5389
|
+
useEffect8(() => {
|
|
5390
|
+
let cancelled = false;
|
|
5391
|
+
client.fetch(SPAWNED_REPORTS_QUERY, {
|
|
5392
|
+
reportId,
|
|
5393
|
+
type: REPORT_TYPE2
|
|
5394
|
+
}).then((data) => {
|
|
5395
|
+
if (!cancelled) setSpawned(data ?? []);
|
|
5396
|
+
}).catch(() => {
|
|
5397
|
+
});
|
|
5398
|
+
return () => {
|
|
5399
|
+
cancelled = true;
|
|
5400
|
+
};
|
|
5401
|
+
}, [client, reportId]);
|
|
5402
|
+
const hasLineage = lineage?.rerunOf || lineage?.comparedAgainst;
|
|
5403
|
+
if (!hasLineage && spawned.length === 0) return null;
|
|
5404
|
+
return /* @__PURE__ */ jsx32(Card18, { padding: 4, radius: 2, shadow: 1, children: /* @__PURE__ */ jsxs26(Stack18, { space: 4, children: [
|
|
5405
|
+
/* @__PURE__ */ jsx32(Flex20, { align: "center", gap: 2, children: /* @__PURE__ */ jsxs26(Text27, { size: 3, weight: "semibold", children: [
|
|
5406
|
+
/* @__PURE__ */ jsx32(LinkIcon2, {}),
|
|
5407
|
+
" Lineage"
|
|
5408
|
+
] }) }),
|
|
5409
|
+
lineage?.rerunOf && /* @__PURE__ */ jsx32(
|
|
5410
|
+
LineageLink,
|
|
5411
|
+
{
|
|
5412
|
+
label: "Re-run of",
|
|
5413
|
+
reportId: lineage.rerunOf,
|
|
5414
|
+
router
|
|
5415
|
+
}
|
|
5416
|
+
),
|
|
5417
|
+
lineage?.comparedAgainst && /* @__PURE__ */ jsx32(
|
|
5418
|
+
LineageLink,
|
|
5419
|
+
{
|
|
5420
|
+
label: "Compared against",
|
|
5421
|
+
reportId: lineage.comparedAgainst,
|
|
5422
|
+
router
|
|
5423
|
+
}
|
|
5424
|
+
),
|
|
5425
|
+
spawned.length > 0 && /* @__PURE__ */ jsxs26(Stack18, { space: 2, children: [
|
|
5426
|
+
/* @__PURE__ */ jsx32(Text27, { muted: true, size: 1, weight: "semibold", children: "SPAWNED RE-RUNS" }),
|
|
5427
|
+
spawned.map((s) => /* @__PURE__ */ jsx32(SpawnedReportRow, { report: s, router }, s.reportId))
|
|
5428
|
+
] })
|
|
5429
|
+
] }) });
|
|
5430
|
+
}
|
|
5431
|
+
function LineageLink({
|
|
5432
|
+
label,
|
|
5433
|
+
reportId,
|
|
5434
|
+
router
|
|
5435
|
+
}) {
|
|
5436
|
+
const handleClick = useCallback13(() => {
|
|
5437
|
+
router.navigate({ reportId });
|
|
5438
|
+
}, [reportId, router]);
|
|
5439
|
+
return /* @__PURE__ */ jsxs26(Flex20, { align: "center", gap: 2, children: [
|
|
5440
|
+
/* @__PURE__ */ jsxs26(Text27, { muted: true, size: 2, weight: "semibold", children: [
|
|
5441
|
+
label,
|
|
5442
|
+
":"
|
|
5443
|
+
] }),
|
|
5444
|
+
/* @__PURE__ */ jsx32(Text27, { size: 2, children: /* @__PURE__ */ jsxs26(
|
|
5445
|
+
"a",
|
|
5446
|
+
{
|
|
5447
|
+
href: "#",
|
|
5448
|
+
onClick: (e) => {
|
|
5449
|
+
e.preventDefault();
|
|
5450
|
+
handleClick();
|
|
5451
|
+
},
|
|
5452
|
+
style: { cursor: "pointer" },
|
|
5453
|
+
children: [
|
|
5454
|
+
reportId.slice(0, 12),
|
|
5455
|
+
"\u2026"
|
|
5456
|
+
]
|
|
5457
|
+
}
|
|
5458
|
+
) })
|
|
5459
|
+
] });
|
|
5460
|
+
}
|
|
5461
|
+
function SpawnedReportRow({
|
|
5462
|
+
report,
|
|
5463
|
+
router
|
|
5464
|
+
}) {
|
|
5465
|
+
const handleClick = useCallback13(() => {
|
|
5466
|
+
router.navigate({ reportId: report.reportId });
|
|
5467
|
+
}, [report.reportId, router]);
|
|
5468
|
+
const dateLabel = formatShortDate(report.completedAt);
|
|
5469
|
+
const label = report.tag ?? dateLabel;
|
|
5470
|
+
return /* @__PURE__ */ jsxs26(Flex20, { align: "center", gap: 2, children: [
|
|
5471
|
+
/* @__PURE__ */ jsx32(Text27, { size: 2, children: /* @__PURE__ */ jsx32(
|
|
5472
|
+
"a",
|
|
5473
|
+
{
|
|
5474
|
+
href: "#",
|
|
5475
|
+
onClick: (e) => {
|
|
5476
|
+
e.preventDefault();
|
|
5477
|
+
handleClick();
|
|
5478
|
+
},
|
|
5479
|
+
style: { cursor: "pointer" },
|
|
5480
|
+
children: label
|
|
5481
|
+
}
|
|
5482
|
+
) }),
|
|
5483
|
+
report.tag && /* @__PURE__ */ jsx32(Text27, { muted: true, size: 1, children: dateLabel }),
|
|
5484
|
+
/* @__PURE__ */ jsx32(Badge18, { fontSize: 1, mode: "outline", tone: "default", children: report.reportId.slice(0, 8) })
|
|
5485
|
+
] });
|
|
5486
|
+
}
|
|
5487
|
+
function formatShortDate(iso) {
|
|
5488
|
+
try {
|
|
5489
|
+
return new Date(iso).toLocaleDateString("en-US", {
|
|
5490
|
+
day: "numeric",
|
|
5491
|
+
month: "short",
|
|
5492
|
+
year: "numeric"
|
|
5493
|
+
});
|
|
5494
|
+
} catch {
|
|
5495
|
+
return iso;
|
|
5496
|
+
}
|
|
5497
|
+
}
|
|
5498
|
+
|
|
5319
5499
|
// src/components/report-detail/JudgmentList.tsx
|
|
5320
|
-
import { useState as
|
|
5500
|
+
import { useState as useState10 } from "react";
|
|
5321
5501
|
import { HelpCircleIcon as HelpCircleIcon6 } from "@sanity/icons";
|
|
5322
|
-
import { Badge as
|
|
5502
|
+
import { Badge as Badge19, Box as Box12, Card as Card19, Flex as Flex21, Stack as Stack19, Text as Text28, Tooltip as Tooltip6 } from "@sanity/ui";
|
|
5323
5503
|
|
|
5324
5504
|
// src/components/primitives/InlineCode.tsx
|
|
5325
|
-
import { Fragment as Fragment5, jsx as
|
|
5505
|
+
import { Fragment as Fragment5, jsx as jsx33 } from "react/jsx-runtime";
|
|
5326
5506
|
function InlineCode({ text }) {
|
|
5327
5507
|
const parts = text.split(/`([^`]+)`/);
|
|
5328
|
-
return /* @__PURE__ */
|
|
5329
|
-
(part, i) => i % 2 === 1 ? /* @__PURE__ */
|
|
5508
|
+
return /* @__PURE__ */ jsx33(Fragment5, { children: parts.map(
|
|
5509
|
+
(part, i) => i % 2 === 1 ? /* @__PURE__ */ jsx33(
|
|
5330
5510
|
"code",
|
|
5331
5511
|
{
|
|
5332
5512
|
style: {
|
|
@@ -5338,12 +5518,12 @@ function InlineCode({ text }) {
|
|
|
5338
5518
|
children: part
|
|
5339
5519
|
},
|
|
5340
5520
|
i
|
|
5341
|
-
) : /* @__PURE__ */
|
|
5521
|
+
) : /* @__PURE__ */ jsx33("span", { children: part }, i)
|
|
5342
5522
|
) });
|
|
5343
5523
|
}
|
|
5344
5524
|
|
|
5345
5525
|
// src/components/report-detail/JudgmentList.tsx
|
|
5346
|
-
import { jsx as
|
|
5526
|
+
import { jsx as jsx34, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
5347
5527
|
function groupByArea(judgments) {
|
|
5348
5528
|
const byArea = /* @__PURE__ */ new Map();
|
|
5349
5529
|
for (const j of judgments) {
|
|
@@ -5358,56 +5538,56 @@ var DIMENSION_LABELS = DIMENSION_LABELS_KEBAB;
|
|
|
5358
5538
|
function JudgmentList({ judgments }) {
|
|
5359
5539
|
if (judgments.length === 0) return null;
|
|
5360
5540
|
const grouped = groupByArea(judgments);
|
|
5361
|
-
return /* @__PURE__ */
|
|
5362
|
-
/* @__PURE__ */
|
|
5363
|
-
/* @__PURE__ */
|
|
5364
|
-
/* @__PURE__ */
|
|
5541
|
+
return /* @__PURE__ */ jsx34(Card19, { padding: 4, radius: 2, shadow: 1, children: /* @__PURE__ */ jsxs27(Stack19, { space: 4, children: [
|
|
5542
|
+
/* @__PURE__ */ jsxs27(Flex21, { align: "center", gap: 3, wrap: "wrap", children: [
|
|
5543
|
+
/* @__PURE__ */ jsx34(Text28, { size: 3, weight: "semibold", children: "Low-Scoring Judgments" }),
|
|
5544
|
+
/* @__PURE__ */ jsx34(
|
|
5365
5545
|
Tooltip6,
|
|
5366
5546
|
{
|
|
5367
|
-
content: /* @__PURE__ */
|
|
5547
|
+
content: /* @__PURE__ */ jsx34(Box12, { padding: 2, style: { maxWidth: 260 }, children: /* @__PURE__ */ jsx34(Text28, { size: 2, children: GLOSSARY.lowScoringJudgments }) }),
|
|
5368
5548
|
placement: "bottom",
|
|
5369
5549
|
portal: true,
|
|
5370
|
-
children: /* @__PURE__ */
|
|
5550
|
+
children: /* @__PURE__ */ jsx34(Text28, { muted: true, size: 1, children: /* @__PURE__ */ jsx34(HelpCircleIcon6, {}) })
|
|
5371
5551
|
}
|
|
5372
5552
|
),
|
|
5373
|
-
/* @__PURE__ */
|
|
5553
|
+
/* @__PURE__ */ jsx34(Card19, { padding: 2, radius: 2, tone: "critical", children: /* @__PURE__ */ jsxs27(Text28, { size: 2, weight: "bold", children: [
|
|
5374
5554
|
judgments.length,
|
|
5375
5555
|
" judgment",
|
|
5376
5556
|
judgments.length === 1 ? "" : "s",
|
|
5377
5557
|
" below 70"
|
|
5378
5558
|
] }) })
|
|
5379
5559
|
] }),
|
|
5380
|
-
grouped.map(([area, areaJudgments]) => /* @__PURE__ */
|
|
5381
|
-
/* @__PURE__ */
|
|
5560
|
+
grouped.map(([area, areaJudgments]) => /* @__PURE__ */ jsx34(Card19, { padding: 3, radius: 2, tone: "transparent", children: /* @__PURE__ */ jsxs27(Stack19, { space: 3, children: [
|
|
5561
|
+
/* @__PURE__ */ jsxs27(Text28, { size: 2, weight: "semibold", children: [
|
|
5382
5562
|
area,
|
|
5383
5563
|
" ",
|
|
5384
|
-
/* @__PURE__ */
|
|
5564
|
+
/* @__PURE__ */ jsxs27(Text28, { muted: true, size: 2, weight: "regular", as: "span", children: [
|
|
5385
5565
|
"(",
|
|
5386
5566
|
areaJudgments.length,
|
|
5387
5567
|
")"
|
|
5388
5568
|
] })
|
|
5389
5569
|
] }),
|
|
5390
|
-
areaJudgments.map((j, i) => /* @__PURE__ */
|
|
5570
|
+
areaJudgments.map((j, i) => /* @__PURE__ */ jsx34(JudgmentCard, { judgment: j }, `${area}-${i}`))
|
|
5391
5571
|
] }) }, area))
|
|
5392
5572
|
] }) });
|
|
5393
5573
|
}
|
|
5394
5574
|
function JudgmentCard({ judgment }) {
|
|
5395
|
-
const [expanded, setExpanded] =
|
|
5575
|
+
const [expanded, setExpanded] = useState10(false);
|
|
5396
5576
|
const dimLabel = DIMENSION_LABELS[judgment.dimension] ?? judgment.dimension;
|
|
5397
5577
|
const sep = judgment.taskId.indexOf(" - ");
|
|
5398
5578
|
const taskName = sep > 0 ? judgment.taskId.substring(sep + 3) : judgment.taskId;
|
|
5399
|
-
return /* @__PURE__ */
|
|
5400
|
-
|
|
5579
|
+
return /* @__PURE__ */ jsx34(
|
|
5580
|
+
Card19,
|
|
5401
5581
|
{
|
|
5402
5582
|
padding: 3,
|
|
5403
5583
|
radius: 2,
|
|
5404
5584
|
shadow: 1,
|
|
5405
5585
|
style: { cursor: "pointer" },
|
|
5406
5586
|
onClick: () => setExpanded(!expanded),
|
|
5407
|
-
children: /* @__PURE__ */
|
|
5408
|
-
/* @__PURE__ */
|
|
5409
|
-
/* @__PURE__ */
|
|
5410
|
-
|
|
5587
|
+
children: /* @__PURE__ */ jsxs27(Stack19, { space: 3, children: [
|
|
5588
|
+
/* @__PURE__ */ jsxs27(Flex21, { align: "center", gap: 2, wrap: "wrap", children: [
|
|
5589
|
+
/* @__PURE__ */ jsx34(Card19, { padding: 2, radius: 2, tone: scoreTone(judgment.score), children: /* @__PURE__ */ jsx34(
|
|
5590
|
+
Text28,
|
|
5411
5591
|
{
|
|
5412
5592
|
align: "center",
|
|
5413
5593
|
size: 2,
|
|
@@ -5416,24 +5596,24 @@ function JudgmentCard({ judgment }) {
|
|
|
5416
5596
|
children: judgment.score
|
|
5417
5597
|
}
|
|
5418
5598
|
) }),
|
|
5419
|
-
/* @__PURE__ */
|
|
5420
|
-
/* @__PURE__ */
|
|
5421
|
-
/* @__PURE__ */
|
|
5422
|
-
/* @__PURE__ */
|
|
5599
|
+
/* @__PURE__ */ jsx34(Badge19, { tone: "default", children: dimLabel }),
|
|
5600
|
+
/* @__PURE__ */ jsx34(Text28, { size: 2, weight: "medium", children: taskName }),
|
|
5601
|
+
/* @__PURE__ */ jsx34(Text28, { muted: true, size: 1, children: judgment.modelId }),
|
|
5602
|
+
/* @__PURE__ */ jsx34(Text28, { muted: true, size: 1, style: { marginLeft: "auto" }, children: expanded ? "\u25B2" : "\u25BC" })
|
|
5423
5603
|
] }),
|
|
5424
|
-
expanded && /* @__PURE__ */
|
|
5425
|
-
/* @__PURE__ */
|
|
5426
|
-
|
|
5604
|
+
expanded && /* @__PURE__ */ jsxs27(Stack19, { space: 3, children: [
|
|
5605
|
+
/* @__PURE__ */ jsx34(Card19, { padding: 3, radius: 2, tone: "transparent", children: /* @__PURE__ */ jsx34(
|
|
5606
|
+
Text28,
|
|
5427
5607
|
{
|
|
5428
5608
|
muted: true,
|
|
5429
5609
|
size: 2,
|
|
5430
5610
|
style: { lineHeight: 1.6, whiteSpace: "pre-wrap" },
|
|
5431
|
-
children: /* @__PURE__ */
|
|
5611
|
+
children: /* @__PURE__ */ jsx34(InlineCode, { text: judgment.reason })
|
|
5432
5612
|
}
|
|
5433
5613
|
) }),
|
|
5434
|
-
judgment.canonicalDocs && judgment.canonicalDocs.length > 0 && /* @__PURE__ */
|
|
5435
|
-
/* @__PURE__ */
|
|
5436
|
-
judgment.canonicalDocs.map((doc) => /* @__PURE__ */
|
|
5614
|
+
judgment.canonicalDocs && judgment.canonicalDocs.length > 0 && /* @__PURE__ */ jsxs27(Flex21, { align: "center", gap: 2, wrap: "wrap", children: [
|
|
5615
|
+
/* @__PURE__ */ jsx34(Text28, { muted: true, size: 1, children: "Docs:" }),
|
|
5616
|
+
judgment.canonicalDocs.map((doc) => /* @__PURE__ */ jsx34(DocBadge, { doc }, doc.slug))
|
|
5437
5617
|
] })
|
|
5438
5618
|
] })
|
|
5439
5619
|
] })
|
|
@@ -5449,17 +5629,17 @@ var editLinkStyle = {
|
|
|
5449
5629
|
function DocBadge({
|
|
5450
5630
|
doc
|
|
5451
5631
|
}) {
|
|
5452
|
-
const [hovered, setHovered] =
|
|
5632
|
+
const [hovered, setHovered] = useState10(false);
|
|
5453
5633
|
const isLinked = Boolean(doc.documentId);
|
|
5454
5634
|
const tooltipLabel = isLinked ? `Edit "${doc.title || doc.slug}"` : doc.title || doc.slug;
|
|
5455
|
-
const badge = /* @__PURE__ */
|
|
5456
|
-
return /* @__PURE__ */
|
|
5635
|
+
const badge = /* @__PURE__ */ jsx34(Badge19, { mode: "outline", tone: isLinked && hovered ? "caution" : "primary", children: doc.slug });
|
|
5636
|
+
return /* @__PURE__ */ jsx34(
|
|
5457
5637
|
Tooltip6,
|
|
5458
5638
|
{
|
|
5459
|
-
content: /* @__PURE__ */
|
|
5639
|
+
content: /* @__PURE__ */ jsx34(Box12, { padding: 2, children: /* @__PURE__ */ jsx34(Text28, { size: 2, children: tooltipLabel }) }),
|
|
5460
5640
|
placement: "bottom",
|
|
5461
5641
|
portal: true,
|
|
5462
|
-
children: isLinked ? /* @__PURE__ */
|
|
5642
|
+
children: isLinked ? /* @__PURE__ */ jsx34(
|
|
5463
5643
|
"a",
|
|
5464
5644
|
{
|
|
5465
5645
|
href: `/intent/edit/id=${doc.documentId}`,
|
|
@@ -5472,14 +5652,14 @@ function DocBadge({
|
|
|
5472
5652
|
},
|
|
5473
5653
|
children: badge
|
|
5474
5654
|
}
|
|
5475
|
-
) : /* @__PURE__ */
|
|
5655
|
+
) : /* @__PURE__ */ jsx34("span", { children: badge })
|
|
5476
5656
|
}
|
|
5477
5657
|
);
|
|
5478
5658
|
}
|
|
5479
5659
|
|
|
5480
5660
|
// src/components/report-detail/OverviewStats.tsx
|
|
5481
5661
|
import { Grid as Grid4 } from "@sanity/ui";
|
|
5482
|
-
import { jsx as
|
|
5662
|
+
import { jsx as jsx35, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
5483
5663
|
function OverviewStats({
|
|
5484
5664
|
overall,
|
|
5485
5665
|
durationMs,
|
|
@@ -5487,8 +5667,8 @@ function OverviewStats({
|
|
|
5487
5667
|
isFullMode
|
|
5488
5668
|
}) {
|
|
5489
5669
|
const overallTone = scoreTone(overall.avgScore);
|
|
5490
|
-
return /* @__PURE__ */
|
|
5491
|
-
/* @__PURE__ */
|
|
5670
|
+
return /* @__PURE__ */ jsxs28(Grid4, { columns: [1, 1, 2, isFullMode ? 4 : 4], gap: 3, children: [
|
|
5671
|
+
/* @__PURE__ */ jsx35(
|
|
5492
5672
|
StatCard,
|
|
5493
5673
|
{
|
|
5494
5674
|
label: "Overall Score",
|
|
@@ -5497,7 +5677,7 @@ function OverviewStats({
|
|
|
5497
5677
|
value: overall.avgScore.toFixed(1)
|
|
5498
5678
|
}
|
|
5499
5679
|
),
|
|
5500
|
-
/* @__PURE__ */
|
|
5680
|
+
/* @__PURE__ */ jsx35(
|
|
5501
5681
|
StatCard,
|
|
5502
5682
|
{
|
|
5503
5683
|
label: "Doc Lift",
|
|
@@ -5506,7 +5686,7 @@ function OverviewStats({
|
|
|
5506
5686
|
value: overall.avgDocLift.toFixed(1)
|
|
5507
5687
|
}
|
|
5508
5688
|
),
|
|
5509
|
-
isFullMode && overall.avgActualScore != null && /* @__PURE__ */
|
|
5689
|
+
isFullMode && overall.avgActualScore != null && /* @__PURE__ */ jsx35(
|
|
5510
5690
|
StatCard,
|
|
5511
5691
|
{
|
|
5512
5692
|
label: "Actual Score",
|
|
@@ -5515,7 +5695,7 @@ function OverviewStats({
|
|
|
5515
5695
|
value: overall.avgActualScore.toFixed(1)
|
|
5516
5696
|
}
|
|
5517
5697
|
),
|
|
5518
|
-
isFullMode && overall.avgRetrievalGap != null && /* @__PURE__ */
|
|
5698
|
+
isFullMode && overall.avgRetrievalGap != null && /* @__PURE__ */ jsx35(
|
|
5519
5699
|
StatCard,
|
|
5520
5700
|
{
|
|
5521
5701
|
label: "Retrieval Gap",
|
|
@@ -5525,7 +5705,7 @@ function OverviewStats({
|
|
|
5525
5705
|
value: overall.avgRetrievalGap.toFixed(1)
|
|
5526
5706
|
}
|
|
5527
5707
|
),
|
|
5528
|
-
isFullMode && overall.avgInfrastructureEfficiency != null && /* @__PURE__ */
|
|
5708
|
+
isFullMode && overall.avgInfrastructureEfficiency != null && /* @__PURE__ */ jsx35(
|
|
5529
5709
|
StatCard,
|
|
5530
5710
|
{
|
|
5531
5711
|
label: "Infra Efficiency",
|
|
@@ -5533,8 +5713,8 @@ function OverviewStats({
|
|
|
5533
5713
|
value: formatPercent(overall.avgInfrastructureEfficiency)
|
|
5534
5714
|
}
|
|
5535
5715
|
),
|
|
5536
|
-
/* @__PURE__ */
|
|
5537
|
-
/* @__PURE__ */
|
|
5716
|
+
/* @__PURE__ */ jsx35(StatCard, { label: "Duration", value: formatDuration(durationMs) }),
|
|
5717
|
+
/* @__PURE__ */ jsx35(
|
|
5538
5718
|
StatCard,
|
|
5539
5719
|
{
|
|
5540
5720
|
label: "Tests",
|
|
@@ -5546,31 +5726,31 @@ function OverviewStats({
|
|
|
5546
5726
|
}
|
|
5547
5727
|
|
|
5548
5728
|
// src/components/report-detail/ProvenanceCard.tsx
|
|
5549
|
-
import { Card as
|
|
5550
|
-
import { jsx as
|
|
5729
|
+
import { Card as Card20, Flex as Flex22, Grid as Grid5, Stack as Stack20, Text as Text29 } from "@sanity/ui";
|
|
5730
|
+
import { jsx as jsx36, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
5551
5731
|
var VIEWABLE_PROMPTFOO_MODES = /* @__PURE__ */ new Set(["agentic", "observed"]);
|
|
5552
5732
|
function ProvenanceCard({ provenance }) {
|
|
5553
|
-
return /* @__PURE__ */
|
|
5554
|
-
/* @__PURE__ */
|
|
5555
|
-
/* @__PURE__ */
|
|
5556
|
-
/* @__PURE__ */
|
|
5557
|
-
/* @__PURE__ */
|
|
5558
|
-
/* @__PURE__ */
|
|
5733
|
+
return /* @__PURE__ */ jsx36(Card20, { padding: 4, radius: 2, shadow: 1, children: /* @__PURE__ */ jsxs29(Stack20, { space: 4, children: [
|
|
5734
|
+
/* @__PURE__ */ jsx36(Text29, { size: 3, weight: "semibold", children: "Provenance" }),
|
|
5735
|
+
/* @__PURE__ */ jsxs29(Grid5, { columns: [1, 2, 3], gap: 4, children: [
|
|
5736
|
+
/* @__PURE__ */ jsx36(Field, { label: "Mode", value: provenance.mode }),
|
|
5737
|
+
/* @__PURE__ */ jsx36(Field, { label: "Source", value: provenance.source.name }),
|
|
5738
|
+
/* @__PURE__ */ jsx36(
|
|
5559
5739
|
Field,
|
|
5560
5740
|
{
|
|
5561
5741
|
label: "Trigger",
|
|
5562
5742
|
value: provenance.trigger.type + (provenance.trigger.workflow ? ` (${provenance.trigger.workflow})` : "")
|
|
5563
5743
|
}
|
|
5564
5744
|
),
|
|
5565
|
-
/* @__PURE__ */
|
|
5745
|
+
/* @__PURE__ */ jsx36(
|
|
5566
5746
|
Field,
|
|
5567
5747
|
{
|
|
5568
5748
|
label: "Models",
|
|
5569
5749
|
value: provenance.models.map((m) => m.label).join(", ")
|
|
5570
5750
|
}
|
|
5571
5751
|
),
|
|
5572
|
-
/* @__PURE__ */
|
|
5573
|
-
provenance.contextHash && /* @__PURE__ */
|
|
5752
|
+
/* @__PURE__ */ jsx36(Field, { label: "Grader Model", mono: true, value: provenance.graderModel }),
|
|
5753
|
+
provenance.contextHash && /* @__PURE__ */ jsx36(
|
|
5574
5754
|
Field,
|
|
5575
5755
|
{
|
|
5576
5756
|
label: "Context Hash",
|
|
@@ -5579,8 +5759,8 @@ function ProvenanceCard({ provenance }) {
|
|
|
5579
5759
|
}
|
|
5580
5760
|
)
|
|
5581
5761
|
] }),
|
|
5582
|
-
provenance.git && /* @__PURE__ */
|
|
5583
|
-
/* @__PURE__ */
|
|
5762
|
+
provenance.git && /* @__PURE__ */ jsx36(GitInfo, { git: provenance.git }),
|
|
5763
|
+
/* @__PURE__ */ jsx36(PromptfooLinks, { provenance })
|
|
5584
5764
|
] }) });
|
|
5585
5765
|
}
|
|
5586
5766
|
function Field({
|
|
@@ -5588,9 +5768,9 @@ function Field({
|
|
|
5588
5768
|
mono,
|
|
5589
5769
|
value
|
|
5590
5770
|
}) {
|
|
5591
|
-
return /* @__PURE__ */
|
|
5592
|
-
/* @__PURE__ */
|
|
5593
|
-
|
|
5771
|
+
return /* @__PURE__ */ jsxs29(Stack20, { space: 1, children: [
|
|
5772
|
+
/* @__PURE__ */ jsx36(
|
|
5773
|
+
Text29,
|
|
5594
5774
|
{
|
|
5595
5775
|
muted: true,
|
|
5596
5776
|
size: 1,
|
|
@@ -5599,7 +5779,7 @@ function Field({
|
|
|
5599
5779
|
children: label
|
|
5600
5780
|
}
|
|
5601
5781
|
),
|
|
5602
|
-
/* @__PURE__ */
|
|
5782
|
+
/* @__PURE__ */ jsx36(Text29, { size: 2, style: mono ? { fontFamily: "monospace" } : void 0, children: value })
|
|
5603
5783
|
] });
|
|
5604
5784
|
}
|
|
5605
5785
|
function GitInfo({ git }) {
|
|
@@ -5607,15 +5787,15 @@ function GitInfo({ git }) {
|
|
|
5607
5787
|
const branchUrl = `${repoUrl}/tree/${git.branch}`;
|
|
5608
5788
|
const commitUrl = `${repoUrl}/commit/${git.sha}`;
|
|
5609
5789
|
const prUrl = git.prNumber ? `${repoUrl}/pull/${git.prNumber}` : null;
|
|
5610
|
-
return /* @__PURE__ */
|
|
5611
|
-
/* @__PURE__ */
|
|
5612
|
-
/* @__PURE__ */
|
|
5613
|
-
/* @__PURE__ */
|
|
5790
|
+
return /* @__PURE__ */ jsx36(Card20, { border: true, padding: 3, radius: 2, tone: "transparent", children: /* @__PURE__ */ jsxs29(Flex22, { align: "center", gap: 3, wrap: "wrap", children: [
|
|
5791
|
+
/* @__PURE__ */ jsx36(Text29, { muted: true, size: 2, weight: "semibold", children: "Git" }),
|
|
5792
|
+
/* @__PURE__ */ jsxs29(Text29, { size: 2, children: [
|
|
5793
|
+
/* @__PURE__ */ jsx36("a", { href: repoUrl, rel: "noopener noreferrer", target: "_blank", children: git.repo }),
|
|
5614
5794
|
" / ",
|
|
5615
|
-
/* @__PURE__ */
|
|
5795
|
+
/* @__PURE__ */ jsx36("a", { href: branchUrl, rel: "noopener noreferrer", target: "_blank", children: git.branch })
|
|
5616
5796
|
] }),
|
|
5617
|
-
/* @__PURE__ */
|
|
5618
|
-
prUrl && /* @__PURE__ */
|
|
5797
|
+
/* @__PURE__ */ jsx36(Text29, { muted: true, size: 2, style: { fontFamily: "monospace" }, children: /* @__PURE__ */ jsx36("a", { href: commitUrl, rel: "noopener noreferrer", target: "_blank", children: git.sha.slice(0, 12) }) }),
|
|
5798
|
+
prUrl && /* @__PURE__ */ jsx36(Text29, { size: 2, children: /* @__PURE__ */ jsxs29("a", { href: prUrl, rel: "noopener noreferrer", target: "_blank", children: [
|
|
5619
5799
|
"PR #",
|
|
5620
5800
|
git.prNumber,
|
|
5621
5801
|
" \u2192"
|
|
@@ -5630,14 +5810,14 @@ function PromptfooLinks({
|
|
|
5630
5810
|
(e) => VIEWABLE_PROMPTFOO_MODES.has(e.mode)
|
|
5631
5811
|
);
|
|
5632
5812
|
if (viewable.length === 0) return null;
|
|
5633
|
-
return /* @__PURE__ */
|
|
5813
|
+
return /* @__PURE__ */ jsx36(Flex22, { gap: 3, wrap: "wrap", children: viewable.map((entry) => /* @__PURE__ */ jsx36(Text29, { size: 2, children: /* @__PURE__ */ jsxs29("a", { href: entry.url, rel: "noopener noreferrer", target: "_blank", children: [
|
|
5634
5814
|
"View in Promptfoo (",
|
|
5635
5815
|
entry.mode,
|
|
5636
5816
|
") \u2192"
|
|
5637
5817
|
] }) }, entry.mode)) });
|
|
5638
5818
|
}
|
|
5639
5819
|
if (provenance.promptfooUrl && VIEWABLE_PROMPTFOO_MODES.has(provenance.mode)) {
|
|
5640
|
-
return /* @__PURE__ */
|
|
5820
|
+
return /* @__PURE__ */ jsx36(Text29, { size: 2, children: /* @__PURE__ */ jsx36(
|
|
5641
5821
|
"a",
|
|
5642
5822
|
{
|
|
5643
5823
|
href: provenance.promptfooUrl,
|
|
@@ -5652,32 +5832,32 @@ function PromptfooLinks({
|
|
|
5652
5832
|
|
|
5653
5833
|
// src/components/report-detail/RecommendationsSection.tsx
|
|
5654
5834
|
import React4 from "react";
|
|
5655
|
-
import { Badge as
|
|
5835
|
+
import { Badge as Badge20, Box as Box13, Card as Card21, Flex as Flex23, Stack as Stack21, Text as Text30, Tooltip as Tooltip7 } from "@sanity/ui";
|
|
5656
5836
|
import { HelpCircleIcon as HelpCircleIcon7 } from "@sanity/icons";
|
|
5657
|
-
import { jsx as
|
|
5837
|
+
import { jsx as jsx37, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
5658
5838
|
function RecommendationsSection({
|
|
5659
5839
|
recommendations
|
|
5660
5840
|
}) {
|
|
5661
5841
|
if (recommendations.gaps.length === 0) return null;
|
|
5662
|
-
return /* @__PURE__ */
|
|
5663
|
-
/* @__PURE__ */
|
|
5664
|
-
/* @__PURE__ */
|
|
5665
|
-
/* @__PURE__ */
|
|
5842
|
+
return /* @__PURE__ */ jsx37(Card21, { padding: 4, radius: 2, shadow: 1, children: /* @__PURE__ */ jsxs30(Stack21, { space: 4, children: [
|
|
5843
|
+
/* @__PURE__ */ jsxs30(Flex23, { align: "center", gap: 3, wrap: "wrap", children: [
|
|
5844
|
+
/* @__PURE__ */ jsx37(Text30, { size: 3, weight: "semibold", children: "Recommendations" }),
|
|
5845
|
+
/* @__PURE__ */ jsx37(
|
|
5666
5846
|
Tooltip7,
|
|
5667
5847
|
{
|
|
5668
|
-
content: /* @__PURE__ */
|
|
5848
|
+
content: /* @__PURE__ */ jsx37(Box13, { padding: 2, style: { maxWidth: 260 }, children: /* @__PURE__ */ jsx37(Text30, { size: 2, children: GLOSSARY.recommendations }) }),
|
|
5669
5849
|
placement: "bottom",
|
|
5670
5850
|
portal: true,
|
|
5671
|
-
children: /* @__PURE__ */
|
|
5851
|
+
children: /* @__PURE__ */ jsx37(Text30, { muted: true, size: 1, children: /* @__PURE__ */ jsx37(HelpCircleIcon7, {}) })
|
|
5672
5852
|
}
|
|
5673
5853
|
),
|
|
5674
|
-
/* @__PURE__ */
|
|
5854
|
+
/* @__PURE__ */ jsx37(
|
|
5675
5855
|
Tooltip7,
|
|
5676
5856
|
{
|
|
5677
|
-
content: /* @__PURE__ */
|
|
5857
|
+
content: /* @__PURE__ */ jsx37(Box13, { padding: 2, style: { maxWidth: 260 }, children: /* @__PURE__ */ jsx37(Text30, { size: 2, children: GLOSSARY.totalPotentialLift }) }),
|
|
5678
5858
|
placement: "bottom",
|
|
5679
5859
|
portal: true,
|
|
5680
|
-
children: /* @__PURE__ */
|
|
5860
|
+
children: /* @__PURE__ */ jsx37(Card21, { padding: 2, radius: 2, tone: "positive", children: /* @__PURE__ */ jsxs30(Text30, { size: 2, weight: "bold", children: [
|
|
5681
5861
|
"+",
|
|
5682
5862
|
recommendations.totalPotentialLift.toFixed(1),
|
|
5683
5863
|
" pts potential lift"
|
|
@@ -5685,7 +5865,7 @@ function RecommendationsSection({
|
|
|
5685
5865
|
}
|
|
5686
5866
|
)
|
|
5687
5867
|
] }),
|
|
5688
|
-
/* @__PURE__ */
|
|
5868
|
+
/* @__PURE__ */ jsxs30(
|
|
5689
5869
|
"div",
|
|
5690
5870
|
{
|
|
5691
5871
|
style: {
|
|
@@ -5694,9 +5874,9 @@ function RecommendationsSection({
|
|
|
5694
5874
|
gridTemplateColumns: "auto 2fr 2fr 1fr 1fr 1fr"
|
|
5695
5875
|
},
|
|
5696
5876
|
children: [
|
|
5697
|
-
/* @__PURE__ */
|
|
5698
|
-
/* @__PURE__ */
|
|
5699
|
-
/* @__PURE__ */
|
|
5877
|
+
/* @__PURE__ */ jsx37(ColumnHeader, { borderBottom: true, label: "#" }),
|
|
5878
|
+
/* @__PURE__ */ jsx37(ColumnHeader, { borderBottom: true, label: "Area" }),
|
|
5879
|
+
/* @__PURE__ */ jsx37(
|
|
5700
5880
|
ColumnHeader,
|
|
5701
5881
|
{
|
|
5702
5882
|
borderBottom: true,
|
|
@@ -5704,8 +5884,8 @@ function RecommendationsSection({
|
|
|
5704
5884
|
tooltip: GLOSSARY.failureMode
|
|
5705
5885
|
}
|
|
5706
5886
|
),
|
|
5707
|
-
/* @__PURE__ */
|
|
5708
|
-
/* @__PURE__ */
|
|
5887
|
+
/* @__PURE__ */ jsx37(ColumnHeader, { borderBottom: true, label: "Action" }),
|
|
5888
|
+
/* @__PURE__ */ jsx37(
|
|
5709
5889
|
ColumnHeader,
|
|
5710
5890
|
{
|
|
5711
5891
|
borderBottom: true,
|
|
@@ -5713,7 +5893,7 @@ function RecommendationsSection({
|
|
|
5713
5893
|
tooltip: GLOSSARY.estimatedLift
|
|
5714
5894
|
}
|
|
5715
5895
|
),
|
|
5716
|
-
/* @__PURE__ */
|
|
5896
|
+
/* @__PURE__ */ jsx37(
|
|
5717
5897
|
ColumnHeader,
|
|
5718
5898
|
{
|
|
5719
5899
|
borderBottom: true,
|
|
@@ -5721,7 +5901,7 @@ function RecommendationsSection({
|
|
|
5721
5901
|
tooltip: GLOSSARY.confidence
|
|
5722
5902
|
}
|
|
5723
5903
|
),
|
|
5724
|
-
recommendations.gaps.map((gap, i) => /* @__PURE__ */
|
|
5904
|
+
recommendations.gaps.map((gap, i) => /* @__PURE__ */ jsx37(RecommendationRow, { gap, index: i }, `gap-${i}`))
|
|
5725
5905
|
]
|
|
5726
5906
|
}
|
|
5727
5907
|
)
|
|
@@ -5733,8 +5913,8 @@ function RecommendationRow({
|
|
|
5733
5913
|
}) {
|
|
5734
5914
|
const confIcon = gap.confidence === "high" ? "\u{1F7E2}" : gap.confidence === "medium" ? "\u{1F7E1}" : "\u{1F534}";
|
|
5735
5915
|
const bg = rowBackground(index);
|
|
5736
|
-
return /* @__PURE__ */
|
|
5737
|
-
/* @__PURE__ */
|
|
5916
|
+
return /* @__PURE__ */ jsxs30(React4.Fragment, { children: [
|
|
5917
|
+
/* @__PURE__ */ jsx37(
|
|
5738
5918
|
"div",
|
|
5739
5919
|
{
|
|
5740
5920
|
style: {
|
|
@@ -5744,10 +5924,10 @@ function RecommendationRow({
|
|
|
5744
5924
|
display: "flex",
|
|
5745
5925
|
padding: "8px 4px"
|
|
5746
5926
|
},
|
|
5747
|
-
children: /* @__PURE__ */
|
|
5927
|
+
children: /* @__PURE__ */ jsx37(Text30, { muted: true, size: 2, children: index + 1 })
|
|
5748
5928
|
}
|
|
5749
5929
|
),
|
|
5750
|
-
/* @__PURE__ */
|
|
5930
|
+
/* @__PURE__ */ jsx37(
|
|
5751
5931
|
"div",
|
|
5752
5932
|
{
|
|
5753
5933
|
style: {
|
|
@@ -5756,10 +5936,10 @@ function RecommendationRow({
|
|
|
5756
5936
|
display: "flex",
|
|
5757
5937
|
padding: "8px 0"
|
|
5758
5938
|
},
|
|
5759
|
-
children: /* @__PURE__ */
|
|
5939
|
+
children: /* @__PURE__ */ jsx37(Text30, { size: 2, weight: "medium", children: gap.area })
|
|
5760
5940
|
}
|
|
5761
5941
|
),
|
|
5762
|
-
/* @__PURE__ */
|
|
5942
|
+
/* @__PURE__ */ jsx37(
|
|
5763
5943
|
"div",
|
|
5764
5944
|
{
|
|
5765
5945
|
style: {
|
|
@@ -5768,8 +5948,8 @@ function RecommendationRow({
|
|
|
5768
5948
|
display: "flex",
|
|
5769
5949
|
padding: "8px 0"
|
|
5770
5950
|
},
|
|
5771
|
-
children: /* @__PURE__ */
|
|
5772
|
-
|
|
5951
|
+
children: /* @__PURE__ */ jsx37(
|
|
5952
|
+
Badge20,
|
|
5773
5953
|
{
|
|
5774
5954
|
tone: gap.failureMode === "missing-docs" ? "critical" : gap.failureMode === "incorrect-docs" ? "critical" : gap.failureMode === "outdated-docs" ? "caution" : "default",
|
|
5775
5955
|
children: gap.failureMode
|
|
@@ -5777,7 +5957,7 @@ function RecommendationRow({
|
|
|
5777
5957
|
)
|
|
5778
5958
|
}
|
|
5779
5959
|
),
|
|
5780
|
-
/* @__PURE__ */
|
|
5960
|
+
/* @__PURE__ */ jsx37(
|
|
5781
5961
|
"div",
|
|
5782
5962
|
{
|
|
5783
5963
|
style: {
|
|
@@ -5786,10 +5966,10 @@ function RecommendationRow({
|
|
|
5786
5966
|
display: "flex",
|
|
5787
5967
|
padding: "8px 0"
|
|
5788
5968
|
},
|
|
5789
|
-
children: /* @__PURE__ */
|
|
5969
|
+
children: /* @__PURE__ */ jsx37(Text30, { muted: true, size: 2, children: gap.remediation })
|
|
5790
5970
|
}
|
|
5791
5971
|
),
|
|
5792
|
-
/* @__PURE__ */
|
|
5972
|
+
/* @__PURE__ */ jsx37(
|
|
5793
5973
|
"div",
|
|
5794
5974
|
{
|
|
5795
5975
|
style: {
|
|
@@ -5798,13 +5978,13 @@ function RecommendationRow({
|
|
|
5798
5978
|
display: "flex",
|
|
5799
5979
|
padding: "8px 0"
|
|
5800
5980
|
},
|
|
5801
|
-
children: /* @__PURE__ */
|
|
5981
|
+
children: /* @__PURE__ */ jsx37(Card21, { padding: 2, radius: 2, tone: "positive", children: /* @__PURE__ */ jsxs30(Text30, { align: "center", size: 2, weight: "medium", children: [
|
|
5802
5982
|
"+",
|
|
5803
5983
|
gap.estimatedLift.toFixed(1)
|
|
5804
5984
|
] }) })
|
|
5805
5985
|
}
|
|
5806
5986
|
),
|
|
5807
|
-
/* @__PURE__ */
|
|
5987
|
+
/* @__PURE__ */ jsx37(
|
|
5808
5988
|
"div",
|
|
5809
5989
|
{
|
|
5810
5990
|
style: {
|
|
@@ -5813,7 +5993,7 @@ function RecommendationRow({
|
|
|
5813
5993
|
display: "flex",
|
|
5814
5994
|
padding: "8px 0"
|
|
5815
5995
|
},
|
|
5816
|
-
children: /* @__PURE__ */
|
|
5996
|
+
children: /* @__PURE__ */ jsxs30(Text30, { size: 2, children: [
|
|
5817
5997
|
confIcon,
|
|
5818
5998
|
" ",
|
|
5819
5999
|
gap.confidence
|
|
@@ -5825,32 +6005,32 @@ function RecommendationRow({
|
|
|
5825
6005
|
|
|
5826
6006
|
// src/components/report-detail/ReportHeader.tsx
|
|
5827
6007
|
import { ArrowLeftIcon } from "@sanity/icons";
|
|
5828
|
-
import { Badge as
|
|
6008
|
+
import { Badge as Badge21, Button as Button4, Flex as Flex26, Stack as Stack23, Text as Text32 } from "@sanity/ui";
|
|
5829
6009
|
|
|
5830
6010
|
// src/components/report-detail/report-actions/ReportActions.tsx
|
|
5831
6011
|
import { ChevronDownIcon, CopyIcon as CopyIcon2 } from "@sanity/icons";
|
|
5832
6012
|
import {
|
|
5833
6013
|
Button as Button3,
|
|
5834
|
-
Flex as
|
|
6014
|
+
Flex as Flex25,
|
|
5835
6015
|
Menu as Menu2,
|
|
5836
6016
|
MenuButton as MenuButton2,
|
|
5837
6017
|
MenuDivider,
|
|
5838
6018
|
useToast as useToast7
|
|
5839
6019
|
} from "@sanity/ui";
|
|
5840
|
-
import { useCallback as
|
|
5841
|
-
import { useClient as
|
|
6020
|
+
import { useCallback as useCallback19, useState as useState14 } from "react";
|
|
6021
|
+
import { useClient as useClient11 } from "sanity";
|
|
5842
6022
|
|
|
5843
6023
|
// src/components/report-detail/report-actions/CopyReportAction.tsx
|
|
5844
6024
|
import { ClipboardIcon } from "@sanity/icons";
|
|
5845
6025
|
import { MenuItem as MenuItem2, useToast as useToast2 } from "@sanity/ui";
|
|
5846
|
-
import { useCallback as
|
|
5847
|
-
import { useClient as
|
|
5848
|
-
import { jsx as
|
|
6026
|
+
import { useCallback as useCallback14, useState as useState11 } from "react";
|
|
6027
|
+
import { useClient as useClient8 } from "sanity";
|
|
6028
|
+
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
5849
6029
|
function CopyReportAction({ documentId }) {
|
|
5850
|
-
const client =
|
|
6030
|
+
const client = useClient8({ apiVersion: API_VERSION });
|
|
5851
6031
|
const toast = useToast2();
|
|
5852
|
-
const [copying, setCopying] =
|
|
5853
|
-
const handleClick =
|
|
6032
|
+
const [copying, setCopying] = useState11(false);
|
|
6033
|
+
const handleClick = useCallback14(async () => {
|
|
5854
6034
|
setCopying(true);
|
|
5855
6035
|
try {
|
|
5856
6036
|
const doc = await client.fetch(
|
|
@@ -5882,7 +6062,7 @@ function CopyReportAction({ documentId }) {
|
|
|
5882
6062
|
setCopying(false);
|
|
5883
6063
|
}
|
|
5884
6064
|
}, [client, documentId, toast]);
|
|
5885
|
-
return /* @__PURE__ */
|
|
6065
|
+
return /* @__PURE__ */ jsx38(
|
|
5886
6066
|
MenuItem2,
|
|
5887
6067
|
{
|
|
5888
6068
|
disabled: copying,
|
|
@@ -5896,11 +6076,11 @@ function CopyReportAction({ documentId }) {
|
|
|
5896
6076
|
// src/components/report-detail/report-actions/CopyReportIdAction.tsx
|
|
5897
6077
|
import { CopyIcon } from "@sanity/icons";
|
|
5898
6078
|
import { MenuItem as MenuItem3, useToast as useToast3 } from "@sanity/ui";
|
|
5899
|
-
import { useCallback as
|
|
5900
|
-
import { jsx as
|
|
6079
|
+
import { useCallback as useCallback15 } from "react";
|
|
6080
|
+
import { jsx as jsx39 } from "react/jsx-runtime";
|
|
5901
6081
|
function CopyReportIdAction({ reportId }) {
|
|
5902
6082
|
const toast = useToast3();
|
|
5903
|
-
const handleClick =
|
|
6083
|
+
const handleClick = useCallback15(() => {
|
|
5904
6084
|
navigator.clipboard.writeText(reportId).then(
|
|
5905
6085
|
() => {
|
|
5906
6086
|
toast.push({
|
|
@@ -5918,19 +6098,19 @@ function CopyReportIdAction({ reportId }) {
|
|
|
5918
6098
|
}
|
|
5919
6099
|
);
|
|
5920
6100
|
}, [reportId, toast]);
|
|
5921
|
-
return /* @__PURE__ */
|
|
6101
|
+
return /* @__PURE__ */ jsx39(MenuItem3, { icon: CopyIcon, onClick: handleClick, text: "Copy report ID" });
|
|
5922
6102
|
}
|
|
5923
6103
|
|
|
5924
6104
|
// src/components/report-detail/report-actions/CopyVisionQueryAction.tsx
|
|
5925
6105
|
import { SearchIcon as SearchIcon6 } from "@sanity/icons";
|
|
5926
6106
|
import { MenuItem as MenuItem4, useToast as useToast4 } from "@sanity/ui";
|
|
5927
|
-
import { useCallback as
|
|
5928
|
-
import { jsx as
|
|
6107
|
+
import { useCallback as useCallback16 } from "react";
|
|
6108
|
+
import { jsx as jsx40 } from "react/jsx-runtime";
|
|
5929
6109
|
function CopyVisionQueryAction({
|
|
5930
6110
|
reportId
|
|
5931
6111
|
}) {
|
|
5932
6112
|
const toast = useToast4();
|
|
5933
|
-
const handleClick =
|
|
6113
|
+
const handleClick = useCallback16(() => {
|
|
5934
6114
|
const query = `*[_type == "ailf.report" && reportId == "${reportId}"][0]`;
|
|
5935
6115
|
navigator.clipboard.writeText(query).then(
|
|
5936
6116
|
() => {
|
|
@@ -5950,7 +6130,7 @@ function CopyVisionQueryAction({
|
|
|
5950
6130
|
}
|
|
5951
6131
|
);
|
|
5952
6132
|
}, [reportId, toast]);
|
|
5953
|
-
return /* @__PURE__ */
|
|
6133
|
+
return /* @__PURE__ */ jsx40(
|
|
5954
6134
|
MenuItem4,
|
|
5955
6135
|
{
|
|
5956
6136
|
icon: SearchIcon6,
|
|
@@ -5961,25 +6141,25 @@ function CopyVisionQueryAction({
|
|
|
5961
6141
|
}
|
|
5962
6142
|
|
|
5963
6143
|
// src/components/report-detail/report-actions/DeleteConfirmDialog.tsx
|
|
5964
|
-
import { Box as Box14, Button as Button2, Card as
|
|
5965
|
-
import { jsx as
|
|
6144
|
+
import { Box as Box14, Button as Button2, Card as Card22, Dialog, Flex as Flex24, Stack as Stack22, Text as Text31 } from "@sanity/ui";
|
|
6145
|
+
import { jsx as jsx41, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
5966
6146
|
function DeleteConfirmDialog({
|
|
5967
6147
|
isDeleting,
|
|
5968
6148
|
onClose,
|
|
5969
6149
|
onConfirm,
|
|
5970
6150
|
reportId
|
|
5971
6151
|
}) {
|
|
5972
|
-
return /* @__PURE__ */
|
|
6152
|
+
return /* @__PURE__ */ jsx41(
|
|
5973
6153
|
Dialog,
|
|
5974
6154
|
{
|
|
5975
6155
|
header: "Delete Report",
|
|
5976
6156
|
id: "delete-report-dialog",
|
|
5977
6157
|
onClose,
|
|
5978
6158
|
width: 1,
|
|
5979
|
-
children: /* @__PURE__ */
|
|
5980
|
-
/* @__PURE__ */
|
|
5981
|
-
/* @__PURE__ */
|
|
5982
|
-
|
|
6159
|
+
children: /* @__PURE__ */ jsx41(Box14, { padding: 4, children: /* @__PURE__ */ jsxs31(Stack22, { space: 4, children: [
|
|
6160
|
+
/* @__PURE__ */ jsx41(Text31, { children: "Are you sure you want to delete this report? This action cannot be undone." }),
|
|
6161
|
+
/* @__PURE__ */ jsx41(Card22, { border: true, padding: 3, radius: 2, tone: "transparent", children: /* @__PURE__ */ jsx41(
|
|
6162
|
+
Text31,
|
|
5983
6163
|
{
|
|
5984
6164
|
muted: true,
|
|
5985
6165
|
size: 1,
|
|
@@ -5987,8 +6167,8 @@ function DeleteConfirmDialog({
|
|
|
5987
6167
|
children: reportId
|
|
5988
6168
|
}
|
|
5989
6169
|
) }),
|
|
5990
|
-
/* @__PURE__ */
|
|
5991
|
-
/* @__PURE__ */
|
|
6170
|
+
/* @__PURE__ */ jsxs31(Flex24, { gap: 2, justify: "flex-end", children: [
|
|
6171
|
+
/* @__PURE__ */ jsx41(
|
|
5992
6172
|
Button2,
|
|
5993
6173
|
{
|
|
5994
6174
|
disabled: isDeleting,
|
|
@@ -5997,7 +6177,7 @@ function DeleteConfirmDialog({
|
|
|
5997
6177
|
text: "Cancel"
|
|
5998
6178
|
}
|
|
5999
6179
|
),
|
|
6000
|
-
/* @__PURE__ */
|
|
6180
|
+
/* @__PURE__ */ jsx41(
|
|
6001
6181
|
Button2,
|
|
6002
6182
|
{
|
|
6003
6183
|
disabled: isDeleting,
|
|
@@ -6015,11 +6195,11 @@ function DeleteConfirmDialog({
|
|
|
6015
6195
|
// src/components/report-detail/report-actions/DeleteReportAction.tsx
|
|
6016
6196
|
import { TrashIcon } from "@sanity/icons";
|
|
6017
6197
|
import { MenuItem as MenuItem5 } from "@sanity/ui";
|
|
6018
|
-
import { jsx as
|
|
6198
|
+
import { jsx as jsx42 } from "react/jsx-runtime";
|
|
6019
6199
|
function DeleteReportAction({
|
|
6020
6200
|
onRequestDelete
|
|
6021
6201
|
}) {
|
|
6022
|
-
return /* @__PURE__ */
|
|
6202
|
+
return /* @__PURE__ */ jsx42(
|
|
6023
6203
|
MenuItem5,
|
|
6024
6204
|
{
|
|
6025
6205
|
icon: TrashIcon,
|
|
@@ -6033,17 +6213,17 @@ function DeleteReportAction({
|
|
|
6033
6213
|
// src/components/report-detail/report-actions/DownloadReportAction.tsx
|
|
6034
6214
|
import { DownloadIcon } from "@sanity/icons";
|
|
6035
6215
|
import { MenuItem as MenuItem6, useToast as useToast5 } from "@sanity/ui";
|
|
6036
|
-
import { useCallback as
|
|
6037
|
-
import { useClient as
|
|
6038
|
-
import { jsx as
|
|
6216
|
+
import { useCallback as useCallback17, useState as useState12 } from "react";
|
|
6217
|
+
import { useClient as useClient9 } from "sanity";
|
|
6218
|
+
import { jsx as jsx43 } from "react/jsx-runtime";
|
|
6039
6219
|
function DownloadReportAction({
|
|
6040
6220
|
documentId,
|
|
6041
6221
|
reportId
|
|
6042
6222
|
}) {
|
|
6043
|
-
const client =
|
|
6223
|
+
const client = useClient9({ apiVersion: API_VERSION });
|
|
6044
6224
|
const toast = useToast5();
|
|
6045
|
-
const [downloading, setDownloading] =
|
|
6046
|
-
const handleClick =
|
|
6225
|
+
const [downloading, setDownloading] = useState12(false);
|
|
6226
|
+
const handleClick = useCallback17(async () => {
|
|
6047
6227
|
setDownloading(true);
|
|
6048
6228
|
try {
|
|
6049
6229
|
const doc = await client.fetch(
|
|
@@ -6083,7 +6263,7 @@ function DownloadReportAction({
|
|
|
6083
6263
|
setDownloading(false);
|
|
6084
6264
|
}
|
|
6085
6265
|
}, [client, documentId, reportId, toast]);
|
|
6086
|
-
return /* @__PURE__ */
|
|
6266
|
+
return /* @__PURE__ */ jsx43(
|
|
6087
6267
|
MenuItem6,
|
|
6088
6268
|
{
|
|
6089
6269
|
disabled: downloading,
|
|
@@ -6097,8 +6277,8 @@ function DownloadReportAction({
|
|
|
6097
6277
|
// src/components/report-detail/report-actions/RerunEvaluationAction.tsx
|
|
6098
6278
|
import { PlayIcon as PlayIcon2 } from "@sanity/icons";
|
|
6099
6279
|
import { MenuItem as MenuItem7, useToast as useToast6 } from "@sanity/ui";
|
|
6100
|
-
import { useCallback as
|
|
6101
|
-
import { useClient as
|
|
6280
|
+
import { useCallback as useCallback18, useState as useState13 } from "react";
|
|
6281
|
+
import { useClient as useClient10, useCurrentUser as useCurrentUser2 } from "sanity";
|
|
6102
6282
|
|
|
6103
6283
|
// src/lib/eval-scope.ts
|
|
6104
6284
|
function extractEvalScope(provenance) {
|
|
@@ -6113,7 +6293,7 @@ function extractEvalScope(provenance) {
|
|
|
6113
6293
|
}
|
|
6114
6294
|
|
|
6115
6295
|
// src/components/report-detail/report-actions/RerunEvaluationAction.tsx
|
|
6116
|
-
import { jsx as
|
|
6296
|
+
import { jsx as jsx44 } from "react/jsx-runtime";
|
|
6117
6297
|
var EVAL_REQUEST_TYPE2 = "ailf.evalRequest";
|
|
6118
6298
|
function slugify2(s) {
|
|
6119
6299
|
return s.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 40);
|
|
@@ -6139,6 +6319,8 @@ function buildRequestDoc(scope, meta) {
|
|
|
6139
6319
|
// Request metadata
|
|
6140
6320
|
requestedAt: now,
|
|
6141
6321
|
requestedBy: meta.userId,
|
|
6322
|
+
// Lineage — links this request back to the source report
|
|
6323
|
+
sourceReportId: meta.reportId,
|
|
6142
6324
|
status: "pending",
|
|
6143
6325
|
tag
|
|
6144
6326
|
};
|
|
@@ -6147,11 +6329,11 @@ function RerunEvaluationAction({
|
|
|
6147
6329
|
provenance,
|
|
6148
6330
|
reportId
|
|
6149
6331
|
}) {
|
|
6150
|
-
const client =
|
|
6332
|
+
const client = useClient10({ apiVersion: API_VERSION });
|
|
6151
6333
|
const currentUser = useCurrentUser2();
|
|
6152
6334
|
const toast = useToast6();
|
|
6153
|
-
const [requesting, setRequesting] =
|
|
6154
|
-
const handleClick =
|
|
6335
|
+
const [requesting, setRequesting] = useState13(false);
|
|
6336
|
+
const handleClick = useCallback18(async () => {
|
|
6155
6337
|
setRequesting(true);
|
|
6156
6338
|
try {
|
|
6157
6339
|
const scope = extractEvalScope(provenance);
|
|
@@ -6178,7 +6360,7 @@ function RerunEvaluationAction({
|
|
|
6178
6360
|
setRequesting(false);
|
|
6179
6361
|
}
|
|
6180
6362
|
}, [client, currentUser?.id, provenance, reportId, toast]);
|
|
6181
|
-
return /* @__PURE__ */
|
|
6363
|
+
return /* @__PURE__ */ jsx44(
|
|
6182
6364
|
MenuItem7,
|
|
6183
6365
|
{
|
|
6184
6366
|
disabled: requesting,
|
|
@@ -6190,16 +6372,16 @@ function RerunEvaluationAction({
|
|
|
6190
6372
|
}
|
|
6191
6373
|
|
|
6192
6374
|
// src/components/report-detail/report-actions/ReportActions.tsx
|
|
6193
|
-
import { Fragment as Fragment6, jsx as
|
|
6375
|
+
import { Fragment as Fragment6, jsx as jsx45, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
6194
6376
|
function ReportActions({
|
|
6195
6377
|
documentId,
|
|
6196
6378
|
onDeleted,
|
|
6197
6379
|
provenance,
|
|
6198
6380
|
reportId
|
|
6199
6381
|
}) {
|
|
6200
|
-
const client =
|
|
6382
|
+
const client = useClient11({ apiVersion: API_VERSION });
|
|
6201
6383
|
const toast = useToast7();
|
|
6202
|
-
const handleCopyId =
|
|
6384
|
+
const handleCopyId = useCallback19(() => {
|
|
6203
6385
|
navigator.clipboard.writeText(reportId).then(
|
|
6204
6386
|
() => {
|
|
6205
6387
|
toast.push({
|
|
@@ -6217,15 +6399,15 @@ function ReportActions({
|
|
|
6217
6399
|
}
|
|
6218
6400
|
);
|
|
6219
6401
|
}, [reportId, toast]);
|
|
6220
|
-
const [deleteDialogOpen, setDeleteDialogOpen] =
|
|
6221
|
-
const [deleting, setDeleting] =
|
|
6222
|
-
const handleRequestDelete =
|
|
6402
|
+
const [deleteDialogOpen, setDeleteDialogOpen] = useState14(false);
|
|
6403
|
+
const [deleting, setDeleting] = useState14(false);
|
|
6404
|
+
const handleRequestDelete = useCallback19(() => {
|
|
6223
6405
|
setDeleteDialogOpen(true);
|
|
6224
6406
|
}, []);
|
|
6225
|
-
const handleDeleteClose =
|
|
6407
|
+
const handleDeleteClose = useCallback19(() => {
|
|
6226
6408
|
if (!deleting) setDeleteDialogOpen(false);
|
|
6227
6409
|
}, [deleting]);
|
|
6228
|
-
const handleDeleteConfirm =
|
|
6410
|
+
const handleDeleteConfirm = useCallback19(async () => {
|
|
6229
6411
|
setDeleting(true);
|
|
6230
6412
|
try {
|
|
6231
6413
|
await client.delete(documentId);
|
|
@@ -6246,9 +6428,9 @@ function ReportActions({
|
|
|
6246
6428
|
setDeleting(false);
|
|
6247
6429
|
}
|
|
6248
6430
|
}, [client, documentId, onDeleted, toast]);
|
|
6249
|
-
return /* @__PURE__ */
|
|
6250
|
-
/* @__PURE__ */
|
|
6251
|
-
/* @__PURE__ */
|
|
6431
|
+
return /* @__PURE__ */ jsxs32(Fragment6, { children: [
|
|
6432
|
+
/* @__PURE__ */ jsxs32(Flex25, { children: [
|
|
6433
|
+
/* @__PURE__ */ jsx45(
|
|
6252
6434
|
Button3,
|
|
6253
6435
|
{
|
|
6254
6436
|
icon: CopyIcon2,
|
|
@@ -6262,10 +6444,10 @@ function ReportActions({
|
|
|
6262
6444
|
text: "Copy Report ID"
|
|
6263
6445
|
}
|
|
6264
6446
|
),
|
|
6265
|
-
/* @__PURE__ */
|
|
6447
|
+
/* @__PURE__ */ jsx45(
|
|
6266
6448
|
MenuButton2,
|
|
6267
6449
|
{
|
|
6268
|
-
button: /* @__PURE__ */
|
|
6450
|
+
button: /* @__PURE__ */ jsx45(
|
|
6269
6451
|
Button3,
|
|
6270
6452
|
{
|
|
6271
6453
|
icon: ChevronDownIcon,
|
|
@@ -6278,33 +6460,33 @@ function ReportActions({
|
|
|
6278
6460
|
}
|
|
6279
6461
|
),
|
|
6280
6462
|
id: "report-actions-menu",
|
|
6281
|
-
menu: /* @__PURE__ */
|
|
6282
|
-
/* @__PURE__ */
|
|
6283
|
-
/* @__PURE__ */
|
|
6463
|
+
menu: /* @__PURE__ */ jsxs32(Menu2, { children: [
|
|
6464
|
+
/* @__PURE__ */ jsx45(CopyReportIdAction, { reportId }),
|
|
6465
|
+
/* @__PURE__ */ jsx45(
|
|
6284
6466
|
RerunEvaluationAction,
|
|
6285
6467
|
{
|
|
6286
6468
|
provenance,
|
|
6287
6469
|
reportId
|
|
6288
6470
|
}
|
|
6289
6471
|
),
|
|
6290
|
-
/* @__PURE__ */
|
|
6291
|
-
/* @__PURE__ */
|
|
6472
|
+
/* @__PURE__ */ jsx45(MenuDivider, {}),
|
|
6473
|
+
/* @__PURE__ */ jsx45(
|
|
6292
6474
|
DownloadReportAction,
|
|
6293
6475
|
{
|
|
6294
6476
|
documentId,
|
|
6295
6477
|
reportId
|
|
6296
6478
|
}
|
|
6297
6479
|
),
|
|
6298
|
-
/* @__PURE__ */
|
|
6299
|
-
/* @__PURE__ */
|
|
6300
|
-
/* @__PURE__ */
|
|
6301
|
-
/* @__PURE__ */
|
|
6480
|
+
/* @__PURE__ */ jsx45(CopyReportAction, { documentId }),
|
|
6481
|
+
/* @__PURE__ */ jsx45(CopyVisionQueryAction, { reportId }),
|
|
6482
|
+
/* @__PURE__ */ jsx45(MenuDivider, {}),
|
|
6483
|
+
/* @__PURE__ */ jsx45(DeleteReportAction, { onRequestDelete: handleRequestDelete })
|
|
6302
6484
|
] }),
|
|
6303
6485
|
popover: { placement: "bottom-end", portal: true }
|
|
6304
6486
|
}
|
|
6305
6487
|
)
|
|
6306
6488
|
] }),
|
|
6307
|
-
deleteDialogOpen && /* @__PURE__ */
|
|
6489
|
+
deleteDialogOpen && /* @__PURE__ */ jsx45(
|
|
6308
6490
|
DeleteConfirmDialog,
|
|
6309
6491
|
{
|
|
6310
6492
|
isDeleting: deleting,
|
|
@@ -6317,7 +6499,7 @@ function ReportActions({
|
|
|
6317
6499
|
}
|
|
6318
6500
|
|
|
6319
6501
|
// src/components/report-detail/ReportHeader.tsx
|
|
6320
|
-
import { jsx as
|
|
6502
|
+
import { jsx as jsx46, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
6321
6503
|
function ReportHeader({
|
|
6322
6504
|
completedAt,
|
|
6323
6505
|
documentId,
|
|
@@ -6332,16 +6514,16 @@ function ReportHeader({
|
|
|
6332
6514
|
const dateLabel = formatCardDate(completedAt);
|
|
6333
6515
|
const title = tag ?? dateLabel;
|
|
6334
6516
|
const hasTag = Boolean(tag);
|
|
6335
|
-
return /* @__PURE__ */
|
|
6336
|
-
/* @__PURE__ */
|
|
6337
|
-
/* @__PURE__ */
|
|
6338
|
-
/* @__PURE__ */
|
|
6339
|
-
hasTag && /* @__PURE__ */
|
|
6517
|
+
return /* @__PURE__ */ jsxs33(Flex26, { align: "center", gap: 3, children: [
|
|
6518
|
+
/* @__PURE__ */ jsx46(Button4, { icon: ArrowLeftIcon, mode: "bleed", onClick: onBack, text: "Back" }),
|
|
6519
|
+
/* @__PURE__ */ jsxs33(Stack23, { flex: 1, space: 1, children: [
|
|
6520
|
+
/* @__PURE__ */ jsx46(Text32, { size: 4, weight: "bold", children: title }),
|
|
6521
|
+
hasTag && /* @__PURE__ */ jsx46(Text32, { muted: true, size: 2, children: dateLabel })
|
|
6340
6522
|
] }),
|
|
6341
|
-
/* @__PURE__ */
|
|
6342
|
-
/* @__PURE__ */
|
|
6343
|
-
/* @__PURE__ */
|
|
6344
|
-
/* @__PURE__ */
|
|
6523
|
+
/* @__PURE__ */ jsxs33(Flex26, { align: "center", gap: 2, children: [
|
|
6524
|
+
/* @__PURE__ */ jsx46(Badge21, { mode: "outline", tone: "default", children: sourceName }),
|
|
6525
|
+
/* @__PURE__ */ jsx46(Badge21, { tone: "primary", children: mode }),
|
|
6526
|
+
/* @__PURE__ */ jsx46(
|
|
6345
6527
|
ReportActions,
|
|
6346
6528
|
{
|
|
6347
6529
|
documentId,
|
|
@@ -6356,18 +6538,18 @@ function ReportHeader({
|
|
|
6356
6538
|
|
|
6357
6539
|
// src/components/report-detail/ThreeLayerTable.tsx
|
|
6358
6540
|
import React5 from "react";
|
|
6359
|
-
import { Badge as
|
|
6360
|
-
import { jsx as
|
|
6541
|
+
import { Badge as Badge22, Card as Card23, Flex as Flex27, Stack as Stack24, Text as Text33 } from "@sanity/ui";
|
|
6542
|
+
import { jsx as jsx47, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
6361
6543
|
function ThreeLayerTable({ scores }) {
|
|
6362
6544
|
const filtered = scores.filter((s) => s.actualScore != null);
|
|
6363
6545
|
if (filtered.length === 0) return null;
|
|
6364
6546
|
const hasInverted = filtered.some((s) => s.invertedRetrievalGap);
|
|
6365
|
-
return /* @__PURE__ */
|
|
6366
|
-
/* @__PURE__ */
|
|
6367
|
-
/* @__PURE__ */
|
|
6368
|
-
/* @__PURE__ */
|
|
6547
|
+
return /* @__PURE__ */ jsx47(Card23, { overflow: "auto", padding: 4, radius: 2, shadow: 1, children: /* @__PURE__ */ jsxs34(Stack24, { space: 4, children: [
|
|
6548
|
+
/* @__PURE__ */ jsxs34(Flex27, { align: "center", gap: 3, children: [
|
|
6549
|
+
/* @__PURE__ */ jsx47(Text33, { size: 3, weight: "semibold", children: "Three-Layer Decomposition" }),
|
|
6550
|
+
/* @__PURE__ */ jsx47(Badge22, { tone: "primary", children: "full mode" })
|
|
6369
6551
|
] }),
|
|
6370
|
-
/* @__PURE__ */
|
|
6552
|
+
/* @__PURE__ */ jsxs34(
|
|
6371
6553
|
"div",
|
|
6372
6554
|
{
|
|
6373
6555
|
style: {
|
|
@@ -6376,9 +6558,9 @@ function ThreeLayerTable({ scores }) {
|
|
|
6376
6558
|
gridTemplateColumns: "2fr 1fr 1fr 1fr 1fr 1fr"
|
|
6377
6559
|
},
|
|
6378
6560
|
children: [
|
|
6379
|
-
/* @__PURE__ */
|
|
6380
|
-
/* @__PURE__ */
|
|
6381
|
-
/* @__PURE__ */
|
|
6561
|
+
/* @__PURE__ */ jsx47(ColumnHeader, { borderBottom: true, label: "Area" }),
|
|
6562
|
+
/* @__PURE__ */ jsx47(ColumnHeader, { borderBottom: true, label: "Floor", tooltip: GLOSSARY.floor }),
|
|
6563
|
+
/* @__PURE__ */ jsx47(
|
|
6382
6564
|
ColumnHeader,
|
|
6383
6565
|
{
|
|
6384
6566
|
borderBottom: true,
|
|
@@ -6386,8 +6568,8 @@ function ThreeLayerTable({ scores }) {
|
|
|
6386
6568
|
tooltip: GLOSSARY.ceiling
|
|
6387
6569
|
}
|
|
6388
6570
|
),
|
|
6389
|
-
/* @__PURE__ */
|
|
6390
|
-
/* @__PURE__ */
|
|
6571
|
+
/* @__PURE__ */ jsx47(ColumnHeader, { borderBottom: true, label: "Actual", tooltip: GLOSSARY.actual }),
|
|
6572
|
+
/* @__PURE__ */ jsx47(
|
|
6391
6573
|
ColumnHeader,
|
|
6392
6574
|
{
|
|
6393
6575
|
borderBottom: true,
|
|
@@ -6395,7 +6577,7 @@ function ThreeLayerTable({ scores }) {
|
|
|
6395
6577
|
tooltip: GLOSSARY.retGap
|
|
6396
6578
|
}
|
|
6397
6579
|
),
|
|
6398
|
-
/* @__PURE__ */
|
|
6580
|
+
/* @__PURE__ */ jsx47(
|
|
6399
6581
|
ColumnHeader,
|
|
6400
6582
|
{
|
|
6401
6583
|
borderBottom: true,
|
|
@@ -6403,8 +6585,8 @@ function ThreeLayerTable({ scores }) {
|
|
|
6403
6585
|
tooltip: GLOSSARY.efficiency
|
|
6404
6586
|
}
|
|
6405
6587
|
),
|
|
6406
|
-
filtered.map((score, i) => /* @__PURE__ */
|
|
6407
|
-
/* @__PURE__ */
|
|
6588
|
+
filtered.map((score, i) => /* @__PURE__ */ jsxs34(React5.Fragment, { children: [
|
|
6589
|
+
/* @__PURE__ */ jsx47(
|
|
6408
6590
|
"div",
|
|
6409
6591
|
{
|
|
6410
6592
|
style: {
|
|
@@ -6412,10 +6594,10 @@ function ThreeLayerTable({ scores }) {
|
|
|
6412
6594
|
borderRadius: 4,
|
|
6413
6595
|
padding: "8px 0 8px 4px"
|
|
6414
6596
|
},
|
|
6415
|
-
children: /* @__PURE__ */
|
|
6597
|
+
children: /* @__PURE__ */ jsx47(Text33, { size: 2, weight: "medium", children: score.feature })
|
|
6416
6598
|
}
|
|
6417
6599
|
),
|
|
6418
|
-
/* @__PURE__ */
|
|
6600
|
+
/* @__PURE__ */ jsx47(
|
|
6419
6601
|
"div",
|
|
6420
6602
|
{
|
|
6421
6603
|
style: {
|
|
@@ -6423,10 +6605,10 @@ function ThreeLayerTable({ scores }) {
|
|
|
6423
6605
|
display: "flex",
|
|
6424
6606
|
padding: "2px 0"
|
|
6425
6607
|
},
|
|
6426
|
-
children: /* @__PURE__ */
|
|
6608
|
+
children: /* @__PURE__ */ jsx47(ScoreCell, { score: score.floorScore ?? 0 })
|
|
6427
6609
|
}
|
|
6428
6610
|
),
|
|
6429
|
-
/* @__PURE__ */
|
|
6611
|
+
/* @__PURE__ */ jsx47(
|
|
6430
6612
|
"div",
|
|
6431
6613
|
{
|
|
6432
6614
|
style: {
|
|
@@ -6434,10 +6616,10 @@ function ThreeLayerTable({ scores }) {
|
|
|
6434
6616
|
display: "flex",
|
|
6435
6617
|
padding: "2px 0"
|
|
6436
6618
|
},
|
|
6437
|
-
children: /* @__PURE__ */
|
|
6619
|
+
children: /* @__PURE__ */ jsx47(ScoreCell, { score: score.ceilingScore ?? score.totalScore })
|
|
6438
6620
|
}
|
|
6439
6621
|
),
|
|
6440
|
-
/* @__PURE__ */
|
|
6622
|
+
/* @__PURE__ */ jsx47(
|
|
6441
6623
|
"div",
|
|
6442
6624
|
{
|
|
6443
6625
|
style: {
|
|
@@ -6445,10 +6627,10 @@ function ThreeLayerTable({ scores }) {
|
|
|
6445
6627
|
display: "flex",
|
|
6446
6628
|
padding: "2px 0"
|
|
6447
6629
|
},
|
|
6448
|
-
children: /* @__PURE__ */
|
|
6630
|
+
children: /* @__PURE__ */ jsx47(ScoreCell, { score: score.actualScore ?? 0 })
|
|
6449
6631
|
}
|
|
6450
6632
|
),
|
|
6451
|
-
/* @__PURE__ */
|
|
6633
|
+
/* @__PURE__ */ jsx47(
|
|
6452
6634
|
"div",
|
|
6453
6635
|
{
|
|
6454
6636
|
style: {
|
|
@@ -6457,10 +6639,10 @@ function ThreeLayerTable({ scores }) {
|
|
|
6457
6639
|
display: "flex",
|
|
6458
6640
|
padding: "6px 0"
|
|
6459
6641
|
},
|
|
6460
|
-
children: /* @__PURE__ */
|
|
6642
|
+
children: /* @__PURE__ */ jsx47(Text33, { size: 2, children: score.retrievalGap != null ? score.retrievalGap.toFixed(1) : "\u2014" })
|
|
6461
6643
|
}
|
|
6462
6644
|
),
|
|
6463
|
-
/* @__PURE__ */
|
|
6645
|
+
/* @__PURE__ */ jsx47(
|
|
6464
6646
|
"div",
|
|
6465
6647
|
{
|
|
6466
6648
|
style: {
|
|
@@ -6469,7 +6651,7 @@ function ThreeLayerTable({ scores }) {
|
|
|
6469
6651
|
display: "flex",
|
|
6470
6652
|
padding: "6px 0"
|
|
6471
6653
|
},
|
|
6472
|
-
children: /* @__PURE__ */
|
|
6654
|
+
children: /* @__PURE__ */ jsxs34(Text33, { size: 2, children: [
|
|
6473
6655
|
formatPercent(score.infrastructureEfficiency),
|
|
6474
6656
|
score.invertedRetrievalGap && " \u26A0\uFE0F"
|
|
6475
6657
|
] })
|
|
@@ -6479,12 +6661,12 @@ function ThreeLayerTable({ scores }) {
|
|
|
6479
6661
|
]
|
|
6480
6662
|
}
|
|
6481
6663
|
),
|
|
6482
|
-
hasInverted && /* @__PURE__ */
|
|
6664
|
+
hasInverted && /* @__PURE__ */ jsx47(Text33, { muted: true, size: 1, children: GLOSSARY.invertedRetGap })
|
|
6483
6665
|
] }) });
|
|
6484
6666
|
}
|
|
6485
6667
|
|
|
6486
6668
|
// src/components/report-detail/ReportDetail.tsx
|
|
6487
|
-
import { jsx as
|
|
6669
|
+
import { jsx as jsx48, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
6488
6670
|
var OVERVIEW_TAB = { id: "overview", label: "Overview" };
|
|
6489
6671
|
var DIAGNOSTICS_TAB = { id: "diagnostics", label: "Diagnostics" };
|
|
6490
6672
|
var ACTIVITY_TAB = { id: "activity", label: "Agent Activity" };
|
|
@@ -6498,10 +6680,10 @@ function ReportDetail({
|
|
|
6498
6680
|
onTabChange,
|
|
6499
6681
|
reportId
|
|
6500
6682
|
}) {
|
|
6501
|
-
const client =
|
|
6502
|
-
const [loading, setLoading] =
|
|
6503
|
-
const [report, setReport] =
|
|
6504
|
-
|
|
6683
|
+
const client = useClient12({ apiVersion: API_VERSION });
|
|
6684
|
+
const [loading, setLoading] = useState15(true);
|
|
6685
|
+
const [report, setReport] = useState15(null);
|
|
6686
|
+
useEffect9(() => {
|
|
6505
6687
|
let cancelled = false;
|
|
6506
6688
|
setLoading(true);
|
|
6507
6689
|
client.fetch(reportDetailQuery, { reportId }).then((data) => {
|
|
@@ -6538,18 +6720,18 @@ function ReportDetail({
|
|
|
6538
6720
|
if (disabledTabs.has(parsed)) return "overview";
|
|
6539
6721
|
return tabs.some((t) => t.id === parsed) ? parsed : "overview";
|
|
6540
6722
|
}, [activeTab, disabledTabs, tabs]);
|
|
6541
|
-
const handleTabClick =
|
|
6723
|
+
const handleTabClick = useCallback20(
|
|
6542
6724
|
(tabId) => {
|
|
6543
6725
|
onTabChange(tabId === "overview" ? null : tabId);
|
|
6544
6726
|
},
|
|
6545
6727
|
[onTabChange]
|
|
6546
6728
|
);
|
|
6547
6729
|
if (loading) {
|
|
6548
|
-
return /* @__PURE__ */
|
|
6730
|
+
return /* @__PURE__ */ jsx48(LoadingState, { message: "Loading report\u2026" });
|
|
6549
6731
|
}
|
|
6550
6732
|
if (!report || !summary) {
|
|
6551
|
-
return /* @__PURE__ */
|
|
6552
|
-
/* @__PURE__ */
|
|
6733
|
+
return /* @__PURE__ */ jsx48(Box15, { padding: 5, children: /* @__PURE__ */ jsxs35(Stack25, { space: 4, children: [
|
|
6734
|
+
/* @__PURE__ */ jsx48(
|
|
6553
6735
|
Button5,
|
|
6554
6736
|
{
|
|
6555
6737
|
icon: ArrowLeftIcon2,
|
|
@@ -6558,14 +6740,14 @@ function ReportDetail({
|
|
|
6558
6740
|
text: "Back"
|
|
6559
6741
|
}
|
|
6560
6742
|
),
|
|
6561
|
-
/* @__PURE__ */
|
|
6743
|
+
/* @__PURE__ */ jsx48(Text34, { align: "center", muted: true, size: 3, children: "Report not found" })
|
|
6562
6744
|
] }) });
|
|
6563
6745
|
}
|
|
6564
6746
|
const { comparison, provenance } = report;
|
|
6565
6747
|
const totalTests = summary.scores.reduce((n, s) => n + s.testCount, 0);
|
|
6566
6748
|
const isFullMode = summary.evaluationMode === "full" || summary.scores.some((s) => s.actualScore != null);
|
|
6567
|
-
return /* @__PURE__ */
|
|
6568
|
-
/* @__PURE__ */
|
|
6749
|
+
return /* @__PURE__ */ jsx48(Box15, { padding: 4, children: /* @__PURE__ */ jsxs35(Stack25, { space: 5, children: [
|
|
6750
|
+
/* @__PURE__ */ jsx48(
|
|
6569
6751
|
ReportHeader,
|
|
6570
6752
|
{
|
|
6571
6753
|
completedAt: report.completedAt,
|
|
@@ -6579,10 +6761,10 @@ function ReportDetail({
|
|
|
6579
6761
|
tag: report.tag
|
|
6580
6762
|
}
|
|
6581
6763
|
),
|
|
6582
|
-
/* @__PURE__ */
|
|
6764
|
+
/* @__PURE__ */ jsx48(TabList, { space: 1, children: tabs.map((tab) => {
|
|
6583
6765
|
const isDisabled = disabledTabs.has(tab.id);
|
|
6584
6766
|
const tooltip = getDisabledTabTooltip(tab.id, summary);
|
|
6585
|
-
const tabElement = /* @__PURE__ */
|
|
6767
|
+
const tabElement = /* @__PURE__ */ jsx48(
|
|
6586
6768
|
Tab,
|
|
6587
6769
|
{
|
|
6588
6770
|
"aria-controls": `panel-${tab.id}`,
|
|
@@ -6593,25 +6775,25 @@ function ReportDetail({
|
|
|
6593
6775
|
selected: currentTab === tab.id
|
|
6594
6776
|
}
|
|
6595
6777
|
);
|
|
6596
|
-
return isDisabled && tooltip ? /* @__PURE__ */
|
|
6778
|
+
return isDisabled && tooltip ? /* @__PURE__ */ jsx48(
|
|
6597
6779
|
Tooltip8,
|
|
6598
6780
|
{
|
|
6599
|
-
content: /* @__PURE__ */
|
|
6781
|
+
content: /* @__PURE__ */ jsx48(Box15, { padding: 2, style: { maxWidth: 280 }, children: tooltip }),
|
|
6600
6782
|
placement: "bottom",
|
|
6601
6783
|
portal: true,
|
|
6602
|
-
children: /* @__PURE__ */
|
|
6784
|
+
children: /* @__PURE__ */ jsx48("span", { style: { display: "inline-block" }, children: tabElement })
|
|
6603
6785
|
},
|
|
6604
6786
|
tab.id
|
|
6605
|
-
) : /* @__PURE__ */
|
|
6787
|
+
) : /* @__PURE__ */ jsx48("span", { children: tabElement }, tab.id);
|
|
6606
6788
|
}) }),
|
|
6607
|
-
currentTab === "overview" && /* @__PURE__ */
|
|
6789
|
+
currentTab === "overview" && /* @__PURE__ */ jsx48(
|
|
6608
6790
|
TabPanel,
|
|
6609
6791
|
{
|
|
6610
6792
|
"aria-labelledby": "tab-overview",
|
|
6611
6793
|
hidden: currentTab !== "overview",
|
|
6612
6794
|
id: "panel-overview",
|
|
6613
|
-
children: /* @__PURE__ */
|
|
6614
|
-
/* @__PURE__ */
|
|
6795
|
+
children: /* @__PURE__ */ jsxs35(Stack25, { space: 5, children: [
|
|
6796
|
+
/* @__PURE__ */ jsx48(
|
|
6615
6797
|
OverviewStats,
|
|
6616
6798
|
{
|
|
6617
6799
|
durationMs: report.durationMs,
|
|
@@ -6620,37 +6802,38 @@ function ReportDetail({
|
|
|
6620
6802
|
totalTests
|
|
6621
6803
|
}
|
|
6622
6804
|
),
|
|
6623
|
-
isFullMode && /* @__PURE__ */
|
|
6624
|
-
/* @__PURE__ */
|
|
6625
|
-
comparison && /* @__PURE__ */
|
|
6626
|
-
/* @__PURE__ */
|
|
6805
|
+
isFullMode && /* @__PURE__ */ jsx48(ThreeLayerTable, { scores: summary.scores }),
|
|
6806
|
+
/* @__PURE__ */ jsx48(AreaScoreTable, { scores: summary.scores }),
|
|
6807
|
+
comparison && /* @__PURE__ */ jsx48(ComparisonSummary, { comparison }),
|
|
6808
|
+
/* @__PURE__ */ jsx48(LineageCard, { provenance, reportId: report.reportId }),
|
|
6809
|
+
/* @__PURE__ */ jsx48(ProvenanceCard, { provenance })
|
|
6627
6810
|
] })
|
|
6628
6811
|
}
|
|
6629
6812
|
),
|
|
6630
|
-
currentTab === "diagnostics" && hasDiagnostics && /* @__PURE__ */
|
|
6813
|
+
currentTab === "diagnostics" && hasDiagnostics && /* @__PURE__ */ jsx48(
|
|
6631
6814
|
TabPanel,
|
|
6632
6815
|
{
|
|
6633
6816
|
"aria-labelledby": "tab-diagnostics",
|
|
6634
6817
|
hidden: currentTab !== "diagnostics",
|
|
6635
6818
|
id: "panel-diagnostics",
|
|
6636
|
-
children: /* @__PURE__ */
|
|
6637
|
-
summary.recommendations && summary.recommendations.gaps.length > 0 && /* @__PURE__ */
|
|
6819
|
+
children: /* @__PURE__ */ jsxs35(Stack25, { space: 5, children: [
|
|
6820
|
+
summary.recommendations && summary.recommendations.gaps.length > 0 && /* @__PURE__ */ jsx48(
|
|
6638
6821
|
RecommendationsSection,
|
|
6639
6822
|
{
|
|
6640
6823
|
recommendations: summary.recommendations
|
|
6641
6824
|
}
|
|
6642
6825
|
),
|
|
6643
|
-
summary.lowScoringJudgments && summary.lowScoringJudgments.length > 0 && /* @__PURE__ */
|
|
6826
|
+
summary.lowScoringJudgments && summary.lowScoringJudgments.length > 0 && /* @__PURE__ */ jsx48(JudgmentList, { judgments: summary.lowScoringJudgments })
|
|
6644
6827
|
] })
|
|
6645
6828
|
}
|
|
6646
6829
|
),
|
|
6647
|
-
currentTab === "activity" && hasAgentActivity && /* @__PURE__ */
|
|
6830
|
+
currentTab === "activity" && hasAgentActivity && /* @__PURE__ */ jsx48(
|
|
6648
6831
|
TabPanel,
|
|
6649
6832
|
{
|
|
6650
6833
|
"aria-labelledby": "tab-activity",
|
|
6651
6834
|
hidden: currentTab !== "activity",
|
|
6652
6835
|
id: "panel-activity",
|
|
6653
|
-
children: /* @__PURE__ */
|
|
6836
|
+
children: /* @__PURE__ */ jsx48(
|
|
6654
6837
|
AgentActivitySection,
|
|
6655
6838
|
{
|
|
6656
6839
|
agentBehavior: summary.agentBehavior,
|
|
@@ -6672,27 +6855,27 @@ function getDisabledTabTooltip(tabId, summary) {
|
|
|
6672
6855
|
if (!summary) return null;
|
|
6673
6856
|
switch (tabId) {
|
|
6674
6857
|
case "diagnostics":
|
|
6675
|
-
return /* @__PURE__ */
|
|
6858
|
+
return /* @__PURE__ */ jsx48(Text34, { muted: true, size: 2, children: "No diagnostic data available. Diagnostics require low-scoring judgments or gap analysis recommendations." });
|
|
6676
6859
|
case "activity":
|
|
6677
|
-
return summary.evaluationMode === "baseline" ? /* @__PURE__ */
|
|
6860
|
+
return summary.evaluationMode === "baseline" ? /* @__PURE__ */ jsxs35(Text34, { muted: true, size: 2, children: [
|
|
6678
6861
|
"Not available for baseline-only evaluations. Run with",
|
|
6679
6862
|
" ",
|
|
6680
|
-
/* @__PURE__ */
|
|
6863
|
+
/* @__PURE__ */ jsx48("code", { style: inlineCodeStyle, children: "--mode full" }),
|
|
6681
6864
|
" or",
|
|
6682
6865
|
" ",
|
|
6683
|
-
/* @__PURE__ */
|
|
6866
|
+
/* @__PURE__ */ jsx48("code", { style: inlineCodeStyle, children: "--mode agentic" }),
|
|
6684
6867
|
" to capture agent browsing behavior."
|
|
6685
|
-
] }) : /* @__PURE__ */
|
|
6868
|
+
] }) : /* @__PURE__ */ jsx48(Text34, { muted: true, size: 2, children: "No agent activity data was recorded for this evaluation." });
|
|
6686
6869
|
default:
|
|
6687
6870
|
return null;
|
|
6688
6871
|
}
|
|
6689
6872
|
}
|
|
6690
6873
|
|
|
6691
6874
|
// src/components/ScoreTimeline.tsx
|
|
6692
|
-
import { Card as
|
|
6693
|
-
import { useCallback as
|
|
6694
|
-
import { useClient as
|
|
6695
|
-
import { jsx as
|
|
6875
|
+
import { Card as Card24, Flex as Flex28, Select as Select2, Stack as Stack26, Text as Text35 } from "@sanity/ui";
|
|
6876
|
+
import { useCallback as useCallback21, useEffect as useEffect10, useMemo as useMemo8, useState as useState16 } from "react";
|
|
6877
|
+
import { useClient as useClient13 } from "sanity";
|
|
6878
|
+
import { jsx as jsx49, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
6696
6879
|
var CHART_HEIGHT = 220;
|
|
6697
6880
|
var CHART_WIDTH = 800;
|
|
6698
6881
|
var PAD_BOTTOM = 30;
|
|
@@ -6726,11 +6909,11 @@ function scoreForPoint(point, area) {
|
|
|
6726
6909
|
return match?.totalScore ?? null;
|
|
6727
6910
|
}
|
|
6728
6911
|
function ScoreTimeline({ mode = null, source = null }) {
|
|
6729
|
-
const client =
|
|
6730
|
-
const [dataPoints, setDataPoints] =
|
|
6731
|
-
const [loading, setLoading] =
|
|
6732
|
-
const [rangeDays, setRangeDays] =
|
|
6733
|
-
const [selectedArea, setSelectedArea] =
|
|
6912
|
+
const client = useClient13({ apiVersion: API_VERSION });
|
|
6913
|
+
const [dataPoints, setDataPoints] = useState16([]);
|
|
6914
|
+
const [loading, setLoading] = useState16(true);
|
|
6915
|
+
const [rangeDays, setRangeDays] = useState16(30);
|
|
6916
|
+
const [selectedArea, setSelectedArea] = useState16(null);
|
|
6734
6917
|
const areaNames = useMemo8(() => {
|
|
6735
6918
|
const names = /* @__PURE__ */ new Set();
|
|
6736
6919
|
for (const dp of dataPoints) {
|
|
@@ -6740,7 +6923,7 @@ function ScoreTimeline({ mode = null, source = null }) {
|
|
|
6740
6923
|
}
|
|
6741
6924
|
return Array.from(names).sort();
|
|
6742
6925
|
}, [dataPoints]);
|
|
6743
|
-
const fetchData =
|
|
6926
|
+
const fetchData = useCallback21(async () => {
|
|
6744
6927
|
setLoading(true);
|
|
6745
6928
|
try {
|
|
6746
6929
|
const startDate = rangeDays ? daysAgo(rangeDays) : "1970-01-01T00:00:00Z";
|
|
@@ -6755,7 +6938,7 @@ function ScoreTimeline({ mode = null, source = null }) {
|
|
|
6755
6938
|
setLoading(false);
|
|
6756
6939
|
}
|
|
6757
6940
|
}, [client, mode, rangeDays, source]);
|
|
6758
|
-
|
|
6941
|
+
useEffect10(() => {
|
|
6759
6942
|
void fetchData();
|
|
6760
6943
|
}, [fetchData]);
|
|
6761
6944
|
const chartPoints = useMemo8(() => {
|
|
@@ -6776,14 +6959,14 @@ function ScoreTimeline({ mode = null, source = null }) {
|
|
|
6776
6959
|
if (chartPoints.length === 0) return 0;
|
|
6777
6960
|
return chartPoints.reduce((sum, p) => sum + p.score, 0) / chartPoints.length;
|
|
6778
6961
|
}, [chartPoints]);
|
|
6779
|
-
const handleRangeChange =
|
|
6962
|
+
const handleRangeChange = useCallback21(
|
|
6780
6963
|
(e) => {
|
|
6781
6964
|
const val = e.currentTarget.value;
|
|
6782
6965
|
setRangeDays(val === "all" ? null : Number(val));
|
|
6783
6966
|
},
|
|
6784
6967
|
[]
|
|
6785
6968
|
);
|
|
6786
|
-
const handleAreaChange =
|
|
6969
|
+
const handleAreaChange = useCallback21(
|
|
6787
6970
|
(e) => {
|
|
6788
6971
|
const val = e.currentTarget.value;
|
|
6789
6972
|
setSelectedArea(val || null);
|
|
@@ -6791,22 +6974,22 @@ function ScoreTimeline({ mode = null, source = null }) {
|
|
|
6791
6974
|
[]
|
|
6792
6975
|
);
|
|
6793
6976
|
const polylinePoints = chartPoints.map((p) => `${p.x},${p.y}`).join(" ");
|
|
6794
|
-
return /* @__PURE__ */
|
|
6795
|
-
/* @__PURE__ */
|
|
6796
|
-
/* @__PURE__ */
|
|
6977
|
+
return /* @__PURE__ */ jsxs36(Stack26, { space: 4, children: [
|
|
6978
|
+
/* @__PURE__ */ jsxs36(Flex28, { gap: 3, children: [
|
|
6979
|
+
/* @__PURE__ */ jsx49(
|
|
6797
6980
|
Select2,
|
|
6798
6981
|
{
|
|
6799
6982
|
onChange: handleRangeChange,
|
|
6800
6983
|
value: rangeDays?.toString() ?? "all",
|
|
6801
|
-
children: TIME_RANGES.map((r) => /* @__PURE__ */
|
|
6984
|
+
children: TIME_RANGES.map((r) => /* @__PURE__ */ jsx49("option", { value: r.days?.toString() ?? "all", children: r.label }, r.label))
|
|
6802
6985
|
}
|
|
6803
6986
|
),
|
|
6804
|
-
/* @__PURE__ */
|
|
6805
|
-
/* @__PURE__ */
|
|
6806
|
-
areaNames.map((name) => /* @__PURE__ */
|
|
6987
|
+
/* @__PURE__ */ jsxs36(Select2, { onChange: handleAreaChange, value: selectedArea ?? "", children: [
|
|
6988
|
+
/* @__PURE__ */ jsx49("option", { value: "", children: "Overall" }),
|
|
6989
|
+
areaNames.map((name) => /* @__PURE__ */ jsx49("option", { value: name, children: name }, name))
|
|
6807
6990
|
] })
|
|
6808
6991
|
] }),
|
|
6809
|
-
/* @__PURE__ */
|
|
6992
|
+
/* @__PURE__ */ jsx49(Card24, { padding: 3, radius: 2, shadow: 1, children: loading ? /* @__PURE__ */ jsx49(Flex28, { align: "center", justify: "center", style: { height: 200 }, children: /* @__PURE__ */ jsx49(Text35, { muted: true, size: 2, children: "Loading\u2026" }) }) : chartPoints.length === 0 ? /* @__PURE__ */ jsx49(Flex28, { align: "center", justify: "center", style: { height: 200 }, children: /* @__PURE__ */ jsx49(Text35, { muted: true, size: 2, children: "No reports found for this time range" }) }) : /* @__PURE__ */ jsxs36(
|
|
6810
6993
|
"svg",
|
|
6811
6994
|
{
|
|
6812
6995
|
style: { display: "block", width: "100%" },
|
|
@@ -6814,8 +6997,8 @@ function ScoreTimeline({ mode = null, source = null }) {
|
|
|
6814
6997
|
children: [
|
|
6815
6998
|
Y_TICKS.map((tick) => {
|
|
6816
6999
|
const y = PAD_TOP + PLOT_HEIGHT - tick / Y_MAX * PLOT_HEIGHT;
|
|
6817
|
-
return /* @__PURE__ */
|
|
6818
|
-
/* @__PURE__ */
|
|
7000
|
+
return /* @__PURE__ */ jsxs36("g", { children: [
|
|
7001
|
+
/* @__PURE__ */ jsx49(
|
|
6819
7002
|
"line",
|
|
6820
7003
|
{
|
|
6821
7004
|
stroke: "#ccc",
|
|
@@ -6826,7 +7009,7 @@ function ScoreTimeline({ mode = null, source = null }) {
|
|
|
6826
7009
|
y2: y
|
|
6827
7010
|
}
|
|
6828
7011
|
),
|
|
6829
|
-
/* @__PURE__ */
|
|
7012
|
+
/* @__PURE__ */ jsx49(
|
|
6830
7013
|
"text",
|
|
6831
7014
|
{
|
|
6832
7015
|
dominantBaseline: "middle",
|
|
@@ -6846,7 +7029,7 @@ function ScoreTimeline({ mode = null, source = null }) {
|
|
|
6846
7029
|
chartPoints.length - 1
|
|
6847
7030
|
].map((idx) => {
|
|
6848
7031
|
const p = chartPoints[idx];
|
|
6849
|
-
return /* @__PURE__ */
|
|
7032
|
+
return /* @__PURE__ */ jsx49(
|
|
6850
7033
|
"text",
|
|
6851
7034
|
{
|
|
6852
7035
|
fill: "#999",
|
|
@@ -6858,7 +7041,7 @@ function ScoreTimeline({ mode = null, source = null }) {
|
|
|
6858
7041
|
},
|
|
6859
7042
|
idx
|
|
6860
7043
|
);
|
|
6861
|
-
}) : chartPoints.map((p, idx) => /* @__PURE__ */
|
|
7044
|
+
}) : chartPoints.map((p, idx) => /* @__PURE__ */ jsx49(
|
|
6862
7045
|
"text",
|
|
6863
7046
|
{
|
|
6864
7047
|
fill: "#999",
|
|
@@ -6870,7 +7053,7 @@ function ScoreTimeline({ mode = null, source = null }) {
|
|
|
6870
7053
|
},
|
|
6871
7054
|
idx
|
|
6872
7055
|
)),
|
|
6873
|
-
/* @__PURE__ */
|
|
7056
|
+
/* @__PURE__ */ jsx49(
|
|
6874
7057
|
"polyline",
|
|
6875
7058
|
{
|
|
6876
7059
|
fill: "none",
|
|
@@ -6880,7 +7063,7 @@ function ScoreTimeline({ mode = null, source = null }) {
|
|
|
6880
7063
|
strokeWidth: 2.5
|
|
6881
7064
|
}
|
|
6882
7065
|
),
|
|
6883
|
-
chartPoints.map((p, idx) => /* @__PURE__ */
|
|
7066
|
+
chartPoints.map((p, idx) => /* @__PURE__ */ jsx49(
|
|
6884
7067
|
"circle",
|
|
6885
7068
|
{
|
|
6886
7069
|
cx: p.x,
|
|
@@ -6889,7 +7072,7 @@ function ScoreTimeline({ mode = null, source = null }) {
|
|
|
6889
7072
|
r: 4,
|
|
6890
7073
|
stroke: "#fff",
|
|
6891
7074
|
strokeWidth: 1.5,
|
|
6892
|
-
children: /* @__PURE__ */
|
|
7075
|
+
children: /* @__PURE__ */ jsxs36("title", { children: [
|
|
6893
7076
|
formatDate2(p.date),
|
|
6894
7077
|
": ",
|
|
6895
7078
|
Math.round(p.score)
|
|
@@ -6900,7 +7083,7 @@ function ScoreTimeline({ mode = null, source = null }) {
|
|
|
6900
7083
|
]
|
|
6901
7084
|
}
|
|
6902
7085
|
) }),
|
|
6903
|
-
/* @__PURE__ */
|
|
7086
|
+
/* @__PURE__ */ jsxs36(Text35, { muted: true, size: 2, children: [
|
|
6904
7087
|
chartPoints.length,
|
|
6905
7088
|
" data point",
|
|
6906
7089
|
chartPoints.length !== 1 ? "s" : ""
|
|
@@ -6910,19 +7093,19 @@ function ScoreTimeline({ mode = null, source = null }) {
|
|
|
6910
7093
|
var ScoreTimeline_default = ScoreTimeline;
|
|
6911
7094
|
|
|
6912
7095
|
// src/components/Dashboard.tsx
|
|
6913
|
-
import { jsx as
|
|
7096
|
+
import { jsx as jsx50, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
6914
7097
|
var VIEW_PARAM_MAP = {
|
|
6915
7098
|
compare: "compare",
|
|
6916
7099
|
timeline: "timeline"
|
|
6917
7100
|
};
|
|
6918
7101
|
function Dashboard() {
|
|
6919
|
-
const client =
|
|
6920
|
-
const router =
|
|
7102
|
+
const client = useClient14({ apiVersion: API_VERSION });
|
|
7103
|
+
const router = useRouter2();
|
|
6921
7104
|
const routerState = router.state;
|
|
6922
7105
|
const reportId = routerState.reportId ?? null;
|
|
6923
7106
|
const isDetail = reportId !== null;
|
|
6924
7107
|
const activeTab = isDetail ? "latest" : VIEW_PARAM_MAP[routerState.view ?? ""] ?? "latest";
|
|
6925
|
-
const navigateToTab =
|
|
7108
|
+
const navigateToTab = useCallback22(
|
|
6926
7109
|
(tab) => {
|
|
6927
7110
|
if (tab === "latest") {
|
|
6928
7111
|
router.navigate({});
|
|
@@ -6932,13 +7115,13 @@ function Dashboard() {
|
|
|
6932
7115
|
},
|
|
6933
7116
|
[router]
|
|
6934
7117
|
);
|
|
6935
|
-
const handleSelectReport =
|
|
7118
|
+
const handleSelectReport = useCallback22(
|
|
6936
7119
|
(id) => {
|
|
6937
7120
|
router.navigate({ reportId: id });
|
|
6938
7121
|
},
|
|
6939
7122
|
[router]
|
|
6940
7123
|
);
|
|
6941
|
-
const handleTabChange =
|
|
7124
|
+
const handleTabChange = useCallback22(
|
|
6942
7125
|
(tab) => {
|
|
6943
7126
|
if (!routerState.reportId) return;
|
|
6944
7127
|
if (tab) {
|
|
@@ -6949,52 +7132,52 @@ function Dashboard() {
|
|
|
6949
7132
|
},
|
|
6950
7133
|
[router, routerState.reportId]
|
|
6951
7134
|
);
|
|
6952
|
-
const handleBack =
|
|
7135
|
+
const handleBack = useCallback22(() => {
|
|
6953
7136
|
router.navigate({});
|
|
6954
7137
|
}, [router]);
|
|
6955
|
-
const [source, setSource] =
|
|
6956
|
-
const [mode, setMode] =
|
|
6957
|
-
const [sources, setSources] =
|
|
6958
|
-
const [modes, setModes] =
|
|
6959
|
-
|
|
7138
|
+
const [source, setSource] = useState17(null);
|
|
7139
|
+
const [mode, setMode] = useState17(null);
|
|
7140
|
+
const [sources, setSources] = useState17([]);
|
|
7141
|
+
const [modes, setModes] = useState17([]);
|
|
7142
|
+
useEffect11(() => {
|
|
6960
7143
|
client.fetch(distinctSourcesQuery).then((data) => setSources(data ?? [])).catch(() => setSources([]));
|
|
6961
7144
|
client.fetch(distinctModesQuery).then((data) => setModes(data ?? [])).catch(() => setModes([]));
|
|
6962
7145
|
}, [client]);
|
|
6963
|
-
return /* @__PURE__ */
|
|
6964
|
-
/* @__PURE__ */
|
|
6965
|
-
/* @__PURE__ */
|
|
6966
|
-
/* @__PURE__ */
|
|
6967
|
-
/* @__PURE__ */
|
|
7146
|
+
return /* @__PURE__ */ jsx50(Container, { width: 2, children: /* @__PURE__ */ jsxs37(Stack27, { padding: 4, space: 4, children: [
|
|
7147
|
+
/* @__PURE__ */ jsxs37(Flex29, { align: "center", gap: 3, children: [
|
|
7148
|
+
/* @__PURE__ */ jsxs37(Stack27, { flex: 1, space: 1, children: [
|
|
7149
|
+
/* @__PURE__ */ jsx50(Text36, { size: 4, weight: "bold", children: "AI Literacy Framework" }),
|
|
7150
|
+
/* @__PURE__ */ jsx50(Text36, { muted: true, size: 2, children: "Evaluation reports and score trends" })
|
|
6968
7151
|
] }),
|
|
6969
|
-
!isDetail && /* @__PURE__ */
|
|
6970
|
-
/* @__PURE__ */
|
|
7152
|
+
!isDetail && /* @__PURE__ */ jsxs37(Flex29, { gap: 2, children: [
|
|
7153
|
+
/* @__PURE__ */ jsxs37(
|
|
6971
7154
|
Select3,
|
|
6972
7155
|
{
|
|
6973
7156
|
fontSize: 2,
|
|
6974
7157
|
onChange: (e) => setSource(e.currentTarget.value || null),
|
|
6975
7158
|
value: source ?? "",
|
|
6976
7159
|
children: [
|
|
6977
|
-
/* @__PURE__ */
|
|
6978
|
-
sources.map((s) => /* @__PURE__ */
|
|
7160
|
+
/* @__PURE__ */ jsx50("option", { value: "", children: "All sources" }),
|
|
7161
|
+
sources.map((s) => /* @__PURE__ */ jsx50("option", { value: s, children: s }, s))
|
|
6979
7162
|
]
|
|
6980
7163
|
}
|
|
6981
7164
|
),
|
|
6982
|
-
/* @__PURE__ */
|
|
7165
|
+
/* @__PURE__ */ jsxs37(
|
|
6983
7166
|
Select3,
|
|
6984
7167
|
{
|
|
6985
7168
|
fontSize: 2,
|
|
6986
7169
|
onChange: (e) => setMode(e.currentTarget.value || null),
|
|
6987
7170
|
value: mode ?? "",
|
|
6988
7171
|
children: [
|
|
6989
|
-
/* @__PURE__ */
|
|
6990
|
-
modes.map((m) => /* @__PURE__ */
|
|
7172
|
+
/* @__PURE__ */ jsx50("option", { value: "", children: "All modes" }),
|
|
7173
|
+
modes.map((m) => /* @__PURE__ */ jsx50("option", { value: m, children: m }, m))
|
|
6991
7174
|
]
|
|
6992
7175
|
}
|
|
6993
7176
|
)
|
|
6994
7177
|
] })
|
|
6995
7178
|
] }),
|
|
6996
|
-
!isDetail && /* @__PURE__ */
|
|
6997
|
-
/* @__PURE__ */
|
|
7179
|
+
!isDetail && /* @__PURE__ */ jsxs37(TabList2, { space: 1, children: [
|
|
7180
|
+
/* @__PURE__ */ jsx50(
|
|
6998
7181
|
Tab2,
|
|
6999
7182
|
{
|
|
7000
7183
|
"aria-controls": "latest-panel",
|
|
@@ -7004,7 +7187,7 @@ function Dashboard() {
|
|
|
7004
7187
|
selected: activeTab === "latest"
|
|
7005
7188
|
}
|
|
7006
7189
|
),
|
|
7007
|
-
/* @__PURE__ */
|
|
7190
|
+
/* @__PURE__ */ jsx50(
|
|
7008
7191
|
Tab2,
|
|
7009
7192
|
{
|
|
7010
7193
|
"aria-controls": "timeline-panel",
|
|
@@ -7014,7 +7197,7 @@ function Dashboard() {
|
|
|
7014
7197
|
selected: activeTab === "timeline"
|
|
7015
7198
|
}
|
|
7016
7199
|
),
|
|
7017
|
-
/* @__PURE__ */
|
|
7200
|
+
/* @__PURE__ */ jsx50(
|
|
7018
7201
|
Tab2,
|
|
7019
7202
|
{
|
|
7020
7203
|
"aria-controls": "compare-panel",
|
|
@@ -7025,7 +7208,7 @@ function Dashboard() {
|
|
|
7025
7208
|
}
|
|
7026
7209
|
)
|
|
7027
7210
|
] }),
|
|
7028
|
-
!isDetail && activeTab === "latest" && /* @__PURE__ */
|
|
7211
|
+
!isDetail && activeTab === "latest" && /* @__PURE__ */ jsx50(TabPanel2, { "aria-labelledby": "latest-tab", id: "latest-panel", children: /* @__PURE__ */ jsx50(
|
|
7029
7212
|
LatestReports,
|
|
7030
7213
|
{
|
|
7031
7214
|
mode,
|
|
@@ -7033,9 +7216,9 @@ function Dashboard() {
|
|
|
7033
7216
|
source
|
|
7034
7217
|
}
|
|
7035
7218
|
) }),
|
|
7036
|
-
!isDetail && activeTab === "timeline" && /* @__PURE__ */
|
|
7037
|
-
!isDetail && activeTab === "compare" && /* @__PURE__ */
|
|
7038
|
-
isDetail && reportId && /* @__PURE__ */
|
|
7219
|
+
!isDetail && activeTab === "timeline" && /* @__PURE__ */ jsx50(TabPanel2, { "aria-labelledby": "timeline-tab", id: "timeline-panel", children: /* @__PURE__ */ jsx50(ScoreTimeline_default, { mode, source }) }),
|
|
7220
|
+
!isDetail && activeTab === "compare" && /* @__PURE__ */ jsx50(TabPanel2, { "aria-labelledby": "compare-tab", id: "compare-panel", children: /* @__PURE__ */ jsx50(ComparisonView, {}) }),
|
|
7221
|
+
isDetail && reportId && /* @__PURE__ */ jsx50(
|
|
7039
7222
|
ReportDetail,
|
|
7040
7223
|
{
|
|
7041
7224
|
activeTab: routerState.tab ?? null,
|
|
@@ -7065,10 +7248,10 @@ function ailfTool(options = {}) {
|
|
|
7065
7248
|
// src/actions/RunEvaluationAction.tsx
|
|
7066
7249
|
import { BarChartIcon as BarChartIcon2 } from "@sanity/icons";
|
|
7067
7250
|
import { useToast as useToast8 } from "@sanity/ui";
|
|
7068
|
-
import { useCallback as
|
|
7251
|
+
import { useCallback as useCallback23, useEffect as useEffect12, useRef as useRef5, useState as useState18 } from "react";
|
|
7069
7252
|
import {
|
|
7070
7253
|
getReleaseIdFromReleaseDocumentId as getReleaseIdFromReleaseDocumentId4,
|
|
7071
|
-
useClient as
|
|
7254
|
+
useClient as useClient15,
|
|
7072
7255
|
useCurrentUser as useCurrentUser3,
|
|
7073
7256
|
useDataset as useDataset2,
|
|
7074
7257
|
useProjectId as useProjectId2
|
|
@@ -7091,15 +7274,15 @@ function createRunEvaluationAction(options = {}) {
|
|
|
7091
7274
|
const { mode = "baseline" } = options;
|
|
7092
7275
|
const RunEvaluationAction = (props) => {
|
|
7093
7276
|
const { release } = props;
|
|
7094
|
-
const client =
|
|
7277
|
+
const client = useClient15({ apiVersion: API_VERSION2 });
|
|
7095
7278
|
const dataset = useDataset2();
|
|
7096
7279
|
const projectId = useProjectId2();
|
|
7097
7280
|
const currentUser = useCurrentUser3();
|
|
7098
7281
|
const toast = useToast8();
|
|
7099
|
-
const [state, setState] =
|
|
7282
|
+
const [state, setState] = useState18({ status: "loading" });
|
|
7100
7283
|
const requestedAtRef = useRef5(null);
|
|
7101
7284
|
const perspectiveId = getReleaseIdFromReleaseDocumentId4(release._id);
|
|
7102
|
-
|
|
7285
|
+
useEffect12(() => {
|
|
7103
7286
|
let cancelled = false;
|
|
7104
7287
|
client.fetch(contentImpactQuery, buildReportQueryParams(perspectiveId)).then((results) => {
|
|
7105
7288
|
if (cancelled) return;
|
|
@@ -7122,7 +7305,7 @@ function createRunEvaluationAction(options = {}) {
|
|
|
7122
7305
|
cancelled = true;
|
|
7123
7306
|
};
|
|
7124
7307
|
}, [client, perspectiveId]);
|
|
7125
|
-
|
|
7308
|
+
useEffect12(() => {
|
|
7126
7309
|
if (state.status !== "requested" && state.status !== "polling") return;
|
|
7127
7310
|
const { requestId, startedAt } = state;
|
|
7128
7311
|
if (state.status === "requested") {
|
|
@@ -7172,7 +7355,7 @@ function createRunEvaluationAction(options = {}) {
|
|
|
7172
7355
|
}, POLL_INTERVAL_MS2);
|
|
7173
7356
|
return () => clearInterval(interval);
|
|
7174
7357
|
}, [client, perspectiveId, state]);
|
|
7175
|
-
|
|
7358
|
+
useEffect12(() => {
|
|
7176
7359
|
if (state.status !== "error") return;
|
|
7177
7360
|
const timer = setTimeout(() => {
|
|
7178
7361
|
client.fetch(contentImpactQuery, buildReportQueryParams(perspectiveId)).then((results) => {
|
|
@@ -7192,7 +7375,7 @@ function createRunEvaluationAction(options = {}) {
|
|
|
7192
7375
|
}, 15e3);
|
|
7193
7376
|
return () => clearTimeout(timer);
|
|
7194
7377
|
}, [client, perspectiveId, state]);
|
|
7195
|
-
const handleRequest =
|
|
7378
|
+
const handleRequest = useCallback23(async () => {
|
|
7196
7379
|
const releaseTitle = release.metadata?.title ?? perspectiveId ?? "release";
|
|
7197
7380
|
const tag = `release-${slugify3(releaseTitle)}-${dateStamp3()}`;
|
|
7198
7381
|
const now = Date.now();
|