@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.
@@ -1338,6 +1338,20 @@ export type RAGSyncSourcePresentation = {
1338
1338
  extendedSummary?: string;
1339
1339
  runs?: RAGSyncSourceRunPresentation[];
1340
1340
  };
1341
+ export type RAGAdminJobPresentation = {
1342
+ id: string;
1343
+ action: RAGAdminJobRecord['action'];
1344
+ status: RAGAdminJobRecord['status'];
1345
+ summary: string;
1346
+ rows: RAGLabelValueRow[];
1347
+ };
1348
+ export type RAGAdminActionPresentation = {
1349
+ id: string;
1350
+ action: RAGAdminActionRecord['action'];
1351
+ status: RAGAdminActionRecord['status'];
1352
+ summary: string;
1353
+ rows: RAGLabelValueRow[];
1354
+ };
1341
1355
  export type RAGEvaluationCaseTracePresentation = {
1342
1356
  caseId: string;
1343
1357
  label: string;
@@ -1259,6 +1259,46 @@ var buildSyncOverviewLatestRow = (sources) => {
1259
1259
  ].filter(Boolean).join(" \xB7 ")
1260
1260
  };
1261
1261
  };
1262
+ var formatAdminActionLabel = (value) => value.replaceAll("_", " ");
1263
+ var buildAdminTimingLabel = (input) => typeof input.elapsedMs === "number" ? formatDurationLabel(input.elapsedMs) : formatDateLabel(input.startedAt);
1264
+ var buildRAGAdminJobPresentation = (job) => ({
1265
+ id: job.id,
1266
+ action: job.action,
1267
+ status: job.status,
1268
+ summary: [
1269
+ job.status.toUpperCase(),
1270
+ formatAdminActionLabel(job.action),
1271
+ job.target,
1272
+ buildAdminTimingLabel(job)
1273
+ ].filter(Boolean).join(" \xB7 "),
1274
+ rows: [
1275
+ { label: "Action", value: formatAdminActionLabel(job.action) },
1276
+ { label: "Status", value: job.status },
1277
+ ...job.target ? [{ label: "Target", value: job.target }] : [],
1278
+ { label: "Timing", value: buildAdminTimingLabel(job) },
1279
+ ...job.error ? [{ label: "Error", value: job.error }] : []
1280
+ ]
1281
+ });
1282
+ var buildRAGAdminJobPresentations = (jobs) => (jobs ?? []).slice(0, 3).map(buildRAGAdminJobPresentation);
1283
+ var buildRAGAdminActionPresentation = (action) => ({
1284
+ id: action.id,
1285
+ action: action.action,
1286
+ status: action.status,
1287
+ summary: [
1288
+ action.status.toUpperCase(),
1289
+ formatAdminActionLabel(action.action),
1290
+ action.documentId ?? action.target,
1291
+ buildAdminTimingLabel(action)
1292
+ ].filter(Boolean).join(" \xB7 "),
1293
+ rows: [
1294
+ { label: "Action", value: formatAdminActionLabel(action.action) },
1295
+ { label: "Status", value: action.status },
1296
+ ...action.documentId ? [{ label: "Document", value: action.documentId }] : action.target ? [{ label: "Target", value: action.target }] : [],
1297
+ { label: "Timing", value: buildAdminTimingLabel(action) },
1298
+ ...action.error ? [{ label: "Error", value: action.error }] : []
1299
+ ]
1300
+ });
1301
+ var buildRAGAdminActionPresentations = (actions) => (actions ?? []).slice(0, 3).map(buildRAGAdminActionPresentation);
1262
1302
  var buildRAGSyncSourceRunPresentations = (source) => {
1263
1303
  if (!Array.isArray(source.metadata?.recentRuns)) {
1264
1304
  return [];
@@ -4421,5 +4461,5 @@ export {
4421
4461
  AIStreamKey
4422
4462
  };
4423
4463
 
4424
- //# debugId=937ABBD6575B6D4664756E2164756E21
4464
+ //# debugId=A2EBD5654A45197164756E2164756E21
4425
4465
  //# sourceMappingURL=index.js.map