@mastra/playground-ui 24.0.0-alpha.2 → 24.0.0-alpha.3

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.es.js CHANGED
@@ -16804,7 +16804,9 @@ function SpanDataPanelView({
16804
16804
  activeTab,
16805
16805
  onTabChange,
16806
16806
  scoringTabSlot,
16807
- scoringTabBadge
16807
+ scoringTabBadge,
16808
+ feedbackTabSlot,
16809
+ feedbackTabBadge
16808
16810
  }) {
16809
16811
  return /* @__PURE__ */ jsxs(DataPanel, { children: [
16810
16812
  /* @__PURE__ */ jsxs(DataPanel.Header, { children: [
@@ -16837,7 +16839,9 @@ function SpanDataPanelView({
16837
16839
  activeTab,
16838
16840
  onTabChange,
16839
16841
  scoringTabSlot,
16840
- scoringTabBadge
16842
+ scoringTabBadge,
16843
+ feedbackTabSlot,
16844
+ feedbackTabBadge
16841
16845
  }
16842
16846
  )
16843
16847
  ] });
@@ -16849,7 +16853,9 @@ function SpanDataPanelContent({
16849
16853
  activeTab,
16850
16854
  onTabChange,
16851
16855
  scoringTabSlot,
16852
- scoringTabBadge
16856
+ scoringTabBadge,
16857
+ feedbackTabSlot,
16858
+ feedbackTabBadge
16853
16859
  }) {
16854
16860
  const durationMs = span.startedAt && span.endedAt ? new Date(span.endedAt).getTime() - new Date(span.startedAt).getTime() : null;
16855
16861
  const usage = span.attributes?.usage;
@@ -16997,23 +17003,32 @@ function SpanDataPanelContent({
16997
17003
  )
16998
17004
  ] })
16999
17005
  ] });
17000
- if (!scoringTabSlot) {
17006
+ if (!scoringTabSlot && !feedbackTabSlot) {
17001
17007
  return /* @__PURE__ */ jsx(DataPanel.Content, { children: detailsBody });
17002
17008
  }
17003
17009
  return /* @__PURE__ */ jsx(DataPanel.Content, { children: /* @__PURE__ */ jsxs(Tabs, { defaultTab: "details", value: activeTab, onValueChange: onTabChange, children: [
17004
17010
  /* @__PURE__ */ jsxs(TabList, { children: [
17005
17011
  /* @__PURE__ */ jsx(Tab, { value: "details", children: "Details" }),
17006
- /* @__PURE__ */ jsxs(Tab, { value: "scoring", children: [
17012
+ scoringTabSlot && /* @__PURE__ */ jsxs(Tab, { value: "scoring", children: [
17007
17013
  "Scoring ",
17008
17014
  scoringTabBadge != null && /* @__PURE__ */ jsxs(Fragment, { children: [
17009
17015
  "(",
17010
17016
  scoringTabBadge,
17011
17017
  ")"
17012
17018
  ] })
17019
+ ] }),
17020
+ feedbackTabSlot && /* @__PURE__ */ jsxs(Tab, { value: "feedback", children: [
17021
+ "Feedback ",
17022
+ feedbackTabBadge != null && /* @__PURE__ */ jsxs(Fragment, { children: [
17023
+ "(",
17024
+ feedbackTabBadge,
17025
+ ")"
17026
+ ] })
17013
17027
  ] })
17014
17028
  ] }),
17015
17029
  /* @__PURE__ */ jsx(TabContent, { value: "details", children: detailsBody }),
17016
- /* @__PURE__ */ jsx(TabContent, { value: "scoring", children: scoringTabSlot({ span, traceId, spanId }) })
17030
+ scoringTabSlot && /* @__PURE__ */ jsx(TabContent, { value: "scoring", children: scoringTabSlot({ span, traceId, spanId }) }),
17031
+ feedbackTabSlot && /* @__PURE__ */ jsx(TabContent, { value: "feedback", children: feedbackTabSlot({ span, traceId, spanId }) })
17017
17032
  ] }) });
17018
17033
  }
17019
17034
 
@@ -17900,7 +17915,7 @@ function useTraceUrlState(searchParams, setSearchParams, options) {
17900
17915
  const traceIdParam = searchParams.get(TRACE_ID_PARAM) || void 0;
17901
17916
  const spanIdParam = searchParams.get(SPAN_ID_PARAM) || void 0;
17902
17917
  const tabParam = searchParams.get(TAB_PARAM);
17903
- const spanTabParam = tabParam === "scoring" ? "scoring" : tabParam === "details" ? "details" : void 0;
17918
+ const spanTabParam = tabParam === "scoring" ? "scoring" : tabParam === "feedback" ? "feedback" : tabParam === "details" ? "details" : void 0;
17904
17919
  const scoreIdParam = searchParams.get(SCORE_ID_PARAM) || void 0;
17905
17920
  const selectedEntityOption = useMemo(
17906
17921
  () => ROOT_ENTITY_TYPE_OPTIONS.find((option) => option.entityType === searchParams.get(TRACE_ROOT_ENTITY_TYPE_PARAM)),