@sanity/ailf-studio 1.7.2 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +4 -4
- package/dist/index.js +1313 -829
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1696,11 +1696,6 @@ var reportSchema = defineType4({
|
|
|
1696
1696
|
name: "graderPrompts",
|
|
1697
1697
|
title: "Grader Prompts"
|
|
1698
1698
|
}),
|
|
1699
|
-
defineField4({
|
|
1700
|
-
...artifactRefSchema(),
|
|
1701
|
-
name: "taskDefinitions",
|
|
1702
|
-
title: "Task Definitions"
|
|
1703
|
-
}),
|
|
1704
1699
|
defineField4({
|
|
1705
1700
|
...artifactRefSchema(),
|
|
1706
1701
|
name: "traces",
|
|
@@ -3270,17 +3265,17 @@ import { route } from "sanity/router";
|
|
|
3270
3265
|
// src/components/Dashboard.tsx
|
|
3271
3266
|
import { HelpCircleIcon as HelpCircleIcon8 } from "@sanity/icons";
|
|
3272
3267
|
import {
|
|
3273
|
-
Box as
|
|
3268
|
+
Box as Box31,
|
|
3274
3269
|
Button as Button10,
|
|
3275
3270
|
Container,
|
|
3276
|
-
Flex as
|
|
3277
|
-
Stack as
|
|
3271
|
+
Flex as Flex36,
|
|
3272
|
+
Stack as Stack38,
|
|
3278
3273
|
Tab as Tab3,
|
|
3279
3274
|
TabList as TabList3,
|
|
3280
3275
|
TabPanel as TabPanel3,
|
|
3281
|
-
Text as
|
|
3276
|
+
Text as Text48
|
|
3282
3277
|
} from "@sanity/ui";
|
|
3283
|
-
import { useCallback as useCallback36, useEffect as
|
|
3278
|
+
import { useCallback as useCallback36, useEffect as useEffect16 } from "react";
|
|
3284
3279
|
import { useRouter as useRouter3 } from "sanity/router";
|
|
3285
3280
|
|
|
3286
3281
|
// src/lib/help-context.ts
|
|
@@ -6050,22 +6045,22 @@ function LatestReports({
|
|
|
6050
6045
|
// src/components/report-detail/ReportDetail.tsx
|
|
6051
6046
|
import { ArrowLeftIcon as ArrowLeftIcon3 } from "@sanity/icons";
|
|
6052
6047
|
import {
|
|
6053
|
-
Badge as
|
|
6054
|
-
Box as
|
|
6055
|
-
Button as
|
|
6056
|
-
Flex as
|
|
6057
|
-
Stack as
|
|
6048
|
+
Badge as Badge8,
|
|
6049
|
+
Box as Box26,
|
|
6050
|
+
Button as Button8,
|
|
6051
|
+
Flex as Flex29,
|
|
6052
|
+
Stack as Stack30,
|
|
6058
6053
|
Tab,
|
|
6059
6054
|
TabList,
|
|
6060
6055
|
TabPanel,
|
|
6061
|
-
Text as
|
|
6062
|
-
Tooltip as
|
|
6056
|
+
Text as Text39,
|
|
6057
|
+
Tooltip as Tooltip10
|
|
6063
6058
|
} from "@sanity/ui";
|
|
6064
6059
|
import {
|
|
6065
|
-
useCallback as
|
|
6066
|
-
useEffect as
|
|
6060
|
+
useCallback as useCallback33,
|
|
6061
|
+
useEffect as useEffect12,
|
|
6067
6062
|
useMemo as useMemo15,
|
|
6068
|
-
useState as
|
|
6063
|
+
useState as useState23
|
|
6069
6064
|
} from "react";
|
|
6070
6065
|
import { useClient as useClient10 } from "sanity";
|
|
6071
6066
|
|
|
@@ -6604,14 +6599,7 @@ function GlossaryTip({ text }) {
|
|
|
6604
6599
|
);
|
|
6605
6600
|
}
|
|
6606
6601
|
|
|
6607
|
-
// src/components/report-detail/
|
|
6608
|
-
import {
|
|
6609
|
-
ArrowDownIcon,
|
|
6610
|
-
ArrowUpIcon,
|
|
6611
|
-
CheckmarkCircleIcon,
|
|
6612
|
-
ErrorOutlineIcon,
|
|
6613
|
-
WarningOutlineIcon
|
|
6614
|
-
} from "@sanity/icons";
|
|
6602
|
+
// src/components/report-detail/CostLatencyPanel.tsx
|
|
6615
6603
|
import { Box as Box15, Flex as Flex14, Stack as Stack18, Text as Text23 } from "@sanity/ui";
|
|
6616
6604
|
|
|
6617
6605
|
// src/components/report-detail/diagnostics-styles.ts
|
|
@@ -6720,8 +6708,271 @@ function sentimentTextColor(sentiment) {
|
|
|
6720
6708
|
return COLORS[sentimentColorKey(sentiment)].text;
|
|
6721
6709
|
}
|
|
6722
6710
|
|
|
6711
|
+
// src/components/report-detail/CostLatencyPanel.tsx
|
|
6712
|
+
import { Fragment as Fragment8, jsx as jsx27, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
6713
|
+
function median(values) {
|
|
6714
|
+
if (values.length === 0) return null;
|
|
6715
|
+
const sorted = values.slice().sort((a, b) => a - b);
|
|
6716
|
+
const mid = sorted.length >>> 1;
|
|
6717
|
+
return sorted.length % 2 === 0 ? Math.round((sorted[mid - 1] + sorted[mid]) / 2) : sorted[mid];
|
|
6718
|
+
}
|
|
6719
|
+
function rollup(testResults) {
|
|
6720
|
+
let totalCost = 0;
|
|
6721
|
+
let totalTokens = 0;
|
|
6722
|
+
let passed = 0;
|
|
6723
|
+
let failed = 0;
|
|
6724
|
+
const latencies = [];
|
|
6725
|
+
const byModel = /* @__PURE__ */ new Map();
|
|
6726
|
+
for (const t of testResults) {
|
|
6727
|
+
if (typeof t.cost === "number") totalCost += t.cost;
|
|
6728
|
+
if (typeof t.tokenUsage?.total === "number") {
|
|
6729
|
+
totalTokens += t.tokenUsage.total;
|
|
6730
|
+
}
|
|
6731
|
+
if (typeof t.latencyMs === "number") latencies.push(t.latencyMs);
|
|
6732
|
+
if (t.outputFailure) failed++;
|
|
6733
|
+
else passed++;
|
|
6734
|
+
const m = byModel.get(t.modelId) ?? {
|
|
6735
|
+
modelId: t.modelId,
|
|
6736
|
+
calls: 0,
|
|
6737
|
+
cost: 0,
|
|
6738
|
+
tokens: 0,
|
|
6739
|
+
passed: 0
|
|
6740
|
+
};
|
|
6741
|
+
m.calls++;
|
|
6742
|
+
if (typeof t.cost === "number") m.cost += t.cost;
|
|
6743
|
+
if (typeof t.tokenUsage?.total === "number") m.tokens += t.tokenUsage.total;
|
|
6744
|
+
if (!t.outputFailure) m.passed++;
|
|
6745
|
+
byModel.set(t.modelId, m);
|
|
6746
|
+
}
|
|
6747
|
+
return {
|
|
6748
|
+
totalCost,
|
|
6749
|
+
totalTokens,
|
|
6750
|
+
passed,
|
|
6751
|
+
failed,
|
|
6752
|
+
medianLatencyMs: median(latencies),
|
|
6753
|
+
perModel: [...byModel.values()].sort((a, b) => b.cost - a.cost)
|
|
6754
|
+
};
|
|
6755
|
+
}
|
|
6756
|
+
function aggregateRawResultsPreviews(entries) {
|
|
6757
|
+
let totalCost = 0;
|
|
6758
|
+
let totalTokens = 0;
|
|
6759
|
+
const totalLatencies = [];
|
|
6760
|
+
let hadCost = false;
|
|
6761
|
+
let hadTokens = false;
|
|
6762
|
+
let hadLatency = false;
|
|
6763
|
+
const perModelTokens = /* @__PURE__ */ new Map();
|
|
6764
|
+
for (const entry of entries) {
|
|
6765
|
+
const p = entry.preview;
|
|
6766
|
+
if (!p) continue;
|
|
6767
|
+
if (typeof p.cost === "number") {
|
|
6768
|
+
totalCost += p.cost;
|
|
6769
|
+
hadCost = true;
|
|
6770
|
+
}
|
|
6771
|
+
if (typeof p.totalTokens === "number") {
|
|
6772
|
+
totalTokens += p.totalTokens;
|
|
6773
|
+
hadTokens = true;
|
|
6774
|
+
const modelId = entry.association?.model;
|
|
6775
|
+
if (typeof modelId === "string") {
|
|
6776
|
+
perModelTokens.set(
|
|
6777
|
+
modelId,
|
|
6778
|
+
(perModelTokens.get(modelId) ?? 0) + p.totalTokens
|
|
6779
|
+
);
|
|
6780
|
+
}
|
|
6781
|
+
}
|
|
6782
|
+
if (typeof p.latencyMs === "number") {
|
|
6783
|
+
totalLatencies.push(p.latencyMs);
|
|
6784
|
+
hadLatency = true;
|
|
6785
|
+
}
|
|
6786
|
+
}
|
|
6787
|
+
return {
|
|
6788
|
+
totalCost,
|
|
6789
|
+
totalTokens,
|
|
6790
|
+
totalLatencies,
|
|
6791
|
+
hadCost,
|
|
6792
|
+
hadTokens,
|
|
6793
|
+
hadLatency,
|
|
6794
|
+
perModelTokens
|
|
6795
|
+
};
|
|
6796
|
+
}
|
|
6797
|
+
function formatUsd(n) {
|
|
6798
|
+
if (n === 0) return "$0.00";
|
|
6799
|
+
if (n < 0.01) return `$${n.toFixed(4)}`;
|
|
6800
|
+
return `$${n.toFixed(2)}`;
|
|
6801
|
+
}
|
|
6802
|
+
function formatTokens(n) {
|
|
6803
|
+
if (n >= 1e6) return `${(n / 1e6).toFixed(1)}M`;
|
|
6804
|
+
if (n >= 1e3) return `${(n / 1e3).toFixed(1)}k`;
|
|
6805
|
+
return String(n);
|
|
6806
|
+
}
|
|
6807
|
+
function formatLatency(ms) {
|
|
6808
|
+
if (ms === null) return "\u2014";
|
|
6809
|
+
if (ms >= 1e4) return `${(ms / 1e3).toFixed(1)}s`;
|
|
6810
|
+
if (ms >= 1e3) return `${(ms / 1e3).toFixed(2)}s`;
|
|
6811
|
+
return `${ms} ms`;
|
|
6812
|
+
}
|
|
6813
|
+
function shortModelId(id) {
|
|
6814
|
+
const colon = id.lastIndexOf(":");
|
|
6815
|
+
return colon >= 0 ? id.slice(colon + 1) : id;
|
|
6816
|
+
}
|
|
6817
|
+
function CostLatencyPanel({ testResults }) {
|
|
6818
|
+
const rawResultsRef = useArtifactRef("rawResults");
|
|
6819
|
+
if (!testResults || testResults.length === 0) return null;
|
|
6820
|
+
const hasAnyCost = testResults.some((t) => typeof t.cost === "number");
|
|
6821
|
+
const hasAnyLatency = testResults.some((t) => typeof t.latencyMs === "number");
|
|
6822
|
+
if (!hasAnyCost && !hasAnyLatency) return null;
|
|
6823
|
+
const r = rollup(testResults);
|
|
6824
|
+
const totalCalls = r.passed + r.failed;
|
|
6825
|
+
const passRate = totalCalls > 0 ? Math.round(r.passed / totalCalls * 100) : 0;
|
|
6826
|
+
const manifestAgg = aggregateRawResultsPreviews(rawResultsRef?.entries ?? []);
|
|
6827
|
+
const totalTokens = r.totalTokens === 0 && manifestAgg.hadTokens ? manifestAgg.totalTokens : r.totalTokens;
|
|
6828
|
+
const totalCost = r.totalCost === 0 && manifestAgg.hadCost ? manifestAgg.totalCost : r.totalCost;
|
|
6829
|
+
const medianLatencyMs = r.medianLatencyMs === null && manifestAgg.hadLatency ? median(manifestAgg.totalLatencies) : r.medianLatencyMs;
|
|
6830
|
+
const perModel = r.perModel.map((m) => {
|
|
6831
|
+
if (m.tokens > 0) return m;
|
|
6832
|
+
const fallback = manifestAgg.perModelTokens.get(m.modelId);
|
|
6833
|
+
return fallback === void 0 ? m : { ...m, tokens: fallback };
|
|
6834
|
+
});
|
|
6835
|
+
return /* @__PURE__ */ jsx27(Box15, { style: { ...neutralCardStyle, padding: "16px 20px" }, children: /* @__PURE__ */ jsxs21(Stack18, { space: 4, children: [
|
|
6836
|
+
/* @__PURE__ */ jsxs21(Flex14, { align: "baseline", gap: 2, wrap: "wrap", children: [
|
|
6837
|
+
/* @__PURE__ */ jsx27(Text23, { size: 2, weight: "semibold", children: "Cost & Latency" }),
|
|
6838
|
+
/* @__PURE__ */ jsxs21(Text23, { muted: true, size: 1, children: [
|
|
6839
|
+
totalCalls,
|
|
6840
|
+
" call",
|
|
6841
|
+
totalCalls === 1 ? "" : "s"
|
|
6842
|
+
] })
|
|
6843
|
+
] }),
|
|
6844
|
+
/* @__PURE__ */ jsxs21(Flex14, { gap: 4, wrap: "wrap", children: [
|
|
6845
|
+
/* @__PURE__ */ jsx27(Stat, { label: "Total cost", value: formatUsd(totalCost) }),
|
|
6846
|
+
/* @__PURE__ */ jsx27(Stat, { label: "Total tokens", value: formatTokens(totalTokens) }),
|
|
6847
|
+
/* @__PURE__ */ jsx27(Stat, { label: "Pass rate", value: `${passRate}%` }),
|
|
6848
|
+
/* @__PURE__ */ jsx27(Stat, { label: "Median latency", value: formatLatency(medianLatencyMs) })
|
|
6849
|
+
] }),
|
|
6850
|
+
perModel.length > 1 && /* @__PURE__ */ jsxs21(Fragment8, { children: [
|
|
6851
|
+
/* @__PURE__ */ jsx27(Box15, { style: dividerStyle }),
|
|
6852
|
+
/* @__PURE__ */ jsxs21(Stack18, { space: 2, children: [
|
|
6853
|
+
/* @__PURE__ */ jsx27(
|
|
6854
|
+
Text23,
|
|
6855
|
+
{
|
|
6856
|
+
muted: true,
|
|
6857
|
+
size: 1,
|
|
6858
|
+
style: {
|
|
6859
|
+
letterSpacing: "0.05em",
|
|
6860
|
+
textTransform: "uppercase"
|
|
6861
|
+
},
|
|
6862
|
+
weight: "semibold",
|
|
6863
|
+
children: "By model"
|
|
6864
|
+
}
|
|
6865
|
+
),
|
|
6866
|
+
/* @__PURE__ */ jsx27(Stack18, { space: 1, children: perModel.map((m) => /* @__PURE__ */ jsx27(ModelRow, { row: m }, m.modelId)) })
|
|
6867
|
+
] })
|
|
6868
|
+
] })
|
|
6869
|
+
] }) });
|
|
6870
|
+
}
|
|
6871
|
+
function Stat({ label, value }) {
|
|
6872
|
+
return /* @__PURE__ */ jsxs21(Stack18, { space: 1, children: [
|
|
6873
|
+
/* @__PURE__ */ jsx27(Text23, { muted: true, size: 1, children: label }),
|
|
6874
|
+
/* @__PURE__ */ jsx27(
|
|
6875
|
+
Text23,
|
|
6876
|
+
{
|
|
6877
|
+
size: 3,
|
|
6878
|
+
style: {
|
|
6879
|
+
fontFamily: FONT_STACK_MONO2,
|
|
6880
|
+
fontVariantNumeric: "tabular-nums"
|
|
6881
|
+
},
|
|
6882
|
+
weight: "semibold",
|
|
6883
|
+
children: value
|
|
6884
|
+
}
|
|
6885
|
+
)
|
|
6886
|
+
] });
|
|
6887
|
+
}
|
|
6888
|
+
function ModelRow({ row }) {
|
|
6889
|
+
const pct = row.calls > 0 ? Math.round(row.passed / row.calls * 100) : 0;
|
|
6890
|
+
return /* @__PURE__ */ jsxs21(Flex14, { align: "center", gap: 3, style: { padding: "2px 0" }, wrap: "wrap", children: [
|
|
6891
|
+
/* @__PURE__ */ jsx27(
|
|
6892
|
+
Text23,
|
|
6893
|
+
{
|
|
6894
|
+
size: 1,
|
|
6895
|
+
style: {
|
|
6896
|
+
fontFamily: FONT_STACK_MONO2,
|
|
6897
|
+
minWidth: 140
|
|
6898
|
+
},
|
|
6899
|
+
weight: "medium",
|
|
6900
|
+
children: shortModelId(row.modelId)
|
|
6901
|
+
}
|
|
6902
|
+
),
|
|
6903
|
+
/* @__PURE__ */ jsxs21(
|
|
6904
|
+
Text23,
|
|
6905
|
+
{
|
|
6906
|
+
muted: true,
|
|
6907
|
+
size: 1,
|
|
6908
|
+
style: {
|
|
6909
|
+
fontFamily: FONT_STACK_MONO2,
|
|
6910
|
+
fontVariantNumeric: "tabular-nums",
|
|
6911
|
+
minWidth: 80
|
|
6912
|
+
},
|
|
6913
|
+
children: [
|
|
6914
|
+
row.calls,
|
|
6915
|
+
" call",
|
|
6916
|
+
row.calls === 1 ? "" : "s"
|
|
6917
|
+
]
|
|
6918
|
+
}
|
|
6919
|
+
),
|
|
6920
|
+
/* @__PURE__ */ jsx27(
|
|
6921
|
+
Text23,
|
|
6922
|
+
{
|
|
6923
|
+
size: 1,
|
|
6924
|
+
style: {
|
|
6925
|
+
fontFamily: FONT_STACK_MONO2,
|
|
6926
|
+
fontVariantNumeric: "tabular-nums",
|
|
6927
|
+
minWidth: 80
|
|
6928
|
+
},
|
|
6929
|
+
children: formatUsd(row.cost)
|
|
6930
|
+
}
|
|
6931
|
+
),
|
|
6932
|
+
/* @__PURE__ */ jsxs21(
|
|
6933
|
+
Text23,
|
|
6934
|
+
{
|
|
6935
|
+
muted: true,
|
|
6936
|
+
size: 1,
|
|
6937
|
+
style: {
|
|
6938
|
+
fontFamily: FONT_STACK_MONO2,
|
|
6939
|
+
fontVariantNumeric: "tabular-nums",
|
|
6940
|
+
minWidth: 80
|
|
6941
|
+
},
|
|
6942
|
+
children: [
|
|
6943
|
+
formatTokens(row.tokens),
|
|
6944
|
+
" tok"
|
|
6945
|
+
]
|
|
6946
|
+
}
|
|
6947
|
+
),
|
|
6948
|
+
/* @__PURE__ */ jsxs21(
|
|
6949
|
+
Text23,
|
|
6950
|
+
{
|
|
6951
|
+
muted: true,
|
|
6952
|
+
size: 1,
|
|
6953
|
+
style: {
|
|
6954
|
+
fontFamily: FONT_STACK_MONO2,
|
|
6955
|
+
fontVariantNumeric: "tabular-nums"
|
|
6956
|
+
},
|
|
6957
|
+
children: [
|
|
6958
|
+
pct,
|
|
6959
|
+
"% pass"
|
|
6960
|
+
]
|
|
6961
|
+
}
|
|
6962
|
+
)
|
|
6963
|
+
] });
|
|
6964
|
+
}
|
|
6965
|
+
|
|
6723
6966
|
// src/components/report-detail/DiagnosticsOverview.tsx
|
|
6724
|
-
import {
|
|
6967
|
+
import {
|
|
6968
|
+
ArrowDownIcon,
|
|
6969
|
+
ArrowUpIcon,
|
|
6970
|
+
CheckmarkCircleIcon,
|
|
6971
|
+
ErrorOutlineIcon,
|
|
6972
|
+
WarningOutlineIcon
|
|
6973
|
+
} from "@sanity/icons";
|
|
6974
|
+
import { Box as Box16, Flex as Flex15, Stack as Stack19, Text as Text24 } from "@sanity/ui";
|
|
6975
|
+
import { jsx as jsx28, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
6725
6976
|
function DiagnosticsOverview({
|
|
6726
6977
|
scores,
|
|
6727
6978
|
overall,
|
|
@@ -6743,11 +6994,11 @@ function DiagnosticsOverview({
|
|
|
6743
6994
|
const regressed = comparison?.regressed ?? [];
|
|
6744
6995
|
const unchanged = comparison?.unchanged ?? [];
|
|
6745
6996
|
const hasComparison = improved.length > 0 || regressed.length > 0 || unchanged.length > 0;
|
|
6746
|
-
return /* @__PURE__ */
|
|
6747
|
-
/* @__PURE__ */
|
|
6748
|
-
/* @__PURE__ */
|
|
6749
|
-
/* @__PURE__ */
|
|
6750
|
-
/* @__PURE__ */
|
|
6997
|
+
return /* @__PURE__ */ jsxs22(Stack19, { space: 4, children: [
|
|
6998
|
+
/* @__PURE__ */ jsxs22(Box16, { style: sectionWrapperStyle, children: [
|
|
6999
|
+
/* @__PURE__ */ jsx28(Box16, { padding: 3, style: sectionHeaderStyle, children: /* @__PURE__ */ jsx28(SectionLabel, { label: "Baseline" }) }),
|
|
7000
|
+
/* @__PURE__ */ jsxs22(Stack19, { space: 3, padding: 3, children: [
|
|
7001
|
+
/* @__PURE__ */ jsxs22(
|
|
6751
7002
|
"div",
|
|
6752
7003
|
{
|
|
6753
7004
|
style: {
|
|
@@ -6756,7 +7007,7 @@ function DiagnosticsOverview({
|
|
|
6756
7007
|
gridTemplateColumns: showDocMetrics ? "repeat(3, 1fr)" : "repeat(2, 1fr)"
|
|
6757
7008
|
},
|
|
6758
7009
|
children: [
|
|
6759
|
-
/* @__PURE__ */
|
|
7010
|
+
/* @__PURE__ */ jsx28(HoverTip, { display: "block", text: GLOSSARY.overallScore, children: /* @__PURE__ */ jsx28(
|
|
6760
7011
|
ScoreCard,
|
|
6761
7012
|
{
|
|
6762
7013
|
delta: comparison?.deltas.overall,
|
|
@@ -6766,7 +7017,7 @@ function DiagnosticsOverview({
|
|
|
6766
7017
|
value: Math.round(overall.avgScore)
|
|
6767
7018
|
}
|
|
6768
7019
|
) }),
|
|
6769
|
-
showDocMetrics && /* @__PURE__ */
|
|
7020
|
+
showDocMetrics && /* @__PURE__ */ jsx28(HoverTip, { display: "block", text: GLOSSARY.docLift, children: /* @__PURE__ */ jsx28(
|
|
6770
7021
|
ScoreCard,
|
|
6771
7022
|
{
|
|
6772
7023
|
delta: comparison?.deltas.docLift,
|
|
@@ -6776,7 +7027,7 @@ function DiagnosticsOverview({
|
|
|
6776
7027
|
value: Math.round(overall.avgDocLift)
|
|
6777
7028
|
}
|
|
6778
7029
|
) }),
|
|
6779
|
-
/* @__PURE__ */
|
|
7030
|
+
/* @__PURE__ */ jsx28(HoverTip, { display: "block", text: GLOSSARY.tests, children: /* @__PURE__ */ jsx28(
|
|
6780
7031
|
ScoreCard,
|
|
6781
7032
|
{
|
|
6782
7033
|
label: "TESTS",
|
|
@@ -6787,7 +7038,7 @@ function DiagnosticsOverview({
|
|
|
6787
7038
|
]
|
|
6788
7039
|
}
|
|
6789
7040
|
),
|
|
6790
|
-
/* @__PURE__ */
|
|
7041
|
+
/* @__PURE__ */ jsxs22(
|
|
6791
7042
|
"div",
|
|
6792
7043
|
{
|
|
6793
7044
|
style: {
|
|
@@ -6796,7 +7047,7 @@ function DiagnosticsOverview({
|
|
|
6796
7047
|
gridTemplateColumns: showDocMetrics ? "repeat(2, 1fr)" : "1fr"
|
|
6797
7048
|
},
|
|
6798
7049
|
children: [
|
|
6799
|
-
showDocMetrics && /* @__PURE__ */
|
|
7050
|
+
showDocMetrics && /* @__PURE__ */ jsx28(HoverTip, { display: "block", text: GLOSSARY.negativeDocLiftMetric, children: /* @__PURE__ */ jsx28(
|
|
6800
7051
|
MetricCard,
|
|
6801
7052
|
{
|
|
6802
7053
|
label: "Negative Doc Lift",
|
|
@@ -6804,12 +7055,12 @@ function DiagnosticsOverview({
|
|
|
6804
7055
|
value: `${negativeDocLiftCount} area${negativeDocLiftCount === 1 ? "" : "s"}`
|
|
6805
7056
|
}
|
|
6806
7057
|
) }),
|
|
6807
|
-
durationMs != null && durationMs > 0 ? /* @__PURE__ */
|
|
7058
|
+
durationMs != null && durationMs > 0 ? /* @__PURE__ */ jsx28(
|
|
6808
7059
|
HoverTip,
|
|
6809
7060
|
{
|
|
6810
7061
|
display: "block",
|
|
6811
7062
|
text: "Total wall-clock time for the evaluation pipeline run.",
|
|
6812
|
-
children: /* @__PURE__ */
|
|
7063
|
+
children: /* @__PURE__ */ jsx28(
|
|
6813
7064
|
MetricCard,
|
|
6814
7065
|
{
|
|
6815
7066
|
label: "Duration",
|
|
@@ -6817,15 +7068,15 @@ function DiagnosticsOverview({
|
|
|
6817
7068
|
}
|
|
6818
7069
|
)
|
|
6819
7070
|
}
|
|
6820
|
-
) : /* @__PURE__ */
|
|
7071
|
+
) : /* @__PURE__ */ jsx28("div", {})
|
|
6821
7072
|
]
|
|
6822
7073
|
}
|
|
6823
7074
|
)
|
|
6824
7075
|
] })
|
|
6825
7076
|
] }),
|
|
6826
|
-
hasAgenticData && /* @__PURE__ */
|
|
6827
|
-
/* @__PURE__ */
|
|
6828
|
-
/* @__PURE__ */
|
|
7077
|
+
hasAgenticData && /* @__PURE__ */ jsxs22(Box16, { style: sectionWrapperStyle, children: [
|
|
7078
|
+
/* @__PURE__ */ jsx28(Box16, { padding: 3, style: sectionHeaderStyle, children: /* @__PURE__ */ jsx28(SectionLabel, { label: "Agent Performance" }) }),
|
|
7079
|
+
/* @__PURE__ */ jsx28(Stack19, { space: 3, padding: 3, children: /* @__PURE__ */ jsxs22(
|
|
6829
7080
|
"div",
|
|
6830
7081
|
{
|
|
6831
7082
|
style: {
|
|
@@ -6834,7 +7085,7 @@ function DiagnosticsOverview({
|
|
|
6834
7085
|
gridTemplateColumns: "repeat(3, 1fr)"
|
|
6835
7086
|
},
|
|
6836
7087
|
children: [
|
|
6837
|
-
/* @__PURE__ */
|
|
7088
|
+
/* @__PURE__ */ jsx28(HoverTip, { display: "block", text: GLOSSARY.actualScore, children: /* @__PURE__ */ jsx28(
|
|
6838
7089
|
ScoreCard,
|
|
6839
7090
|
{
|
|
6840
7091
|
delta: comparison?.deltas.actualDelta,
|
|
@@ -6844,7 +7095,7 @@ function DiagnosticsOverview({
|
|
|
6844
7095
|
value: Math.round(overall.avgActualScore)
|
|
6845
7096
|
}
|
|
6846
7097
|
) }),
|
|
6847
|
-
/* @__PURE__ */
|
|
7098
|
+
/* @__PURE__ */ jsx28(HoverTip, { display: "block", text: GLOSSARY.retrievalGap, children: /* @__PURE__ */ jsx28(
|
|
6848
7099
|
ScoreCard,
|
|
6849
7100
|
{
|
|
6850
7101
|
label: "RETRIEVAL GAP",
|
|
@@ -6854,7 +7105,7 @@ function DiagnosticsOverview({
|
|
|
6854
7105
|
value: overall.avgRetrievalGap != null ? Math.round(overall.avgRetrievalGap) : 0
|
|
6855
7106
|
}
|
|
6856
7107
|
) }),
|
|
6857
|
-
/* @__PURE__ */
|
|
7108
|
+
/* @__PURE__ */ jsx28(HoverTip, { display: "block", text: GLOSSARY.infraEfficiency, children: /* @__PURE__ */ jsx28(
|
|
6858
7109
|
ScoreCard,
|
|
6859
7110
|
{
|
|
6860
7111
|
label: "EFFICIENCY",
|
|
@@ -6868,9 +7119,9 @@ function DiagnosticsOverview({
|
|
|
6868
7119
|
}
|
|
6869
7120
|
) })
|
|
6870
7121
|
] }),
|
|
6871
|
-
/* @__PURE__ */
|
|
6872
|
-
/* @__PURE__ */
|
|
6873
|
-
/* @__PURE__ */
|
|
7122
|
+
/* @__PURE__ */ jsxs22(Box16, { style: sectionWrapperStyle, children: [
|
|
7123
|
+
/* @__PURE__ */ jsx28(Box16, { padding: 3, style: sectionHeaderStyle, children: /* @__PURE__ */ jsx28(SectionLabel, { label: "Area Health" }) }),
|
|
7124
|
+
/* @__PURE__ */ jsx28(Box16, { padding: 3, children: /* @__PURE__ */ jsxs22(
|
|
6874
7125
|
"div",
|
|
6875
7126
|
{
|
|
6876
7127
|
style: {
|
|
@@ -6879,30 +7130,30 @@ function DiagnosticsOverview({
|
|
|
6879
7130
|
gridTemplateColumns: "1fr 1fr 1fr"
|
|
6880
7131
|
},
|
|
6881
7132
|
children: [
|
|
6882
|
-
/* @__PURE__ */
|
|
7133
|
+
/* @__PURE__ */ jsx28(HoverTip, { display: "block", text: GLOSSARY.healthStrong, children: /* @__PURE__ */ jsx28(
|
|
6883
7134
|
HealthCard,
|
|
6884
7135
|
{
|
|
6885
7136
|
color: strong.length > 0 ? "emerald" : "muted",
|
|
6886
7137
|
count: strong.length,
|
|
6887
|
-
icon: /* @__PURE__ */
|
|
7138
|
+
icon: /* @__PURE__ */ jsx28(CheckmarkCircleIcon, {}),
|
|
6888
7139
|
label: "Strong (80+)"
|
|
6889
7140
|
}
|
|
6890
7141
|
) }),
|
|
6891
|
-
/* @__PURE__ */
|
|
7142
|
+
/* @__PURE__ */ jsx28(HoverTip, { display: "block", text: GLOSSARY.healthAttention, children: /* @__PURE__ */ jsx28(
|
|
6892
7143
|
HealthCard,
|
|
6893
7144
|
{
|
|
6894
7145
|
color: attention.length === 0 ? "muted" : "amber",
|
|
6895
7146
|
count: attention.length,
|
|
6896
|
-
icon: /* @__PURE__ */
|
|
7147
|
+
icon: /* @__PURE__ */ jsx28(WarningOutlineIcon, {}),
|
|
6897
7148
|
label: "Attention (70-79)"
|
|
6898
7149
|
}
|
|
6899
7150
|
) }),
|
|
6900
|
-
/* @__PURE__ */
|
|
7151
|
+
/* @__PURE__ */ jsx28(HoverTip, { display: "block", text: GLOSSARY.healthWeak, children: /* @__PURE__ */ jsx28(
|
|
6901
7152
|
HealthCard,
|
|
6902
7153
|
{
|
|
6903
7154
|
color: weak.length === 0 ? "muted" : "red",
|
|
6904
7155
|
count: weak.length,
|
|
6905
|
-
icon: /* @__PURE__ */
|
|
7156
|
+
icon: /* @__PURE__ */ jsx28(ErrorOutlineIcon, {}),
|
|
6906
7157
|
label: "Weak (<70)"
|
|
6907
7158
|
}
|
|
6908
7159
|
) })
|
|
@@ -6910,16 +7161,16 @@ function DiagnosticsOverview({
|
|
|
6910
7161
|
}
|
|
6911
7162
|
) })
|
|
6912
7163
|
] }),
|
|
6913
|
-
hasComparison && /* @__PURE__ */
|
|
6914
|
-
/* @__PURE__ */
|
|
6915
|
-
|
|
7164
|
+
hasComparison && /* @__PURE__ */ jsxs22(Box16, { style: neutralCardStyle, children: [
|
|
7165
|
+
/* @__PURE__ */ jsx28(
|
|
7166
|
+
Box16,
|
|
6916
7167
|
{
|
|
6917
7168
|
padding: 4,
|
|
6918
7169
|
style: { borderBottom: "1px solid var(--card-border-color)" },
|
|
6919
|
-
children: /* @__PURE__ */
|
|
7170
|
+
children: /* @__PURE__ */ jsx28(Text24, { size: 3, weight: "semibold", children: "Change from Previous Run" })
|
|
6920
7171
|
}
|
|
6921
7172
|
),
|
|
6922
|
-
/* @__PURE__ */
|
|
7173
|
+
/* @__PURE__ */ jsxs22(
|
|
6923
7174
|
"div",
|
|
6924
7175
|
{
|
|
6925
7176
|
style: {
|
|
@@ -6927,43 +7178,43 @@ function DiagnosticsOverview({
|
|
|
6927
7178
|
gridTemplateColumns: "1fr 1fr 1fr"
|
|
6928
7179
|
},
|
|
6929
7180
|
children: [
|
|
6930
|
-
/* @__PURE__ */
|
|
6931
|
-
/* @__PURE__ */
|
|
6932
|
-
/* @__PURE__ */
|
|
6933
|
-
/* @__PURE__ */
|
|
7181
|
+
/* @__PURE__ */ jsx28(Box16, { padding: 4, children: /* @__PURE__ */ jsxs22(Stack19, { space: 3, children: [
|
|
7182
|
+
/* @__PURE__ */ jsxs22(Flex15, { align: "center", gap: 2, children: [
|
|
7183
|
+
/* @__PURE__ */ jsx28(ArrowUpIcon, { style: { color: "#34d399" } }),
|
|
7184
|
+
/* @__PURE__ */ jsxs22(Text24, { size: 2, style: { color: "#34d399" }, weight: "medium", children: [
|
|
6934
7185
|
"Improved (",
|
|
6935
7186
|
improved.length,
|
|
6936
7187
|
")"
|
|
6937
7188
|
] })
|
|
6938
7189
|
] }),
|
|
6939
|
-
/* @__PURE__ */
|
|
7190
|
+
/* @__PURE__ */ jsx28(Flex15, { gap: 2, wrap: "wrap", children: improved.length > 0 ? improved.map((area) => /* @__PURE__ */ jsx28(Pill, { color: "emerald", label: area }, area)) : /* @__PURE__ */ jsx28(Text24, { muted: true, size: 2, children: "None" }) })
|
|
6940
7191
|
] }) }),
|
|
6941
|
-
/* @__PURE__ */
|
|
6942
|
-
|
|
7192
|
+
/* @__PURE__ */ jsx28(
|
|
7193
|
+
Box16,
|
|
6943
7194
|
{
|
|
6944
7195
|
padding: 4,
|
|
6945
7196
|
style: { borderLeft: "1px solid var(--card-border-color)" },
|
|
6946
|
-
children: /* @__PURE__ */
|
|
6947
|
-
/* @__PURE__ */
|
|
6948
|
-
/* @__PURE__ */
|
|
6949
|
-
/* @__PURE__ */
|
|
7197
|
+
children: /* @__PURE__ */ jsxs22(Stack19, { space: 3, children: [
|
|
7198
|
+
/* @__PURE__ */ jsxs22(Flex15, { align: "center", gap: 2, children: [
|
|
7199
|
+
/* @__PURE__ */ jsx28(ArrowDownIcon, { style: { color: "#f87171" } }),
|
|
7200
|
+
/* @__PURE__ */ jsxs22(Text24, { size: 2, style: { color: "#f87171" }, weight: "medium", children: [
|
|
6950
7201
|
"Regressed (",
|
|
6951
7202
|
regressed.length,
|
|
6952
7203
|
")"
|
|
6953
7204
|
] })
|
|
6954
7205
|
] }),
|
|
6955
|
-
/* @__PURE__ */
|
|
7206
|
+
/* @__PURE__ */ jsx28(Flex15, { gap: 2, wrap: "wrap", children: regressed.length > 0 ? regressed.map((area) => /* @__PURE__ */ jsx28(Pill, { color: "red", label: area }, area)) : /* @__PURE__ */ jsx28(Text24, { muted: true, size: 2, children: "None" }) })
|
|
6956
7207
|
] })
|
|
6957
7208
|
}
|
|
6958
7209
|
),
|
|
6959
|
-
/* @__PURE__ */
|
|
6960
|
-
|
|
7210
|
+
/* @__PURE__ */ jsx28(
|
|
7211
|
+
Box16,
|
|
6961
7212
|
{
|
|
6962
7213
|
padding: 4,
|
|
6963
7214
|
style: { borderLeft: "1px solid var(--card-border-color)" },
|
|
6964
|
-
children: /* @__PURE__ */
|
|
6965
|
-
/* @__PURE__ */
|
|
6966
|
-
/* @__PURE__ */
|
|
7215
|
+
children: /* @__PURE__ */ jsxs22(Stack19, { space: 3, children: [
|
|
7216
|
+
/* @__PURE__ */ jsxs22(Flex15, { align: "center", gap: 2, children: [
|
|
7217
|
+
/* @__PURE__ */ jsx28(
|
|
6967
7218
|
"span",
|
|
6968
7219
|
{
|
|
6969
7220
|
style: {
|
|
@@ -6974,13 +7225,13 @@ function DiagnosticsOverview({
|
|
|
6974
7225
|
children: "\u2014"
|
|
6975
7226
|
}
|
|
6976
7227
|
),
|
|
6977
|
-
/* @__PURE__ */
|
|
7228
|
+
/* @__PURE__ */ jsxs22(Text24, { muted: true, size: 2, weight: "medium", children: [
|
|
6978
7229
|
"Unchanged (",
|
|
6979
7230
|
unchanged.length,
|
|
6980
7231
|
")"
|
|
6981
7232
|
] })
|
|
6982
7233
|
] }),
|
|
6983
|
-
/* @__PURE__ */
|
|
7234
|
+
/* @__PURE__ */ jsx28(Flex15, { gap: 2, wrap: "wrap", children: unchanged.length > 0 ? unchanged.map((area) => /* @__PURE__ */ jsx28(Pill, { color: "muted", label: area }, area)) : /* @__PURE__ */ jsx28(Text24, { muted: true, size: 2, children: "None" }) })
|
|
6984
7235
|
] })
|
|
6985
7236
|
}
|
|
6986
7237
|
)
|
|
@@ -6999,8 +7250,8 @@ var sectionHeaderStyle = {
|
|
|
6999
7250
|
borderBottom: "1px solid var(--card-border-color)"
|
|
7000
7251
|
};
|
|
7001
7252
|
function SectionLabel({ label }) {
|
|
7002
|
-
return /* @__PURE__ */
|
|
7003
|
-
|
|
7253
|
+
return /* @__PURE__ */ jsx28(
|
|
7254
|
+
Text24,
|
|
7004
7255
|
{
|
|
7005
7256
|
muted: true,
|
|
7006
7257
|
size: 1,
|
|
@@ -7024,9 +7275,9 @@ function ScoreCard({
|
|
|
7024
7275
|
border: "1px solid var(--card-border-color)",
|
|
7025
7276
|
borderRadius: 6
|
|
7026
7277
|
};
|
|
7027
|
-
return /* @__PURE__ */
|
|
7028
|
-
/* @__PURE__ */
|
|
7029
|
-
|
|
7278
|
+
return /* @__PURE__ */ jsx28(Box16, { padding: 4, style: cardStyle, children: /* @__PURE__ */ jsxs22(Stack19, { space: 3, children: [
|
|
7279
|
+
/* @__PURE__ */ jsx28(
|
|
7280
|
+
Text24,
|
|
7030
7281
|
{
|
|
7031
7282
|
muted: true,
|
|
7032
7283
|
size: 1,
|
|
@@ -7037,8 +7288,8 @@ function ScoreCard({
|
|
|
7037
7288
|
children: label
|
|
7038
7289
|
}
|
|
7039
7290
|
),
|
|
7040
|
-
/* @__PURE__ */
|
|
7041
|
-
/* @__PURE__ */
|
|
7291
|
+
/* @__PURE__ */ jsxs22(Flex15, { align: "baseline", gap: 2, children: [
|
|
7292
|
+
/* @__PURE__ */ jsxs22(
|
|
7042
7293
|
"span",
|
|
7043
7294
|
{
|
|
7044
7295
|
style: {
|
|
@@ -7050,13 +7301,13 @@ function ScoreCard({
|
|
|
7050
7301
|
},
|
|
7051
7302
|
children: [
|
|
7052
7303
|
value,
|
|
7053
|
-
suffix && /* @__PURE__ */
|
|
7304
|
+
suffix && /* @__PURE__ */ jsx28("span", { style: { fontSize: 24 }, children: suffix })
|
|
7054
7305
|
]
|
|
7055
7306
|
}
|
|
7056
7307
|
),
|
|
7057
|
-
delta != null && delta !== 0 && /* @__PURE__ */
|
|
7308
|
+
delta != null && delta !== 0 && /* @__PURE__ */ jsx28(DeltaIndicator, { delta, icon: true, mono: true, size: 1 })
|
|
7058
7309
|
] }),
|
|
7059
|
-
/* @__PURE__ */
|
|
7310
|
+
/* @__PURE__ */ jsx28(Text24, { muted: true, size: 1, children: subtitle })
|
|
7060
7311
|
] }) });
|
|
7061
7312
|
}
|
|
7062
7313
|
function HealthCard({
|
|
@@ -7072,18 +7323,18 @@ function HealthCard({
|
|
|
7072
7323
|
muted: "var(--card-muted-fg-color)"
|
|
7073
7324
|
};
|
|
7074
7325
|
const textColor = TEXT_COLORS[color];
|
|
7075
|
-
return /* @__PURE__ */
|
|
7076
|
-
|
|
7326
|
+
return /* @__PURE__ */ jsx28(
|
|
7327
|
+
Box16,
|
|
7077
7328
|
{
|
|
7078
7329
|
padding: 4,
|
|
7079
7330
|
style: {
|
|
7080
7331
|
...sectionStyle(color),
|
|
7081
7332
|
minHeight: 80
|
|
7082
7333
|
},
|
|
7083
|
-
children: /* @__PURE__ */
|
|
7084
|
-
/* @__PURE__ */
|
|
7085
|
-
/* @__PURE__ */
|
|
7086
|
-
/* @__PURE__ */
|
|
7334
|
+
children: /* @__PURE__ */ jsxs22(Flex15, { align: "center", gap: 3, children: [
|
|
7335
|
+
/* @__PURE__ */ jsx28("span", { style: { color: textColor, fontSize: 28 }, children: icon }),
|
|
7336
|
+
/* @__PURE__ */ jsxs22(Stack19, { space: 1, children: [
|
|
7337
|
+
/* @__PURE__ */ jsx28(
|
|
7087
7338
|
"span",
|
|
7088
7339
|
{
|
|
7089
7340
|
style: {
|
|
@@ -7096,7 +7347,7 @@ function HealthCard({
|
|
|
7096
7347
|
children: count
|
|
7097
7348
|
}
|
|
7098
7349
|
),
|
|
7099
|
-
/* @__PURE__ */
|
|
7350
|
+
/* @__PURE__ */ jsx28(Text24, { muted: true, size: 2, children: label })
|
|
7100
7351
|
] })
|
|
7101
7352
|
] })
|
|
7102
7353
|
}
|
|
@@ -7117,9 +7368,9 @@ function MetricCard({
|
|
|
7117
7368
|
padding: 16
|
|
7118
7369
|
};
|
|
7119
7370
|
const valueColor = sentiment ? sentimentTextColor(sentiment) : "var(--card-fg-color)";
|
|
7120
|
-
return /* @__PURE__ */
|
|
7121
|
-
/* @__PURE__ */
|
|
7122
|
-
/* @__PURE__ */
|
|
7371
|
+
return /* @__PURE__ */ jsx28(Box16, { style, children: /* @__PURE__ */ jsxs22(Stack19, { space: 2, children: [
|
|
7372
|
+
/* @__PURE__ */ jsx28(Text24, { muted: true, size: 2, children: label }),
|
|
7373
|
+
/* @__PURE__ */ jsx28(
|
|
7123
7374
|
"span",
|
|
7124
7375
|
{
|
|
7125
7376
|
style: {
|
|
@@ -7147,7 +7398,7 @@ function Pill({
|
|
|
7147
7398
|
}
|
|
7148
7399
|
};
|
|
7149
7400
|
const c = colors[color];
|
|
7150
|
-
return /* @__PURE__ */
|
|
7401
|
+
return /* @__PURE__ */ jsx28(
|
|
7151
7402
|
"span",
|
|
7152
7403
|
{
|
|
7153
7404
|
style: {
|
|
@@ -7165,7 +7416,7 @@ function Pill({
|
|
|
7165
7416
|
}
|
|
7166
7417
|
|
|
7167
7418
|
// src/components/report-detail/FailureModesPanel.tsx
|
|
7168
|
-
import { Box as
|
|
7419
|
+
import { Box as Box17, Flex as Flex16, Stack as Stack20, Text as Text25 } from "@sanity/ui";
|
|
7169
7420
|
|
|
7170
7421
|
// src/lib/useArtifactListRow.ts
|
|
7171
7422
|
import { useCallback as useCallback18, useMemo as useMemo10 } from "react";
|
|
@@ -7561,7 +7812,7 @@ function useGraderJudgmentArtifact(key, listKeys) {
|
|
|
7561
7812
|
}
|
|
7562
7813
|
|
|
7563
7814
|
// src/components/report-detail/FailureModesPanel.tsx
|
|
7564
|
-
import { jsx as
|
|
7815
|
+
import { jsx as jsx29, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
7565
7816
|
function severityColor(severity) {
|
|
7566
7817
|
switch (severity) {
|
|
7567
7818
|
case "critical":
|
|
@@ -7581,25 +7832,25 @@ function FailureModesPanel({ failureModes }) {
|
|
|
7581
7832
|
if (!failureModes || failureModes.topTitles.length === 0) return null;
|
|
7582
7833
|
const allKeys = failureModes.topTitles.map((t) => t.id);
|
|
7583
7834
|
const classificationPct = Math.round(failureModes.classificationRate);
|
|
7584
|
-
return /* @__PURE__ */
|
|
7585
|
-
|
|
7835
|
+
return /* @__PURE__ */ jsx29(
|
|
7836
|
+
Box17,
|
|
7586
7837
|
{
|
|
7587
7838
|
style: {
|
|
7588
7839
|
...neutralCardStyle,
|
|
7589
7840
|
padding: "12px 16px"
|
|
7590
7841
|
},
|
|
7591
|
-
children: /* @__PURE__ */
|
|
7592
|
-
/* @__PURE__ */
|
|
7593
|
-
/* @__PURE__ */
|
|
7594
|
-
/* @__PURE__ */
|
|
7842
|
+
children: /* @__PURE__ */ jsxs23(Stack20, { space: 3, children: [
|
|
7843
|
+
/* @__PURE__ */ jsxs23(Flex16, { align: "baseline", gap: 2, wrap: "wrap", children: [
|
|
7844
|
+
/* @__PURE__ */ jsx29(Text25, { size: 2, weight: "semibold", children: "Failure Categories" }),
|
|
7845
|
+
/* @__PURE__ */ jsxs23(Text25, { muted: true, size: 1, children: [
|
|
7595
7846
|
failureModes.totalJudgments,
|
|
7596
7847
|
" judgments \xB7 ",
|
|
7597
7848
|
classificationPct,
|
|
7598
7849
|
"% classified"
|
|
7599
7850
|
] })
|
|
7600
7851
|
] }),
|
|
7601
|
-
/* @__PURE__ */
|
|
7602
|
-
/* @__PURE__ */
|
|
7852
|
+
/* @__PURE__ */ jsx29(Box17, { style: dividerStyle }),
|
|
7853
|
+
/* @__PURE__ */ jsx29(Stack20, { space: 2, children: failureModes.topTitles.map((row) => /* @__PURE__ */ jsx29(
|
|
7603
7854
|
FailureModeRow,
|
|
7604
7855
|
{
|
|
7605
7856
|
allKeys,
|
|
@@ -7623,8 +7874,8 @@ function FailureModeRow({
|
|
|
7623
7874
|
const title = artifact.preview?.titlePreview ?? row.title ?? toTitleCase(category);
|
|
7624
7875
|
const pct = total > 0 ? Math.round(row.count / total * 100) : 0;
|
|
7625
7876
|
const sevColors = severityColor(severity);
|
|
7626
|
-
return /* @__PURE__ */
|
|
7627
|
-
|
|
7877
|
+
return /* @__PURE__ */ jsxs23(
|
|
7878
|
+
Flex16,
|
|
7628
7879
|
{
|
|
7629
7880
|
align: "center",
|
|
7630
7881
|
gap: 3,
|
|
@@ -7632,7 +7883,7 @@ function FailureModeRow({
|
|
|
7632
7883
|
onMouseEnter: artifact.handlers.onMouseEnter,
|
|
7633
7884
|
style: { padding: "4px 0" },
|
|
7634
7885
|
children: [
|
|
7635
|
-
/* @__PURE__ */
|
|
7886
|
+
/* @__PURE__ */ jsx29(
|
|
7636
7887
|
"span",
|
|
7637
7888
|
{
|
|
7638
7889
|
style: {
|
|
@@ -7649,10 +7900,10 @@ function FailureModeRow({
|
|
|
7649
7900
|
children: severity.toUpperCase()
|
|
7650
7901
|
}
|
|
7651
7902
|
),
|
|
7652
|
-
/* @__PURE__ */
|
|
7653
|
-
/* @__PURE__ */
|
|
7654
|
-
/* @__PURE__ */
|
|
7655
|
-
|
|
7903
|
+
/* @__PURE__ */ jsx29(Text25, { size: 1, weight: "medium", children: title }),
|
|
7904
|
+
/* @__PURE__ */ jsx29(Text25, { muted: true, size: 1, children: "\xB7" }),
|
|
7905
|
+
/* @__PURE__ */ jsxs23(
|
|
7906
|
+
Text25,
|
|
7656
7907
|
{
|
|
7657
7908
|
muted: true,
|
|
7658
7909
|
size: 1,
|
|
@@ -7675,11 +7926,11 @@ function FailureModeRow({
|
|
|
7675
7926
|
|
|
7676
7927
|
// src/components/report-detail/LineageCard.tsx
|
|
7677
7928
|
import { LinkIcon as LinkIcon2 } from "@sanity/icons";
|
|
7678
|
-
import { Badge as Badge6, Card as Card13, Flex as
|
|
7929
|
+
import { Badge as Badge6, Card as Card13, Flex as Flex17, Stack as Stack21, Text as Text26 } from "@sanity/ui";
|
|
7679
7930
|
import { useCallback as useCallback19, useEffect as useEffect8, useState as useState14 } from "react";
|
|
7680
7931
|
import { useClient as useClient5 } from "sanity";
|
|
7681
7932
|
import { useRouter as useRouter2 } from "sanity/router";
|
|
7682
|
-
import { jsx as
|
|
7933
|
+
import { jsx as jsx30, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
7683
7934
|
var REPORT_TYPE2 = "ailf.report";
|
|
7684
7935
|
var SPAWNED_REPORTS_QUERY = (
|
|
7685
7936
|
/* groq */
|
|
@@ -7712,12 +7963,12 @@ function LineageCard({ provenance, reportId }) {
|
|
|
7712
7963
|
}, [client, reportId]);
|
|
7713
7964
|
const hasLineage = lineage?.rerunOf || lineage?.comparedAgainst;
|
|
7714
7965
|
if (!hasLineage && spawned.length === 0) return null;
|
|
7715
|
-
return /* @__PURE__ */
|
|
7716
|
-
/* @__PURE__ */
|
|
7717
|
-
/* @__PURE__ */
|
|
7966
|
+
return /* @__PURE__ */ jsx30(Card13, { padding: 4, radius: 2, shadow: 1, children: /* @__PURE__ */ jsxs24(Stack21, { space: 4, children: [
|
|
7967
|
+
/* @__PURE__ */ jsx30(Flex17, { align: "center", gap: 2, children: /* @__PURE__ */ jsxs24(Text26, { size: 3, weight: "semibold", children: [
|
|
7968
|
+
/* @__PURE__ */ jsx30(LinkIcon2, {}),
|
|
7718
7969
|
" Lineage"
|
|
7719
7970
|
] }) }),
|
|
7720
|
-
lineage?.rerunOf && /* @__PURE__ */
|
|
7971
|
+
lineage?.rerunOf && /* @__PURE__ */ jsx30(
|
|
7721
7972
|
LineageLink,
|
|
7722
7973
|
{
|
|
7723
7974
|
label: "Re-run of",
|
|
@@ -7725,7 +7976,7 @@ function LineageCard({ provenance, reportId }) {
|
|
|
7725
7976
|
router
|
|
7726
7977
|
}
|
|
7727
7978
|
),
|
|
7728
|
-
lineage?.comparedAgainst && /* @__PURE__ */
|
|
7979
|
+
lineage?.comparedAgainst && /* @__PURE__ */ jsx30(
|
|
7729
7980
|
LineageLink,
|
|
7730
7981
|
{
|
|
7731
7982
|
label: "Compared against",
|
|
@@ -7733,9 +7984,9 @@ function LineageCard({ provenance, reportId }) {
|
|
|
7733
7984
|
router
|
|
7734
7985
|
}
|
|
7735
7986
|
),
|
|
7736
|
-
spawned.length > 0 && /* @__PURE__ */
|
|
7737
|
-
/* @__PURE__ */
|
|
7738
|
-
spawned.map((s) => /* @__PURE__ */
|
|
7987
|
+
spawned.length > 0 && /* @__PURE__ */ jsxs24(Stack21, { space: 2, children: [
|
|
7988
|
+
/* @__PURE__ */ jsx30(Text26, { muted: true, size: 1, weight: "semibold", children: "SPAWNED RE-RUNS" }),
|
|
7989
|
+
spawned.map((s) => /* @__PURE__ */ jsx30(SpawnedReportRow, { report: s, router }, s.reportId))
|
|
7739
7990
|
] })
|
|
7740
7991
|
] }) });
|
|
7741
7992
|
}
|
|
@@ -7747,12 +7998,12 @@ function LineageLink({
|
|
|
7747
7998
|
const handleClick = useCallback19(() => {
|
|
7748
7999
|
router.navigate({ reportId });
|
|
7749
8000
|
}, [reportId, router]);
|
|
7750
|
-
return /* @__PURE__ */
|
|
7751
|
-
/* @__PURE__ */
|
|
8001
|
+
return /* @__PURE__ */ jsxs24(Flex17, { align: "center", gap: 2, children: [
|
|
8002
|
+
/* @__PURE__ */ jsxs24(Text26, { muted: true, size: 2, weight: "semibold", children: [
|
|
7752
8003
|
label,
|
|
7753
8004
|
":"
|
|
7754
8005
|
] }),
|
|
7755
|
-
/* @__PURE__ */
|
|
8006
|
+
/* @__PURE__ */ jsx30(Text26, { size: 2, children: /* @__PURE__ */ jsxs24(
|
|
7756
8007
|
"a",
|
|
7757
8008
|
{
|
|
7758
8009
|
href: "#",
|
|
@@ -7778,8 +8029,8 @@ function SpawnedReportRow({
|
|
|
7778
8029
|
}, [report.reportId, router]);
|
|
7779
8030
|
const dateLabel = formatShortDate(report.completedAt);
|
|
7780
8031
|
const label = report.title ?? report.tag ?? dateLabel;
|
|
7781
|
-
return /* @__PURE__ */
|
|
7782
|
-
/* @__PURE__ */
|
|
8032
|
+
return /* @__PURE__ */ jsxs24(Flex17, { align: "center", gap: 2, children: [
|
|
8033
|
+
/* @__PURE__ */ jsx30(Text26, { size: 2, children: /* @__PURE__ */ jsx30(
|
|
7783
8034
|
"a",
|
|
7784
8035
|
{
|
|
7785
8036
|
href: "#",
|
|
@@ -7791,8 +8042,8 @@ function SpawnedReportRow({
|
|
|
7791
8042
|
children: label
|
|
7792
8043
|
}
|
|
7793
8044
|
) }),
|
|
7794
|
-
(report.title ?? report.tag) && /* @__PURE__ */
|
|
7795
|
-
/* @__PURE__ */
|
|
8045
|
+
(report.title ?? report.tag) && /* @__PURE__ */ jsx30(Text26, { muted: true, size: 1, children: dateLabel }),
|
|
8046
|
+
/* @__PURE__ */ jsx30(Badge6, { fontSize: 1, mode: "outline", tone: "default", children: report.reportId.slice(0, 8) })
|
|
7796
8047
|
] });
|
|
7797
8048
|
}
|
|
7798
8049
|
function formatShortDate(iso) {
|
|
@@ -7808,18 +8059,294 @@ function formatShortDate(iso) {
|
|
|
7808
8059
|
}
|
|
7809
8060
|
|
|
7810
8061
|
// src/components/report-detail/JudgmentList.tsx
|
|
7811
|
-
import React2, { useCallback as
|
|
8062
|
+
import React2, { useCallback as useCallback22, useEffect as useEffect11, useMemo as useMemo11, useRef as useRef7, useState as useState16 } from "react";
|
|
7812
8063
|
import {
|
|
7813
8064
|
ChevronDownIcon,
|
|
7814
8065
|
ChevronRightIcon,
|
|
7815
8066
|
ErrorOutlineIcon as ErrorOutlineIcon2,
|
|
7816
8067
|
HelpCircleIcon as HelpCircleIcon7
|
|
7817
8068
|
} from "@sanity/icons";
|
|
7818
|
-
import { Box as
|
|
8069
|
+
import { Box as Box21, Flex as Flex20, Stack as Stack23, Text as Text31, Tooltip as Tooltip9 } from "@sanity/ui";
|
|
8070
|
+
|
|
8071
|
+
// src/components/report-detail/PromptReplayDrawer.tsx
|
|
8072
|
+
import { useEffect as useEffect10 } from "react";
|
|
8073
|
+
import { Badge as Badge7, Box as Box19, Card as Card14, Dialog, Flex as Flex18, Grid as Grid3, Stack as Stack22, Text as Text28 } from "@sanity/ui";
|
|
8074
|
+
|
|
8075
|
+
// src/components/CopyButton.tsx
|
|
8076
|
+
import {
|
|
8077
|
+
useCallback as useCallback20,
|
|
8078
|
+
useEffect as useEffect9,
|
|
8079
|
+
useRef as useRef6,
|
|
8080
|
+
useState as useState15
|
|
8081
|
+
} from "react";
|
|
8082
|
+
import { CheckmarkIcon, CopyIcon } from "@sanity/icons";
|
|
8083
|
+
import { Box as Box18, Button as Button3, Text as Text27, Tooltip as Tooltip7 } from "@sanity/ui";
|
|
8084
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
8085
|
+
function CopyButton({
|
|
8086
|
+
copiedLabel = "Copied!",
|
|
8087
|
+
errorLabel = "Copy failed",
|
|
8088
|
+
label,
|
|
8089
|
+
revertAfterMs = 1500,
|
|
8090
|
+
style,
|
|
8091
|
+
text
|
|
8092
|
+
}) {
|
|
8093
|
+
const [status, setStatus] = useState15("idle");
|
|
8094
|
+
const timerRef = useRef6(null);
|
|
8095
|
+
const scheduleRevert = useCallback20(() => {
|
|
8096
|
+
if (timerRef.current !== null) window.clearTimeout(timerRef.current);
|
|
8097
|
+
timerRef.current = window.setTimeout(() => {
|
|
8098
|
+
setStatus("idle");
|
|
8099
|
+
timerRef.current = null;
|
|
8100
|
+
}, revertAfterMs);
|
|
8101
|
+
}, [revertAfterMs]);
|
|
8102
|
+
const handleCopy = useCallback20(() => {
|
|
8103
|
+
navigator.clipboard.writeText(text).then(
|
|
8104
|
+
() => {
|
|
8105
|
+
setStatus("copied");
|
|
8106
|
+
scheduleRevert();
|
|
8107
|
+
},
|
|
8108
|
+
() => {
|
|
8109
|
+
setStatus("error");
|
|
8110
|
+
scheduleRevert();
|
|
8111
|
+
}
|
|
8112
|
+
);
|
|
8113
|
+
}, [text, scheduleRevert]);
|
|
8114
|
+
useEffect9(() => {
|
|
8115
|
+
return () => {
|
|
8116
|
+
if (timerRef.current !== null) window.clearTimeout(timerRef.current);
|
|
8117
|
+
};
|
|
8118
|
+
}, []);
|
|
8119
|
+
const tooltipLabel = status === "copied" ? copiedLabel : status === "error" ? errorLabel : label;
|
|
8120
|
+
const tone = status === "copied" ? "positive" : status === "error" ? "critical" : "default";
|
|
8121
|
+
const icon = status === "copied" ? CheckmarkIcon : CopyIcon;
|
|
8122
|
+
const idle = status === "idle";
|
|
8123
|
+
return /* @__PURE__ */ jsx31(
|
|
8124
|
+
Tooltip7,
|
|
8125
|
+
{
|
|
8126
|
+
content: /* @__PURE__ */ jsx31(Box18, { padding: 2, children: /* @__PURE__ */ jsx31(Text27, { size: 1, children: tooltipLabel }) }),
|
|
8127
|
+
placement: "left",
|
|
8128
|
+
portal: true,
|
|
8129
|
+
children: /* @__PURE__ */ jsx31(
|
|
8130
|
+
Button3,
|
|
8131
|
+
{
|
|
8132
|
+
"aria-label": label,
|
|
8133
|
+
fontSize: 1,
|
|
8134
|
+
icon,
|
|
8135
|
+
mode: "bleed",
|
|
8136
|
+
onBlur: (e) => {
|
|
8137
|
+
if (idle) e.currentTarget.style.opacity = "0.55";
|
|
8138
|
+
},
|
|
8139
|
+
onClick: handleCopy,
|
|
8140
|
+
onFocus: (e) => {
|
|
8141
|
+
if (idle) e.currentTarget.style.opacity = "1";
|
|
8142
|
+
},
|
|
8143
|
+
onMouseEnter: (e) => {
|
|
8144
|
+
if (idle) e.currentTarget.style.opacity = "1";
|
|
8145
|
+
},
|
|
8146
|
+
onMouseLeave: (e) => {
|
|
8147
|
+
if (idle) e.currentTarget.style.opacity = "0.55";
|
|
8148
|
+
},
|
|
8149
|
+
padding: 2,
|
|
8150
|
+
style: {
|
|
8151
|
+
opacity: idle ? 0.55 : 1,
|
|
8152
|
+
transition: "opacity 150ms ease",
|
|
8153
|
+
...style
|
|
8154
|
+
},
|
|
8155
|
+
tone
|
|
8156
|
+
}
|
|
8157
|
+
)
|
|
8158
|
+
}
|
|
8159
|
+
);
|
|
8160
|
+
}
|
|
8161
|
+
|
|
8162
|
+
// src/components/report-detail/PromptReplayDrawer.tsx
|
|
8163
|
+
import { Fragment as Fragment9, jsx as jsx32, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
8164
|
+
function useArtifactPane(type, entryKey, project) {
|
|
8165
|
+
const ref = useArtifactRef(type);
|
|
8166
|
+
const isLocalStore = ref?.store === "local";
|
|
8167
|
+
const entry = useArtifactEntry(type, entryKey ?? "");
|
|
8168
|
+
const [full, status, request] = useArtifactDetail(type, entryKey ?? "");
|
|
8169
|
+
useEffect10(() => {
|
|
8170
|
+
if (!entryKey) return;
|
|
8171
|
+
if (isLocalStore) return;
|
|
8172
|
+
if (status !== "idle") return;
|
|
8173
|
+
void request();
|
|
8174
|
+
}, [entryKey, status, request, isLocalStore]);
|
|
8175
|
+
const projected = project(entry.preview, full);
|
|
8176
|
+
return {
|
|
8177
|
+
charCount: projected.charCount,
|
|
8178
|
+
extra: projected.extra,
|
|
8179
|
+
fullText: projected.fullText,
|
|
8180
|
+
snippet: projected.snippet,
|
|
8181
|
+
status,
|
|
8182
|
+
isLocalStore,
|
|
8183
|
+
present: entry.present
|
|
8184
|
+
};
|
|
8185
|
+
}
|
|
8186
|
+
function useRenderedPrompt(entryKey) {
|
|
8187
|
+
return useArtifactPane(
|
|
8188
|
+
"renderedPrompts",
|
|
8189
|
+
entryKey,
|
|
8190
|
+
(preview, full) => {
|
|
8191
|
+
const fullText = typeof full?.prompt?.raw === "string" ? full.prompt.raw : null;
|
|
8192
|
+
return {
|
|
8193
|
+
charCount: fullText?.length ?? preview?.promptCharCount ?? 0,
|
|
8194
|
+
extra: preview?.label ?? null,
|
|
8195
|
+
fullText,
|
|
8196
|
+
snippet: preview?.snippet
|
|
8197
|
+
};
|
|
8198
|
+
}
|
|
8199
|
+
);
|
|
8200
|
+
}
|
|
8201
|
+
function useGraderRubric(entryKey) {
|
|
8202
|
+
return useArtifactPane(
|
|
8203
|
+
"graderPrompts",
|
|
8204
|
+
entryKey,
|
|
8205
|
+
(preview, full) => {
|
|
8206
|
+
const rubricText = typeof full?.assertion?.value === "string" ? full.assertion.value : null;
|
|
8207
|
+
return {
|
|
8208
|
+
charCount: rubricText?.length ?? preview?.rubricCharCount ?? 0,
|
|
8209
|
+
extra: preview?.rubricName ? `dim: ${preview.rubricName}` : null,
|
|
8210
|
+
fullText: rubricText,
|
|
8211
|
+
snippet: preview?.snippet
|
|
8212
|
+
};
|
|
8213
|
+
}
|
|
8214
|
+
);
|
|
8215
|
+
}
|
|
8216
|
+
function PromptReplayDrawer({
|
|
8217
|
+
open,
|
|
8218
|
+
renderedPromptKey,
|
|
8219
|
+
graderPromptKey,
|
|
8220
|
+
subtitle,
|
|
8221
|
+
onClose
|
|
8222
|
+
}) {
|
|
8223
|
+
if (!open) return null;
|
|
8224
|
+
return /* @__PURE__ */ jsx32(
|
|
8225
|
+
Dialog,
|
|
8226
|
+
{
|
|
8227
|
+
header: "Prompt replay",
|
|
8228
|
+
id: "prompt-replay-drawer",
|
|
8229
|
+
onClose,
|
|
8230
|
+
width: 4,
|
|
8231
|
+
children: /* @__PURE__ */ jsx32(Box19, { padding: 4, children: /* @__PURE__ */ jsxs25(Stack22, { space: 4, children: [
|
|
8232
|
+
/* @__PURE__ */ jsx32(Text28, { muted: true, size: 1, children: subtitle }),
|
|
8233
|
+
/* @__PURE__ */ jsxs25(Grid3, { columns: [1, 1, 2], gap: 4, children: [
|
|
8234
|
+
/* @__PURE__ */ jsx32(RenderedPromptPane, { entryKey: renderedPromptKey }),
|
|
8235
|
+
/* @__PURE__ */ jsx32(GraderRubricPane, { entryKey: graderPromptKey })
|
|
8236
|
+
] })
|
|
8237
|
+
] }) })
|
|
8238
|
+
}
|
|
8239
|
+
);
|
|
8240
|
+
}
|
|
8241
|
+
function RenderedPromptPane({ entryKey }) {
|
|
8242
|
+
const data = useRenderedPrompt(entryKey);
|
|
8243
|
+
return /* @__PURE__ */ jsx32(
|
|
8244
|
+
PromptPane,
|
|
8245
|
+
{
|
|
8246
|
+
copiedLabel: "Prompt copied",
|
|
8247
|
+
copyLabel: "Copy prompt",
|
|
8248
|
+
data,
|
|
8249
|
+
entryKey,
|
|
8250
|
+
paneLabel: "Rendered prompt"
|
|
8251
|
+
}
|
|
8252
|
+
);
|
|
8253
|
+
}
|
|
8254
|
+
function GraderRubricPane({ entryKey }) {
|
|
8255
|
+
const data = useGraderRubric(entryKey);
|
|
8256
|
+
return /* @__PURE__ */ jsx32(
|
|
8257
|
+
PromptPane,
|
|
8258
|
+
{
|
|
8259
|
+
copiedLabel: "Rubric copied",
|
|
8260
|
+
copyLabel: "Copy rubric",
|
|
8261
|
+
data,
|
|
8262
|
+
entryKey,
|
|
8263
|
+
paneLabel: "Grader rubric"
|
|
8264
|
+
}
|
|
8265
|
+
);
|
|
8266
|
+
}
|
|
8267
|
+
function PromptPane({
|
|
8268
|
+
copiedLabel,
|
|
8269
|
+
copyLabel,
|
|
8270
|
+
data,
|
|
8271
|
+
entryKey,
|
|
8272
|
+
paneLabel
|
|
8273
|
+
}) {
|
|
8274
|
+
if (!entryKey) {
|
|
8275
|
+
return /* @__PURE__ */ jsx32(PaneCard, { paneLabel, children: /* @__PURE__ */ jsx32(Text28, { muted: true, size: 1, children: "Not available for this report (no entry key could be derived from the task identity)." }) });
|
|
8276
|
+
}
|
|
8277
|
+
if (!data.present) {
|
|
8278
|
+
return /* @__PURE__ */ jsx32(PaneCard, { paneLabel, children: /* @__PURE__ */ jsx32(Text28, { muted: true, size: 1, children: "Not captured for this entry. (Older runs pre-dating the renderedPrompts/graderPrompts writers won't carry a manifest entry.)" }) });
|
|
8279
|
+
}
|
|
8280
|
+
const { fullText, snippet, charCount, extra, status, isLocalStore } = data;
|
|
8281
|
+
const displayText = fullText ?? snippet ?? "";
|
|
8282
|
+
const isPreviewOnly = fullText === null;
|
|
8283
|
+
const footer = isLocalStore ? /* @__PURE__ */ jsx32(Text28, { muted: true, size: 1, style: { marginTop: 8 }, children: "Full text stored locally on the runner that produced this report \u2014 not reachable from Studio. Showing 120-char preview only." }) : status === "error" ? /* @__PURE__ */ jsx32(Text28, { muted: true, size: 1, style: { color: "#f87171", marginTop: 8 }, children: "Failed to load full text \u2014 showing preview only." }) : status === "loading" && !fullText ? /* @__PURE__ */ jsx32(Text28, { muted: true, size: 1, style: { marginTop: 8 }, children: "Loading full text from artifact store\u2026" }) : isPreviewOnly ? /* @__PURE__ */ jsx32(Text28, { muted: true, size: 1, style: { marginTop: 8 }, children: "Showing 120-char preview. Full text not yet hydrated." }) : null;
|
|
8284
|
+
return /* @__PURE__ */ jsxs25(
|
|
8285
|
+
PaneCard,
|
|
8286
|
+
{
|
|
8287
|
+
badges: /* @__PURE__ */ jsxs25(Fragment9, { children: [
|
|
8288
|
+
/* @__PURE__ */ jsxs25(Badge7, { fontSize: 0, tone: "primary", children: [
|
|
8289
|
+
charCount.toLocaleString(),
|
|
8290
|
+
" char",
|
|
8291
|
+
charCount === 1 ? "" : "s"
|
|
8292
|
+
] }),
|
|
8293
|
+
extra && /* @__PURE__ */ jsx32(Badge7, { fontSize: 0, tone: "default", children: extra })
|
|
8294
|
+
] }),
|
|
8295
|
+
copyAction: displayText.length > 0 ? /* @__PURE__ */ jsx32(
|
|
8296
|
+
CopyButton,
|
|
8297
|
+
{
|
|
8298
|
+
copiedLabel,
|
|
8299
|
+
label: copyLabel,
|
|
8300
|
+
text: displayText
|
|
8301
|
+
}
|
|
8302
|
+
) : null,
|
|
8303
|
+
paneLabel,
|
|
8304
|
+
children: [
|
|
8305
|
+
displayText.length === 0 ? /* @__PURE__ */ jsx32(Text28, { muted: true, size: 1, children: "(empty)" }) : /* @__PURE__ */ jsx32(
|
|
8306
|
+
"pre",
|
|
8307
|
+
{
|
|
8308
|
+
style: {
|
|
8309
|
+
backgroundColor: "var(--card-muted-bg-color, rgba(0,0,0,0.2))",
|
|
8310
|
+
border: "1px solid var(--card-border-color)",
|
|
8311
|
+
borderRadius: 3,
|
|
8312
|
+
fontFamily: FONT_STACK_MONO2,
|
|
8313
|
+
fontSize: 12,
|
|
8314
|
+
lineHeight: 1.5,
|
|
8315
|
+
margin: 0,
|
|
8316
|
+
maxHeight: 480,
|
|
8317
|
+
overflow: "auto",
|
|
8318
|
+
padding: 12,
|
|
8319
|
+
whiteSpace: "pre-wrap",
|
|
8320
|
+
wordBreak: "break-word"
|
|
8321
|
+
},
|
|
8322
|
+
children: displayText
|
|
8323
|
+
}
|
|
8324
|
+
),
|
|
8325
|
+
footer
|
|
8326
|
+
]
|
|
8327
|
+
}
|
|
8328
|
+
);
|
|
8329
|
+
}
|
|
8330
|
+
function PaneCard({
|
|
8331
|
+
badges,
|
|
8332
|
+
children,
|
|
8333
|
+
copyAction,
|
|
8334
|
+
paneLabel
|
|
8335
|
+
}) {
|
|
8336
|
+
return /* @__PURE__ */ jsx32(Card14, { border: true, padding: 3, radius: 2, tone: "transparent", children: /* @__PURE__ */ jsxs25(Stack22, { space: 3, children: [
|
|
8337
|
+
/* @__PURE__ */ jsxs25(Flex18, { align: "center", gap: 2, wrap: "wrap", children: [
|
|
8338
|
+
/* @__PURE__ */ jsx32(Text28, { size: 1, weight: "semibold", children: paneLabel }),
|
|
8339
|
+
badges,
|
|
8340
|
+
/* @__PURE__ */ jsx32(Box19, { flex: 1 }),
|
|
8341
|
+
copyAction
|
|
8342
|
+
] }),
|
|
8343
|
+
children
|
|
8344
|
+
] }) });
|
|
8345
|
+
}
|
|
7819
8346
|
|
|
7820
8347
|
// src/components/report-detail/judgment-formatting.tsx
|
|
7821
|
-
import { Box as
|
|
7822
|
-
import { jsx as
|
|
8348
|
+
import { Box as Box20, Text as Text29, Tooltip as Tooltip8 } from "@sanity/ui";
|
|
8349
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
7823
8350
|
function judgmentSlug(j) {
|
|
7824
8351
|
const sep = j.taskId.indexOf(" - ");
|
|
7825
8352
|
const area = sep > 0 ? j.taskId.substring(0, sep) : j.taskId;
|
|
@@ -7836,7 +8363,7 @@ function dimensionLabel2(dim) {
|
|
|
7836
8363
|
if (!dim) return "";
|
|
7837
8364
|
return dim.split("-").map((w) => w.charAt(0).toUpperCase() + w.slice(1)).join(" ");
|
|
7838
8365
|
}
|
|
7839
|
-
function
|
|
8366
|
+
function shortModelId2(id) {
|
|
7840
8367
|
const idx = id.lastIndexOf(":");
|
|
7841
8368
|
if (idx < 0 || idx === id.length - 1) return id;
|
|
7842
8369
|
return id.substring(idx + 1);
|
|
@@ -7854,13 +8381,13 @@ function splitVariant(taskName) {
|
|
|
7854
8381
|
function VariantBadge({ variant }) {
|
|
7855
8382
|
if (!variant) return null;
|
|
7856
8383
|
const isGold = variant === "gold";
|
|
7857
|
-
return /* @__PURE__ */
|
|
7858
|
-
|
|
8384
|
+
return /* @__PURE__ */ jsx33(
|
|
8385
|
+
Tooltip8,
|
|
7859
8386
|
{
|
|
7860
|
-
content: /* @__PURE__ */
|
|
8387
|
+
content: /* @__PURE__ */ jsx33(Box20, { padding: 2, style: { maxWidth: 240 }, children: /* @__PURE__ */ jsx33(Text29, { size: 1, children: isGold ? "Gold: uses the documentation-authored reference prompt." : "Baseline: model implementation with no documentation guidance." }) }),
|
|
7861
8388
|
placement: "bottom",
|
|
7862
8389
|
portal: true,
|
|
7863
|
-
children: /* @__PURE__ */
|
|
8390
|
+
children: /* @__PURE__ */ jsx33(
|
|
7864
8391
|
"span",
|
|
7865
8392
|
{
|
|
7866
8393
|
style: {
|
|
@@ -7882,10 +8409,10 @@ function VariantBadge({ variant }) {
|
|
|
7882
8409
|
}
|
|
7883
8410
|
|
|
7884
8411
|
// src/components/report-detail/JudgmentListToolbar.tsx
|
|
7885
|
-
import { Flex as
|
|
8412
|
+
import { Flex as Flex19, Text as Text30, TextInput as TextInput4 } from "@sanity/ui";
|
|
7886
8413
|
import { ResetIcon as ResetIcon2, SearchIcon as SearchIcon5 } from "@sanity/icons";
|
|
7887
|
-
import { useCallback as
|
|
7888
|
-
import { jsx as
|
|
8414
|
+
import { useCallback as useCallback21 } from "react";
|
|
8415
|
+
import { jsx as jsx34, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
7889
8416
|
var FILTERS_BOX_STYLE = {
|
|
7890
8417
|
background: "var(--card-bg-color)",
|
|
7891
8418
|
border: "1px solid var(--card-border-color)",
|
|
@@ -7978,17 +8505,17 @@ function JudgmentListToolbar({
|
|
|
7978
8505
|
totalCount
|
|
7979
8506
|
}) {
|
|
7980
8507
|
const hasActiveFilters = query.trim() !== "" || scoreBand !== null || selectedDimensions.size > 0;
|
|
7981
|
-
const handleQueryChange =
|
|
8508
|
+
const handleQueryChange = useCallback21(
|
|
7982
8509
|
(e) => {
|
|
7983
8510
|
onQueryChange(e.currentTarget.value);
|
|
7984
8511
|
},
|
|
7985
8512
|
[onQueryChange]
|
|
7986
8513
|
);
|
|
7987
|
-
return /* @__PURE__ */
|
|
7988
|
-
/* @__PURE__ */
|
|
7989
|
-
/* @__PURE__ */
|
|
7990
|
-
/* @__PURE__ */
|
|
7991
|
-
hasActiveFilters && /* @__PURE__ */
|
|
8514
|
+
return /* @__PURE__ */ jsx34("div", { style: FILTERS_BOX_STYLE, children: /* @__PURE__ */ jsxs26(Flex19, { direction: "column", gap: 3, children: [
|
|
8515
|
+
/* @__PURE__ */ jsxs26(Flex19, { align: "center", gap: 2, children: [
|
|
8516
|
+
/* @__PURE__ */ jsx34(Text30, { muted: true, size: 1, style: GROUP_LABEL_STYLE, weight: "semibold", children: "Filters" }),
|
|
8517
|
+
/* @__PURE__ */ jsx34("div", { style: { flex: "1 0 0px" } }),
|
|
8518
|
+
hasActiveFilters && /* @__PURE__ */ jsxs26(
|
|
7992
8519
|
"button",
|
|
7993
8520
|
{
|
|
7994
8521
|
onBlur: (e) => {
|
|
@@ -8015,15 +8542,15 @@ function JudgmentListToolbar({
|
|
|
8015
8542
|
},
|
|
8016
8543
|
type: "button",
|
|
8017
8544
|
children: [
|
|
8018
|
-
/* @__PURE__ */
|
|
8545
|
+
/* @__PURE__ */ jsx34(ResetIcon2, { style: { fontSize: 14 } }),
|
|
8019
8546
|
"Reset"
|
|
8020
8547
|
]
|
|
8021
8548
|
}
|
|
8022
8549
|
),
|
|
8023
|
-
/* @__PURE__ */
|
|
8550
|
+
/* @__PURE__ */ jsx34(Text30, { muted: true, size: 1, style: { whiteSpace: "nowrap" }, children: filteredCount === totalCount ? `${totalCount}` : `${filteredCount} of ${totalCount}` })
|
|
8024
8551
|
] }),
|
|
8025
|
-
/* @__PURE__ */
|
|
8026
|
-
/* @__PURE__ */
|
|
8552
|
+
/* @__PURE__ */ jsxs26("div", { style: CONTROLS_ROW_STYLE, children: [
|
|
8553
|
+
/* @__PURE__ */ jsx34("div", { style: { flex: "1 1 220px", maxWidth: 360, minWidth: 160 }, children: /* @__PURE__ */ jsx34(
|
|
8027
8554
|
TextInput4,
|
|
8028
8555
|
{
|
|
8029
8556
|
fontSize: 1,
|
|
@@ -8033,7 +8560,7 @@ function JudgmentListToolbar({
|
|
|
8033
8560
|
value: query
|
|
8034
8561
|
}
|
|
8035
8562
|
) }),
|
|
8036
|
-
/* @__PURE__ */
|
|
8563
|
+
/* @__PURE__ */ jsx34(PillGroup2, { label: "Score", children: SCORE_BANDS.map(({ band, label }) => /* @__PURE__ */ jsx34(
|
|
8037
8564
|
"button",
|
|
8038
8565
|
{
|
|
8039
8566
|
onClick: () => onScoreBandChange(band),
|
|
@@ -8043,7 +8570,7 @@ function JudgmentListToolbar({
|
|
|
8043
8570
|
},
|
|
8044
8571
|
label
|
|
8045
8572
|
)) }),
|
|
8046
|
-
/* @__PURE__ */
|
|
8573
|
+
/* @__PURE__ */ jsx34(PillGroup2, { label: "Sort", children: SORT_OPTIONS.map(({ order, label }) => /* @__PURE__ */ jsx34(
|
|
8047
8574
|
"button",
|
|
8048
8575
|
{
|
|
8049
8576
|
onClick: () => onSortOrderChange(order),
|
|
@@ -8054,11 +8581,11 @@ function JudgmentListToolbar({
|
|
|
8054
8581
|
order
|
|
8055
8582
|
)) })
|
|
8056
8583
|
] }),
|
|
8057
|
-
dimensions.length > 0 && /* @__PURE__ */
|
|
8058
|
-
/* @__PURE__ */
|
|
8584
|
+
dimensions.length > 0 && /* @__PURE__ */ jsxs26(Flex19, { align: "center", gap: 2, wrap: "wrap", children: [
|
|
8585
|
+
/* @__PURE__ */ jsx34(Text30, { muted: true, size: 1, style: GROUP_LABEL_STYLE, weight: "semibold", children: "Dimensions" }),
|
|
8059
8586
|
dimensions.map((d) => {
|
|
8060
8587
|
const active = selectedDimensions.has(d.key);
|
|
8061
|
-
return /* @__PURE__ */
|
|
8588
|
+
return /* @__PURE__ */ jsxs26(
|
|
8062
8589
|
"button",
|
|
8063
8590
|
{
|
|
8064
8591
|
"aria-pressed": active,
|
|
@@ -8068,7 +8595,7 @@ function JudgmentListToolbar({
|
|
|
8068
8595
|
children: [
|
|
8069
8596
|
d.label,
|
|
8070
8597
|
" ",
|
|
8071
|
-
/* @__PURE__ */
|
|
8598
|
+
/* @__PURE__ */ jsx34(
|
|
8072
8599
|
"span",
|
|
8073
8600
|
{
|
|
8074
8601
|
style: {
|
|
@@ -8091,14 +8618,14 @@ function PillGroup2({
|
|
|
8091
8618
|
label,
|
|
8092
8619
|
children
|
|
8093
8620
|
}) {
|
|
8094
|
-
return /* @__PURE__ */
|
|
8095
|
-
/* @__PURE__ */
|
|
8096
|
-
/* @__PURE__ */
|
|
8621
|
+
return /* @__PURE__ */ jsxs26(Flex19, { align: "center", gap: 2, children: [
|
|
8622
|
+
/* @__PURE__ */ jsx34(Text30, { muted: true, size: 1, style: GROUP_LABEL_STYLE, weight: "semibold", children: label }),
|
|
8623
|
+
/* @__PURE__ */ jsx34("div", { style: PILL_GROUP_STYLE2, children })
|
|
8097
8624
|
] });
|
|
8098
8625
|
}
|
|
8099
8626
|
|
|
8100
8627
|
// src/components/report-detail/JudgmentList.tsx
|
|
8101
|
-
import { jsx as
|
|
8628
|
+
import { jsx as jsx35, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
8102
8629
|
function isOutputFailure(j) {
|
|
8103
8630
|
if (j.outputFailure) return true;
|
|
8104
8631
|
return j.score === 0 && j.taskId.includes("(baseline)");
|
|
@@ -8167,12 +8694,12 @@ function JudgmentList({
|
|
|
8167
8694
|
onFocusChange,
|
|
8168
8695
|
testResults
|
|
8169
8696
|
}) {
|
|
8170
|
-
const [query, setQuery] =
|
|
8171
|
-
const [selectedDimensions, setSelectedDimensions] =
|
|
8697
|
+
const [query, setQuery] = useState16("");
|
|
8698
|
+
const [selectedDimensions, setSelectedDimensions] = useState16(
|
|
8172
8699
|
() => /* @__PURE__ */ new Set()
|
|
8173
8700
|
);
|
|
8174
|
-
const [scoreBand, setScoreBand] =
|
|
8175
|
-
const [sortOrder, setSortOrder] =
|
|
8701
|
+
const [scoreBand, setScoreBand] = useState16(null);
|
|
8702
|
+
const [sortOrder, setSortOrder] = useState16("score-desc");
|
|
8176
8703
|
const testResultMap = useMemo11(() => {
|
|
8177
8704
|
const map = /* @__PURE__ */ new Map();
|
|
8178
8705
|
if (!testResults) return map;
|
|
@@ -8221,7 +8748,7 @@ function JudgmentList({
|
|
|
8221
8748
|
focusedJudgment.modelId
|
|
8222
8749
|
)
|
|
8223
8750
|
) : void 0;
|
|
8224
|
-
const handleDimensionToggle =
|
|
8751
|
+
const handleDimensionToggle = useCallback22((key) => {
|
|
8225
8752
|
setSelectedDimensions((prev) => {
|
|
8226
8753
|
const next = new Set(prev);
|
|
8227
8754
|
if (next.has(key)) next.delete(key);
|
|
@@ -8229,15 +8756,26 @@ function JudgmentList({
|
|
|
8229
8756
|
return next;
|
|
8230
8757
|
});
|
|
8231
8758
|
}, []);
|
|
8232
|
-
const handleReset =
|
|
8759
|
+
const handleReset = useCallback22(() => {
|
|
8233
8760
|
setQuery("");
|
|
8234
8761
|
setSelectedDimensions(/* @__PURE__ */ new Set());
|
|
8235
8762
|
setScoreBand(null);
|
|
8236
8763
|
}, []);
|
|
8237
|
-
const [
|
|
8764
|
+
const [promptReplay, setPromptReplay] = useState16(null);
|
|
8765
|
+
const openPromptReplay = useCallback22((j) => {
|
|
8766
|
+
const sep = j.taskId.indexOf(" - ");
|
|
8767
|
+
const rawTaskName = sep > 0 ? j.taskId.substring(sep + 3) : j.taskId;
|
|
8768
|
+
setPromptReplay({
|
|
8769
|
+
renderedPromptKey: testOutputsEntryKey(j.taskId, j.modelId),
|
|
8770
|
+
graderPromptKey: j.id ?? null,
|
|
8771
|
+
subtitle: `${rawTaskName} \xB7 ${j.modelId} \xB7 ${dimensionLabel2(j.dimension)}`
|
|
8772
|
+
});
|
|
8773
|
+
}, []);
|
|
8774
|
+
const closePromptReplay = useCallback22(() => setPromptReplay(null), []);
|
|
8775
|
+
const [collapsedAreas, setCollapsedAreas] = useState16(
|
|
8238
8776
|
() => /* @__PURE__ */ new Set()
|
|
8239
8777
|
);
|
|
8240
|
-
const toggleArea =
|
|
8778
|
+
const toggleArea = useCallback22((area) => {
|
|
8241
8779
|
setCollapsedAreas((prev) => {
|
|
8242
8780
|
const next = new Set(prev);
|
|
8243
8781
|
if (next.has(area)) next.delete(area);
|
|
@@ -8245,7 +8783,7 @@ function JudgmentList({
|
|
|
8245
8783
|
return next;
|
|
8246
8784
|
});
|
|
8247
8785
|
}, []);
|
|
8248
|
-
|
|
8786
|
+
useEffect11(() => {
|
|
8249
8787
|
if (!focusedJudgment) return;
|
|
8250
8788
|
const area = areaOf(focusedJudgment.taskId);
|
|
8251
8789
|
setCollapsedAreas((prev) => {
|
|
@@ -8255,7 +8793,7 @@ function JudgmentList({
|
|
|
8255
8793
|
return next;
|
|
8256
8794
|
});
|
|
8257
8795
|
}, [focusedJudgment]);
|
|
8258
|
-
const [activeRowSlug, setActiveRowSlug] =
|
|
8796
|
+
const [activeRowSlug, setActiveRowSlug] = useState16(null);
|
|
8259
8797
|
const flatSlugs = useMemo11(
|
|
8260
8798
|
() => grouped.flatMap(
|
|
8261
8799
|
([, areaJudgments]) => areaJudgments.map((j) => judgmentSlug(j))
|
|
@@ -8269,24 +8807,25 @@ function JudgmentList({
|
|
|
8269
8807
|
[grouped]
|
|
8270
8808
|
);
|
|
8271
8809
|
const effectiveActiveSlug = activeRowSlug && flatSlugs.includes(activeRowSlug) ? activeRowSlug : flatSlugs[0] ?? null;
|
|
8272
|
-
|
|
8810
|
+
useEffect11(() => {
|
|
8273
8811
|
if (focus) setActiveRowSlug(focus);
|
|
8274
8812
|
}, [focus]);
|
|
8275
|
-
|
|
8813
|
+
useEffect11(() => {
|
|
8276
8814
|
if (activeRowSlug && !flatSlugs.includes(activeRowSlug)) {
|
|
8277
8815
|
setActiveRowSlug(null);
|
|
8278
8816
|
}
|
|
8279
8817
|
}, [flatSlugs, activeRowSlug]);
|
|
8280
8818
|
const { close: closeDrawer, open: openDrawer } = useJudgmentDrawer();
|
|
8281
8819
|
const { runId: artifactRunId, manifest: artifactManifest } = useReportArtifactContext();
|
|
8282
|
-
|
|
8820
|
+
useEffect11(() => {
|
|
8283
8821
|
if (focus && focusedJudgment) {
|
|
8284
8822
|
openDrawer({
|
|
8285
8823
|
artifactCache,
|
|
8286
8824
|
judgment: focusedJudgment,
|
|
8287
8825
|
testResult: focusedTestResult,
|
|
8288
8826
|
runId: artifactRunId,
|
|
8289
|
-
manifest: artifactManifest
|
|
8827
|
+
manifest: artifactManifest,
|
|
8828
|
+
onShowPrompts: openPromptReplay
|
|
8290
8829
|
});
|
|
8291
8830
|
} else if (!focus) {
|
|
8292
8831
|
closeDrawer();
|
|
@@ -8299,10 +8838,11 @@ function JudgmentList({
|
|
|
8299
8838
|
openDrawer,
|
|
8300
8839
|
closeDrawer,
|
|
8301
8840
|
artifactRunId,
|
|
8302
|
-
artifactManifest
|
|
8841
|
+
artifactManifest,
|
|
8842
|
+
openPromptReplay
|
|
8303
8843
|
]);
|
|
8304
|
-
const prevFocusRef =
|
|
8305
|
-
|
|
8844
|
+
const prevFocusRef = useRef7(focus);
|
|
8845
|
+
useEffect11(() => {
|
|
8306
8846
|
const prev = prevFocusRef.current;
|
|
8307
8847
|
prevFocusRef.current = focus;
|
|
8308
8848
|
if (prev && !focus) {
|
|
@@ -8312,7 +8852,7 @@ function JudgmentList({
|
|
|
8312
8852
|
});
|
|
8313
8853
|
}
|
|
8314
8854
|
}, [focus, activeRowSlug]);
|
|
8315
|
-
const handleListKeyDown =
|
|
8855
|
+
const handleListKeyDown = useCallback22(
|
|
8316
8856
|
(e) => {
|
|
8317
8857
|
const key = e.key;
|
|
8318
8858
|
const isNav = key === "ArrowDown" || key === "ArrowUp" || key === "Home" || key === "End" || key === "j" || key === "k";
|
|
@@ -8347,20 +8887,20 @@ function JudgmentList({
|
|
|
8347
8887
|
if (judgments.length === 0) return null;
|
|
8348
8888
|
if (pruned.length === 0) return null;
|
|
8349
8889
|
const outputFailureCount = judgments.length - pruned.length;
|
|
8350
|
-
return /* @__PURE__ */
|
|
8351
|
-
/* @__PURE__ */
|
|
8352
|
-
/* @__PURE__ */
|
|
8353
|
-
/* @__PURE__ */
|
|
8354
|
-
/* @__PURE__ */
|
|
8355
|
-
|
|
8890
|
+
return /* @__PURE__ */ jsxs27(Stack23, { space: 3, children: [
|
|
8891
|
+
/* @__PURE__ */ jsxs27(Flex20, { align: "center", gap: 2, children: [
|
|
8892
|
+
/* @__PURE__ */ jsx35(ErrorOutlineIcon2, { style: { color: "#fbbf24" } }),
|
|
8893
|
+
/* @__PURE__ */ jsx35(Text31, { size: 2, weight: "medium", children: "Low-Scoring Judgments" }),
|
|
8894
|
+
/* @__PURE__ */ jsx35(
|
|
8895
|
+
Tooltip9,
|
|
8356
8896
|
{
|
|
8357
|
-
content: /* @__PURE__ */
|
|
8897
|
+
content: /* @__PURE__ */ jsx35(Box21, { padding: 2, style: { maxWidth: 260 }, children: /* @__PURE__ */ jsx35(Text31, { size: 2, children: GLOSSARY.lowScoringJudgments }) }),
|
|
8358
8898
|
placement: "bottom",
|
|
8359
8899
|
portal: true,
|
|
8360
|
-
children: /* @__PURE__ */
|
|
8900
|
+
children: /* @__PURE__ */ jsx35(Text31, { muted: true, size: 1, children: /* @__PURE__ */ jsx35(HelpCircleIcon7, {}) })
|
|
8361
8901
|
}
|
|
8362
8902
|
),
|
|
8363
|
-
/* @__PURE__ */
|
|
8903
|
+
/* @__PURE__ */ jsxs27(
|
|
8364
8904
|
"span",
|
|
8365
8905
|
{
|
|
8366
8906
|
style: {
|
|
@@ -8379,10 +8919,10 @@ function JudgmentList({
|
|
|
8379
8919
|
]
|
|
8380
8920
|
}
|
|
8381
8921
|
),
|
|
8382
|
-
outputFailureCount > 0 && /* @__PURE__ */
|
|
8383
|
-
|
|
8922
|
+
outputFailureCount > 0 && /* @__PURE__ */ jsx35(
|
|
8923
|
+
Tooltip9,
|
|
8384
8924
|
{
|
|
8385
|
-
content: /* @__PURE__ */
|
|
8925
|
+
content: /* @__PURE__ */ jsx35(Box21, { padding: 2, style: { maxWidth: 280 }, children: /* @__PURE__ */ jsxs27(Text31, { size: 2, children: [
|
|
8386
8926
|
outputFailureCount,
|
|
8387
8927
|
" judgment",
|
|
8388
8928
|
outputFailureCount === 1 ? "" : "s",
|
|
@@ -8390,7 +8930,7 @@ function JudgmentList({
|
|
|
8390
8930
|
] }) }),
|
|
8391
8931
|
placement: "bottom",
|
|
8392
8932
|
portal: true,
|
|
8393
|
-
children: /* @__PURE__ */
|
|
8933
|
+
children: /* @__PURE__ */ jsxs27(
|
|
8394
8934
|
"span",
|
|
8395
8935
|
{
|
|
8396
8936
|
style: {
|
|
@@ -8412,7 +8952,7 @@ function JudgmentList({
|
|
|
8412
8952
|
}
|
|
8413
8953
|
)
|
|
8414
8954
|
] }),
|
|
8415
|
-
/* @__PURE__ */
|
|
8955
|
+
/* @__PURE__ */ jsx35(
|
|
8416
8956
|
JudgmentListToolbar,
|
|
8417
8957
|
{
|
|
8418
8958
|
dimensions: dimensionOptions,
|
|
@@ -8429,11 +8969,21 @@ function JudgmentList({
|
|
|
8429
8969
|
totalCount: pruned.length
|
|
8430
8970
|
}
|
|
8431
8971
|
),
|
|
8432
|
-
|
|
8433
|
-
|
|
8434
|
-
|
|
8435
|
-
|
|
8436
|
-
|
|
8972
|
+
/* @__PURE__ */ jsx35(
|
|
8973
|
+
PromptReplayDrawer,
|
|
8974
|
+
{
|
|
8975
|
+
graderPromptKey: promptReplay?.graderPromptKey ?? null,
|
|
8976
|
+
onClose: closePromptReplay,
|
|
8977
|
+
open: promptReplay !== null,
|
|
8978
|
+
renderedPromptKey: promptReplay?.renderedPromptKey ?? null,
|
|
8979
|
+
subtitle: promptReplay?.subtitle ?? ""
|
|
8980
|
+
}
|
|
8981
|
+
),
|
|
8982
|
+
filtered.length === 0 ? /* @__PURE__ */ jsx35(Box21, { padding: 4, style: neutralCardStyle, children: /* @__PURE__ */ jsxs27(Stack23, { space: 2, children: [
|
|
8983
|
+
/* @__PURE__ */ jsx35(Text31, { muted: true, size: 2, children: "No judgments match these filters." }),
|
|
8984
|
+
/* @__PURE__ */ jsx35(Text31, { muted: true, size: 1, children: "Try clearing a filter or widening the score band." })
|
|
8985
|
+
] }) }) : /* @__PURE__ */ jsxs27(Stack23, { space: 2, children: [
|
|
8986
|
+
/* @__PURE__ */ jsx35(
|
|
8437
8987
|
AreaJumpRail,
|
|
8438
8988
|
{
|
|
8439
8989
|
areas: groupedWithStats.map(([area, list]) => ({
|
|
@@ -8442,20 +8992,20 @@ function JudgmentList({
|
|
|
8442
8992
|
}))
|
|
8443
8993
|
}
|
|
8444
8994
|
),
|
|
8445
|
-
/* @__PURE__ */
|
|
8995
|
+
/* @__PURE__ */ jsx35(Box21, { onKeyDown: handleListKeyDown, style: neutralCardStyle, children: groupedWithStats.map(
|
|
8446
8996
|
([area, areaJudgments, stats], groupIndex) => {
|
|
8447
8997
|
const anchorId = areaAnchorId(area);
|
|
8448
8998
|
const collapsed = collapsedAreas.has(area);
|
|
8449
8999
|
const groupBodyId = `${anchorId}-body`;
|
|
8450
|
-
return /* @__PURE__ */
|
|
8451
|
-
|
|
9000
|
+
return /* @__PURE__ */ jsx35(
|
|
9001
|
+
Box21,
|
|
8452
9002
|
{
|
|
8453
9003
|
id: anchorId,
|
|
8454
9004
|
padding: 3,
|
|
8455
9005
|
style: groupIndex > 0 ? dividerStyle : void 0,
|
|
8456
|
-
children: /* @__PURE__ */
|
|
8457
|
-
/* @__PURE__ */
|
|
8458
|
-
/* @__PURE__ */
|
|
9006
|
+
children: /* @__PURE__ */ jsxs27(Stack23, { space: 2, children: [
|
|
9007
|
+
/* @__PURE__ */ jsxs27(Flex20, { align: "center", gap: 3, wrap: "wrap", children: [
|
|
9008
|
+
/* @__PURE__ */ jsxs27(
|
|
8459
9009
|
"button",
|
|
8460
9010
|
{
|
|
8461
9011
|
"aria-controls": groupBodyId,
|
|
@@ -8469,7 +9019,7 @@ function JudgmentList({
|
|
|
8469
9019
|
},
|
|
8470
9020
|
type: "button",
|
|
8471
9021
|
children: [
|
|
8472
|
-
/* @__PURE__ */
|
|
9022
|
+
/* @__PURE__ */ jsx35(
|
|
8473
9023
|
"span",
|
|
8474
9024
|
{
|
|
8475
9025
|
"aria-hidden": true,
|
|
@@ -8479,13 +9029,13 @@ function JudgmentList({
|
|
|
8479
9029
|
display: "inline-flex",
|
|
8480
9030
|
fontSize: 14
|
|
8481
9031
|
},
|
|
8482
|
-
children: collapsed ? /* @__PURE__ */
|
|
9032
|
+
children: collapsed ? /* @__PURE__ */ jsx35(ChevronRightIcon, {}) : /* @__PURE__ */ jsx35(ChevronDownIcon, {})
|
|
8483
9033
|
}
|
|
8484
9034
|
),
|
|
8485
|
-
/* @__PURE__ */
|
|
9035
|
+
/* @__PURE__ */ jsxs27(Text31, { size: 2, weight: "semibold", children: [
|
|
8486
9036
|
area,
|
|
8487
9037
|
" ",
|
|
8488
|
-
/* @__PURE__ */
|
|
9038
|
+
/* @__PURE__ */ jsxs27(
|
|
8489
9039
|
"span",
|
|
8490
9040
|
{
|
|
8491
9041
|
style: {
|
|
@@ -8503,10 +9053,10 @@ function JudgmentList({
|
|
|
8503
9053
|
]
|
|
8504
9054
|
}
|
|
8505
9055
|
),
|
|
8506
|
-
/* @__PURE__ */
|
|
8507
|
-
|
|
9056
|
+
/* @__PURE__ */ jsx35(
|
|
9057
|
+
Tooltip9,
|
|
8508
9058
|
{
|
|
8509
|
-
content: /* @__PURE__ */
|
|
9059
|
+
content: /* @__PURE__ */ jsx35(Box21, { padding: 2, children: /* @__PURE__ */ jsxs27(Text31, { size: 1, children: [
|
|
8510
9060
|
"Average score across the ",
|
|
8511
9061
|
areaJudgments.length,
|
|
8512
9062
|
" ",
|
|
@@ -8516,7 +9066,7 @@ function JudgmentList({
|
|
|
8516
9066
|
] }) }),
|
|
8517
9067
|
placement: "bottom",
|
|
8518
9068
|
portal: true,
|
|
8519
|
-
children: /* @__PURE__ */
|
|
9069
|
+
children: /* @__PURE__ */ jsxs27(
|
|
8520
9070
|
"span",
|
|
8521
9071
|
{
|
|
8522
9072
|
style: {
|
|
@@ -8536,12 +9086,12 @@ function JudgmentList({
|
|
|
8536
9086
|
)
|
|
8537
9087
|
}
|
|
8538
9088
|
),
|
|
8539
|
-
/* @__PURE__ */
|
|
8540
|
-
stats.breakdown.length > 0 && /* @__PURE__ */
|
|
9089
|
+
/* @__PURE__ */ jsx35(DistributionBar, { bands: stats.bands }),
|
|
9090
|
+
stats.breakdown.length > 0 && /* @__PURE__ */ jsx35(Text31, { muted: true, size: 1, children: stats.breakdown.map((d) => `${d.label} ${d.count}`).join(" \xB7 ") })
|
|
8541
9091
|
] }),
|
|
8542
|
-
!collapsed && /* @__PURE__ */
|
|
9092
|
+
!collapsed && /* @__PURE__ */ jsx35(Stack23, { id: groupBodyId, space: 1, children: areaJudgments.map((j) => {
|
|
8543
9093
|
const slug = judgmentSlug(j);
|
|
8544
|
-
return /* @__PURE__ */
|
|
9094
|
+
return /* @__PURE__ */ jsx35(
|
|
8545
9095
|
JudgmentCard,
|
|
8546
9096
|
{
|
|
8547
9097
|
allKeys: flatKeys,
|
|
@@ -8571,7 +9121,7 @@ function JudgmentCard({
|
|
|
8571
9121
|
slug,
|
|
8572
9122
|
tabbable
|
|
8573
9123
|
}) {
|
|
8574
|
-
const cardRef =
|
|
9124
|
+
const cardRef = useRef7(null);
|
|
8575
9125
|
const judgmentId = judgment.id ?? "";
|
|
8576
9126
|
const row = useGraderJudgmentArtifact(judgmentId, allKeys);
|
|
8577
9127
|
const testOutputsPrefetch = useArtifactPrefetch("testOutputs");
|
|
@@ -8581,7 +9131,7 @@ function JudgmentCard({
|
|
|
8581
9131
|
const sep = judgment.taskId.indexOf(" - ");
|
|
8582
9132
|
const rawTaskName = sep > 0 ? judgment.taskId.substring(sep + 3) : judgment.taskId;
|
|
8583
9133
|
const { name: taskName, variant } = splitVariant(rawTaskName);
|
|
8584
|
-
|
|
9134
|
+
useEffect11(() => {
|
|
8585
9135
|
if (focused) {
|
|
8586
9136
|
const timer = setTimeout(() => {
|
|
8587
9137
|
cardRef.current?.scrollIntoView({ behavior: "smooth", block: "center" });
|
|
@@ -8589,10 +9139,10 @@ function JudgmentCard({
|
|
|
8589
9139
|
return () => clearTimeout(timer);
|
|
8590
9140
|
}
|
|
8591
9141
|
}, []);
|
|
8592
|
-
const handleClick =
|
|
9142
|
+
const handleClick = useCallback22(() => {
|
|
8593
9143
|
onFocusChange?.(focused ? null : slug);
|
|
8594
9144
|
}, [focused, slug, onFocusChange]);
|
|
8595
|
-
const handleKeyDown =
|
|
9145
|
+
const handleKeyDown = useCallback22(
|
|
8596
9146
|
(e) => {
|
|
8597
9147
|
if (e.key === "Enter" || e.key === " ") {
|
|
8598
9148
|
e.preventDefault();
|
|
@@ -8605,16 +9155,16 @@ function JudgmentCard({
|
|
|
8605
9155
|
() => testOutputsKey ? testOutputsPrefetch.onHover(testOutputsKey) : null,
|
|
8606
9156
|
[testOutputsPrefetch, testOutputsKey]
|
|
8607
9157
|
);
|
|
8608
|
-
const handleMouseEnter =
|
|
9158
|
+
const handleMouseEnter = useCallback22(() => {
|
|
8609
9159
|
row.handlers.onMouseEnter();
|
|
8610
9160
|
onHoverTestOutputs?.();
|
|
8611
9161
|
}, [row.handlers, onHoverTestOutputs]);
|
|
8612
|
-
const handleFocusPrefetch =
|
|
9162
|
+
const handleFocusPrefetch = useCallback22(() => {
|
|
8613
9163
|
row.handlers.onFocus();
|
|
8614
9164
|
onHoverTestOutputs?.();
|
|
8615
9165
|
}, [row.handlers, onHoverTestOutputs]);
|
|
8616
|
-
return /* @__PURE__ */
|
|
8617
|
-
|
|
9166
|
+
return /* @__PURE__ */ jsx35(
|
|
9167
|
+
Box21,
|
|
8618
9168
|
{
|
|
8619
9169
|
"aria-expanded": focused,
|
|
8620
9170
|
"aria-label": `${score} ${dimLabel}: ${taskName}`,
|
|
@@ -8637,8 +9187,8 @@ function JudgmentCard({
|
|
|
8637
9187
|
} : {}
|
|
8638
9188
|
},
|
|
8639
9189
|
tabIndex: tabbable ? 0 : -1,
|
|
8640
|
-
children: /* @__PURE__ */
|
|
8641
|
-
/* @__PURE__ */
|
|
9190
|
+
children: /* @__PURE__ */ jsxs27(Flex20, { align: "center", gap: 2, wrap: "wrap", children: [
|
|
9191
|
+
/* @__PURE__ */ jsx35(
|
|
8642
9192
|
"span",
|
|
8643
9193
|
{
|
|
8644
9194
|
style: {
|
|
@@ -8653,7 +9203,7 @@ function JudgmentCard({
|
|
|
8653
9203
|
children: score
|
|
8654
9204
|
}
|
|
8655
9205
|
),
|
|
8656
|
-
/* @__PURE__ */
|
|
9206
|
+
/* @__PURE__ */ jsx35(
|
|
8657
9207
|
"span",
|
|
8658
9208
|
{
|
|
8659
9209
|
style: {
|
|
@@ -8666,15 +9216,15 @@ function JudgmentCard({
|
|
|
8666
9216
|
children: dimLabel
|
|
8667
9217
|
}
|
|
8668
9218
|
),
|
|
8669
|
-
/* @__PURE__ */
|
|
8670
|
-
/* @__PURE__ */
|
|
8671
|
-
/* @__PURE__ */
|
|
8672
|
-
|
|
9219
|
+
/* @__PURE__ */ jsx35(Text31, { size: 1, weight: "medium", children: taskName }),
|
|
9220
|
+
/* @__PURE__ */ jsx35(VariantBadge, { variant }),
|
|
9221
|
+
/* @__PURE__ */ jsx35(
|
|
9222
|
+
Tooltip9,
|
|
8673
9223
|
{
|
|
8674
|
-
content: /* @__PURE__ */
|
|
9224
|
+
content: /* @__PURE__ */ jsx35(Box21, { padding: 2, children: /* @__PURE__ */ jsx35(Text31, { size: 1, children: judgment.modelId }) }),
|
|
8675
9225
|
placement: "bottom",
|
|
8676
9226
|
portal: true,
|
|
8677
|
-
children: /* @__PURE__ */
|
|
9227
|
+
children: /* @__PURE__ */ jsx35(
|
|
8678
9228
|
"span",
|
|
8679
9229
|
{
|
|
8680
9230
|
style: {
|
|
@@ -8686,12 +9236,12 @@ function JudgmentCard({
|
|
|
8686
9236
|
fontSize: 11,
|
|
8687
9237
|
padding: "1px 6px"
|
|
8688
9238
|
},
|
|
8689
|
-
children:
|
|
9239
|
+
children: shortModelId2(judgment.modelId)
|
|
8690
9240
|
}
|
|
8691
9241
|
)
|
|
8692
9242
|
}
|
|
8693
9243
|
),
|
|
8694
|
-
/* @__PURE__ */
|
|
9244
|
+
/* @__PURE__ */ jsx35(Flex20, { align: "center", gap: 1, style: { marginLeft: "auto" }, children: /* @__PURE__ */ jsx35(Text31, { muted: true, size: 1, children: /* @__PURE__ */ jsx35(ChevronRightIcon, {}) }) })
|
|
8695
9245
|
] })
|
|
8696
9246
|
}
|
|
8697
9247
|
);
|
|
@@ -8721,13 +9271,13 @@ function DistributionBar({ bands }) {
|
|
|
8721
9271
|
label: `${bands.borderline} borderline (50\u201369)`
|
|
8722
9272
|
});
|
|
8723
9273
|
}
|
|
8724
|
-
return /* @__PURE__ */
|
|
8725
|
-
|
|
9274
|
+
return /* @__PURE__ */ jsx35(
|
|
9275
|
+
Tooltip9,
|
|
8726
9276
|
{
|
|
8727
|
-
content: /* @__PURE__ */
|
|
9277
|
+
content: /* @__PURE__ */ jsx35(Box21, { padding: 2, children: /* @__PURE__ */ jsx35(Stack23, { space: 1, children: parts.map((p) => /* @__PURE__ */ jsx35(Text31, { size: 1, children: p.label }, p.label)) }) }),
|
|
8728
9278
|
placement: "bottom",
|
|
8729
9279
|
portal: true,
|
|
8730
|
-
children: /* @__PURE__ */
|
|
9280
|
+
children: /* @__PURE__ */ jsx35(
|
|
8731
9281
|
"div",
|
|
8732
9282
|
{
|
|
8733
9283
|
"aria-label": parts.map((p) => p.label).join(", "),
|
|
@@ -8741,7 +9291,7 @@ function DistributionBar({ bands }) {
|
|
|
8741
9291
|
overflow: "hidden",
|
|
8742
9292
|
width: 72
|
|
8743
9293
|
},
|
|
8744
|
-
children: parts.map((p) => /* @__PURE__ */
|
|
9294
|
+
children: parts.map((p) => /* @__PURE__ */ jsx35(
|
|
8745
9295
|
"div",
|
|
8746
9296
|
{
|
|
8747
9297
|
style: {
|
|
@@ -8757,14 +9307,14 @@ function DistributionBar({ bands }) {
|
|
|
8757
9307
|
);
|
|
8758
9308
|
}
|
|
8759
9309
|
function AreaJumpRail({ areas }) {
|
|
8760
|
-
const handleJump =
|
|
9310
|
+
const handleJump = useCallback22((area) => {
|
|
8761
9311
|
const el = document.getElementById(areaAnchorId(area));
|
|
8762
9312
|
el?.scrollIntoView({ behavior: "smooth", block: "start" });
|
|
8763
9313
|
}, []);
|
|
8764
9314
|
if (areas.length <= 1) return null;
|
|
8765
|
-
return /* @__PURE__ */
|
|
8766
|
-
/* @__PURE__ */
|
|
8767
|
-
|
|
9315
|
+
return /* @__PURE__ */ jsxs27(Flex20, { align: "center", gap: 2, style: { padding: "2px 0" }, wrap: "wrap", children: [
|
|
9316
|
+
/* @__PURE__ */ jsx35(
|
|
9317
|
+
Text31,
|
|
8768
9318
|
{
|
|
8769
9319
|
muted: true,
|
|
8770
9320
|
size: 1,
|
|
@@ -8777,8 +9327,8 @@ function AreaJumpRail({ areas }) {
|
|
|
8777
9327
|
children: "Jump to"
|
|
8778
9328
|
}
|
|
8779
9329
|
),
|
|
8780
|
-
areas.map(({ area, count }, i) => /* @__PURE__ */
|
|
8781
|
-
i > 0 && /* @__PURE__ */
|
|
9330
|
+
areas.map(({ area, count }, i) => /* @__PURE__ */ jsxs27(React2.Fragment, { children: [
|
|
9331
|
+
i > 0 && /* @__PURE__ */ jsx35(
|
|
8782
9332
|
"span",
|
|
8783
9333
|
{
|
|
8784
9334
|
"aria-hidden": true,
|
|
@@ -8789,7 +9339,7 @@ function AreaJumpRail({ areas }) {
|
|
|
8789
9339
|
children: "\xB7"
|
|
8790
9340
|
}
|
|
8791
9341
|
),
|
|
8792
|
-
/* @__PURE__ */
|
|
9342
|
+
/* @__PURE__ */ jsxs27(
|
|
8793
9343
|
"button",
|
|
8794
9344
|
{
|
|
8795
9345
|
"aria-label": `Jump to ${area}, ${count} judgment${count === 1 ? "" : "s"}`,
|
|
@@ -8817,8 +9367,8 @@ function AreaJumpRail({ areas }) {
|
|
|
8817
9367
|
},
|
|
8818
9368
|
type: "button",
|
|
8819
9369
|
children: [
|
|
8820
|
-
/* @__PURE__ */
|
|
8821
|
-
/* @__PURE__ */
|
|
9370
|
+
/* @__PURE__ */ jsx35("span", { "aria-hidden": true, children: area }),
|
|
9371
|
+
/* @__PURE__ */ jsx35(
|
|
8822
9372
|
"span",
|
|
8823
9373
|
{
|
|
8824
9374
|
"aria-hidden": true,
|
|
@@ -8838,30 +9388,30 @@ function AreaJumpRail({ areas }) {
|
|
|
8838
9388
|
}
|
|
8839
9389
|
|
|
8840
9390
|
// src/components/report-detail/ProvenanceCard.tsx
|
|
8841
|
-
import { Card as
|
|
8842
|
-
import { jsx as
|
|
9391
|
+
import { Card as Card15, Flex as Flex21, Grid as Grid4, Stack as Stack24, Text as Text32 } from "@sanity/ui";
|
|
9392
|
+
import { jsx as jsx36, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
8843
9393
|
function ProvenanceCard({ provenance }) {
|
|
8844
|
-
return /* @__PURE__ */
|
|
8845
|
-
/* @__PURE__ */
|
|
8846
|
-
/* @__PURE__ */
|
|
8847
|
-
/* @__PURE__ */
|
|
8848
|
-
/* @__PURE__ */
|
|
8849
|
-
/* @__PURE__ */
|
|
9394
|
+
return /* @__PURE__ */ jsx36(Card15, { padding: 4, radius: 2, shadow: 1, children: /* @__PURE__ */ jsxs28(Stack24, { space: 4, children: [
|
|
9395
|
+
/* @__PURE__ */ jsx36(Text32, { size: 3, weight: "semibold", children: "Provenance" }),
|
|
9396
|
+
/* @__PURE__ */ jsxs28(Grid4, { columns: [1, 2, 3], gap: 4, children: [
|
|
9397
|
+
/* @__PURE__ */ jsx36(Field, { label: "Mode", value: provenance.mode }),
|
|
9398
|
+
/* @__PURE__ */ jsx36(Field, { label: "Source", value: provenance.source.name }),
|
|
9399
|
+
/* @__PURE__ */ jsx36(
|
|
8850
9400
|
Field,
|
|
8851
9401
|
{
|
|
8852
9402
|
label: "Trigger",
|
|
8853
9403
|
value: provenance.trigger.type + (provenance.trigger.workflow ? ` (${provenance.trigger.workflow})` : "")
|
|
8854
9404
|
}
|
|
8855
9405
|
),
|
|
8856
|
-
/* @__PURE__ */
|
|
9406
|
+
/* @__PURE__ */ jsx36(
|
|
8857
9407
|
Field,
|
|
8858
9408
|
{
|
|
8859
9409
|
label: "Models",
|
|
8860
9410
|
value: provenance.models.map((m) => m.label).join(", ")
|
|
8861
9411
|
}
|
|
8862
9412
|
),
|
|
8863
|
-
/* @__PURE__ */
|
|
8864
|
-
provenance.contextHash && /* @__PURE__ */
|
|
9413
|
+
/* @__PURE__ */ jsx36(Field, { label: "Grader Model", mono: true, value: provenance.graderModel }),
|
|
9414
|
+
provenance.contextHash && /* @__PURE__ */ jsx36(
|
|
8865
9415
|
Field,
|
|
8866
9416
|
{
|
|
8867
9417
|
label: "Context Hash",
|
|
@@ -8870,8 +9420,8 @@ function ProvenanceCard({ provenance }) {
|
|
|
8870
9420
|
}
|
|
8871
9421
|
)
|
|
8872
9422
|
] }),
|
|
8873
|
-
provenance.git && /* @__PURE__ */
|
|
8874
|
-
/* @__PURE__ */
|
|
9423
|
+
provenance.git && /* @__PURE__ */ jsx36(GitInfo, { git: provenance.git }),
|
|
9424
|
+
/* @__PURE__ */ jsx36(PromptfooLinks, { provenance })
|
|
8875
9425
|
] }) });
|
|
8876
9426
|
}
|
|
8877
9427
|
function Field({
|
|
@@ -8879,9 +9429,9 @@ function Field({
|
|
|
8879
9429
|
mono,
|
|
8880
9430
|
value
|
|
8881
9431
|
}) {
|
|
8882
|
-
return /* @__PURE__ */
|
|
8883
|
-
/* @__PURE__ */
|
|
8884
|
-
|
|
9432
|
+
return /* @__PURE__ */ jsxs28(Stack24, { space: 1, children: [
|
|
9433
|
+
/* @__PURE__ */ jsx36(
|
|
9434
|
+
Text32,
|
|
8885
9435
|
{
|
|
8886
9436
|
muted: true,
|
|
8887
9437
|
size: 1,
|
|
@@ -8890,7 +9440,7 @@ function Field({
|
|
|
8890
9440
|
children: label
|
|
8891
9441
|
}
|
|
8892
9442
|
),
|
|
8893
|
-
/* @__PURE__ */
|
|
9443
|
+
/* @__PURE__ */ jsx36(Text32, { size: 2, style: mono ? { fontFamily: "monospace" } : void 0, children: value })
|
|
8894
9444
|
] });
|
|
8895
9445
|
}
|
|
8896
9446
|
function GitInfo({ git }) {
|
|
@@ -8898,15 +9448,15 @@ function GitInfo({ git }) {
|
|
|
8898
9448
|
const branchUrl = `${repoUrl}/tree/${git.branch}`;
|
|
8899
9449
|
const commitUrl = `${repoUrl}/commit/${git.sha}`;
|
|
8900
9450
|
const prUrl = git.prNumber ? `${repoUrl}/pull/${git.prNumber}` : null;
|
|
8901
|
-
return /* @__PURE__ */
|
|
8902
|
-
/* @__PURE__ */
|
|
8903
|
-
/* @__PURE__ */
|
|
8904
|
-
/* @__PURE__ */
|
|
9451
|
+
return /* @__PURE__ */ jsx36(Card15, { border: true, padding: 3, radius: 2, tone: "transparent", children: /* @__PURE__ */ jsxs28(Flex21, { align: "center", gap: 3, wrap: "wrap", children: [
|
|
9452
|
+
/* @__PURE__ */ jsx36(Text32, { muted: true, size: 2, weight: "semibold", children: "Git" }),
|
|
9453
|
+
/* @__PURE__ */ jsxs28(Text32, { size: 2, children: [
|
|
9454
|
+
/* @__PURE__ */ jsx36("a", { href: repoUrl, rel: "noopener noreferrer", target: "_blank", children: git.repo }),
|
|
8905
9455
|
" / ",
|
|
8906
|
-
/* @__PURE__ */
|
|
9456
|
+
/* @__PURE__ */ jsx36("a", { href: branchUrl, rel: "noopener noreferrer", target: "_blank", children: git.branch })
|
|
8907
9457
|
] }),
|
|
8908
|
-
/* @__PURE__ */
|
|
8909
|
-
prUrl && /* @__PURE__ */
|
|
9458
|
+
/* @__PURE__ */ jsx36(Text32, { muted: true, size: 2, style: { fontFamily: "monospace" }, children: /* @__PURE__ */ jsx36("a", { href: commitUrl, rel: "noopener noreferrer", target: "_blank", children: git.sha.slice(0, 12) }) }),
|
|
9459
|
+
prUrl && /* @__PURE__ */ jsx36(Text32, { size: 2, children: /* @__PURE__ */ jsxs28("a", { href: prUrl, rel: "noopener noreferrer", target: "_blank", children: [
|
|
8910
9460
|
"PR #",
|
|
8911
9461
|
git.prNumber,
|
|
8912
9462
|
" \u2192"
|
|
@@ -8917,14 +9467,14 @@ function PromptfooLinks({
|
|
|
8917
9467
|
provenance
|
|
8918
9468
|
}) {
|
|
8919
9469
|
if (provenance.promptfooUrls && provenance.promptfooUrls.length > 0) {
|
|
8920
|
-
return /* @__PURE__ */
|
|
9470
|
+
return /* @__PURE__ */ jsx36(Flex21, { align: "center", gap: 3, wrap: "wrap", children: provenance.promptfooUrls.map((entry) => /* @__PURE__ */ jsx36(Text32, { size: 2, children: /* @__PURE__ */ jsxs28("a", { href: entry.url, rel: "noopener noreferrer", target: "_blank", children: [
|
|
8921
9471
|
"View in Promptfoo (",
|
|
8922
9472
|
entry.mode,
|
|
8923
9473
|
") \u2192"
|
|
8924
9474
|
] }) }, entry.mode)) });
|
|
8925
9475
|
}
|
|
8926
9476
|
if (provenance.promptfooUrl) {
|
|
8927
|
-
return /* @__PURE__ */
|
|
9477
|
+
return /* @__PURE__ */ jsx36(Text32, { size: 2, children: /* @__PURE__ */ jsx36(
|
|
8928
9478
|
"a",
|
|
8929
9479
|
{
|
|
8930
9480
|
href: provenance.promptfooUrl,
|
|
@@ -8934,40 +9484,40 @@ function PromptfooLinks({
|
|
|
8934
9484
|
}
|
|
8935
9485
|
) });
|
|
8936
9486
|
}
|
|
8937
|
-
return /* @__PURE__ */
|
|
9487
|
+
return /* @__PURE__ */ jsx36(PromptfooUnavailable, { reason: "not-shared" });
|
|
8938
9488
|
}
|
|
8939
9489
|
var UNAVAILABLE_TOOLTIPS = {
|
|
8940
9490
|
"not-shared": "No Promptfoo share link was generated for this report. This usually means the evaluation was run locally without the --share flag."
|
|
8941
9491
|
};
|
|
8942
9492
|
function PromptfooUnavailable({ reason }) {
|
|
8943
|
-
return /* @__PURE__ */
|
|
8944
|
-
/* @__PURE__ */
|
|
8945
|
-
/* @__PURE__ */
|
|
9493
|
+
return /* @__PURE__ */ jsxs28(Flex21, { align: "center", gap: 2, children: [
|
|
9494
|
+
/* @__PURE__ */ jsx36(Text32, { muted: true, size: 2, children: "Promptfoo report not available" }),
|
|
9495
|
+
/* @__PURE__ */ jsx36(InfoTip, { text: UNAVAILABLE_TOOLTIPS[reason] ?? "" })
|
|
8946
9496
|
] });
|
|
8947
9497
|
}
|
|
8948
9498
|
|
|
8949
9499
|
// src/components/report-detail/report-actions/ActionButton.tsx
|
|
8950
|
-
import { Button as
|
|
8951
|
-
import { jsx as
|
|
9500
|
+
import { Button as Button4, useToast as useToast2 } from "@sanity/ui";
|
|
9501
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
8952
9502
|
|
|
8953
9503
|
// src/components/report-detail/report-actions/JudgmentActions.tsx
|
|
8954
|
-
import { LinkIcon as LinkIcon3 } from "@sanity/icons";
|
|
8955
|
-
import { MenuItem, useToast as useToast3 } from "@sanity/ui";
|
|
8956
|
-
import { useCallback as
|
|
9504
|
+
import { DocumentTextIcon, LinkIcon as LinkIcon3 } from "@sanity/icons";
|
|
9505
|
+
import { MenuDivider, MenuItem, useToast as useToast3 } from "@sanity/ui";
|
|
9506
|
+
import { useCallback as useCallback23 } from "react";
|
|
8957
9507
|
|
|
8958
9508
|
// src/components/report-detail/report-actions/SplitActionButton.tsx
|
|
8959
9509
|
import { ChevronDownIcon as ChevronDownIcon2 } from "@sanity/icons";
|
|
8960
|
-
import { Button as
|
|
8961
|
-
import { jsx as
|
|
9510
|
+
import { Button as Button5, Flex as Flex22, Menu, MenuButton } from "@sanity/ui";
|
|
9511
|
+
import { jsx as jsx38, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
8962
9512
|
function SplitActionButton({
|
|
8963
9513
|
menu,
|
|
8964
9514
|
menuId,
|
|
8965
9515
|
placement = "bottom-end",
|
|
8966
9516
|
primary
|
|
8967
9517
|
}) {
|
|
8968
|
-
return /* @__PURE__ */
|
|
8969
|
-
/* @__PURE__ */
|
|
8970
|
-
|
|
9518
|
+
return /* @__PURE__ */ jsxs29(Flex22, { children: [
|
|
9519
|
+
/* @__PURE__ */ jsx38(
|
|
9520
|
+
Button5,
|
|
8971
9521
|
{
|
|
8972
9522
|
fontSize: primary.fontSize,
|
|
8973
9523
|
icon: primary.icon,
|
|
@@ -8983,11 +9533,11 @@ function SplitActionButton({
|
|
|
8983
9533
|
text: primary.text
|
|
8984
9534
|
}
|
|
8985
9535
|
),
|
|
8986
|
-
/* @__PURE__ */
|
|
9536
|
+
/* @__PURE__ */ jsx38(
|
|
8987
9537
|
MenuButton,
|
|
8988
9538
|
{
|
|
8989
|
-
button: /* @__PURE__ */
|
|
8990
|
-
|
|
9539
|
+
button: /* @__PURE__ */ jsx38(
|
|
9540
|
+
Button5,
|
|
8991
9541
|
{
|
|
8992
9542
|
icon: ChevronDownIcon2,
|
|
8993
9543
|
mode: "ghost",
|
|
@@ -9000,7 +9550,7 @@ function SplitActionButton({
|
|
|
9000
9550
|
}
|
|
9001
9551
|
),
|
|
9002
9552
|
id: menuId,
|
|
9003
|
-
menu: /* @__PURE__ */
|
|
9553
|
+
menu: /* @__PURE__ */ jsx38(Menu, { children: menu }),
|
|
9004
9554
|
popover: { placement, portal: true }
|
|
9005
9555
|
}
|
|
9006
9556
|
)
|
|
@@ -9008,10 +9558,10 @@ function SplitActionButton({
|
|
|
9008
9558
|
}
|
|
9009
9559
|
|
|
9010
9560
|
// src/components/report-detail/report-actions/JudgmentActions.tsx
|
|
9011
|
-
import { jsx as
|
|
9012
|
-
function JudgmentActions() {
|
|
9561
|
+
import { Fragment as Fragment10, jsx as jsx39, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
9562
|
+
function JudgmentActions({ onShowPrompts } = {}) {
|
|
9013
9563
|
const toast = useToast3();
|
|
9014
|
-
const handleCopyLink =
|
|
9564
|
+
const handleCopyLink = useCallback23(() => {
|
|
9015
9565
|
navigator.clipboard.writeText(window.location.href).then(
|
|
9016
9566
|
() => {
|
|
9017
9567
|
toast.push({
|
|
@@ -9029,10 +9579,23 @@ function JudgmentActions() {
|
|
|
9029
9579
|
}
|
|
9030
9580
|
);
|
|
9031
9581
|
}, [toast]);
|
|
9032
|
-
return /* @__PURE__ */
|
|
9582
|
+
return /* @__PURE__ */ jsx39(
|
|
9033
9583
|
SplitActionButton,
|
|
9034
9584
|
{
|
|
9035
|
-
menu: /* @__PURE__ */
|
|
9585
|
+
menu: /* @__PURE__ */ jsxs30(Fragment10, { children: [
|
|
9586
|
+
onShowPrompts && /* @__PURE__ */ jsxs30(Fragment10, { children: [
|
|
9587
|
+
/* @__PURE__ */ jsx39(
|
|
9588
|
+
MenuItem,
|
|
9589
|
+
{
|
|
9590
|
+
icon: DocumentTextIcon,
|
|
9591
|
+
onClick: onShowPrompts,
|
|
9592
|
+
text: "Show prompts"
|
|
9593
|
+
}
|
|
9594
|
+
),
|
|
9595
|
+
/* @__PURE__ */ jsx39(MenuDivider, {})
|
|
9596
|
+
] }),
|
|
9597
|
+
/* @__PURE__ */ jsx39(MenuItem, { icon: LinkIcon3, onClick: handleCopyLink, text: "Copy link" })
|
|
9598
|
+
] }),
|
|
9036
9599
|
menuId: "judgment-actions-menu",
|
|
9037
9600
|
primary: {
|
|
9038
9601
|
fontSize: 1,
|
|
@@ -9046,22 +9609,22 @@ function JudgmentActions() {
|
|
|
9046
9609
|
}
|
|
9047
9610
|
|
|
9048
9611
|
// src/components/report-detail/report-actions/ReportActions.tsx
|
|
9049
|
-
import { CopyIcon as
|
|
9050
|
-
import { MenuDivider, useToast as useToast9 } from "@sanity/ui";
|
|
9051
|
-
import { useCallback as
|
|
9612
|
+
import { CopyIcon as CopyIcon3 } from "@sanity/icons";
|
|
9613
|
+
import { MenuDivider as MenuDivider2, useToast as useToast9 } from "@sanity/ui";
|
|
9614
|
+
import { useCallback as useCallback29, useState as useState20 } from "react";
|
|
9052
9615
|
import { useClient as useClient9 } from "sanity";
|
|
9053
9616
|
|
|
9054
9617
|
// src/components/report-detail/report-actions/CopyReportAction.tsx
|
|
9055
9618
|
import { ClipboardIcon } from "@sanity/icons";
|
|
9056
9619
|
import { MenuItem as MenuItem2, useToast as useToast4 } from "@sanity/ui";
|
|
9057
|
-
import { useCallback as
|
|
9620
|
+
import { useCallback as useCallback24, useState as useState17 } from "react";
|
|
9058
9621
|
import { useClient as useClient6 } from "sanity";
|
|
9059
|
-
import { jsx as
|
|
9622
|
+
import { jsx as jsx40 } from "react/jsx-runtime";
|
|
9060
9623
|
function CopyReportAction({ documentId }) {
|
|
9061
9624
|
const client = useClient6({ apiVersion: API_VERSION });
|
|
9062
9625
|
const toast = useToast4();
|
|
9063
|
-
const [copying, setCopying] =
|
|
9064
|
-
const handleClick =
|
|
9626
|
+
const [copying, setCopying] = useState17(false);
|
|
9627
|
+
const handleClick = useCallback24(async () => {
|
|
9065
9628
|
setCopying(true);
|
|
9066
9629
|
try {
|
|
9067
9630
|
const doc = await client.fetch(
|
|
@@ -9093,7 +9656,7 @@ function CopyReportAction({ documentId }) {
|
|
|
9093
9656
|
setCopying(false);
|
|
9094
9657
|
}
|
|
9095
9658
|
}, [client, documentId, toast]);
|
|
9096
|
-
return /* @__PURE__ */
|
|
9659
|
+
return /* @__PURE__ */ jsx40(
|
|
9097
9660
|
MenuItem2,
|
|
9098
9661
|
{
|
|
9099
9662
|
disabled: copying,
|
|
@@ -9105,13 +9668,13 @@ function CopyReportAction({ documentId }) {
|
|
|
9105
9668
|
}
|
|
9106
9669
|
|
|
9107
9670
|
// src/components/report-detail/report-actions/CopyReportIdAction.tsx
|
|
9108
|
-
import { CopyIcon } from "@sanity/icons";
|
|
9671
|
+
import { CopyIcon as CopyIcon2 } from "@sanity/icons";
|
|
9109
9672
|
import { MenuItem as MenuItem3, useToast as useToast5 } from "@sanity/ui";
|
|
9110
|
-
import { useCallback as
|
|
9111
|
-
import { jsx as
|
|
9673
|
+
import { useCallback as useCallback25 } from "react";
|
|
9674
|
+
import { jsx as jsx41 } from "react/jsx-runtime";
|
|
9112
9675
|
function CopyReportIdAction({ reportId }) {
|
|
9113
9676
|
const toast = useToast5();
|
|
9114
|
-
const handleClick =
|
|
9677
|
+
const handleClick = useCallback25(() => {
|
|
9115
9678
|
navigator.clipboard.writeText(reportId).then(
|
|
9116
9679
|
() => {
|
|
9117
9680
|
toast.push({
|
|
@@ -9129,19 +9692,19 @@ function CopyReportIdAction({ reportId }) {
|
|
|
9129
9692
|
}
|
|
9130
9693
|
);
|
|
9131
9694
|
}, [reportId, toast]);
|
|
9132
|
-
return /* @__PURE__ */
|
|
9695
|
+
return /* @__PURE__ */ jsx41(MenuItem3, { icon: CopyIcon2, onClick: handleClick, text: "Copy report ID" });
|
|
9133
9696
|
}
|
|
9134
9697
|
|
|
9135
9698
|
// src/components/report-detail/report-actions/CopyVisionQueryAction.tsx
|
|
9136
9699
|
import { SearchIcon as SearchIcon6 } from "@sanity/icons";
|
|
9137
9700
|
import { MenuItem as MenuItem4, useToast as useToast6 } from "@sanity/ui";
|
|
9138
|
-
import { useCallback as
|
|
9139
|
-
import { jsx as
|
|
9701
|
+
import { useCallback as useCallback26 } from "react";
|
|
9702
|
+
import { jsx as jsx42 } from "react/jsx-runtime";
|
|
9140
9703
|
function CopyVisionQueryAction({
|
|
9141
9704
|
reportId
|
|
9142
9705
|
}) {
|
|
9143
9706
|
const toast = useToast6();
|
|
9144
|
-
const handleClick =
|
|
9707
|
+
const handleClick = useCallback26(() => {
|
|
9145
9708
|
const query = `*[_type == "ailf.report" && reportId == "${reportId}"][0]`;
|
|
9146
9709
|
navigator.clipboard.writeText(query).then(
|
|
9147
9710
|
() => {
|
|
@@ -9161,7 +9724,7 @@ function CopyVisionQueryAction({
|
|
|
9161
9724
|
}
|
|
9162
9725
|
);
|
|
9163
9726
|
}, [reportId, toast]);
|
|
9164
|
-
return /* @__PURE__ */
|
|
9727
|
+
return /* @__PURE__ */ jsx42(
|
|
9165
9728
|
MenuItem4,
|
|
9166
9729
|
{
|
|
9167
9730
|
icon: SearchIcon6,
|
|
@@ -9172,25 +9735,25 @@ function CopyVisionQueryAction({
|
|
|
9172
9735
|
}
|
|
9173
9736
|
|
|
9174
9737
|
// src/components/report-detail/report-actions/DeleteConfirmDialog.tsx
|
|
9175
|
-
import { Box as
|
|
9176
|
-
import { jsx as
|
|
9738
|
+
import { Box as Box22, Button as Button6, Card as Card16, Dialog as Dialog2, Flex as Flex23, Stack as Stack25, Text as Text33 } from "@sanity/ui";
|
|
9739
|
+
import { jsx as jsx43, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
9177
9740
|
function DeleteConfirmDialog({
|
|
9178
9741
|
isDeleting,
|
|
9179
9742
|
onClose,
|
|
9180
9743
|
onConfirm,
|
|
9181
9744
|
reportId
|
|
9182
9745
|
}) {
|
|
9183
|
-
return /* @__PURE__ */
|
|
9184
|
-
|
|
9746
|
+
return /* @__PURE__ */ jsx43(
|
|
9747
|
+
Dialog2,
|
|
9185
9748
|
{
|
|
9186
9749
|
header: "Delete Report",
|
|
9187
9750
|
id: "delete-report-dialog",
|
|
9188
9751
|
onClose,
|
|
9189
9752
|
width: 1,
|
|
9190
|
-
children: /* @__PURE__ */
|
|
9191
|
-
/* @__PURE__ */
|
|
9192
|
-
/* @__PURE__ */
|
|
9193
|
-
|
|
9753
|
+
children: /* @__PURE__ */ jsx43(Box22, { padding: 4, children: /* @__PURE__ */ jsxs31(Stack25, { space: 4, children: [
|
|
9754
|
+
/* @__PURE__ */ jsx43(Text33, { children: "Are you sure you want to delete this report? This action cannot be undone." }),
|
|
9755
|
+
/* @__PURE__ */ jsx43(Card16, { border: true, padding: 3, radius: 2, tone: "transparent", children: /* @__PURE__ */ jsx43(
|
|
9756
|
+
Text33,
|
|
9194
9757
|
{
|
|
9195
9758
|
muted: true,
|
|
9196
9759
|
size: 1,
|
|
@@ -9198,9 +9761,9 @@ function DeleteConfirmDialog({
|
|
|
9198
9761
|
children: reportId
|
|
9199
9762
|
}
|
|
9200
9763
|
) }),
|
|
9201
|
-
/* @__PURE__ */
|
|
9202
|
-
/* @__PURE__ */
|
|
9203
|
-
|
|
9764
|
+
/* @__PURE__ */ jsxs31(Flex23, { gap: 2, justify: "flex-end", children: [
|
|
9765
|
+
/* @__PURE__ */ jsx43(
|
|
9766
|
+
Button6,
|
|
9204
9767
|
{
|
|
9205
9768
|
disabled: isDeleting,
|
|
9206
9769
|
mode: "ghost",
|
|
@@ -9208,8 +9771,8 @@ function DeleteConfirmDialog({
|
|
|
9208
9771
|
text: "Cancel"
|
|
9209
9772
|
}
|
|
9210
9773
|
),
|
|
9211
|
-
/* @__PURE__ */
|
|
9212
|
-
|
|
9774
|
+
/* @__PURE__ */ jsx43(
|
|
9775
|
+
Button6,
|
|
9213
9776
|
{
|
|
9214
9777
|
disabled: isDeleting,
|
|
9215
9778
|
onClick: onConfirm,
|
|
@@ -9226,11 +9789,11 @@ function DeleteConfirmDialog({
|
|
|
9226
9789
|
// src/components/report-detail/report-actions/DeleteReportAction.tsx
|
|
9227
9790
|
import { TrashIcon } from "@sanity/icons";
|
|
9228
9791
|
import { MenuItem as MenuItem5 } from "@sanity/ui";
|
|
9229
|
-
import { jsx as
|
|
9792
|
+
import { jsx as jsx44 } from "react/jsx-runtime";
|
|
9230
9793
|
function DeleteReportAction({
|
|
9231
9794
|
onRequestDelete
|
|
9232
9795
|
}) {
|
|
9233
|
-
return /* @__PURE__ */
|
|
9796
|
+
return /* @__PURE__ */ jsx44(
|
|
9234
9797
|
MenuItem5,
|
|
9235
9798
|
{
|
|
9236
9799
|
icon: TrashIcon,
|
|
@@ -9244,17 +9807,17 @@ function DeleteReportAction({
|
|
|
9244
9807
|
// src/components/report-detail/report-actions/DownloadReportAction.tsx
|
|
9245
9808
|
import { DownloadIcon } from "@sanity/icons";
|
|
9246
9809
|
import { MenuItem as MenuItem6, useToast as useToast7 } from "@sanity/ui";
|
|
9247
|
-
import { useCallback as
|
|
9810
|
+
import { useCallback as useCallback27, useState as useState18 } from "react";
|
|
9248
9811
|
import { useClient as useClient7 } from "sanity";
|
|
9249
|
-
import { jsx as
|
|
9812
|
+
import { jsx as jsx45 } from "react/jsx-runtime";
|
|
9250
9813
|
function DownloadReportAction({
|
|
9251
9814
|
documentId,
|
|
9252
9815
|
reportId
|
|
9253
9816
|
}) {
|
|
9254
9817
|
const client = useClient7({ apiVersion: API_VERSION });
|
|
9255
9818
|
const toast = useToast7();
|
|
9256
|
-
const [downloading, setDownloading] =
|
|
9257
|
-
const handleClick =
|
|
9819
|
+
const [downloading, setDownloading] = useState18(false);
|
|
9820
|
+
const handleClick = useCallback27(async () => {
|
|
9258
9821
|
setDownloading(true);
|
|
9259
9822
|
try {
|
|
9260
9823
|
const doc = await client.fetch(
|
|
@@ -9294,7 +9857,7 @@ function DownloadReportAction({
|
|
|
9294
9857
|
setDownloading(false);
|
|
9295
9858
|
}
|
|
9296
9859
|
}, [client, documentId, reportId, toast]);
|
|
9297
|
-
return /* @__PURE__ */
|
|
9860
|
+
return /* @__PURE__ */ jsx45(
|
|
9298
9861
|
MenuItem6,
|
|
9299
9862
|
{
|
|
9300
9863
|
disabled: downloading,
|
|
@@ -9308,7 +9871,7 @@ function DownloadReportAction({
|
|
|
9308
9871
|
// src/components/report-detail/report-actions/RerunEvaluationAction.tsx
|
|
9309
9872
|
import { PlayIcon as PlayIcon2 } from "@sanity/icons";
|
|
9310
9873
|
import { MenuItem as MenuItem7, useToast as useToast8 } from "@sanity/ui";
|
|
9311
|
-
import { useCallback as
|
|
9874
|
+
import { useCallback as useCallback28, useState as useState19 } from "react";
|
|
9312
9875
|
import { useClient as useClient8, useCurrentUser as useCurrentUser3 } from "sanity";
|
|
9313
9876
|
|
|
9314
9877
|
// src/lib/eval-scope.ts
|
|
@@ -9324,7 +9887,7 @@ function extractEvalScope(provenance) {
|
|
|
9324
9887
|
}
|
|
9325
9888
|
|
|
9326
9889
|
// src/components/report-detail/report-actions/RerunEvaluationAction.tsx
|
|
9327
|
-
import { jsx as
|
|
9890
|
+
import { jsx as jsx46 } from "react/jsx-runtime";
|
|
9328
9891
|
var EVAL_REQUEST_TYPE2 = "ailf.evalRequest";
|
|
9329
9892
|
function slugify2(s) {
|
|
9330
9893
|
return s.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 40);
|
|
@@ -9363,8 +9926,8 @@ function RerunEvaluationAction({
|
|
|
9363
9926
|
const client = useClient8({ apiVersion: API_VERSION });
|
|
9364
9927
|
const currentUser = useCurrentUser3();
|
|
9365
9928
|
const toast = useToast8();
|
|
9366
|
-
const [requesting, setRequesting] =
|
|
9367
|
-
const handleClick =
|
|
9929
|
+
const [requesting, setRequesting] = useState19(false);
|
|
9930
|
+
const handleClick = useCallback28(async () => {
|
|
9368
9931
|
setRequesting(true);
|
|
9369
9932
|
try {
|
|
9370
9933
|
const scope = extractEvalScope(provenance);
|
|
@@ -9391,7 +9954,7 @@ function RerunEvaluationAction({
|
|
|
9391
9954
|
setRequesting(false);
|
|
9392
9955
|
}
|
|
9393
9956
|
}, [client, currentUser?.id, provenance, reportId, toast]);
|
|
9394
|
-
return /* @__PURE__ */
|
|
9957
|
+
return /* @__PURE__ */ jsx46(
|
|
9395
9958
|
MenuItem7,
|
|
9396
9959
|
{
|
|
9397
9960
|
disabled: requesting,
|
|
@@ -9403,7 +9966,7 @@ function RerunEvaluationAction({
|
|
|
9403
9966
|
}
|
|
9404
9967
|
|
|
9405
9968
|
// src/components/report-detail/report-actions/ReportActions.tsx
|
|
9406
|
-
import { Fragment as
|
|
9969
|
+
import { Fragment as Fragment11, jsx as jsx47, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
9407
9970
|
function ReportActions({
|
|
9408
9971
|
documentId,
|
|
9409
9972
|
onDeleted,
|
|
@@ -9412,7 +9975,7 @@ function ReportActions({
|
|
|
9412
9975
|
}) {
|
|
9413
9976
|
const client = useClient9({ apiVersion: API_VERSION });
|
|
9414
9977
|
const toast = useToast9();
|
|
9415
|
-
const handleCopyId =
|
|
9978
|
+
const handleCopyId = useCallback29(() => {
|
|
9416
9979
|
navigator.clipboard.writeText(reportId).then(
|
|
9417
9980
|
() => {
|
|
9418
9981
|
toast.push({
|
|
@@ -9430,15 +9993,15 @@ function ReportActions({
|
|
|
9430
9993
|
}
|
|
9431
9994
|
);
|
|
9432
9995
|
}, [reportId, toast]);
|
|
9433
|
-
const [deleteDialogOpen, setDeleteDialogOpen] =
|
|
9434
|
-
const [deleting, setDeleting] =
|
|
9435
|
-
const handleRequestDelete =
|
|
9996
|
+
const [deleteDialogOpen, setDeleteDialogOpen] = useState20(false);
|
|
9997
|
+
const [deleting, setDeleting] = useState20(false);
|
|
9998
|
+
const handleRequestDelete = useCallback29(() => {
|
|
9436
9999
|
setDeleteDialogOpen(true);
|
|
9437
10000
|
}, []);
|
|
9438
|
-
const handleDeleteClose =
|
|
10001
|
+
const handleDeleteClose = useCallback29(() => {
|
|
9439
10002
|
if (!deleting) setDeleteDialogOpen(false);
|
|
9440
10003
|
}, [deleting]);
|
|
9441
|
-
const handleDeleteConfirm =
|
|
10004
|
+
const handleDeleteConfirm = useCallback29(async () => {
|
|
9442
10005
|
setDeleting(true);
|
|
9443
10006
|
try {
|
|
9444
10007
|
await client.delete(documentId);
|
|
@@ -9459,35 +10022,35 @@ function ReportActions({
|
|
|
9459
10022
|
setDeleting(false);
|
|
9460
10023
|
}
|
|
9461
10024
|
}, [client, documentId, onDeleted, toast]);
|
|
9462
|
-
return /* @__PURE__ */
|
|
9463
|
-
/* @__PURE__ */
|
|
10025
|
+
return /* @__PURE__ */ jsxs32(Fragment11, { children: [
|
|
10026
|
+
/* @__PURE__ */ jsx47(
|
|
9464
10027
|
SplitActionButton,
|
|
9465
10028
|
{
|
|
9466
|
-
menu: /* @__PURE__ */
|
|
9467
|
-
/* @__PURE__ */
|
|
9468
|
-
/* @__PURE__ */
|
|
10029
|
+
menu: /* @__PURE__ */ jsxs32(Fragment11, { children: [
|
|
10030
|
+
/* @__PURE__ */ jsx47(CopyReportIdAction, { reportId }),
|
|
10031
|
+
/* @__PURE__ */ jsx47(
|
|
9469
10032
|
RerunEvaluationAction,
|
|
9470
10033
|
{
|
|
9471
10034
|
provenance,
|
|
9472
10035
|
reportId
|
|
9473
10036
|
}
|
|
9474
10037
|
),
|
|
9475
|
-
/* @__PURE__ */
|
|
9476
|
-
/* @__PURE__ */
|
|
9477
|
-
/* @__PURE__ */
|
|
9478
|
-
/* @__PURE__ */
|
|
9479
|
-
/* @__PURE__ */
|
|
9480
|
-
/* @__PURE__ */
|
|
10038
|
+
/* @__PURE__ */ jsx47(MenuDivider2, {}),
|
|
10039
|
+
/* @__PURE__ */ jsx47(DownloadReportAction, { documentId, reportId }),
|
|
10040
|
+
/* @__PURE__ */ jsx47(CopyReportAction, { documentId }),
|
|
10041
|
+
/* @__PURE__ */ jsx47(CopyVisionQueryAction, { reportId }),
|
|
10042
|
+
/* @__PURE__ */ jsx47(MenuDivider2, {}),
|
|
10043
|
+
/* @__PURE__ */ jsx47(DeleteReportAction, { onRequestDelete: handleRequestDelete })
|
|
9481
10044
|
] }),
|
|
9482
10045
|
menuId: "report-actions-menu",
|
|
9483
10046
|
primary: {
|
|
9484
|
-
icon:
|
|
10047
|
+
icon: CopyIcon3,
|
|
9485
10048
|
onClick: handleCopyId,
|
|
9486
10049
|
text: "Copy Report ID"
|
|
9487
10050
|
}
|
|
9488
10051
|
}
|
|
9489
10052
|
),
|
|
9490
|
-
deleteDialogOpen && /* @__PURE__ */
|
|
10053
|
+
deleteDialogOpen && /* @__PURE__ */ jsx47(
|
|
9491
10054
|
DeleteConfirmDialog,
|
|
9492
10055
|
{
|
|
9493
10056
|
isDeleting: deleting,
|
|
@@ -9501,8 +10064,8 @@ function ReportActions({
|
|
|
9501
10064
|
|
|
9502
10065
|
// src/components/report-detail/ReportHeader.tsx
|
|
9503
10066
|
import { ArrowLeftIcon as ArrowLeftIcon2 } from "@sanity/icons";
|
|
9504
|
-
import { Button as
|
|
9505
|
-
import { jsx as
|
|
10067
|
+
import { Button as Button7, Flex as Flex24, Stack as Stack26, Text as Text34 } from "@sanity/ui";
|
|
10068
|
+
import { jsx as jsx48, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
9506
10069
|
function ReportHeader({
|
|
9507
10070
|
completedAt,
|
|
9508
10071
|
onBack,
|
|
@@ -9512,11 +10075,11 @@ function ReportHeader({
|
|
|
9512
10075
|
const dateLabel = formatCardDate(completedAt);
|
|
9513
10076
|
const displayTitle = title ?? tag ?? dateLabel;
|
|
9514
10077
|
const hasSubtitle = Boolean(title ?? tag);
|
|
9515
|
-
return /* @__PURE__ */
|
|
9516
|
-
/* @__PURE__ */
|
|
9517
|
-
/* @__PURE__ */
|
|
9518
|
-
/* @__PURE__ */
|
|
9519
|
-
hasSubtitle && /* @__PURE__ */
|
|
10078
|
+
return /* @__PURE__ */ jsxs33(Flex24, { align: "center", gap: 3, children: [
|
|
10079
|
+
/* @__PURE__ */ jsx48(Button7, { icon: ArrowLeftIcon2, mode: "bleed", onClick: onBack, text: "Back" }),
|
|
10080
|
+
/* @__PURE__ */ jsxs33(Stack26, { flex: 1, space: 1, children: [
|
|
10081
|
+
/* @__PURE__ */ jsx48(Text34, { size: 4, weight: "bold", children: displayTitle }),
|
|
10082
|
+
hasSubtitle && /* @__PURE__ */ jsx48(Text34, { muted: true, size: 2, children: dateLabel })
|
|
9520
10083
|
] })
|
|
9521
10084
|
] });
|
|
9522
10085
|
}
|
|
@@ -9524,17 +10087,17 @@ function ReportHeader({
|
|
|
9524
10087
|
// src/components/report-detail/StrengthsList.tsx
|
|
9525
10088
|
import { useMemo as useMemo14 } from "react";
|
|
9526
10089
|
import { CheckmarkCircleIcon as CheckmarkCircleIcon2, SearchIcon as SearchIcon7 } from "@sanity/icons";
|
|
9527
|
-
import { Box as
|
|
10090
|
+
import { Box as Box24, Flex as Flex27, Stack as Stack28, Text as Text37 } from "@sanity/ui";
|
|
9528
10091
|
|
|
9529
10092
|
// src/components/report-detail/AreaScoresGrid.tsx
|
|
9530
10093
|
import React3, {
|
|
9531
|
-
useCallback as
|
|
10094
|
+
useCallback as useCallback30,
|
|
9532
10095
|
useMemo as useMemo12,
|
|
9533
|
-
useState as
|
|
10096
|
+
useState as useState21
|
|
9534
10097
|
} from "react";
|
|
9535
10098
|
import { WarningOutlineIcon as WarningOutlineIcon2 } from "@sanity/icons";
|
|
9536
|
-
import { Box as
|
|
9537
|
-
import { Fragment as
|
|
10099
|
+
import { Box as Box23, Flex as Flex25, Stack as Stack27, Text as Text35 } from "@sanity/ui";
|
|
10100
|
+
import { Fragment as Fragment12, jsx as jsx49, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
9538
10101
|
var DIMENSION_TOOLTIPS2 = {
|
|
9539
10102
|
agentOutput: "Quality and completeness of the agent's output. Graded 0\u2013100.",
|
|
9540
10103
|
assertionPassRate: "Fraction of structural assertions that passed. Graded 0\u2013100.",
|
|
@@ -9580,9 +10143,9 @@ function AreaScoresGrid({
|
|
|
9580
10143
|
);
|
|
9581
10144
|
const showLift = isLiteracyMode(mode);
|
|
9582
10145
|
const dimKeys = useMemo12(() => collectDimensionKeys(scores), [scores]);
|
|
9583
|
-
const [sortField, setSortField] =
|
|
9584
|
-
const [sortDir, setSortDir] =
|
|
9585
|
-
const handleSort =
|
|
10146
|
+
const [sortField, setSortField] = useState21("score");
|
|
10147
|
+
const [sortDir, setSortDir] = useState21("desc");
|
|
10148
|
+
const handleSort = useCallback30(
|
|
9586
10149
|
(field) => {
|
|
9587
10150
|
if (field === sortField) {
|
|
9588
10151
|
setSortDir((d) => d === "asc" ? "desc" : "asc");
|
|
@@ -9626,8 +10189,8 @@ function AreaScoresGrid({
|
|
|
9626
10189
|
}
|
|
9627
10190
|
return map;
|
|
9628
10191
|
}, [perModel]);
|
|
9629
|
-
return /* @__PURE__ */
|
|
9630
|
-
/* @__PURE__ */
|
|
10192
|
+
return /* @__PURE__ */ jsxs34(Box23, { ref: containerRef, style: { ...neutralCardStyle, overflow: "auto" }, children: [
|
|
10193
|
+
/* @__PURE__ */ jsxs34(
|
|
9631
10194
|
"div",
|
|
9632
10195
|
{
|
|
9633
10196
|
style: {
|
|
@@ -9643,7 +10206,7 @@ function AreaScoresGrid({
|
|
|
9643
10206
|
padding: "12px 16px 8px"
|
|
9644
10207
|
},
|
|
9645
10208
|
children: [
|
|
9646
|
-
/* @__PURE__ */
|
|
10209
|
+
/* @__PURE__ */ jsx49(
|
|
9647
10210
|
ColHeader2,
|
|
9648
10211
|
{
|
|
9649
10212
|
active: sortField === "score",
|
|
@@ -9653,7 +10216,7 @@ function AreaScoresGrid({
|
|
|
9653
10216
|
tooltip: GLOSSARY.score
|
|
9654
10217
|
}
|
|
9655
10218
|
),
|
|
9656
|
-
/* @__PURE__ */
|
|
10219
|
+
/* @__PURE__ */ jsx49(
|
|
9657
10220
|
ColHeader2,
|
|
9658
10221
|
{
|
|
9659
10222
|
active: sortField === "area",
|
|
@@ -9662,7 +10225,7 @@ function AreaScoresGrid({
|
|
|
9662
10225
|
onClick: () => handleSort("area")
|
|
9663
10226
|
}
|
|
9664
10227
|
),
|
|
9665
|
-
dimKeys.map((key) => /* @__PURE__ */
|
|
10228
|
+
dimKeys.map((key) => /* @__PURE__ */ jsx49(
|
|
9666
10229
|
ColHeader2,
|
|
9667
10230
|
{
|
|
9668
10231
|
active: sortField === key,
|
|
@@ -9673,7 +10236,7 @@ function AreaScoresGrid({
|
|
|
9673
10236
|
},
|
|
9674
10237
|
key
|
|
9675
10238
|
)),
|
|
9676
|
-
tier !== "narrow" && showLift && /* @__PURE__ */
|
|
10239
|
+
tier !== "narrow" && showLift && /* @__PURE__ */ jsx49(
|
|
9677
10240
|
ColHeader2,
|
|
9678
10241
|
{
|
|
9679
10242
|
active: sortField === "lift",
|
|
@@ -9683,12 +10246,12 @@ function AreaScoresGrid({
|
|
|
9683
10246
|
tooltip: GLOSSARY.docLift
|
|
9684
10247
|
}
|
|
9685
10248
|
),
|
|
9686
|
-
tier === "full" && hasActual && /* @__PURE__ */
|
|
10249
|
+
tier === "full" && hasActual && /* @__PURE__ */ jsx49(ColHeader2, { label: "Actual", tooltip: GLOSSARY.actualScore })
|
|
9687
10250
|
]
|
|
9688
10251
|
}
|
|
9689
10252
|
),
|
|
9690
|
-
sorted.map((area) => /* @__PURE__ */
|
|
9691
|
-
/* @__PURE__ */
|
|
10253
|
+
sorted.map((area) => /* @__PURE__ */ jsxs34(React3.Fragment, { children: [
|
|
10254
|
+
/* @__PURE__ */ jsx49(
|
|
9692
10255
|
AreaRow,
|
|
9693
10256
|
{
|
|
9694
10257
|
area,
|
|
@@ -9699,7 +10262,7 @@ function AreaScoresGrid({
|
|
|
9699
10262
|
tier
|
|
9700
10263
|
}
|
|
9701
10264
|
),
|
|
9702
|
-
modelScoresByFeature && /* @__PURE__ */
|
|
10265
|
+
modelScoresByFeature && /* @__PURE__ */ jsx49(
|
|
9703
10266
|
ModelSubRows,
|
|
9704
10267
|
{
|
|
9705
10268
|
dimKeys,
|
|
@@ -9720,8 +10283,8 @@ function ModelSubRows({
|
|
|
9720
10283
|
tier
|
|
9721
10284
|
}) {
|
|
9722
10285
|
if (!models || models.length === 0) return null;
|
|
9723
|
-
return /* @__PURE__ */
|
|
9724
|
-
|
|
10286
|
+
return /* @__PURE__ */ jsx49(Fragment12, { children: models.map((entry) => /* @__PURE__ */ jsx49(
|
|
10287
|
+
ModelRow2,
|
|
9725
10288
|
{
|
|
9726
10289
|
dimKeys,
|
|
9727
10290
|
hasActual,
|
|
@@ -9733,7 +10296,7 @@ function ModelSubRows({
|
|
|
9733
10296
|
entry.label
|
|
9734
10297
|
)) });
|
|
9735
10298
|
}
|
|
9736
|
-
function
|
|
10299
|
+
function ModelRow2({
|
|
9737
10300
|
dimKeys,
|
|
9738
10301
|
hasActual,
|
|
9739
10302
|
label,
|
|
@@ -9742,7 +10305,7 @@ function ModelRow({
|
|
|
9742
10305
|
tier
|
|
9743
10306
|
}) {
|
|
9744
10307
|
const isNarrow = tier === "narrow";
|
|
9745
|
-
return /* @__PURE__ */
|
|
10308
|
+
return /* @__PURE__ */ jsxs34(
|
|
9746
10309
|
"div",
|
|
9747
10310
|
{
|
|
9748
10311
|
style: {
|
|
@@ -9760,8 +10323,8 @@ function ModelRow({
|
|
|
9760
10323
|
padding: isNarrow ? "6px 12px 6px 20px" : "6px 16px 6px 28px"
|
|
9761
10324
|
},
|
|
9762
10325
|
children: [
|
|
9763
|
-
/* @__PURE__ */
|
|
9764
|
-
|
|
10326
|
+
/* @__PURE__ */ jsx49(Flex25, { align: "center", children: /* @__PURE__ */ jsx49(
|
|
10327
|
+
Text35,
|
|
9765
10328
|
{
|
|
9766
10329
|
size: 1,
|
|
9767
10330
|
style: {
|
|
@@ -9772,8 +10335,8 @@ function ModelRow({
|
|
|
9772
10335
|
children: Math.round(scores.totalScore)
|
|
9773
10336
|
}
|
|
9774
10337
|
) }),
|
|
9775
|
-
/* @__PURE__ */
|
|
9776
|
-
dimKeys.map((key) => /* @__PURE__ */
|
|
10338
|
+
/* @__PURE__ */ jsx49(Flex25, { align: "center", gap: 2, children: /* @__PURE__ */ jsx49(Text35, { muted: true, size: 1, children: label }) }),
|
|
10339
|
+
dimKeys.map((key) => /* @__PURE__ */ jsx49(
|
|
9777
10340
|
DimCell,
|
|
9778
10341
|
{
|
|
9779
10342
|
area: label,
|
|
@@ -9783,8 +10346,8 @@ function ModelRow({
|
|
|
9783
10346
|
},
|
|
9784
10347
|
key
|
|
9785
10348
|
)),
|
|
9786
|
-
!isNarrow && showLift && /* @__PURE__ */
|
|
9787
|
-
|
|
10349
|
+
!isNarrow && showLift && /* @__PURE__ */ jsxs34(
|
|
10350
|
+
Text35,
|
|
9788
10351
|
{
|
|
9789
10352
|
size: 1,
|
|
9790
10353
|
style: {
|
|
@@ -9798,8 +10361,8 @@ function ModelRow({
|
|
|
9798
10361
|
]
|
|
9799
10362
|
}
|
|
9800
10363
|
),
|
|
9801
|
-
tier === "full" && hasActual && /* @__PURE__ */
|
|
9802
|
-
|
|
10364
|
+
tier === "full" && hasActual && /* @__PURE__ */ jsx49(
|
|
10365
|
+
Text35,
|
|
9803
10366
|
{
|
|
9804
10367
|
size: 1,
|
|
9805
10368
|
style: {
|
|
@@ -9823,7 +10386,7 @@ function AreaRow({
|
|
|
9823
10386
|
tier
|
|
9824
10387
|
}) {
|
|
9825
10388
|
const isNarrow = tier === "narrow";
|
|
9826
|
-
return /* @__PURE__ */
|
|
10389
|
+
return /* @__PURE__ */ jsxs34(
|
|
9827
10390
|
"div",
|
|
9828
10391
|
{
|
|
9829
10392
|
style: {
|
|
@@ -9840,15 +10403,15 @@ function AreaRow({
|
|
|
9840
10403
|
padding: isNarrow ? "8px 12px" : "10px 16px"
|
|
9841
10404
|
},
|
|
9842
10405
|
children: [
|
|
9843
|
-
/* @__PURE__ */
|
|
9844
|
-
/* @__PURE__ */
|
|
10406
|
+
/* @__PURE__ */ jsxs34(Flex25, { align: "center", gap: isNarrow ? 0 : 2, children: [
|
|
10407
|
+
/* @__PURE__ */ jsx49(
|
|
9845
10408
|
HoverTip,
|
|
9846
10409
|
{
|
|
9847
|
-
text: /* @__PURE__ */
|
|
9848
|
-
/* @__PURE__ */
|
|
10410
|
+
text: /* @__PURE__ */ jsxs34(Text35, { size: 2, style: { lineHeight: 1.5 }, children: [
|
|
10411
|
+
/* @__PURE__ */ jsx49("span", { style: { fontWeight: 600 }, children: area.feature }),
|
|
9849
10412
|
" score:",
|
|
9850
10413
|
" ",
|
|
9851
|
-
/* @__PURE__ */
|
|
10414
|
+
/* @__PURE__ */ jsx49(
|
|
9852
10415
|
"span",
|
|
9853
10416
|
{
|
|
9854
10417
|
style: {
|
|
@@ -9859,12 +10422,12 @@ function AreaRow({
|
|
|
9859
10422
|
children: Math.round(area.totalScore)
|
|
9860
10423
|
}
|
|
9861
10424
|
),
|
|
9862
|
-
/* @__PURE__ */
|
|
10425
|
+
/* @__PURE__ */ jsx49("span", { style: { color: "var(--card-muted-fg-color)" }, children: "/100" }),
|
|
9863
10426
|
".",
|
|
9864
10427
|
" ",
|
|
9865
10428
|
GLOSSARY.score
|
|
9866
10429
|
] }),
|
|
9867
|
-
children: /* @__PURE__ */
|
|
10430
|
+
children: /* @__PURE__ */ jsx49(
|
|
9868
10431
|
"div",
|
|
9869
10432
|
{
|
|
9870
10433
|
style: {
|
|
@@ -9885,11 +10448,11 @@ function AreaRow({
|
|
|
9885
10448
|
)
|
|
9886
10449
|
}
|
|
9887
10450
|
),
|
|
9888
|
-
!isNarrow && delta != null && delta !== 0 && /* @__PURE__ */
|
|
10451
|
+
!isNarrow && delta != null && delta !== 0 && /* @__PURE__ */ jsx49(HoverTip, { text: GLOSSARY.areaDelta, children: /* @__PURE__ */ jsx49(DeltaIndicator, { delta, icon: true, size: 1 }) })
|
|
9889
10452
|
] }),
|
|
9890
|
-
/* @__PURE__ */
|
|
9891
|
-
/* @__PURE__ */
|
|
9892
|
-
area.negativeDocLift && showLift && /* @__PURE__ */
|
|
10453
|
+
/* @__PURE__ */ jsxs34(Flex25, { align: "center", gap: 2, wrap: "wrap", children: [
|
|
10454
|
+
/* @__PURE__ */ jsx49(Text35, { size: 2, weight: "medium", children: area.feature }),
|
|
10455
|
+
area.negativeDocLift && showLift && /* @__PURE__ */ jsx49(HoverTip, { text: GLOSSARY.docsHurt, children: /* @__PURE__ */ jsx49(
|
|
9893
10456
|
"span",
|
|
9894
10457
|
{
|
|
9895
10458
|
style: {
|
|
@@ -9902,11 +10465,11 @@ function AreaRow({
|
|
|
9902
10465
|
gap: 3,
|
|
9903
10466
|
padding: "1px 5px"
|
|
9904
10467
|
},
|
|
9905
|
-
children: /* @__PURE__ */
|
|
10468
|
+
children: /* @__PURE__ */ jsx49(WarningOutlineIcon2, {})
|
|
9906
10469
|
}
|
|
9907
10470
|
) })
|
|
9908
10471
|
] }),
|
|
9909
|
-
dimKeys.map((key) => /* @__PURE__ */
|
|
10472
|
+
dimKeys.map((key) => /* @__PURE__ */ jsx49(
|
|
9910
10473
|
DimCell,
|
|
9911
10474
|
{
|
|
9912
10475
|
area: area.feature,
|
|
@@ -9915,14 +10478,14 @@ function AreaRow({
|
|
|
9915
10478
|
},
|
|
9916
10479
|
key
|
|
9917
10480
|
)),
|
|
9918
|
-
!isNarrow && showLift && /* @__PURE__ */
|
|
10481
|
+
!isNarrow && showLift && /* @__PURE__ */ jsx49(
|
|
9919
10482
|
HoverTip,
|
|
9920
10483
|
{
|
|
9921
|
-
text: /* @__PURE__ */
|
|
9922
|
-
/* @__PURE__ */
|
|
10484
|
+
text: /* @__PURE__ */ jsxs34(Text35, { size: 2, style: { lineHeight: 1.5 }, children: [
|
|
10485
|
+
/* @__PURE__ */ jsx49("span", { style: { fontWeight: 600 }, children: area.feature }),
|
|
9923
10486
|
" doc lift:",
|
|
9924
10487
|
" ",
|
|
9925
|
-
/* @__PURE__ */
|
|
10488
|
+
/* @__PURE__ */ jsxs34(
|
|
9926
10489
|
"span",
|
|
9927
10490
|
{
|
|
9928
10491
|
style: {
|
|
@@ -9940,8 +10503,8 @@ function AreaRow({
|
|
|
9940
10503
|
"pts. ",
|
|
9941
10504
|
GLOSSARY.docLift
|
|
9942
10505
|
] }),
|
|
9943
|
-
children: /* @__PURE__ */
|
|
9944
|
-
|
|
10506
|
+
children: /* @__PURE__ */ jsxs34(
|
|
10507
|
+
Text35,
|
|
9945
10508
|
{
|
|
9946
10509
|
size: 2,
|
|
9947
10510
|
style: {
|
|
@@ -9957,12 +10520,12 @@ function AreaRow({
|
|
|
9957
10520
|
)
|
|
9958
10521
|
}
|
|
9959
10522
|
),
|
|
9960
|
-
tier === "full" && hasActual && /* @__PURE__ */
|
|
10523
|
+
tier === "full" && hasActual && /* @__PURE__ */ jsx49(
|
|
9961
10524
|
HoverTip,
|
|
9962
10525
|
{
|
|
9963
10526
|
text: area.actualScore != null ? `${area.feature} actual score: ${Math.round(area.actualScore)}/100. ${GLOSSARY.actualScore}` : `No agentic data for ${area.feature}.`,
|
|
9964
|
-
children: /* @__PURE__ */
|
|
9965
|
-
|
|
10527
|
+
children: /* @__PURE__ */ jsx49(
|
|
10528
|
+
Text35,
|
|
9966
10529
|
{
|
|
9967
10530
|
size: 2,
|
|
9968
10531
|
style: {
|
|
@@ -9991,17 +10554,17 @@ function DimCell({
|
|
|
9991
10554
|
const tooltip = dimKey ? DIMENSION_TOOLTIPS2[dimKey] : "";
|
|
9992
10555
|
const textSize = size === "small" ? 0 : 1;
|
|
9993
10556
|
const barHeight = size === "small" ? 3 : 4;
|
|
9994
|
-
return /* @__PURE__ */
|
|
10557
|
+
return /* @__PURE__ */ jsx49(
|
|
9995
10558
|
HoverTip,
|
|
9996
10559
|
{
|
|
9997
|
-
text: /* @__PURE__ */
|
|
9998
|
-
/* @__PURE__ */
|
|
10560
|
+
text: /* @__PURE__ */ jsxs34(Text35, { size: 2, style: { lineHeight: 1.5 }, children: [
|
|
10561
|
+
/* @__PURE__ */ jsx49("span", { style: { fontWeight: 600 }, children: area }),
|
|
9999
10562
|
" \u2192",
|
|
10000
10563
|
" ",
|
|
10001
|
-
/* @__PURE__ */
|
|
10564
|
+
/* @__PURE__ */ jsx49("span", { style: { fontWeight: 600 }, children: dim }),
|
|
10002
10565
|
":",
|
|
10003
10566
|
" ",
|
|
10004
|
-
/* @__PURE__ */
|
|
10567
|
+
/* @__PURE__ */ jsx49(
|
|
10005
10568
|
"span",
|
|
10006
10569
|
{
|
|
10007
10570
|
style: {
|
|
@@ -10012,14 +10575,14 @@ function DimCell({
|
|
|
10012
10575
|
children: Math.round(value)
|
|
10013
10576
|
}
|
|
10014
10577
|
),
|
|
10015
|
-
/* @__PURE__ */
|
|
10578
|
+
/* @__PURE__ */ jsx49("span", { style: { color: "var(--card-muted-fg-color)" }, children: "/100" }),
|
|
10016
10579
|
".",
|
|
10017
10580
|
" ",
|
|
10018
10581
|
tooltip
|
|
10019
10582
|
] }),
|
|
10020
|
-
children: /* @__PURE__ */
|
|
10021
|
-
/* @__PURE__ */
|
|
10022
|
-
|
|
10583
|
+
children: /* @__PURE__ */ jsxs34(Stack27, { space: 1, style: { width: "100%" }, children: [
|
|
10584
|
+
/* @__PURE__ */ jsx49(
|
|
10585
|
+
Text35,
|
|
10023
10586
|
{
|
|
10024
10587
|
size: textSize,
|
|
10025
10588
|
style: {
|
|
@@ -10030,7 +10593,7 @@ function DimCell({
|
|
|
10030
10593
|
children: Math.round(value)
|
|
10031
10594
|
}
|
|
10032
10595
|
),
|
|
10033
|
-
/* @__PURE__ */
|
|
10596
|
+
/* @__PURE__ */ jsx49(
|
|
10034
10597
|
"div",
|
|
10035
10598
|
{
|
|
10036
10599
|
style: {
|
|
@@ -10040,7 +10603,7 @@ function DimCell({
|
|
|
10040
10603
|
overflow: "hidden",
|
|
10041
10604
|
width: "100%"
|
|
10042
10605
|
},
|
|
10043
|
-
children: /* @__PURE__ */
|
|
10606
|
+
children: /* @__PURE__ */ jsx49(
|
|
10044
10607
|
"div",
|
|
10045
10608
|
{
|
|
10046
10609
|
style: {
|
|
@@ -10065,7 +10628,7 @@ function ColHeader2({
|
|
|
10065
10628
|
onClick,
|
|
10066
10629
|
tooltip
|
|
10067
10630
|
}) {
|
|
10068
|
-
const handleKeyDown =
|
|
10631
|
+
const handleKeyDown = useCallback30(
|
|
10069
10632
|
(e) => {
|
|
10070
10633
|
if (onClick && (e.key === "Enter" || e.key === " ")) {
|
|
10071
10634
|
e.preventDefault();
|
|
@@ -10075,8 +10638,8 @@ function ColHeader2({
|
|
|
10075
10638
|
[onClick]
|
|
10076
10639
|
);
|
|
10077
10640
|
const arrow = active ? direction === "asc" ? " \u2191" : " \u2193" : "";
|
|
10078
|
-
return /* @__PURE__ */
|
|
10079
|
-
/* @__PURE__ */
|
|
10641
|
+
return /* @__PURE__ */ jsxs34(Flex25, { align: "center", gap: 1, children: [
|
|
10642
|
+
/* @__PURE__ */ jsx49(
|
|
10080
10643
|
"div",
|
|
10081
10644
|
{
|
|
10082
10645
|
onClick,
|
|
@@ -10087,8 +10650,8 @@ function ColHeader2({
|
|
|
10087
10650
|
userSelect: "none"
|
|
10088
10651
|
},
|
|
10089
10652
|
tabIndex: onClick ? 0 : void 0,
|
|
10090
|
-
children: /* @__PURE__ */
|
|
10091
|
-
|
|
10653
|
+
children: /* @__PURE__ */ jsxs34(
|
|
10654
|
+
Text35,
|
|
10092
10655
|
{
|
|
10093
10656
|
muted: true,
|
|
10094
10657
|
size: 1,
|
|
@@ -10105,14 +10668,14 @@ function ColHeader2({
|
|
|
10105
10668
|
)
|
|
10106
10669
|
}
|
|
10107
10670
|
),
|
|
10108
|
-
tooltip && /* @__PURE__ */
|
|
10671
|
+
tooltip && /* @__PURE__ */ jsx49(InfoTip, { text: tooltip })
|
|
10109
10672
|
] });
|
|
10110
10673
|
}
|
|
10111
10674
|
|
|
10112
10675
|
// src/components/report-detail/ModelSelector.tsx
|
|
10113
|
-
import { useCallback as
|
|
10114
|
-
import { Flex as
|
|
10115
|
-
import { jsx as
|
|
10676
|
+
import { useCallback as useCallback31 } from "react";
|
|
10677
|
+
import { Flex as Flex26, Text as Text36 } from "@sanity/ui";
|
|
10678
|
+
import { jsx as jsx50, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
10116
10679
|
var pillBase = {
|
|
10117
10680
|
borderColor: "var(--card-border-color)",
|
|
10118
10681
|
borderRadius: 999,
|
|
@@ -10143,8 +10706,8 @@ function ModelSelector({
|
|
|
10143
10706
|
selection,
|
|
10144
10707
|
onChange
|
|
10145
10708
|
}) {
|
|
10146
|
-
return /* @__PURE__ */
|
|
10147
|
-
/* @__PURE__ */
|
|
10709
|
+
return /* @__PURE__ */ jsxs35(Flex26, { align: "center", gap: 1, wrap: "wrap", children: [
|
|
10710
|
+
/* @__PURE__ */ jsx50(
|
|
10148
10711
|
Pill2,
|
|
10149
10712
|
{
|
|
10150
10713
|
isSelected: selection === null,
|
|
@@ -10152,7 +10715,7 @@ function ModelSelector({
|
|
|
10152
10715
|
onClick: () => onChange(null)
|
|
10153
10716
|
}
|
|
10154
10717
|
),
|
|
10155
|
-
models.map((model) => /* @__PURE__ */
|
|
10718
|
+
models.map((model) => /* @__PURE__ */ jsx50(
|
|
10156
10719
|
Pill2,
|
|
10157
10720
|
{
|
|
10158
10721
|
isSelected: selection === model.modelId,
|
|
@@ -10161,7 +10724,7 @@ function ModelSelector({
|
|
|
10161
10724
|
},
|
|
10162
10725
|
model.modelId
|
|
10163
10726
|
)),
|
|
10164
|
-
/* @__PURE__ */
|
|
10727
|
+
/* @__PURE__ */ jsx50(
|
|
10165
10728
|
"div",
|
|
10166
10729
|
{
|
|
10167
10730
|
style: {
|
|
@@ -10172,7 +10735,7 @@ function ModelSelector({
|
|
|
10172
10735
|
}
|
|
10173
10736
|
}
|
|
10174
10737
|
),
|
|
10175
|
-
/* @__PURE__ */
|
|
10738
|
+
/* @__PURE__ */ jsx50(
|
|
10176
10739
|
Pill2,
|
|
10177
10740
|
{
|
|
10178
10741
|
isSelected: selection === "expanded",
|
|
@@ -10187,7 +10750,7 @@ function Pill2({
|
|
|
10187
10750
|
label,
|
|
10188
10751
|
onClick
|
|
10189
10752
|
}) {
|
|
10190
|
-
const handleKeyDown =
|
|
10753
|
+
const handleKeyDown = useCallback31(
|
|
10191
10754
|
(e) => {
|
|
10192
10755
|
if (e.key === "Enter" || e.key === " ") {
|
|
10193
10756
|
e.preventDefault();
|
|
@@ -10196,7 +10759,7 @@ function Pill2({
|
|
|
10196
10759
|
},
|
|
10197
10760
|
[onClick]
|
|
10198
10761
|
);
|
|
10199
|
-
return /* @__PURE__ */
|
|
10762
|
+
return /* @__PURE__ */ jsx50(
|
|
10200
10763
|
"span",
|
|
10201
10764
|
{
|
|
10202
10765
|
onClick,
|
|
@@ -10204,8 +10767,8 @@ function Pill2({
|
|
|
10204
10767
|
role: "button",
|
|
10205
10768
|
style: isSelected ? pillSelected : pillDefault,
|
|
10206
10769
|
tabIndex: 0,
|
|
10207
|
-
children: /* @__PURE__ */
|
|
10208
|
-
|
|
10770
|
+
children: /* @__PURE__ */ jsx50(
|
|
10771
|
+
Text36,
|
|
10209
10772
|
{
|
|
10210
10773
|
size: 1,
|
|
10211
10774
|
style: {
|
|
@@ -10220,13 +10783,13 @@ function Pill2({
|
|
|
10220
10783
|
}
|
|
10221
10784
|
|
|
10222
10785
|
// src/components/report-detail/useModelSelection.ts
|
|
10223
|
-
import { useCallback as
|
|
10786
|
+
import { useCallback as useCallback32, useMemo as useMemo13, useState as useState22 } from "react";
|
|
10224
10787
|
function useModelSelection({
|
|
10225
10788
|
scores,
|
|
10226
10789
|
perModel
|
|
10227
10790
|
}) {
|
|
10228
|
-
const [selection, setSelection] =
|
|
10229
|
-
const onSelectionChange =
|
|
10791
|
+
const [selection, setSelection] = useState22(null);
|
|
10792
|
+
const onSelectionChange = useCallback32((next) => {
|
|
10230
10793
|
setSelection(next);
|
|
10231
10794
|
}, []);
|
|
10232
10795
|
const isExpanded = selection === "expanded";
|
|
@@ -10248,7 +10811,7 @@ function useModelSelection({
|
|
|
10248
10811
|
}
|
|
10249
10812
|
|
|
10250
10813
|
// src/components/report-detail/StrengthsList.tsx
|
|
10251
|
-
import { jsx as
|
|
10814
|
+
import { jsx as jsx51, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
10252
10815
|
function StrengthsList({
|
|
10253
10816
|
mode,
|
|
10254
10817
|
scores,
|
|
@@ -10272,13 +10835,13 @@ function StrengthsList({
|
|
|
10272
10835
|
(a, b) => (b.infrastructureEfficiency ?? 0) - (a.infrastructureEfficiency ?? 0)
|
|
10273
10836
|
);
|
|
10274
10837
|
if (displayedScores.length === 0) return null;
|
|
10275
|
-
return /* @__PURE__ */
|
|
10276
|
-
/* @__PURE__ */
|
|
10277
|
-
/* @__PURE__ */
|
|
10278
|
-
/* @__PURE__ */
|
|
10279
|
-
/* @__PURE__ */
|
|
10280
|
-
/* @__PURE__ */
|
|
10281
|
-
hasModels && /* @__PURE__ */
|
|
10838
|
+
return /* @__PURE__ */ jsxs36(Stack28, { space: 5, children: [
|
|
10839
|
+
/* @__PURE__ */ jsxs36(Stack28, { space: 3, children: [
|
|
10840
|
+
/* @__PURE__ */ jsxs36(Flex27, { align: "center", gap: 2, wrap: "wrap", children: [
|
|
10841
|
+
/* @__PURE__ */ jsx51(CheckmarkCircleIcon2, { style: { color: "#34d399" } }),
|
|
10842
|
+
/* @__PURE__ */ jsx51(Text37, { size: 2, weight: "medium", children: "Strong Areas (70+)" }),
|
|
10843
|
+
/* @__PURE__ */ jsx51(InfoTip, { text: GLOSSARY.strengths }),
|
|
10844
|
+
hasModels && /* @__PURE__ */ jsx51(Box24, { style: { marginLeft: "auto" }, children: /* @__PURE__ */ jsx51(
|
|
10282
10845
|
ModelSelector,
|
|
10283
10846
|
{
|
|
10284
10847
|
models: perModel,
|
|
@@ -10287,7 +10850,7 @@ function StrengthsList({
|
|
|
10287
10850
|
}
|
|
10288
10851
|
) })
|
|
10289
10852
|
] }),
|
|
10290
|
-
/* @__PURE__ */
|
|
10853
|
+
/* @__PURE__ */ jsx51(
|
|
10291
10854
|
AreaScoresGrid,
|
|
10292
10855
|
{
|
|
10293
10856
|
mode,
|
|
@@ -10297,33 +10860,33 @@ function StrengthsList({
|
|
|
10297
10860
|
}
|
|
10298
10861
|
)
|
|
10299
10862
|
] }),
|
|
10300
|
-
retrievalSuccesses.length > 0 && /* @__PURE__ */
|
|
10301
|
-
/* @__PURE__ */
|
|
10302
|
-
|
|
10863
|
+
retrievalSuccesses.length > 0 && /* @__PURE__ */ jsxs36(Box24, { style: neutralCardStyle, children: [
|
|
10864
|
+
/* @__PURE__ */ jsx51(
|
|
10865
|
+
Box24,
|
|
10303
10866
|
{
|
|
10304
10867
|
padding: 4,
|
|
10305
10868
|
style: { borderBottom: "1px solid var(--card-border-color)" },
|
|
10306
|
-
children: /* @__PURE__ */
|
|
10307
|
-
/* @__PURE__ */
|
|
10308
|
-
/* @__PURE__ */
|
|
10869
|
+
children: /* @__PURE__ */ jsxs36(Flex27, { align: "center", gap: 2, children: [
|
|
10870
|
+
/* @__PURE__ */ jsx51(SearchIcon7, { style: { color: "#34d399" } }),
|
|
10871
|
+
/* @__PURE__ */ jsxs36(Text37, { size: 2, weight: "medium", children: [
|
|
10309
10872
|
"Retrieval Successes (",
|
|
10310
10873
|
Math.round(EFFICIENCY_POSITIVE * 100),
|
|
10311
10874
|
"%+ efficiency)"
|
|
10312
10875
|
] }),
|
|
10313
|
-
/* @__PURE__ */
|
|
10876
|
+
/* @__PURE__ */ jsx51(InfoTip, { text: GLOSSARY.retrievalExcellence })
|
|
10314
10877
|
] })
|
|
10315
10878
|
}
|
|
10316
10879
|
),
|
|
10317
|
-
/* @__PURE__ */
|
|
10318
|
-
|
|
10880
|
+
/* @__PURE__ */ jsx51(Stack28, { children: retrievalSuccesses.map((area, i) => /* @__PURE__ */ jsxs36(
|
|
10881
|
+
Flex27,
|
|
10319
10882
|
{
|
|
10320
10883
|
align: "center",
|
|
10321
10884
|
justify: "space-between",
|
|
10322
10885
|
padding: 4,
|
|
10323
10886
|
style: i > 0 ? dividerStyle : void 0,
|
|
10324
10887
|
children: [
|
|
10325
|
-
/* @__PURE__ */
|
|
10326
|
-
/* @__PURE__ */
|
|
10888
|
+
/* @__PURE__ */ jsx51(Text37, { size: 2, children: area.feature }),
|
|
10889
|
+
/* @__PURE__ */ jsx51(
|
|
10327
10890
|
"span",
|
|
10328
10891
|
{
|
|
10329
10892
|
style: {
|
|
@@ -10353,8 +10916,9 @@ import {
|
|
|
10353
10916
|
BoltIcon,
|
|
10354
10917
|
ArrowDownIcon as ArrowDownIcon2
|
|
10355
10918
|
} from "@sanity/icons";
|
|
10356
|
-
import { Box as
|
|
10357
|
-
import { jsx as
|
|
10919
|
+
import { Box as Box25, Flex as Flex28, Stack as Stack29, Text as Text38 } from "@sanity/ui";
|
|
10920
|
+
import { jsx as jsx52, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
10921
|
+
var SHOW_REGRESSED = false;
|
|
10358
10922
|
function WeaknessesList({
|
|
10359
10923
|
mode,
|
|
10360
10924
|
scores,
|
|
@@ -10382,15 +10946,15 @@ function WeaknessesList({
|
|
|
10382
10946
|
const efficiencyAnomalies = scores.filter(
|
|
10383
10947
|
(s) => s.infrastructureEfficiency != null && s.infrastructureEfficiency > EFFICIENCY_ANOMALY
|
|
10384
10948
|
);
|
|
10385
|
-
const hasContent = weakAreas.length > 0 || docsHurt.length > 0 || retrievalIssues.length > 0 || dimWeaknesses.length > 0 || regressed.length > 0 || efficiencyAnomalies.length > 0;
|
|
10949
|
+
const hasContent = weakAreas.length > 0 || docsHurt.length > 0 || retrievalIssues.length > 0 || dimWeaknesses.length > 0 || SHOW_REGRESSED && regressed.length > 0 || efficiencyAnomalies.length > 0;
|
|
10386
10950
|
if (!hasContent) return null;
|
|
10387
|
-
return /* @__PURE__ */
|
|
10388
|
-
weakAreas.length > 0 && /* @__PURE__ */
|
|
10389
|
-
/* @__PURE__ */
|
|
10390
|
-
/* @__PURE__ */
|
|
10391
|
-
/* @__PURE__ */
|
|
10392
|
-
/* @__PURE__ */
|
|
10393
|
-
hasModels && /* @__PURE__ */
|
|
10951
|
+
return /* @__PURE__ */ jsxs37(Stack29, { space: 5, children: [
|
|
10952
|
+
weakAreas.length > 0 && /* @__PURE__ */ jsxs37(Stack29, { space: 3, children: [
|
|
10953
|
+
/* @__PURE__ */ jsxs37(Flex28, { align: "center", gap: 2, wrap: "wrap", children: [
|
|
10954
|
+
/* @__PURE__ */ jsx52(ErrorOutlineIcon3, { style: { color: "#f87171" } }),
|
|
10955
|
+
/* @__PURE__ */ jsx52(Text38, { size: 2, weight: "medium", children: "Weak Areas (<70)" }),
|
|
10956
|
+
/* @__PURE__ */ jsx52(InfoTip, { text: GLOSSARY.weakAreas }),
|
|
10957
|
+
hasModels && /* @__PURE__ */ jsx52(Box25, { style: { marginLeft: "auto" }, children: /* @__PURE__ */ jsx52(
|
|
10394
10958
|
ModelSelector,
|
|
10395
10959
|
{
|
|
10396
10960
|
models: perModel,
|
|
@@ -10399,7 +10963,7 @@ function WeaknessesList({
|
|
|
10399
10963
|
}
|
|
10400
10964
|
) })
|
|
10401
10965
|
] }),
|
|
10402
|
-
/* @__PURE__ */
|
|
10966
|
+
/* @__PURE__ */ jsx52(
|
|
10403
10967
|
AreaScoresGrid,
|
|
10404
10968
|
{
|
|
10405
10969
|
mode,
|
|
@@ -10409,22 +10973,22 @@ function WeaknessesList({
|
|
|
10409
10973
|
}
|
|
10410
10974
|
)
|
|
10411
10975
|
] }),
|
|
10412
|
-
docsHurt.length > 0 && /* @__PURE__ */
|
|
10413
|
-
/* @__PURE__ */
|
|
10414
|
-
/* @__PURE__ */
|
|
10415
|
-
/* @__PURE__ */
|
|
10416
|
-
/* @__PURE__ */
|
|
10976
|
+
docsHurt.length > 0 && /* @__PURE__ */ jsxs37(Stack29, { space: 3, children: [
|
|
10977
|
+
/* @__PURE__ */ jsxs37(Flex28, { align: "center", gap: 2, children: [
|
|
10978
|
+
/* @__PURE__ */ jsx52(ErrorOutlineIcon3, { style: { color: "#f87171" } }),
|
|
10979
|
+
/* @__PURE__ */ jsx52(Text38, { size: 2, weight: "medium", children: "Docs Hurt Performance (Negative Doc Lift)" }),
|
|
10980
|
+
/* @__PURE__ */ jsx52(InfoTip, { text: GLOSSARY.docsHurt })
|
|
10417
10981
|
] }),
|
|
10418
|
-
/* @__PURE__ */
|
|
10419
|
-
|
|
10982
|
+
/* @__PURE__ */ jsx52(Box25, { style: sectionStyle("red"), children: docsHurt.map((area, i) => /* @__PURE__ */ jsxs37(
|
|
10983
|
+
Box25,
|
|
10420
10984
|
{
|
|
10421
10985
|
padding: 4,
|
|
10422
10986
|
style: i > 0 ? { borderTop: "1px solid rgba(239,68,68,0.2)" } : void 0,
|
|
10423
10987
|
children: [
|
|
10424
|
-
/* @__PURE__ */
|
|
10425
|
-
/* @__PURE__ */
|
|
10426
|
-
/* @__PURE__ */
|
|
10427
|
-
/* @__PURE__ */
|
|
10988
|
+
/* @__PURE__ */ jsxs37(Flex28, { align: "center", justify: "space-between", wrap: "wrap", children: [
|
|
10989
|
+
/* @__PURE__ */ jsxs37(Flex28, { align: "center", gap: 2, children: [
|
|
10990
|
+
/* @__PURE__ */ jsx52(Text38, { size: 2, weight: "medium", children: area.feature }),
|
|
10991
|
+
/* @__PURE__ */ jsx52(
|
|
10428
10992
|
"span",
|
|
10429
10993
|
{
|
|
10430
10994
|
style: {
|
|
@@ -10439,7 +11003,7 @@ function WeaknessesList({
|
|
|
10439
11003
|
}
|
|
10440
11004
|
)
|
|
10441
11005
|
] }),
|
|
10442
|
-
/* @__PURE__ */
|
|
11006
|
+
/* @__PURE__ */ jsx52(
|
|
10443
11007
|
"span",
|
|
10444
11008
|
{
|
|
10445
11009
|
style: {
|
|
@@ -10452,8 +11016,8 @@ function WeaknessesList({
|
|
|
10452
11016
|
}
|
|
10453
11017
|
)
|
|
10454
11018
|
] }),
|
|
10455
|
-
/* @__PURE__ */
|
|
10456
|
-
area.invertedRetrievalGap && /* @__PURE__ */
|
|
11019
|
+
/* @__PURE__ */ jsx52(Box25, { paddingTop: 2, children: /* @__PURE__ */ jsxs37(Text38, { muted: true, size: 2, children: [
|
|
11020
|
+
area.invertedRetrievalGap && /* @__PURE__ */ jsxs37("span", { style: { color: "#fbbf24" }, children: [
|
|
10457
11021
|
"Agent does better by NOT finding these docs.",
|
|
10458
11022
|
" "
|
|
10459
11023
|
] }),
|
|
@@ -10468,22 +11032,22 @@ function WeaknessesList({
|
|
|
10468
11032
|
area.feature
|
|
10469
11033
|
)) })
|
|
10470
11034
|
] }),
|
|
10471
|
-
retrievalIssues.length > 0 && /* @__PURE__ */
|
|
10472
|
-
/* @__PURE__ */
|
|
10473
|
-
/* @__PURE__ */
|
|
10474
|
-
/* @__PURE__ */
|
|
10475
|
-
/* @__PURE__ */
|
|
11035
|
+
retrievalIssues.length > 0 && /* @__PURE__ */ jsxs37(Stack29, { space: 3, children: [
|
|
11036
|
+
/* @__PURE__ */ jsxs37(Flex28, { align: "center", gap: 2, children: [
|
|
11037
|
+
/* @__PURE__ */ jsx52(SearchIcon8, { style: { color: "#fbbf24" } }),
|
|
11038
|
+
/* @__PURE__ */ jsx52(Text38, { size: 2, weight: "medium", children: "Retrieval Issues (<70% efficiency)" }),
|
|
11039
|
+
/* @__PURE__ */ jsx52(InfoTip, { text: GLOSSARY.retrievalIssues })
|
|
10476
11040
|
] }),
|
|
10477
|
-
/* @__PURE__ */
|
|
10478
|
-
|
|
11041
|
+
/* @__PURE__ */ jsx52(Box25, { style: sectionStyle("amber"), children: retrievalIssues.map((area, i) => /* @__PURE__ */ jsxs37(
|
|
11042
|
+
Box25,
|
|
10479
11043
|
{
|
|
10480
11044
|
padding: 4,
|
|
10481
11045
|
style: i > 0 ? { borderTop: "1px solid rgba(245,158,11,0.2)" } : void 0,
|
|
10482
11046
|
children: [
|
|
10483
|
-
/* @__PURE__ */
|
|
10484
|
-
/* @__PURE__ */
|
|
10485
|
-
/* @__PURE__ */
|
|
10486
|
-
/* @__PURE__ */
|
|
11047
|
+
/* @__PURE__ */ jsxs37(Flex28, { align: "center", justify: "space-between", wrap: "wrap", children: [
|
|
11048
|
+
/* @__PURE__ */ jsxs37(Flex28, { align: "center", gap: 2, children: [
|
|
11049
|
+
/* @__PURE__ */ jsx52(Text38, { size: 2, weight: "medium", children: area.feature }),
|
|
11050
|
+
/* @__PURE__ */ jsx52(
|
|
10487
11051
|
"span",
|
|
10488
11052
|
{
|
|
10489
11053
|
style: {
|
|
@@ -10498,7 +11062,7 @@ function WeaknessesList({
|
|
|
10498
11062
|
}
|
|
10499
11063
|
)
|
|
10500
11064
|
] }),
|
|
10501
|
-
/* @__PURE__ */
|
|
11065
|
+
/* @__PURE__ */ jsx52(
|
|
10502
11066
|
"span",
|
|
10503
11067
|
{
|
|
10504
11068
|
style: {
|
|
@@ -10511,7 +11075,7 @@ function WeaknessesList({
|
|
|
10511
11075
|
}
|
|
10512
11076
|
)
|
|
10513
11077
|
] }),
|
|
10514
|
-
/* @__PURE__ */
|
|
11078
|
+
/* @__PURE__ */ jsx52(Box25, { paddingTop: 2, children: /* @__PURE__ */ jsxs37(Text38, { muted: true, size: 2, children: [
|
|
10515
11079
|
"Actual score (",
|
|
10516
11080
|
Math.round(area.actualScore ?? 0),
|
|
10517
11081
|
") is much lower than ceiling (",
|
|
@@ -10526,21 +11090,21 @@ function WeaknessesList({
|
|
|
10526
11090
|
area.feature
|
|
10527
11091
|
)) })
|
|
10528
11092
|
] }),
|
|
10529
|
-
dimWeaknesses.length > 0 && /* @__PURE__ */
|
|
10530
|
-
/* @__PURE__ */
|
|
10531
|
-
/* @__PURE__ */
|
|
10532
|
-
/* @__PURE__ */
|
|
10533
|
-
/* @__PURE__ */
|
|
11093
|
+
dimWeaknesses.length > 0 && /* @__PURE__ */ jsxs37(Stack29, { space: 3, children: [
|
|
11094
|
+
/* @__PURE__ */ jsxs37(Flex28, { align: "center", gap: 2, children: [
|
|
11095
|
+
/* @__PURE__ */ jsx52(WarningOutlineIcon3, { style: { color: "#fbbf24" } }),
|
|
11096
|
+
/* @__PURE__ */ jsx52(Text38, { size: 2, weight: "medium", children: "Dimension Weaknesses (<50)" }),
|
|
11097
|
+
/* @__PURE__ */ jsx52(InfoTip, { text: GLOSSARY.dimWeaknesses })
|
|
10534
11098
|
] }),
|
|
10535
|
-
/* @__PURE__ */
|
|
10536
|
-
|
|
11099
|
+
/* @__PURE__ */ jsx52(Box25, { style: neutralCardStyle, children: dimWeaknesses.map(({ area, dims }, i) => /* @__PURE__ */ jsxs37(
|
|
11100
|
+
Box25,
|
|
10537
11101
|
{
|
|
10538
11102
|
padding: 4,
|
|
10539
11103
|
style: i > 0 ? dividerStyle : void 0,
|
|
10540
11104
|
children: [
|
|
10541
|
-
/* @__PURE__ */
|
|
10542
|
-
/* @__PURE__ */
|
|
10543
|
-
/* @__PURE__ */
|
|
11105
|
+
/* @__PURE__ */ jsxs37(Flex28, { align: "center", gap: 2, paddingBottom: 2, children: [
|
|
11106
|
+
/* @__PURE__ */ jsx52(Text38, { size: 2, weight: "medium", children: area.feature }),
|
|
11107
|
+
/* @__PURE__ */ jsx52(
|
|
10544
11108
|
"span",
|
|
10545
11109
|
{
|
|
10546
11110
|
style: {
|
|
@@ -10555,7 +11119,7 @@ function WeaknessesList({
|
|
|
10555
11119
|
}
|
|
10556
11120
|
)
|
|
10557
11121
|
] }),
|
|
10558
|
-
/* @__PURE__ */
|
|
11122
|
+
/* @__PURE__ */ jsx52(Flex28, { gap: 2, wrap: "wrap", children: dims.map((w) => /* @__PURE__ */ jsx52(HoverTip, { text: w.tip, children: /* @__PURE__ */ jsxs37(
|
|
10559
11123
|
"span",
|
|
10560
11124
|
{
|
|
10561
11125
|
style: {
|
|
@@ -10577,33 +11141,33 @@ function WeaknessesList({
|
|
|
10577
11141
|
area.feature
|
|
10578
11142
|
)) })
|
|
10579
11143
|
] }),
|
|
10580
|
-
regressed.length > 0 && /* @__PURE__ */
|
|
10581
|
-
/* @__PURE__ */
|
|
10582
|
-
|
|
11144
|
+
SHOW_REGRESSED && regressed.length > 0 && /* @__PURE__ */ jsxs37(Box25, { style: neutralCardStyle, children: [
|
|
11145
|
+
/* @__PURE__ */ jsx52(
|
|
11146
|
+
Box25,
|
|
10583
11147
|
{
|
|
10584
11148
|
padding: 4,
|
|
10585
11149
|
style: { borderBottom: "1px solid var(--card-border-color)" },
|
|
10586
|
-
children: /* @__PURE__ */
|
|
10587
|
-
/* @__PURE__ */
|
|
10588
|
-
/* @__PURE__ */
|
|
11150
|
+
children: /* @__PURE__ */ jsxs37(Flex28, { align: "center", gap: 2, children: [
|
|
11151
|
+
/* @__PURE__ */ jsx52(ArrowDownIcon2, { style: { color: "#f87171" } }),
|
|
11152
|
+
/* @__PURE__ */ jsx52(Text38, { size: 2, weight: "medium", children: "Regressed Since Last Run" })
|
|
10589
11153
|
] })
|
|
10590
11154
|
}
|
|
10591
11155
|
),
|
|
10592
|
-
/* @__PURE__ */
|
|
11156
|
+
/* @__PURE__ */ jsx52(Stack29, { children: regressed.map((featureName, i) => {
|
|
10593
11157
|
const area = scores.find((s) => s.feature === featureName);
|
|
10594
11158
|
const areaDelta = perArea?.[featureName];
|
|
10595
|
-
return /* @__PURE__ */
|
|
10596
|
-
|
|
11159
|
+
return /* @__PURE__ */ jsxs37(
|
|
11160
|
+
Flex28,
|
|
10597
11161
|
{
|
|
10598
11162
|
align: "center",
|
|
10599
11163
|
justify: "space-between",
|
|
10600
11164
|
padding: 4,
|
|
10601
11165
|
style: i > 0 ? dividerStyle : void 0,
|
|
10602
11166
|
children: [
|
|
10603
|
-
/* @__PURE__ */
|
|
10604
|
-
/* @__PURE__ */
|
|
10605
|
-
areaDelta != null && /* @__PURE__ */
|
|
10606
|
-
area && /* @__PURE__ */
|
|
11167
|
+
/* @__PURE__ */ jsx52(Text38, { size: 2, children: featureName }),
|
|
11168
|
+
/* @__PURE__ */ jsxs37(Flex28, { align: "center", gap: 3, children: [
|
|
11169
|
+
areaDelta != null && /* @__PURE__ */ jsx52(DeltaIndicator, { delta: areaDelta, icon: true }),
|
|
11170
|
+
area && /* @__PURE__ */ jsx52(
|
|
10607
11171
|
"span",
|
|
10608
11172
|
{
|
|
10609
11173
|
style: {
|
|
@@ -10625,32 +11189,32 @@ function WeaknessesList({
|
|
|
10625
11189
|
);
|
|
10626
11190
|
}) })
|
|
10627
11191
|
] }),
|
|
10628
|
-
efficiencyAnomalies.length > 0 && /* @__PURE__ */
|
|
10629
|
-
/* @__PURE__ */
|
|
10630
|
-
|
|
11192
|
+
efficiencyAnomalies.length > 0 && /* @__PURE__ */ jsxs37(Box25, { style: neutralCardStyle, children: [
|
|
11193
|
+
/* @__PURE__ */ jsx52(
|
|
11194
|
+
Box25,
|
|
10631
11195
|
{
|
|
10632
11196
|
padding: 4,
|
|
10633
11197
|
style: { borderBottom: "1px solid var(--card-border-color)" },
|
|
10634
|
-
children: /* @__PURE__ */
|
|
10635
|
-
/* @__PURE__ */
|
|
10636
|
-
/* @__PURE__ */
|
|
10637
|
-
/* @__PURE__ */
|
|
10638
|
-
/* @__PURE__ */
|
|
11198
|
+
children: /* @__PURE__ */ jsxs37(Stack29, { space: 2, children: [
|
|
11199
|
+
/* @__PURE__ */ jsxs37(Flex28, { align: "center", gap: 2, children: [
|
|
11200
|
+
/* @__PURE__ */ jsx52(BoltIcon, { style: { color: "#fbbf24" } }),
|
|
11201
|
+
/* @__PURE__ */ jsx52(Text38, { size: 2, weight: "medium", children: "Efficiency Anomalies (>100%)" }),
|
|
11202
|
+
/* @__PURE__ */ jsx52(InfoTip, { text: GLOSSARY.efficiencyAnomalies })
|
|
10639
11203
|
] }),
|
|
10640
|
-
/* @__PURE__ */
|
|
11204
|
+
/* @__PURE__ */ jsx52(Text38, { muted: true, size: 2, children: "Agent outperforms injected docs \u2014 may indicate doc quality issues or agent memorization." })
|
|
10641
11205
|
] })
|
|
10642
11206
|
}
|
|
10643
11207
|
),
|
|
10644
|
-
/* @__PURE__ */
|
|
10645
|
-
|
|
11208
|
+
/* @__PURE__ */ jsx52(Stack29, { children: efficiencyAnomalies.map((area, i) => /* @__PURE__ */ jsxs37(
|
|
11209
|
+
Flex28,
|
|
10646
11210
|
{
|
|
10647
11211
|
align: "center",
|
|
10648
11212
|
justify: "space-between",
|
|
10649
11213
|
padding: 4,
|
|
10650
11214
|
style: i > 0 ? dividerStyle : void 0,
|
|
10651
11215
|
children: [
|
|
10652
|
-
/* @__PURE__ */
|
|
10653
|
-
/* @__PURE__ */
|
|
11216
|
+
/* @__PURE__ */ jsx52(Text38, { size: 2, children: area.feature }),
|
|
11217
|
+
/* @__PURE__ */ jsx52(
|
|
10654
11218
|
"span",
|
|
10655
11219
|
{
|
|
10656
11220
|
style: {
|
|
@@ -10678,12 +11242,12 @@ var tipArea = {
|
|
|
10678
11242
|
fontWeight: 600
|
|
10679
11243
|
};
|
|
10680
11244
|
function dimTip(area, dim, score, description) {
|
|
10681
|
-
return /* @__PURE__ */
|
|
10682
|
-
/* @__PURE__ */
|
|
11245
|
+
return /* @__PURE__ */ jsxs37(Text38, { size: 2, style: { lineHeight: 1.5 }, children: [
|
|
11246
|
+
/* @__PURE__ */ jsx52("span", { style: tipArea, children: area }),
|
|
10683
11247
|
" scores",
|
|
10684
11248
|
" ",
|
|
10685
|
-
/* @__PURE__ */
|
|
10686
|
-
/* @__PURE__ */
|
|
11249
|
+
/* @__PURE__ */ jsx52("span", { style: tipValue, children: score }),
|
|
11250
|
+
/* @__PURE__ */ jsx52("span", { style: { color: "var(--card-muted-fg-color)" }, children: "/100" }),
|
|
10687
11251
|
" on",
|
|
10688
11252
|
" ",
|
|
10689
11253
|
dim.toLowerCase(),
|
|
@@ -10712,7 +11276,7 @@ function getDimensionWeaknesses(area) {
|
|
|
10712
11276
|
}
|
|
10713
11277
|
|
|
10714
11278
|
// src/components/report-detail/ReportDetail.tsx
|
|
10715
|
-
import { jsx as
|
|
11279
|
+
import { jsx as jsx53, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
10716
11280
|
var OVERVIEW_TAB = { id: "overview", label: "Overview" };
|
|
10717
11281
|
var DIAGNOSTICS_TAB = { id: "diagnostics", label: "Diagnostics" };
|
|
10718
11282
|
var ACTIVITY_TAB = { id: "activity", label: "Agent Activity" };
|
|
@@ -10729,9 +11293,9 @@ function ReportDetail({
|
|
|
10729
11293
|
subTab
|
|
10730
11294
|
}) {
|
|
10731
11295
|
const client = useClient10({ apiVersion: API_VERSION });
|
|
10732
|
-
const [loading, setLoading] =
|
|
10733
|
-
const [report, setReport] =
|
|
10734
|
-
|
|
11296
|
+
const [loading, setLoading] = useState23(true);
|
|
11297
|
+
const [report, setReport] = useState23(null);
|
|
11298
|
+
useEffect12(() => {
|
|
10735
11299
|
let cancelled = false;
|
|
10736
11300
|
setLoading(true);
|
|
10737
11301
|
client.fetch(reportDetailQuery, { reportId }).then((data) => {
|
|
@@ -10775,19 +11339,19 @@ function ReportDetail({
|
|
|
10775
11339
|
if (disabledTabs.has(parsed)) return "overview";
|
|
10776
11340
|
return tabs.some((t) => t.id === parsed) ? parsed : "overview";
|
|
10777
11341
|
}, [activeTab, disabledTabs, tabs]);
|
|
10778
|
-
const handleTabClick =
|
|
11342
|
+
const handleTabClick = useCallback33(
|
|
10779
11343
|
(tabId) => {
|
|
10780
11344
|
onTabChange(tabId === "overview" ? null : tabId, null, null);
|
|
10781
11345
|
},
|
|
10782
11346
|
[onTabChange]
|
|
10783
11347
|
);
|
|
10784
11348
|
if (loading) {
|
|
10785
|
-
return /* @__PURE__ */
|
|
11349
|
+
return /* @__PURE__ */ jsx53(LoadingState, { message: "Loading report\u2026" });
|
|
10786
11350
|
}
|
|
10787
11351
|
if (!report || !summary) {
|
|
10788
|
-
return /* @__PURE__ */
|
|
10789
|
-
/* @__PURE__ */
|
|
10790
|
-
|
|
11352
|
+
return /* @__PURE__ */ jsx53(Box26, { padding: 5, children: /* @__PURE__ */ jsxs38(Stack30, { space: 4, children: [
|
|
11353
|
+
/* @__PURE__ */ jsx53(
|
|
11354
|
+
Button8,
|
|
10791
11355
|
{
|
|
10792
11356
|
icon: ArrowLeftIcon3,
|
|
10793
11357
|
mode: "bleed",
|
|
@@ -10795,18 +11359,18 @@ function ReportDetail({
|
|
|
10795
11359
|
text: "Back"
|
|
10796
11360
|
}
|
|
10797
11361
|
),
|
|
10798
|
-
/* @__PURE__ */
|
|
11362
|
+
/* @__PURE__ */ jsx53(Text39, { align: "center", muted: true, size: 3, children: "Report not found" })
|
|
10799
11363
|
] }) });
|
|
10800
11364
|
}
|
|
10801
11365
|
const { comparison, provenance } = report;
|
|
10802
11366
|
const totalTests = summary.scores.reduce((n, s) => n + s.testCount, 0);
|
|
10803
|
-
return /* @__PURE__ */
|
|
11367
|
+
return /* @__PURE__ */ jsx53(
|
|
10804
11368
|
ReportArtifactProvider,
|
|
10805
11369
|
{
|
|
10806
11370
|
runId: report.provenance?.runId,
|
|
10807
11371
|
manifest: summary?.artifactManifest,
|
|
10808
|
-
children: /* @__PURE__ */
|
|
10809
|
-
/* @__PURE__ */
|
|
11372
|
+
children: /* @__PURE__ */ jsx53(Box26, { padding: 4, children: /* @__PURE__ */ jsxs38(Stack30, { space: 5, children: [
|
|
11373
|
+
/* @__PURE__ */ jsx53(
|
|
10810
11374
|
ReportHeader,
|
|
10811
11375
|
{
|
|
10812
11376
|
completedAt: report.completedAt,
|
|
@@ -10815,11 +11379,11 @@ function ReportDetail({
|
|
|
10815
11379
|
title: report.title
|
|
10816
11380
|
}
|
|
10817
11381
|
),
|
|
10818
|
-
/* @__PURE__ */
|
|
10819
|
-
/* @__PURE__ */
|
|
11382
|
+
/* @__PURE__ */ jsxs38(Flex29, { align: "center", gap: 2, wrap: "wrap", children: [
|
|
11383
|
+
/* @__PURE__ */ jsx53(TabList, { space: 1, children: tabs.map((tab) => {
|
|
10820
11384
|
const isDisabled = disabledTabs.has(tab.id);
|
|
10821
11385
|
const tooltip = getDisabledTabTooltip(tab.id, summary);
|
|
10822
|
-
const tabElement = /* @__PURE__ */
|
|
11386
|
+
const tabElement = /* @__PURE__ */ jsx53(
|
|
10823
11387
|
Tab,
|
|
10824
11388
|
{
|
|
10825
11389
|
"aria-controls": `panel-${tab.id}`,
|
|
@@ -10830,27 +11394,27 @@ function ReportDetail({
|
|
|
10830
11394
|
selected: currentTab === tab.id
|
|
10831
11395
|
}
|
|
10832
11396
|
);
|
|
10833
|
-
return isDisabled && tooltip ? /* @__PURE__ */
|
|
10834
|
-
|
|
11397
|
+
return isDisabled && tooltip ? /* @__PURE__ */ jsx53(
|
|
11398
|
+
Tooltip10,
|
|
10835
11399
|
{
|
|
10836
|
-
content: /* @__PURE__ */
|
|
11400
|
+
content: /* @__PURE__ */ jsx53(Box26, { padding: 2, style: { maxWidth: 280 }, children: tooltip }),
|
|
10837
11401
|
placement: "bottom",
|
|
10838
11402
|
portal: true,
|
|
10839
|
-
children: /* @__PURE__ */
|
|
11403
|
+
children: /* @__PURE__ */ jsx53("span", { style: { display: "inline-block" }, children: tabElement })
|
|
10840
11404
|
},
|
|
10841
11405
|
tab.id
|
|
10842
|
-
) : /* @__PURE__ */
|
|
11406
|
+
) : /* @__PURE__ */ jsx53("span", { children: tabElement }, tab.id);
|
|
10843
11407
|
}) }),
|
|
10844
|
-
/* @__PURE__ */
|
|
10845
|
-
/* @__PURE__ */
|
|
11408
|
+
/* @__PURE__ */ jsxs38(Flex29, { align: "center", gap: 2, style: { marginLeft: "auto" }, children: [
|
|
11409
|
+
/* @__PURE__ */ jsx53(
|
|
10846
11410
|
HoverTip,
|
|
10847
11411
|
{
|
|
10848
11412
|
text: SOURCE_TIP[provenance.source.name] ?? GLOSSARY.reportMode,
|
|
10849
|
-
children: /* @__PURE__ */
|
|
11413
|
+
children: /* @__PURE__ */ jsx53(Badge8, { mode: "outline", tone: "default", children: provenance.source.name })
|
|
10850
11414
|
}
|
|
10851
11415
|
),
|
|
10852
|
-
/* @__PURE__ */
|
|
10853
|
-
/* @__PURE__ */
|
|
11416
|
+
/* @__PURE__ */ jsx53(HoverTip, { text: MODE_TIP2[provenance.mode] ?? GLOSSARY.reportMode, children: /* @__PURE__ */ jsx53(Badge8, { tone: "primary", children: provenance.mode }) }),
|
|
11417
|
+
/* @__PURE__ */ jsx53(
|
|
10854
11418
|
ReportActions,
|
|
10855
11419
|
{
|
|
10856
11420
|
documentId: report._id,
|
|
@@ -10861,14 +11425,14 @@ function ReportDetail({
|
|
|
10861
11425
|
)
|
|
10862
11426
|
] })
|
|
10863
11427
|
] }),
|
|
10864
|
-
currentTab === "overview" && /* @__PURE__ */
|
|
11428
|
+
currentTab === "overview" && /* @__PURE__ */ jsx53(
|
|
10865
11429
|
TabPanel,
|
|
10866
11430
|
{
|
|
10867
11431
|
"aria-labelledby": "tab-overview",
|
|
10868
11432
|
hidden: currentTab !== "overview",
|
|
10869
11433
|
id: "panel-overview",
|
|
10870
|
-
children: /* @__PURE__ */
|
|
10871
|
-
/* @__PURE__ */
|
|
11434
|
+
children: /* @__PURE__ */ jsxs38(Stack30, { space: 5, children: [
|
|
11435
|
+
/* @__PURE__ */ jsx53(
|
|
10872
11436
|
DiagnosticsOverview,
|
|
10873
11437
|
{
|
|
10874
11438
|
comparison,
|
|
@@ -10879,18 +11443,19 @@ function ReportDetail({
|
|
|
10879
11443
|
totalTests
|
|
10880
11444
|
}
|
|
10881
11445
|
),
|
|
10882
|
-
/* @__PURE__ */
|
|
11446
|
+
/* @__PURE__ */ jsx53(CostLatencyPanel, { testResults: summary.testResults }),
|
|
11447
|
+
/* @__PURE__ */ jsx53(
|
|
10883
11448
|
LineageCard,
|
|
10884
11449
|
{
|
|
10885
11450
|
provenance,
|
|
10886
11451
|
reportId: report.reportId
|
|
10887
11452
|
}
|
|
10888
11453
|
),
|
|
10889
|
-
/* @__PURE__ */
|
|
11454
|
+
/* @__PURE__ */ jsx53(ProvenanceCard, { provenance })
|
|
10890
11455
|
] })
|
|
10891
11456
|
}
|
|
10892
11457
|
),
|
|
10893
|
-
currentTab === "diagnostics" && hasDiagnostics && /* @__PURE__ */
|
|
11458
|
+
currentTab === "diagnostics" && hasDiagnostics && /* @__PURE__ */ jsx53(
|
|
10894
11459
|
DiagnosticsPanel,
|
|
10895
11460
|
{
|
|
10896
11461
|
artifactCache,
|
|
@@ -10906,13 +11471,13 @@ function ReportDetail({
|
|
|
10906
11471
|
testResults: summary.testResults
|
|
10907
11472
|
}
|
|
10908
11473
|
),
|
|
10909
|
-
currentTab === "activity" && hasAgentActivity && /* @__PURE__ */
|
|
11474
|
+
currentTab === "activity" && hasAgentActivity && /* @__PURE__ */ jsx53(
|
|
10910
11475
|
TabPanel,
|
|
10911
11476
|
{
|
|
10912
11477
|
"aria-labelledby": "tab-activity",
|
|
10913
11478
|
hidden: currentTab !== "activity",
|
|
10914
11479
|
id: "panel-activity",
|
|
10915
|
-
children: /* @__PURE__ */
|
|
11480
|
+
children: /* @__PURE__ */ jsx53(
|
|
10916
11481
|
AgentBehaviorCard,
|
|
10917
11482
|
{
|
|
10918
11483
|
agentBehavior: summary.agentBehavior,
|
|
@@ -10933,6 +11498,7 @@ var DIAG_TABS = [
|
|
|
10933
11498
|
{ id: "strengths", label: "Strengths" },
|
|
10934
11499
|
{ id: "issues", label: "Issues" }
|
|
10935
11500
|
];
|
|
11501
|
+
var SHOW_FAILURE_MODES = false;
|
|
10936
11502
|
function DiagnosticsPanel({
|
|
10937
11503
|
artifactCache,
|
|
10938
11504
|
comparison,
|
|
@@ -10950,9 +11516,9 @@ function DiagnosticsPanel({
|
|
|
10950
11516
|
const issueCount = scores.filter((s) => s.totalScore < SCORE_CAUTION).length + scores.filter((s) => s.negativeDocLift).length + scores.filter(
|
|
10951
11517
|
(s) => s.infrastructureEfficiency != null && s.infrastructureEfficiency < EFFICIENCY_CAUTION && !s.invertedRetrievalGap
|
|
10952
11518
|
).length;
|
|
10953
|
-
return /* @__PURE__ */
|
|
10954
|
-
/* @__PURE__ */
|
|
10955
|
-
|
|
11519
|
+
return /* @__PURE__ */ jsx53(TabPanel, { "aria-labelledby": "tab-diagnostics", id: "panel-diagnostics", children: /* @__PURE__ */ jsxs38(Stack30, { space: 4, children: [
|
|
11520
|
+
/* @__PURE__ */ jsx53(
|
|
11521
|
+
Flex29,
|
|
10956
11522
|
{
|
|
10957
11523
|
align: "center",
|
|
10958
11524
|
gap: 1,
|
|
@@ -10961,7 +11527,7 @@ function DiagnosticsPanel({
|
|
|
10961
11527
|
paddingBottom: 8
|
|
10962
11528
|
},
|
|
10963
11529
|
wrap: "wrap",
|
|
10964
|
-
children: DIAG_TABS.map((tab) => /* @__PURE__ */
|
|
11530
|
+
children: DIAG_TABS.map((tab) => /* @__PURE__ */ jsxs38(
|
|
10965
11531
|
"button",
|
|
10966
11532
|
{
|
|
10967
11533
|
onClick: () => onNavigate(tab.id === "strengths" ? null : tab.id, null),
|
|
@@ -10981,7 +11547,7 @@ function DiagnosticsPanel({
|
|
|
10981
11547
|
type: "button",
|
|
10982
11548
|
children: [
|
|
10983
11549
|
tab.label,
|
|
10984
|
-
tab.id === "issues" && issueCount > 0 && /* @__PURE__ */
|
|
11550
|
+
tab.id === "issues" && issueCount > 0 && /* @__PURE__ */ jsx53(
|
|
10985
11551
|
"span",
|
|
10986
11552
|
{
|
|
10987
11553
|
style: {
|
|
@@ -11001,7 +11567,7 @@ function DiagnosticsPanel({
|
|
|
11001
11567
|
))
|
|
11002
11568
|
}
|
|
11003
11569
|
),
|
|
11004
|
-
subTab === "strengths" && /* @__PURE__ */
|
|
11570
|
+
subTab === "strengths" && /* @__PURE__ */ jsx53(
|
|
11005
11571
|
StrengthsList,
|
|
11006
11572
|
{
|
|
11007
11573
|
comparison,
|
|
@@ -11010,8 +11576,8 @@ function DiagnosticsPanel({
|
|
|
11010
11576
|
scores
|
|
11011
11577
|
}
|
|
11012
11578
|
),
|
|
11013
|
-
subTab === "issues" && /* @__PURE__ */
|
|
11014
|
-
/* @__PURE__ */
|
|
11579
|
+
subTab === "issues" && /* @__PURE__ */ jsxs38(Stack30, { space: 5, children: [
|
|
11580
|
+
/* @__PURE__ */ jsx53(
|
|
11015
11581
|
WeaknessesList,
|
|
11016
11582
|
{
|
|
11017
11583
|
comparison,
|
|
@@ -11020,8 +11586,8 @@ function DiagnosticsPanel({
|
|
|
11020
11586
|
scores
|
|
11021
11587
|
}
|
|
11022
11588
|
),
|
|
11023
|
-
/* @__PURE__ */
|
|
11024
|
-
judgments && judgments.length > 0 && /* @__PURE__ */
|
|
11589
|
+
SHOW_FAILURE_MODES && /* @__PURE__ */ jsx53(FailureModesPanel, { failureModes }),
|
|
11590
|
+
judgments && judgments.length > 0 && /* @__PURE__ */ jsx53(
|
|
11025
11591
|
JudgmentList,
|
|
11026
11592
|
{
|
|
11027
11593
|
artifactCache,
|
|
@@ -11057,17 +11623,17 @@ function getDisabledTabTooltip(tabId, summary) {
|
|
|
11057
11623
|
if (!summary) return null;
|
|
11058
11624
|
switch (tabId) {
|
|
11059
11625
|
case "diagnostics":
|
|
11060
|
-
return /* @__PURE__ */
|
|
11626
|
+
return /* @__PURE__ */ jsx53(Text39, { muted: true, size: 2, children: "No diagnostic data available. Diagnostics require at least one scored feature area." });
|
|
11061
11627
|
case "activity":
|
|
11062
|
-
return summary.evaluationMode === "baseline" ? /* @__PURE__ */
|
|
11628
|
+
return summary.evaluationMode === "baseline" ? /* @__PURE__ */ jsxs38(Text39, { muted: true, size: 2, children: [
|
|
11063
11629
|
"Not available for baseline-only evaluations. Run with",
|
|
11064
11630
|
" ",
|
|
11065
|
-
/* @__PURE__ */
|
|
11631
|
+
/* @__PURE__ */ jsx53("code", { style: inlineCodeStyle, children: "--mode full" }),
|
|
11066
11632
|
" or",
|
|
11067
11633
|
" ",
|
|
11068
|
-
/* @__PURE__ */
|
|
11634
|
+
/* @__PURE__ */ jsx53("code", { style: inlineCodeStyle, children: "--mode agentic" }),
|
|
11069
11635
|
" to capture agent browsing behavior."
|
|
11070
|
-
] }) : /* @__PURE__ */
|
|
11636
|
+
] }) : /* @__PURE__ */ jsx53(Text39, { muted: true, size: 2, children: "No agent activity data was recorded for this evaluation." });
|
|
11071
11637
|
default:
|
|
11072
11638
|
return null;
|
|
11073
11639
|
}
|
|
@@ -11075,12 +11641,12 @@ function getDisabledTabTooltip(tabId, summary) {
|
|
|
11075
11641
|
|
|
11076
11642
|
// src/components/report-detail/AreaScoreRow.tsx
|
|
11077
11643
|
import { WarningOutlineIcon as WarningOutlineIcon4 } from "@sanity/icons";
|
|
11078
|
-
import { Box as
|
|
11079
|
-
import { jsx as
|
|
11644
|
+
import { Box as Box27, Flex as Flex30, Stack as Stack31, Text as Text40 } from "@sanity/ui";
|
|
11645
|
+
import { jsx as jsx54, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
11080
11646
|
|
|
11081
11647
|
// src/components/report-detail/AreaScoreTable.tsx
|
|
11082
11648
|
import React4 from "react";
|
|
11083
|
-
import { Card as
|
|
11649
|
+
import { Card as Card18, Stack as Stack32, Text as Text42 } from "@sanity/ui";
|
|
11084
11650
|
|
|
11085
11651
|
// src/lib/scoring.ts
|
|
11086
11652
|
var HEX_MAP = {
|
|
@@ -11097,138 +11663,49 @@ function scoreHex(score) {
|
|
|
11097
11663
|
}
|
|
11098
11664
|
|
|
11099
11665
|
// src/components/primitives/ScoreCell.tsx
|
|
11100
|
-
import { Card as
|
|
11101
|
-
import { jsx as
|
|
11666
|
+
import { Card as Card17, Text as Text41 } from "@sanity/ui";
|
|
11667
|
+
import { jsx as jsx55 } from "react/jsx-runtime";
|
|
11102
11668
|
|
|
11103
11669
|
// src/components/report-detail/AreaScoreTable.tsx
|
|
11104
|
-
import { jsx as
|
|
11670
|
+
import { jsx as jsx56, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
11105
11671
|
|
|
11106
11672
|
// src/components/report-detail/AutoComparisonCard.tsx
|
|
11107
|
-
import { Badge as
|
|
11108
|
-
import { jsx as
|
|
11673
|
+
import { Badge as Badge9, Box as Box28, Card as Card19, Flex as Flex31, Grid as Grid5, Stack as Stack33, Text as Text43, Tooltip as Tooltip11 } from "@sanity/ui";
|
|
11674
|
+
import { jsx as jsx57, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
11109
11675
|
|
|
11110
11676
|
// src/components/report-detail/OverviewStats.tsx
|
|
11111
|
-
import { Grid as
|
|
11112
|
-
import { jsx as
|
|
11677
|
+
import { Grid as Grid6 } from "@sanity/ui";
|
|
11678
|
+
import { jsx as jsx58, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
11113
11679
|
|
|
11114
11680
|
// src/components/report-detail/RecommendationsSection.tsx
|
|
11115
11681
|
import { BoltIcon as BoltIcon2 } from "@sanity/icons";
|
|
11116
|
-
import { Box as
|
|
11117
|
-
import { jsx as
|
|
11682
|
+
import { Box as Box29, Flex as Flex32, Stack as Stack34, Text as Text44 } from "@sanity/ui";
|
|
11683
|
+
import { jsx as jsx59, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
11118
11684
|
|
|
11119
11685
|
// src/components/report-detail/ThreeLayerTable.tsx
|
|
11120
11686
|
import React5 from "react";
|
|
11121
|
-
import { Badge as
|
|
11122
|
-
import { jsx as
|
|
11687
|
+
import { Badge as Badge10, Card as Card20, Flex as Flex33, Stack as Stack35, Text as Text45 } from "@sanity/ui";
|
|
11688
|
+
import { jsx as jsx60, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
11123
11689
|
|
|
11124
11690
|
// src/components/report-detail/JudgmentDetailDrawerOutlet.tsx
|
|
11125
|
-
import { Card as
|
|
11126
|
-
import { useCallback as useCallback34, useEffect as
|
|
11691
|
+
import { Card as Card21 } from "@sanity/ui";
|
|
11692
|
+
import { useCallback as useCallback34, useEffect as useEffect14, useRef as useRef8, useState as useState25 } from "react";
|
|
11127
11693
|
|
|
11128
11694
|
// src/components/report-detail/JudgmentDetailDrawer.tsx
|
|
11129
|
-
import { useEffect as
|
|
11695
|
+
import { useEffect as useEffect13, useState as useState24 } from "react";
|
|
11130
11696
|
import { CloseIcon as CloseIcon2 } from "@sanity/icons";
|
|
11131
11697
|
import {
|
|
11132
|
-
Box as
|
|
11698
|
+
Box as Box30,
|
|
11133
11699
|
Button as Button9,
|
|
11134
|
-
Flex as
|
|
11135
|
-
Stack as
|
|
11700
|
+
Flex as Flex34,
|
|
11701
|
+
Stack as Stack36,
|
|
11136
11702
|
Tab as Tab2,
|
|
11137
11703
|
TabList as TabList2,
|
|
11138
11704
|
TabPanel as TabPanel2,
|
|
11139
|
-
Text as
|
|
11705
|
+
Text as Text46,
|
|
11140
11706
|
Tooltip as Tooltip12
|
|
11141
11707
|
} from "@sanity/ui";
|
|
11142
|
-
|
|
11143
|
-
// src/components/CopyButton.tsx
|
|
11144
|
-
import {
|
|
11145
|
-
useCallback as useCallback33,
|
|
11146
|
-
useEffect as useEffect11,
|
|
11147
|
-
useRef as useRef7,
|
|
11148
|
-
useState as useState23
|
|
11149
|
-
} from "react";
|
|
11150
|
-
import { CheckmarkIcon, CopyIcon as CopyIcon3 } from "@sanity/icons";
|
|
11151
|
-
import { Box as Box27, Button as Button8, Text as Text43, Tooltip as Tooltip11 } from "@sanity/ui";
|
|
11152
|
-
import { jsx as jsx58 } from "react/jsx-runtime";
|
|
11153
|
-
function CopyButton({
|
|
11154
|
-
copiedLabel = "Copied!",
|
|
11155
|
-
errorLabel = "Copy failed",
|
|
11156
|
-
label,
|
|
11157
|
-
revertAfterMs = 1500,
|
|
11158
|
-
style,
|
|
11159
|
-
text
|
|
11160
|
-
}) {
|
|
11161
|
-
const [status, setStatus] = useState23("idle");
|
|
11162
|
-
const timerRef = useRef7(null);
|
|
11163
|
-
const scheduleRevert = useCallback33(() => {
|
|
11164
|
-
if (timerRef.current !== null) window.clearTimeout(timerRef.current);
|
|
11165
|
-
timerRef.current = window.setTimeout(() => {
|
|
11166
|
-
setStatus("idle");
|
|
11167
|
-
timerRef.current = null;
|
|
11168
|
-
}, revertAfterMs);
|
|
11169
|
-
}, [revertAfterMs]);
|
|
11170
|
-
const handleCopy = useCallback33(() => {
|
|
11171
|
-
navigator.clipboard.writeText(text).then(
|
|
11172
|
-
() => {
|
|
11173
|
-
setStatus("copied");
|
|
11174
|
-
scheduleRevert();
|
|
11175
|
-
},
|
|
11176
|
-
() => {
|
|
11177
|
-
setStatus("error");
|
|
11178
|
-
scheduleRevert();
|
|
11179
|
-
}
|
|
11180
|
-
);
|
|
11181
|
-
}, [text, scheduleRevert]);
|
|
11182
|
-
useEffect11(() => {
|
|
11183
|
-
return () => {
|
|
11184
|
-
if (timerRef.current !== null) window.clearTimeout(timerRef.current);
|
|
11185
|
-
};
|
|
11186
|
-
}, []);
|
|
11187
|
-
const tooltipLabel = status === "copied" ? copiedLabel : status === "error" ? errorLabel : label;
|
|
11188
|
-
const tone = status === "copied" ? "positive" : status === "error" ? "critical" : "default";
|
|
11189
|
-
const icon = status === "copied" ? CheckmarkIcon : CopyIcon3;
|
|
11190
|
-
const idle = status === "idle";
|
|
11191
|
-
return /* @__PURE__ */ jsx58(
|
|
11192
|
-
Tooltip11,
|
|
11193
|
-
{
|
|
11194
|
-
content: /* @__PURE__ */ jsx58(Box27, { padding: 2, children: /* @__PURE__ */ jsx58(Text43, { size: 1, children: tooltipLabel }) }),
|
|
11195
|
-
placement: "left",
|
|
11196
|
-
portal: true,
|
|
11197
|
-
children: /* @__PURE__ */ jsx58(
|
|
11198
|
-
Button8,
|
|
11199
|
-
{
|
|
11200
|
-
"aria-label": label,
|
|
11201
|
-
fontSize: 1,
|
|
11202
|
-
icon,
|
|
11203
|
-
mode: "bleed",
|
|
11204
|
-
onBlur: (e) => {
|
|
11205
|
-
if (idle) e.currentTarget.style.opacity = "0.55";
|
|
11206
|
-
},
|
|
11207
|
-
onClick: handleCopy,
|
|
11208
|
-
onFocus: (e) => {
|
|
11209
|
-
if (idle) e.currentTarget.style.opacity = "1";
|
|
11210
|
-
},
|
|
11211
|
-
onMouseEnter: (e) => {
|
|
11212
|
-
if (idle) e.currentTarget.style.opacity = "1";
|
|
11213
|
-
},
|
|
11214
|
-
onMouseLeave: (e) => {
|
|
11215
|
-
if (idle) e.currentTarget.style.opacity = "0.55";
|
|
11216
|
-
},
|
|
11217
|
-
padding: 2,
|
|
11218
|
-
style: {
|
|
11219
|
-
opacity: idle ? 0.55 : 1,
|
|
11220
|
-
transition: "opacity 150ms ease",
|
|
11221
|
-
...style
|
|
11222
|
-
},
|
|
11223
|
-
tone
|
|
11224
|
-
}
|
|
11225
|
-
)
|
|
11226
|
-
}
|
|
11227
|
-
);
|
|
11228
|
-
}
|
|
11229
|
-
|
|
11230
|
-
// src/components/report-detail/JudgmentDetailDrawer.tsx
|
|
11231
|
-
import { jsx as jsx59, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
11708
|
+
import { jsx as jsx61, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
11232
11709
|
var HEADER_STYLE = {
|
|
11233
11710
|
borderBottom: "1px solid var(--card-border-color)"
|
|
11234
11711
|
};
|
|
@@ -11267,7 +11744,7 @@ function DocBadge({
|
|
|
11267
11744
|
const [hovered, setHovered] = useState24(false);
|
|
11268
11745
|
const isLinked = Boolean(doc.documentId);
|
|
11269
11746
|
const tooltipLabel = isLinked ? `Edit "${doc.title || doc.slug}"` : doc.title || doc.slug;
|
|
11270
|
-
const badge = /* @__PURE__ */
|
|
11747
|
+
const badge = /* @__PURE__ */ jsx61(
|
|
11271
11748
|
"span",
|
|
11272
11749
|
{
|
|
11273
11750
|
style: {
|
|
@@ -11280,13 +11757,13 @@ function DocBadge({
|
|
|
11280
11757
|
children: doc.slug
|
|
11281
11758
|
}
|
|
11282
11759
|
);
|
|
11283
|
-
return /* @__PURE__ */
|
|
11760
|
+
return /* @__PURE__ */ jsx61(
|
|
11284
11761
|
Tooltip12,
|
|
11285
11762
|
{
|
|
11286
|
-
content: /* @__PURE__ */
|
|
11763
|
+
content: /* @__PURE__ */ jsx61(Box30, { padding: 2, children: /* @__PURE__ */ jsx61(Text46, { size: 2, children: tooltipLabel }) }),
|
|
11287
11764
|
placement: "bottom",
|
|
11288
11765
|
portal: true,
|
|
11289
|
-
children: isLinked ? /* @__PURE__ */
|
|
11766
|
+
children: isLinked ? /* @__PURE__ */ jsx61(
|
|
11290
11767
|
"a",
|
|
11291
11768
|
{
|
|
11292
11769
|
href: `/intent/edit/id=${doc.documentId}`,
|
|
@@ -11301,7 +11778,7 @@ function DocBadge({
|
|
|
11301
11778
|
},
|
|
11302
11779
|
children: badge
|
|
11303
11780
|
}
|
|
11304
|
-
) : /* @__PURE__ */
|
|
11781
|
+
) : /* @__PURE__ */ jsx61("span", { children: badge })
|
|
11305
11782
|
}
|
|
11306
11783
|
);
|
|
11307
11784
|
}
|
|
@@ -11309,6 +11786,7 @@ function JudgmentDetailDrawer({
|
|
|
11309
11786
|
artifactCache,
|
|
11310
11787
|
judgment,
|
|
11311
11788
|
onClose,
|
|
11789
|
+
onShowPrompts,
|
|
11312
11790
|
testResult
|
|
11313
11791
|
}) {
|
|
11314
11792
|
const [tab, setTab] = useState24("reasoning");
|
|
@@ -11318,7 +11796,7 @@ function JudgmentDetailDrawer({
|
|
|
11318
11796
|
const dimLabel = dimensionLabel2(judgment.dimension);
|
|
11319
11797
|
const judgmentId = judgment.id ?? "";
|
|
11320
11798
|
const [fullJudgment, fullStatus, requestFullJudgment] = useArtifactDetail("graderJudgments", judgmentId);
|
|
11321
|
-
|
|
11799
|
+
useEffect13(() => {
|
|
11322
11800
|
if (!judgmentId) return;
|
|
11323
11801
|
if (fullStatus !== "idle") return;
|
|
11324
11802
|
void requestFullJudgment();
|
|
@@ -11326,11 +11804,11 @@ function JudgmentDetailDrawer({
|
|
|
11326
11804
|
const fullReason = typeof fullJudgment?.reason === "string" && fullJudgment.reason.length > 0 ? fullJudgment.reason : null;
|
|
11327
11805
|
const reasoningText = fullReason ?? judgment.reason;
|
|
11328
11806
|
const reasoningIsPreview = fullReason === null && judgmentId.length > 0 && fullStatus !== "error";
|
|
11329
|
-
|
|
11807
|
+
useEffect13(() => {
|
|
11330
11808
|
setTab("reasoning");
|
|
11331
11809
|
}, [judgment.taskId, judgment.dimension, judgment.modelId]);
|
|
11332
11810
|
const [fetchDispatched, setFetchDispatched] = useState24(false);
|
|
11333
|
-
|
|
11811
|
+
useEffect13(() => {
|
|
11334
11812
|
setFetchDispatched(false);
|
|
11335
11813
|
}, [judgment.taskId, judgment.dimension, judgment.modelId]);
|
|
11336
11814
|
const inlineOutput = testResult?.responseOutput;
|
|
@@ -11345,7 +11823,7 @@ function JudgmentDetailDrawer({
|
|
|
11345
11823
|
const fetchFailed = canAttemptFetch && artifactCache?.status === "error";
|
|
11346
11824
|
const entryUnavailable = canAttemptFetch && fetchDispatched && !fetchInFlight && !fetchFailed;
|
|
11347
11825
|
const hasOutputTab = resolvedOutput != null || canAttemptFetch;
|
|
11348
|
-
|
|
11826
|
+
useEffect13(() => {
|
|
11349
11827
|
if (tab === "output" && canAttemptFetch && !fetchDispatched) {
|
|
11350
11828
|
setFetchDispatched(true);
|
|
11351
11829
|
void artifactCache.fetchOutput(judgment.taskId, judgment.modelId);
|
|
@@ -11358,22 +11836,22 @@ function JudgmentDetailDrawer({
|
|
|
11358
11836
|
judgment.taskId,
|
|
11359
11837
|
judgment.modelId
|
|
11360
11838
|
]);
|
|
11361
|
-
|
|
11839
|
+
useEffect13(() => {
|
|
11362
11840
|
const onKeyDown = (e) => {
|
|
11363
11841
|
if (e.key === "Escape") onClose();
|
|
11364
11842
|
};
|
|
11365
11843
|
window.addEventListener("keydown", onKeyDown);
|
|
11366
11844
|
return () => window.removeEventListener("keydown", onKeyDown);
|
|
11367
11845
|
}, [onClose]);
|
|
11368
|
-
return /* @__PURE__ */
|
|
11369
|
-
|
|
11846
|
+
return /* @__PURE__ */ jsxs45(
|
|
11847
|
+
Flex34,
|
|
11370
11848
|
{
|
|
11371
11849
|
"aria-label": `Judgment detail: ${judgment.score} ${dimLabel}, ${taskName}`,
|
|
11372
11850
|
direction: "column",
|
|
11373
11851
|
role: "dialog",
|
|
11374
11852
|
style: { flex: 1, height: "100%", minHeight: 0, overflow: "hidden" },
|
|
11375
11853
|
children: [
|
|
11376
|
-
/* @__PURE__ */
|
|
11854
|
+
/* @__PURE__ */ jsx61(
|
|
11377
11855
|
"div",
|
|
11378
11856
|
{
|
|
11379
11857
|
"aria-hidden": true,
|
|
@@ -11386,10 +11864,10 @@ function JudgmentDetailDrawer({
|
|
|
11386
11864
|
}
|
|
11387
11865
|
}
|
|
11388
11866
|
),
|
|
11389
|
-
/* @__PURE__ */
|
|
11390
|
-
/* @__PURE__ */
|
|
11391
|
-
/* @__PURE__ */
|
|
11392
|
-
/* @__PURE__ */
|
|
11867
|
+
/* @__PURE__ */ jsxs45(Flex34, { align: "flex-start", gap: 2, padding: 4, style: HEADER_STYLE, children: [
|
|
11868
|
+
/* @__PURE__ */ jsxs45(Stack36, { flex: 1, space: 2, children: [
|
|
11869
|
+
/* @__PURE__ */ jsxs45(Flex34, { align: "center", gap: 2, wrap: "wrap", children: [
|
|
11870
|
+
/* @__PURE__ */ jsx61(
|
|
11393
11871
|
"span",
|
|
11394
11872
|
{
|
|
11395
11873
|
style: {
|
|
@@ -11404,7 +11882,7 @@ function JudgmentDetailDrawer({
|
|
|
11404
11882
|
children: judgment.score
|
|
11405
11883
|
}
|
|
11406
11884
|
),
|
|
11407
|
-
/* @__PURE__ */
|
|
11885
|
+
/* @__PURE__ */ jsx61(
|
|
11408
11886
|
"span",
|
|
11409
11887
|
{
|
|
11410
11888
|
style: {
|
|
@@ -11417,13 +11895,13 @@ function JudgmentDetailDrawer({
|
|
|
11417
11895
|
children: dimLabel
|
|
11418
11896
|
}
|
|
11419
11897
|
),
|
|
11420
|
-
/* @__PURE__ */
|
|
11898
|
+
/* @__PURE__ */ jsx61(
|
|
11421
11899
|
Tooltip12,
|
|
11422
11900
|
{
|
|
11423
|
-
content: /* @__PURE__ */
|
|
11901
|
+
content: /* @__PURE__ */ jsx61(Box30, { padding: 2, children: /* @__PURE__ */ jsx61(Text46, { size: 1, children: judgment.modelId }) }),
|
|
11424
11902
|
placement: "bottom",
|
|
11425
11903
|
portal: true,
|
|
11426
|
-
children: /* @__PURE__ */
|
|
11904
|
+
children: /* @__PURE__ */ jsx61(
|
|
11427
11905
|
"span",
|
|
11428
11906
|
{
|
|
11429
11907
|
style: {
|
|
@@ -11435,12 +11913,12 @@ function JudgmentDetailDrawer({
|
|
|
11435
11913
|
fontSize: 12,
|
|
11436
11914
|
padding: "2px 6px"
|
|
11437
11915
|
},
|
|
11438
|
-
children:
|
|
11916
|
+
children: shortModelId2(judgment.modelId)
|
|
11439
11917
|
}
|
|
11440
11918
|
)
|
|
11441
11919
|
}
|
|
11442
11920
|
),
|
|
11443
|
-
(testResult?.latencyMs != null || testResult?.cost != null && testResult.cost > 0) && /* @__PURE__ */
|
|
11921
|
+
(testResult?.latencyMs != null || testResult?.cost != null && testResult.cost > 0) && /* @__PURE__ */ jsx61(
|
|
11444
11922
|
"span",
|
|
11445
11923
|
{
|
|
11446
11924
|
"aria-hidden": true,
|
|
@@ -11452,38 +11930,38 @@ function JudgmentDetailDrawer({
|
|
|
11452
11930
|
}
|
|
11453
11931
|
}
|
|
11454
11932
|
),
|
|
11455
|
-
testResult?.latencyMs != null && /* @__PURE__ */
|
|
11933
|
+
testResult?.latencyMs != null && /* @__PURE__ */ jsx61(
|
|
11456
11934
|
Tooltip12,
|
|
11457
11935
|
{
|
|
11458
|
-
content: /* @__PURE__ */
|
|
11936
|
+
content: /* @__PURE__ */ jsx61(Box30, { padding: 2, children: /* @__PURE__ */ jsx61(Text46, { size: 1, children: "End-to-end generation latency for this model call." }) }),
|
|
11459
11937
|
placement: "bottom",
|
|
11460
11938
|
portal: true,
|
|
11461
|
-
children: /* @__PURE__ */
|
|
11939
|
+
children: /* @__PURE__ */ jsxs45(Text46, { muted: true, size: 1, children: [
|
|
11462
11940
|
(testResult.latencyMs / 1e3).toFixed(1),
|
|
11463
11941
|
"s"
|
|
11464
11942
|
] })
|
|
11465
11943
|
}
|
|
11466
11944
|
),
|
|
11467
|
-
testResult?.cost != null && testResult.cost > 0 && /* @__PURE__ */
|
|
11945
|
+
testResult?.cost != null && testResult.cost > 0 && /* @__PURE__ */ jsx61(
|
|
11468
11946
|
Tooltip12,
|
|
11469
11947
|
{
|
|
11470
|
-
content: /* @__PURE__ */
|
|
11948
|
+
content: /* @__PURE__ */ jsx61(Box30, { padding: 2, children: /* @__PURE__ */ jsx61(Text46, { size: 1, children: "Provider-reported cost for this model call." }) }),
|
|
11471
11949
|
placement: "bottom",
|
|
11472
11950
|
portal: true,
|
|
11473
|
-
children: /* @__PURE__ */
|
|
11951
|
+
children: /* @__PURE__ */ jsxs45(Text46, { muted: true, size: 1, children: [
|
|
11474
11952
|
"$",
|
|
11475
11953
|
testResult.cost.toFixed(4)
|
|
11476
11954
|
] })
|
|
11477
11955
|
}
|
|
11478
11956
|
)
|
|
11479
11957
|
] }),
|
|
11480
|
-
/* @__PURE__ */
|
|
11481
|
-
/* @__PURE__ */
|
|
11482
|
-
/* @__PURE__ */
|
|
11958
|
+
/* @__PURE__ */ jsxs45(Flex34, { align: "center", gap: 2, wrap: "wrap", children: [
|
|
11959
|
+
/* @__PURE__ */ jsx61(Text46, { size: 2, weight: "medium", children: taskName }),
|
|
11960
|
+
/* @__PURE__ */ jsx61(VariantBadge, { variant })
|
|
11483
11961
|
] })
|
|
11484
11962
|
] }),
|
|
11485
|
-
/* @__PURE__ */
|
|
11486
|
-
/* @__PURE__ */
|
|
11963
|
+
/* @__PURE__ */ jsxs45(Flex34, { align: "center", gap: 1, children: [
|
|
11964
|
+
/* @__PURE__ */ jsx61(
|
|
11487
11965
|
"span",
|
|
11488
11966
|
{
|
|
11489
11967
|
style: {
|
|
@@ -11501,7 +11979,7 @@ function JudgmentDetailDrawer({
|
|
|
11501
11979
|
children: "Esc"
|
|
11502
11980
|
}
|
|
11503
11981
|
),
|
|
11504
|
-
/* @__PURE__ */
|
|
11982
|
+
/* @__PURE__ */ jsx61(
|
|
11505
11983
|
Button9,
|
|
11506
11984
|
{
|
|
11507
11985
|
"aria-label": "Close (Esc)",
|
|
@@ -11514,8 +11992,8 @@ function JudgmentDetailDrawer({
|
|
|
11514
11992
|
)
|
|
11515
11993
|
] })
|
|
11516
11994
|
] }),
|
|
11517
|
-
/* @__PURE__ */
|
|
11518
|
-
|
|
11995
|
+
/* @__PURE__ */ jsxs45(
|
|
11996
|
+
Flex34,
|
|
11519
11997
|
{
|
|
11520
11998
|
align: "center",
|
|
11521
11999
|
gap: 2,
|
|
@@ -11524,8 +12002,8 @@ function JudgmentDetailDrawer({
|
|
|
11524
12002
|
paddingY: 2,
|
|
11525
12003
|
style: TAB_BAR_STYLE,
|
|
11526
12004
|
children: [
|
|
11527
|
-
/* @__PURE__ */
|
|
11528
|
-
/* @__PURE__ */
|
|
12005
|
+
/* @__PURE__ */ jsx61(Box30, { flex: 1, style: { minWidth: 0 }, children: /* @__PURE__ */ jsxs45(TabList2, { space: 2, children: [
|
|
12006
|
+
/* @__PURE__ */ jsx61(
|
|
11529
12007
|
Tab2,
|
|
11530
12008
|
{
|
|
11531
12009
|
"aria-controls": "judgment-panel-reasoning",
|
|
@@ -11535,7 +12013,7 @@ function JudgmentDetailDrawer({
|
|
|
11535
12013
|
selected: tab === "reasoning"
|
|
11536
12014
|
}
|
|
11537
12015
|
),
|
|
11538
|
-
hasOutputTab && /* @__PURE__ */
|
|
12016
|
+
hasOutputTab && /* @__PURE__ */ jsx61(
|
|
11539
12017
|
Tab2,
|
|
11540
12018
|
{
|
|
11541
12019
|
"aria-controls": "judgment-panel-output",
|
|
@@ -11546,19 +12024,24 @@ function JudgmentDetailDrawer({
|
|
|
11546
12024
|
}
|
|
11547
12025
|
)
|
|
11548
12026
|
] }) }),
|
|
11549
|
-
/* @__PURE__ */
|
|
12027
|
+
/* @__PURE__ */ jsx61(
|
|
12028
|
+
JudgmentActions,
|
|
12029
|
+
{
|
|
12030
|
+
onShowPrompts: onShowPrompts ? () => onShowPrompts(judgment) : void 0
|
|
12031
|
+
}
|
|
12032
|
+
)
|
|
11550
12033
|
]
|
|
11551
12034
|
}
|
|
11552
12035
|
),
|
|
11553
|
-
/* @__PURE__ */
|
|
11554
|
-
/* @__PURE__ */
|
|
12036
|
+
/* @__PURE__ */ jsxs45(Box30, { padding: 4, style: CONTENT_STYLE, children: [
|
|
12037
|
+
/* @__PURE__ */ jsx61(
|
|
11555
12038
|
TabPanel2,
|
|
11556
12039
|
{
|
|
11557
12040
|
"aria-labelledby": "judgment-tab-reasoning",
|
|
11558
12041
|
hidden: tab !== "reasoning",
|
|
11559
12042
|
id: "judgment-panel-reasoning",
|
|
11560
|
-
children: /* @__PURE__ */
|
|
11561
|
-
/* @__PURE__ */
|
|
12043
|
+
children: /* @__PURE__ */ jsxs45(Box30, { style: COPYABLE_BLOCK_STYLE, children: [
|
|
12044
|
+
/* @__PURE__ */ jsx61(Box30, { style: COPY_BUTTON_SLOT_STYLE, children: /* @__PURE__ */ jsx61(
|
|
11562
12045
|
CopyButton,
|
|
11563
12046
|
{
|
|
11564
12047
|
copiedLabel: "Reasoning copied",
|
|
@@ -11566,26 +12049,26 @@ function JudgmentDetailDrawer({
|
|
|
11566
12049
|
text: reasoningText
|
|
11567
12050
|
}
|
|
11568
12051
|
) }),
|
|
11569
|
-
/* @__PURE__ */
|
|
11570
|
-
reasoningIsPreview && /* @__PURE__ */
|
|
12052
|
+
/* @__PURE__ */ jsx61(Markdown, { content: reasoningText }),
|
|
12053
|
+
reasoningIsPreview && /* @__PURE__ */ jsx61(Text46, { muted: true, size: 1, style: { marginTop: 8 }, children: fullStatus === "loading" ? "Loading full reasoning\u2026" : "Showing preview (280 chars). Full reasoning not yet loaded." })
|
|
11571
12054
|
] })
|
|
11572
12055
|
}
|
|
11573
12056
|
),
|
|
11574
|
-
hasOutputTab && /* @__PURE__ */
|
|
12057
|
+
hasOutputTab && /* @__PURE__ */ jsxs45(
|
|
11575
12058
|
TabPanel2,
|
|
11576
12059
|
{
|
|
11577
12060
|
"aria-labelledby": "judgment-tab-output",
|
|
11578
12061
|
hidden: tab !== "output",
|
|
11579
12062
|
id: "judgment-panel-output",
|
|
11580
12063
|
children: [
|
|
11581
|
-
!resolvedOutput && fetchInFlight && /* @__PURE__ */
|
|
11582
|
-
!resolvedOutput && fetchFailed && /* @__PURE__ */
|
|
12064
|
+
!resolvedOutput && fetchInFlight && /* @__PURE__ */ jsx61(Text46, { muted: true, size: 1, children: "Fetching model output\u2026" }),
|
|
12065
|
+
!resolvedOutput && fetchFailed && /* @__PURE__ */ jsxs45(Text46, { muted: true, size: 1, style: { color: "#f87171" }, children: [
|
|
11583
12066
|
"Failed to load model output",
|
|
11584
12067
|
artifactCache?.error ? `: ${artifactCache.error}` : ""
|
|
11585
12068
|
] }),
|
|
11586
|
-
!resolvedOutput && entryUnavailable && /* @__PURE__ */
|
|
11587
|
-
resolvedOutput && /* @__PURE__ */
|
|
11588
|
-
/* @__PURE__ */
|
|
12069
|
+
!resolvedOutput && entryUnavailable && /* @__PURE__ */ jsx61(Text46, { muted: true, size: 1, children: "Model output not available for this entry." }),
|
|
12070
|
+
resolvedOutput && /* @__PURE__ */ jsxs45(Box30, { style: COPYABLE_BLOCK_STYLE, children: [
|
|
12071
|
+
/* @__PURE__ */ jsx61(Box30, { style: COPY_BUTTON_SLOT_STYLE, children: /* @__PURE__ */ jsx61(
|
|
11589
12072
|
CopyButton,
|
|
11590
12073
|
{
|
|
11591
12074
|
copiedLabel: "Output copied",
|
|
@@ -11593,15 +12076,15 @@ function JudgmentDetailDrawer({
|
|
|
11593
12076
|
text: resolvedOutput
|
|
11594
12077
|
}
|
|
11595
12078
|
) }),
|
|
11596
|
-
/* @__PURE__ */
|
|
12079
|
+
/* @__PURE__ */ jsx61(Markdown, { content: resolvedOutput })
|
|
11597
12080
|
] })
|
|
11598
12081
|
]
|
|
11599
12082
|
}
|
|
11600
12083
|
)
|
|
11601
12084
|
] }),
|
|
11602
|
-
judgment.canonicalDocs && judgment.canonicalDocs.length > 0 && /* @__PURE__ */
|
|
11603
|
-
/* @__PURE__ */
|
|
11604
|
-
judgment.canonicalDocs.map((doc) => /* @__PURE__ */
|
|
12085
|
+
judgment.canonicalDocs && judgment.canonicalDocs.length > 0 && /* @__PURE__ */ jsx61(Box30, { padding: 4, style: RELATED_DOCS_STYLE, children: /* @__PURE__ */ jsxs45(Flex34, { align: "center", gap: 2, wrap: "wrap", children: [
|
|
12086
|
+
/* @__PURE__ */ jsx61("span", { style: SECTION_LABEL_STYLE, children: "Related docs" }),
|
|
12087
|
+
judgment.canonicalDocs.map((doc) => /* @__PURE__ */ jsx61(DocBadge, { doc }, doc.slug))
|
|
11605
12088
|
] }) })
|
|
11606
12089
|
]
|
|
11607
12090
|
}
|
|
@@ -11609,7 +12092,7 @@ function JudgmentDetailDrawer({
|
|
|
11609
12092
|
}
|
|
11610
12093
|
|
|
11611
12094
|
// src/components/report-detail/JudgmentDetailDrawerOutlet.tsx
|
|
11612
|
-
import { jsx as
|
|
12095
|
+
import { jsx as jsx62, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
11613
12096
|
var MIN_WIDTH2 = 480;
|
|
11614
12097
|
var MAX_WIDTH2 = 900;
|
|
11615
12098
|
var OVERLAY_BREAKPOINT2 = 1024;
|
|
@@ -11622,7 +12105,7 @@ function useIsNarrow2() {
|
|
|
11622
12105
|
const [narrow, setNarrow] = useState25(
|
|
11623
12106
|
() => typeof window !== "undefined" && window.innerWidth < OVERLAY_BREAKPOINT2
|
|
11624
12107
|
);
|
|
11625
|
-
|
|
12108
|
+
useEffect14(() => {
|
|
11626
12109
|
function handleResize() {
|
|
11627
12110
|
setNarrow(window.innerWidth < OVERLAY_BREAKPOINT2);
|
|
11628
12111
|
}
|
|
@@ -11647,7 +12130,7 @@ function useResizable2(defaultWidth) {
|
|
|
11647
12130
|
},
|
|
11648
12131
|
[width]
|
|
11649
12132
|
);
|
|
11650
|
-
|
|
12133
|
+
useEffect14(() => {
|
|
11651
12134
|
function handleMouseMove(e) {
|
|
11652
12135
|
if (!dragging.current) return;
|
|
11653
12136
|
const delta = startX.current - e.clientX;
|
|
@@ -11679,7 +12162,7 @@ function JudgmentDetailDrawerOutlet({
|
|
|
11679
12162
|
const isNarrow = useIsNarrow2();
|
|
11680
12163
|
const { handleMouseDown, width } = useResizable2(computeDefaultWidth());
|
|
11681
12164
|
if (!isOpen || !active) return null;
|
|
11682
|
-
return /* @__PURE__ */
|
|
12165
|
+
return /* @__PURE__ */ jsxs46(
|
|
11683
12166
|
"div",
|
|
11684
12167
|
{
|
|
11685
12168
|
style: isNarrow ? {
|
|
@@ -11705,7 +12188,7 @@ function JudgmentDetailDrawerOutlet({
|
|
|
11705
12188
|
width
|
|
11706
12189
|
},
|
|
11707
12190
|
children: [
|
|
11708
|
-
!isNarrow && /* @__PURE__ */
|
|
12191
|
+
!isNarrow && /* @__PURE__ */ jsx62(
|
|
11709
12192
|
"div",
|
|
11710
12193
|
{
|
|
11711
12194
|
"aria-label": "Resize judgment drawer",
|
|
@@ -11730,8 +12213,8 @@ function JudgmentDetailDrawerOutlet({
|
|
|
11730
12213
|
}
|
|
11731
12214
|
}
|
|
11732
12215
|
),
|
|
11733
|
-
/* @__PURE__ */
|
|
11734
|
-
|
|
12216
|
+
/* @__PURE__ */ jsx62(
|
|
12217
|
+
Card21,
|
|
11735
12218
|
{
|
|
11736
12219
|
borderLeft: !isNarrow,
|
|
11737
12220
|
style: {
|
|
@@ -11740,12 +12223,13 @@ function JudgmentDetailDrawerOutlet({
|
|
|
11740
12223
|
flexDirection: "column",
|
|
11741
12224
|
overflow: "hidden"
|
|
11742
12225
|
},
|
|
11743
|
-
children: /* @__PURE__ */
|
|
12226
|
+
children: /* @__PURE__ */ jsx62(ReportArtifactProvider, { runId: active.runId, manifest: active.manifest, children: /* @__PURE__ */ jsx62(
|
|
11744
12227
|
JudgmentDetailDrawer,
|
|
11745
12228
|
{
|
|
11746
12229
|
artifactCache: active.artifactCache,
|
|
11747
12230
|
judgment: active.judgment,
|
|
11748
12231
|
onClose,
|
|
12232
|
+
onShowPrompts: active.onShowPrompts,
|
|
11749
12233
|
testResult: active.testResult
|
|
11750
12234
|
}
|
|
11751
12235
|
) })
|
|
@@ -11757,10 +12241,10 @@ function JudgmentDetailDrawerOutlet({
|
|
|
11757
12241
|
}
|
|
11758
12242
|
|
|
11759
12243
|
// src/components/ScoreTimeline.tsx
|
|
11760
|
-
import { Card as
|
|
11761
|
-
import { useCallback as useCallback35, useEffect as
|
|
12244
|
+
import { Card as Card22, Flex as Flex35, Select as Select2, Stack as Stack37, Text as Text47 } from "@sanity/ui";
|
|
12245
|
+
import { useCallback as useCallback35, useEffect as useEffect15, useMemo as useMemo16, useState as useState26 } from "react";
|
|
11762
12246
|
import { useClient as useClient11 } from "sanity";
|
|
11763
|
-
import { jsx as
|
|
12247
|
+
import { jsx as jsx63, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
11764
12248
|
var CHART_HEIGHT = 220;
|
|
11765
12249
|
var CHART_WIDTH = 800;
|
|
11766
12250
|
var PAD_BOTTOM = 30;
|
|
@@ -11823,7 +12307,7 @@ function ScoreTimeline({ mode = null, source = null }) {
|
|
|
11823
12307
|
setLoading(false);
|
|
11824
12308
|
}
|
|
11825
12309
|
}, [client, mode, rangeDays, source]);
|
|
11826
|
-
|
|
12310
|
+
useEffect15(() => {
|
|
11827
12311
|
void fetchData();
|
|
11828
12312
|
}, [fetchData]);
|
|
11829
12313
|
const chartPoints = useMemo16(() => {
|
|
@@ -11859,22 +12343,22 @@ function ScoreTimeline({ mode = null, source = null }) {
|
|
|
11859
12343
|
[]
|
|
11860
12344
|
);
|
|
11861
12345
|
const polylinePoints = chartPoints.map((p) => `${p.x},${p.y}`).join(" ");
|
|
11862
|
-
return /* @__PURE__ */
|
|
11863
|
-
/* @__PURE__ */
|
|
11864
|
-
/* @__PURE__ */
|
|
12346
|
+
return /* @__PURE__ */ jsxs47(Stack37, { space: 4, children: [
|
|
12347
|
+
/* @__PURE__ */ jsxs47(Flex35, { gap: 3, children: [
|
|
12348
|
+
/* @__PURE__ */ jsx63(
|
|
11865
12349
|
Select2,
|
|
11866
12350
|
{
|
|
11867
12351
|
onChange: handleRangeChange,
|
|
11868
12352
|
value: rangeDays?.toString() ?? "all",
|
|
11869
|
-
children: TIME_RANGES.map((r) => /* @__PURE__ */
|
|
12353
|
+
children: TIME_RANGES.map((r) => /* @__PURE__ */ jsx63("option", { value: r.days?.toString() ?? "all", children: r.label }, r.label))
|
|
11870
12354
|
}
|
|
11871
12355
|
),
|
|
11872
|
-
/* @__PURE__ */
|
|
11873
|
-
/* @__PURE__ */
|
|
11874
|
-
areaNames.map((name) => /* @__PURE__ */
|
|
12356
|
+
/* @__PURE__ */ jsxs47(Select2, { onChange: handleAreaChange, value: selectedArea ?? "", children: [
|
|
12357
|
+
/* @__PURE__ */ jsx63("option", { value: "", children: "Overall" }),
|
|
12358
|
+
areaNames.map((name) => /* @__PURE__ */ jsx63("option", { value: name, children: name }, name))
|
|
11875
12359
|
] })
|
|
11876
12360
|
] }),
|
|
11877
|
-
/* @__PURE__ */
|
|
12361
|
+
/* @__PURE__ */ jsx63(Card22, { padding: 3, radius: 2, shadow: 1, children: loading ? /* @__PURE__ */ jsx63(Flex35, { align: "center", justify: "center", style: { height: 200 }, children: /* @__PURE__ */ jsx63(Text47, { muted: true, size: 2, children: "Loading\u2026" }) }) : chartPoints.length === 0 ? /* @__PURE__ */ jsx63(Flex35, { align: "center", justify: "center", style: { height: 200 }, children: /* @__PURE__ */ jsx63(Text47, { muted: true, size: 2, children: "No reports found for this time range" }) }) : /* @__PURE__ */ jsxs47(
|
|
11878
12362
|
"svg",
|
|
11879
12363
|
{
|
|
11880
12364
|
style: { display: "block", width: "100%" },
|
|
@@ -11882,8 +12366,8 @@ function ScoreTimeline({ mode = null, source = null }) {
|
|
|
11882
12366
|
children: [
|
|
11883
12367
|
Y_TICKS.map((tick) => {
|
|
11884
12368
|
const y = PAD_TOP + PLOT_HEIGHT - tick / Y_MAX * PLOT_HEIGHT;
|
|
11885
|
-
return /* @__PURE__ */
|
|
11886
|
-
/* @__PURE__ */
|
|
12369
|
+
return /* @__PURE__ */ jsxs47("g", { children: [
|
|
12370
|
+
/* @__PURE__ */ jsx63(
|
|
11887
12371
|
"line",
|
|
11888
12372
|
{
|
|
11889
12373
|
stroke: "#ccc",
|
|
@@ -11894,7 +12378,7 @@ function ScoreTimeline({ mode = null, source = null }) {
|
|
|
11894
12378
|
y2: y
|
|
11895
12379
|
}
|
|
11896
12380
|
),
|
|
11897
|
-
/* @__PURE__ */
|
|
12381
|
+
/* @__PURE__ */ jsx63(
|
|
11898
12382
|
"text",
|
|
11899
12383
|
{
|
|
11900
12384
|
dominantBaseline: "middle",
|
|
@@ -11914,7 +12398,7 @@ function ScoreTimeline({ mode = null, source = null }) {
|
|
|
11914
12398
|
chartPoints.length - 1
|
|
11915
12399
|
].map((idx) => {
|
|
11916
12400
|
const p = chartPoints[idx];
|
|
11917
|
-
return /* @__PURE__ */
|
|
12401
|
+
return /* @__PURE__ */ jsx63(
|
|
11918
12402
|
"text",
|
|
11919
12403
|
{
|
|
11920
12404
|
fill: "#999",
|
|
@@ -11926,7 +12410,7 @@ function ScoreTimeline({ mode = null, source = null }) {
|
|
|
11926
12410
|
},
|
|
11927
12411
|
idx
|
|
11928
12412
|
);
|
|
11929
|
-
}) : chartPoints.map((p, idx) => /* @__PURE__ */
|
|
12413
|
+
}) : chartPoints.map((p, idx) => /* @__PURE__ */ jsx63(
|
|
11930
12414
|
"text",
|
|
11931
12415
|
{
|
|
11932
12416
|
fill: "#999",
|
|
@@ -11938,7 +12422,7 @@ function ScoreTimeline({ mode = null, source = null }) {
|
|
|
11938
12422
|
},
|
|
11939
12423
|
idx
|
|
11940
12424
|
)),
|
|
11941
|
-
/* @__PURE__ */
|
|
12425
|
+
/* @__PURE__ */ jsx63(
|
|
11942
12426
|
"polyline",
|
|
11943
12427
|
{
|
|
11944
12428
|
fill: "none",
|
|
@@ -11948,7 +12432,7 @@ function ScoreTimeline({ mode = null, source = null }) {
|
|
|
11948
12432
|
strokeWidth: 2.5
|
|
11949
12433
|
}
|
|
11950
12434
|
),
|
|
11951
|
-
chartPoints.map((p, idx) => /* @__PURE__ */
|
|
12435
|
+
chartPoints.map((p, idx) => /* @__PURE__ */ jsx63(
|
|
11952
12436
|
"circle",
|
|
11953
12437
|
{
|
|
11954
12438
|
cx: p.x,
|
|
@@ -11957,7 +12441,7 @@ function ScoreTimeline({ mode = null, source = null }) {
|
|
|
11957
12441
|
r: 4,
|
|
11958
12442
|
stroke: "#fff",
|
|
11959
12443
|
strokeWidth: 1.5,
|
|
11960
|
-
children: /* @__PURE__ */
|
|
12444
|
+
children: /* @__PURE__ */ jsxs47("title", { children: [
|
|
11961
12445
|
formatDate(p.date),
|
|
11962
12446
|
": ",
|
|
11963
12447
|
Math.round(p.score)
|
|
@@ -11968,7 +12452,7 @@ function ScoreTimeline({ mode = null, source = null }) {
|
|
|
11968
12452
|
]
|
|
11969
12453
|
}
|
|
11970
12454
|
) }),
|
|
11971
|
-
/* @__PURE__ */
|
|
12455
|
+
/* @__PURE__ */ jsxs47(Text47, { muted: true, size: 2, children: [
|
|
11972
12456
|
chartPoints.length,
|
|
11973
12457
|
" data point",
|
|
11974
12458
|
chartPoints.length !== 1 ? "s" : ""
|
|
@@ -11978,20 +12462,20 @@ function ScoreTimeline({ mode = null, source = null }) {
|
|
|
11978
12462
|
var ScoreTimeline_default = ScoreTimeline;
|
|
11979
12463
|
|
|
11980
12464
|
// src/components/Dashboard.tsx
|
|
11981
|
-
import { jsx as
|
|
12465
|
+
import { jsx as jsx64, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
11982
12466
|
var VIEW_PARAM_MAP = {
|
|
11983
12467
|
compare: "compare",
|
|
11984
12468
|
timeline: "timeline"
|
|
11985
12469
|
};
|
|
11986
12470
|
function Dashboard() {
|
|
11987
|
-
return /* @__PURE__ */
|
|
12471
|
+
return /* @__PURE__ */ jsx64(HelpProvider, { children: /* @__PURE__ */ jsx64(JudgmentDrawerProvider, { children: /* @__PURE__ */ jsx64(DashboardShell, {}) }) });
|
|
11988
12472
|
}
|
|
11989
12473
|
function DashboardShell() {
|
|
11990
12474
|
const router = useRouter3();
|
|
11991
12475
|
const { close: closeDrawer } = useJudgmentDrawer();
|
|
11992
12476
|
const routerState = router.state;
|
|
11993
12477
|
const reportId = routerState.reportId ?? null;
|
|
11994
|
-
|
|
12478
|
+
useEffect16(() => {
|
|
11995
12479
|
if (!reportId) closeDrawer();
|
|
11996
12480
|
}, [reportId, closeDrawer]);
|
|
11997
12481
|
const handleJudgmentDrawerClose = useCallback36(() => {
|
|
@@ -12002,10 +12486,10 @@ function DashboardShell() {
|
|
|
12002
12486
|
router.navigate(state);
|
|
12003
12487
|
}
|
|
12004
12488
|
}, [closeDrawer, router]);
|
|
12005
|
-
return /* @__PURE__ */
|
|
12006
|
-
/* @__PURE__ */
|
|
12007
|
-
/* @__PURE__ */
|
|
12008
|
-
/* @__PURE__ */
|
|
12489
|
+
return /* @__PURE__ */ jsxs48(Flex36, { style: { height: "100%" }, children: [
|
|
12490
|
+
/* @__PURE__ */ jsx64(Box31, { flex: 1, overflow: "auto", children: /* @__PURE__ */ jsx64(DashboardContent, {}) }),
|
|
12491
|
+
/* @__PURE__ */ jsx64(JudgmentDetailDrawerOutlet, { onClose: handleJudgmentDrawerClose }),
|
|
12492
|
+
/* @__PURE__ */ jsx64(HelpDrawer, {})
|
|
12009
12493
|
] });
|
|
12010
12494
|
}
|
|
12011
12495
|
function DashboardContent() {
|
|
@@ -12051,13 +12535,13 @@ function DashboardContent() {
|
|
|
12051
12535
|
const handleOpenHelp = useCallback36(() => {
|
|
12052
12536
|
openHelp(defaultTopic);
|
|
12053
12537
|
}, [openHelp, defaultTopic]);
|
|
12054
|
-
return /* @__PURE__ */
|
|
12055
|
-
/* @__PURE__ */
|
|
12056
|
-
/* @__PURE__ */
|
|
12057
|
-
/* @__PURE__ */
|
|
12058
|
-
/* @__PURE__ */
|
|
12538
|
+
return /* @__PURE__ */ jsx64(Container, { width: 4, children: /* @__PURE__ */ jsxs48(Stack38, { padding: 4, space: 4, children: [
|
|
12539
|
+
/* @__PURE__ */ jsxs48(Flex36, { align: "center", gap: 3, children: [
|
|
12540
|
+
/* @__PURE__ */ jsxs48(Stack38, { flex: 1, space: 1, children: [
|
|
12541
|
+
/* @__PURE__ */ jsx64(Text48, { size: 4, weight: "bold", children: "AI Literacy Framework" }),
|
|
12542
|
+
/* @__PURE__ */ jsx64(Text48, { muted: true, size: 2, children: "Evaluation reports and score trends" })
|
|
12059
12543
|
] }),
|
|
12060
|
-
/* @__PURE__ */
|
|
12544
|
+
/* @__PURE__ */ jsx64(
|
|
12061
12545
|
Button10,
|
|
12062
12546
|
{
|
|
12063
12547
|
icon: HelpCircleIcon8,
|
|
@@ -12068,8 +12552,8 @@ function DashboardContent() {
|
|
|
12068
12552
|
}
|
|
12069
12553
|
)
|
|
12070
12554
|
] }),
|
|
12071
|
-
!isDetail && /* @__PURE__ */
|
|
12072
|
-
/* @__PURE__ */
|
|
12555
|
+
!isDetail && /* @__PURE__ */ jsxs48(TabList3, { space: 1, children: [
|
|
12556
|
+
/* @__PURE__ */ jsx64(
|
|
12073
12557
|
Tab3,
|
|
12074
12558
|
{
|
|
12075
12559
|
"aria-controls": "latest-panel",
|
|
@@ -12079,7 +12563,7 @@ function DashboardContent() {
|
|
|
12079
12563
|
selected: activeTab === "latest"
|
|
12080
12564
|
}
|
|
12081
12565
|
),
|
|
12082
|
-
/* @__PURE__ */
|
|
12566
|
+
/* @__PURE__ */ jsx64(
|
|
12083
12567
|
Tab3,
|
|
12084
12568
|
{
|
|
12085
12569
|
"aria-controls": "timeline-panel",
|
|
@@ -12089,7 +12573,7 @@ function DashboardContent() {
|
|
|
12089
12573
|
selected: activeTab === "timeline"
|
|
12090
12574
|
}
|
|
12091
12575
|
),
|
|
12092
|
-
/* @__PURE__ */
|
|
12576
|
+
/* @__PURE__ */ jsx64(
|
|
12093
12577
|
Tab3,
|
|
12094
12578
|
{
|
|
12095
12579
|
"aria-controls": "compare-panel",
|
|
@@ -12100,10 +12584,10 @@ function DashboardContent() {
|
|
|
12100
12584
|
}
|
|
12101
12585
|
)
|
|
12102
12586
|
] }),
|
|
12103
|
-
!isDetail && activeTab === "latest" && /* @__PURE__ */
|
|
12104
|
-
!isDetail && activeTab === "timeline" && /* @__PURE__ */
|
|
12105
|
-
!isDetail && activeTab === "compare" && /* @__PURE__ */
|
|
12106
|
-
isDetail && reportId && /* @__PURE__ */
|
|
12587
|
+
!isDetail && activeTab === "latest" && /* @__PURE__ */ jsx64(TabPanel3, { "aria-labelledby": "latest-tab", id: "latest-panel", children: /* @__PURE__ */ jsx64(LatestReports, { onSelectReport: handleSelectReport }) }),
|
|
12588
|
+
!isDetail && activeTab === "timeline" && /* @__PURE__ */ jsx64(TabPanel3, { "aria-labelledby": "timeline-tab", id: "timeline-panel", children: /* @__PURE__ */ jsx64(ScoreTimeline_default, {}) }),
|
|
12589
|
+
!isDetail && activeTab === "compare" && /* @__PURE__ */ jsx64(TabPanel3, { "aria-labelledby": "compare-tab", id: "compare-panel", children: /* @__PURE__ */ jsx64(ComparisonView, {}) }),
|
|
12590
|
+
isDetail && reportId && /* @__PURE__ */ jsx64(
|
|
12107
12591
|
ReportDetail,
|
|
12108
12592
|
{
|
|
12109
12593
|
activeTab: routerState.tab ?? null,
|
|
@@ -12139,7 +12623,7 @@ function ailfTool(options = {}) {
|
|
|
12139
12623
|
// src/actions/RunEvaluationAction.tsx
|
|
12140
12624
|
import { BarChartIcon as BarChartIcon2 } from "@sanity/icons";
|
|
12141
12625
|
import { useToast as useToast10 } from "@sanity/ui";
|
|
12142
|
-
import { useCallback as useCallback37, useEffect as
|
|
12626
|
+
import { useCallback as useCallback37, useEffect as useEffect17, useRef as useRef9, useState as useState27 } from "react";
|
|
12143
12627
|
import {
|
|
12144
12628
|
getReleaseIdFromReleaseDocumentId as getReleaseIdFromReleaseDocumentId3,
|
|
12145
12629
|
useClient as useClient12,
|
|
@@ -12173,7 +12657,7 @@ function createRunEvaluationAction(options = {}) {
|
|
|
12173
12657
|
const [state, setState] = useState27({ status: "loading" });
|
|
12174
12658
|
const requestedAtRef = useRef9(null);
|
|
12175
12659
|
const perspectiveId = getReleaseIdFromReleaseDocumentId3(release._id);
|
|
12176
|
-
|
|
12660
|
+
useEffect17(() => {
|
|
12177
12661
|
let cancelled = false;
|
|
12178
12662
|
client.fetch(contentImpactQuery, buildReportQueryParams(perspectiveId)).then((results) => {
|
|
12179
12663
|
if (cancelled) return;
|
|
@@ -12196,7 +12680,7 @@ function createRunEvaluationAction(options = {}) {
|
|
|
12196
12680
|
cancelled = true;
|
|
12197
12681
|
};
|
|
12198
12682
|
}, [client, perspectiveId]);
|
|
12199
|
-
|
|
12683
|
+
useEffect17(() => {
|
|
12200
12684
|
if (state.status !== "requested" && state.status !== "polling") return;
|
|
12201
12685
|
const { requestId, startedAt } = state;
|
|
12202
12686
|
if (state.status === "requested") {
|
|
@@ -12246,7 +12730,7 @@ function createRunEvaluationAction(options = {}) {
|
|
|
12246
12730
|
}, POLL_INTERVAL_MS2);
|
|
12247
12731
|
return () => clearInterval(interval);
|
|
12248
12732
|
}, [client, perspectiveId, state]);
|
|
12249
|
-
|
|
12733
|
+
useEffect17(() => {
|
|
12250
12734
|
if (state.status !== "error") return;
|
|
12251
12735
|
const timer = setTimeout(() => {
|
|
12252
12736
|
client.fetch(contentImpactQuery, buildReportQueryParams(perspectiveId)).then((results) => {
|