@sanity/ailf-studio 1.2.0 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +12 -8
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -7045,7 +7045,6 @@ function DocBadge({
7045
7045
  // src/components/report-detail/ProvenanceCard.tsx
7046
7046
  import { Card as Card14, Flex as Flex17, Grid as Grid3, Stack as Stack21, Text as Text26 } from "@sanity/ui";
7047
7047
  import { jsx as jsx29, jsxs as jsxs24 } from "react/jsx-runtime";
7048
- var VIEWABLE_PROMPTFOO_MODES = /* @__PURE__ */ new Set(["agentic", "observed"]);
7049
7048
  function ProvenanceCard({ provenance }) {
7050
7049
  return /* @__PURE__ */ jsx29(Card14, { padding: 4, radius: 2, shadow: 1, children: /* @__PURE__ */ jsxs24(Stack21, { space: 4, children: [
7051
7050
  /* @__PURE__ */ jsx29(Text26, { size: 3, weight: "semibold", children: "Provenance" }),
@@ -7123,17 +7122,13 @@ function PromptfooLinks({
7123
7122
  provenance
7124
7123
  }) {
7125
7124
  if (provenance.promptfooUrls && provenance.promptfooUrls.length > 0) {
7126
- const viewable = provenance.promptfooUrls.filter(
7127
- (e) => VIEWABLE_PROMPTFOO_MODES.has(e.mode)
7128
- );
7129
- if (viewable.length === 0) return null;
7130
- return /* @__PURE__ */ jsx29(Flex17, { gap: 3, wrap: "wrap", children: viewable.map((entry) => /* @__PURE__ */ jsx29(Text26, { size: 2, children: /* @__PURE__ */ jsxs24("a", { href: entry.url, rel: "noopener noreferrer", target: "_blank", children: [
7125
+ return /* @__PURE__ */ jsx29(Flex17, { align: "center", gap: 3, wrap: "wrap", children: provenance.promptfooUrls.map((entry) => /* @__PURE__ */ jsx29(Text26, { size: 2, children: /* @__PURE__ */ jsxs24("a", { href: entry.url, rel: "noopener noreferrer", target: "_blank", children: [
7131
7126
  "View in Promptfoo (",
7132
7127
  entry.mode,
7133
7128
  ") \u2192"
7134
7129
  ] }) }, entry.mode)) });
7135
7130
  }
7136
- if (provenance.promptfooUrl && VIEWABLE_PROMPTFOO_MODES.has(provenance.mode)) {
7131
+ if (provenance.promptfooUrl) {
7137
7132
  return /* @__PURE__ */ jsx29(Text26, { size: 2, children: /* @__PURE__ */ jsx29(
7138
7133
  "a",
7139
7134
  {
@@ -7144,7 +7139,16 @@ function PromptfooLinks({
7144
7139
  }
7145
7140
  ) });
7146
7141
  }
7147
- return null;
7142
+ return /* @__PURE__ */ jsx29(PromptfooUnavailable, { reason: "not-shared" });
7143
+ }
7144
+ var UNAVAILABLE_TOOLTIPS = {
7145
+ "not-shared": "No Promptfoo share link was generated for this report. This usually means the evaluation was run locally without the --share flag."
7146
+ };
7147
+ function PromptfooUnavailable({ reason }) {
7148
+ return /* @__PURE__ */ jsxs24(Flex17, { align: "center", gap: 2, children: [
7149
+ /* @__PURE__ */ jsx29(Text26, { muted: true, size: 2, children: "Promptfoo report not available" }),
7150
+ /* @__PURE__ */ jsx29(InfoTip, { text: UNAVAILABLE_TOOLTIPS[reason] ?? "" })
7151
+ ] });
7148
7152
  }
7149
7153
 
7150
7154
  // src/components/report-detail/RecommendationsSection.tsx
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sanity/ailf-studio",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "AI Literacy Framework — Sanity Studio dashboard plugin",
5
5
  "type": "module",
6
6
  "license": "MIT",