@absolutejs/absolute 0.19.0-beta.549 → 0.19.0-beta.550

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.
@@ -928,6 +928,46 @@ var buildSyncOverviewLatestRow = (sources) => {
928
928
  ].filter(Boolean).join(" \xB7 ")
929
929
  };
930
930
  };
931
+ var formatAdminActionLabel = (value) => value.replaceAll("_", " ");
932
+ var buildAdminTimingLabel = (input) => typeof input.elapsedMs === "number" ? formatDurationLabel(input.elapsedMs) : formatDateLabel(input.startedAt);
933
+ var buildRAGAdminJobPresentation = (job) => ({
934
+ id: job.id,
935
+ action: job.action,
936
+ status: job.status,
937
+ summary: [
938
+ job.status.toUpperCase(),
939
+ formatAdminActionLabel(job.action),
940
+ job.target,
941
+ buildAdminTimingLabel(job)
942
+ ].filter(Boolean).join(" \xB7 "),
943
+ rows: [
944
+ { label: "Action", value: formatAdminActionLabel(job.action) },
945
+ { label: "Status", value: job.status },
946
+ ...job.target ? [{ label: "Target", value: job.target }] : [],
947
+ { label: "Timing", value: buildAdminTimingLabel(job) },
948
+ ...job.error ? [{ label: "Error", value: job.error }] : []
949
+ ]
950
+ });
951
+ var buildRAGAdminJobPresentations = (jobs) => (jobs ?? []).slice(0, 3).map(buildRAGAdminJobPresentation);
952
+ var buildRAGAdminActionPresentation = (action) => ({
953
+ id: action.id,
954
+ action: action.action,
955
+ status: action.status,
956
+ summary: [
957
+ action.status.toUpperCase(),
958
+ formatAdminActionLabel(action.action),
959
+ action.documentId ?? action.target,
960
+ buildAdminTimingLabel(action)
961
+ ].filter(Boolean).join(" \xB7 "),
962
+ rows: [
963
+ { label: "Action", value: formatAdminActionLabel(action.action) },
964
+ { label: "Status", value: action.status },
965
+ ...action.documentId ? [{ label: "Document", value: action.documentId }] : action.target ? [{ label: "Target", value: action.target }] : [],
966
+ { label: "Timing", value: buildAdminTimingLabel(action) },
967
+ ...action.error ? [{ label: "Error", value: action.error }] : []
968
+ ]
969
+ });
970
+ var buildRAGAdminActionPresentations = (actions) => (actions ?? []).slice(0, 3).map(buildRAGAdminActionPresentation);
931
971
  var buildRAGSyncSourceRunPresentations = (source) => {
932
972
  if (!Array.isArray(source.metadata?.recentRuns)) {
933
973
  return [];
@@ -3758,5 +3798,5 @@ export {
3758
3798
  buildRAGAnswerWorkflowState
3759
3799
  };
3760
3800
 
3761
- //# debugId=63C5869DB16E2E6264756E2164756E21
3801
+ //# debugId=69CCC661C852B27F64756E2164756E21
3762
3802
  //# sourceMappingURL=index.js.map