@absolutejs/absolute 0.19.0-beta.547 → 0.19.0-beta.549
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/ai/client/index.js +77 -1
- package/dist/ai/client/index.js.map +3 -3
- package/dist/ai/index.js +79 -2
- package/dist/ai/index.js.map +3 -3
- package/dist/angular/ai/index.js +77 -1
- package/dist/angular/ai/index.js.map +3 -3
- package/dist/react/ai/index.js +77 -1
- package/dist/react/ai/index.js.map +3 -3
- package/dist/src/ai/index.d.ts +1 -1
- package/dist/src/ai/rag/index.d.ts +1 -1
- package/dist/src/ai/rag/presentation.d.ts +3 -2
- package/dist/svelte/ai/index.js +77 -1
- package/dist/svelte/ai/index.js.map +3 -3
- package/dist/types/ai.d.ts +17 -0
- package/dist/vue/ai/index.js +77 -1
- package/dist/vue/ai/index.js.map +3 -3
- package/package.json +7 -7
package/dist/ai/index.js
CHANGED
|
@@ -4842,6 +4842,82 @@ var buildSyncOverviewLatestRow = (sources) => {
|
|
|
4842
4842
|
].filter(Boolean).join(" \xB7 ")
|
|
4843
4843
|
};
|
|
4844
4844
|
};
|
|
4845
|
+
var buildRAGSyncSourceRunPresentations = (source) => {
|
|
4846
|
+
if (!Array.isArray(source.metadata?.recentRuns)) {
|
|
4847
|
+
return [];
|
|
4848
|
+
}
|
|
4849
|
+
return source.metadata.recentRuns.slice(0, 3).map((entry, index) => {
|
|
4850
|
+
const trigger = typeof entry.trigger === "string" ? entry.trigger : "sync";
|
|
4851
|
+
const status = typeof entry.status === "string" ? entry.status : "unknown";
|
|
4852
|
+
const finishedAt = typeof entry.finishedAt === "number" ? formatDateLabel(entry.finishedAt) : "n/a";
|
|
4853
|
+
const duration = typeof entry.durationMs === "number" ? formatDurationLabel(entry.durationMs) : "n/a";
|
|
4854
|
+
const docs = typeof entry.documentCount === "number" ? `${entry.documentCount} docs` : "n/a";
|
|
4855
|
+
const chunks = typeof entry.chunkCount === "number" ? `${entry.chunkCount} chunks` : "n/a";
|
|
4856
|
+
const error = typeof entry.error === "string" && entry.error.length > 0 ? entry.error : undefined;
|
|
4857
|
+
return {
|
|
4858
|
+
label: `Run ${index + 1}`,
|
|
4859
|
+
status,
|
|
4860
|
+
summary: `${trigger} \xB7 ${status} \xB7 ${docs} \xB7 ${chunks} \xB7 ${duration} \xB7 ${finishedAt}`,
|
|
4861
|
+
rows: [
|
|
4862
|
+
{ label: "Trigger", value: trigger },
|
|
4863
|
+
{ label: "Status", value: status },
|
|
4864
|
+
{ label: "Output", value: `${docs} \xB7 ${chunks}` },
|
|
4865
|
+
{ label: "Duration", value: duration },
|
|
4866
|
+
{ label: "Finished", value: finishedAt },
|
|
4867
|
+
...error ? [{ label: "Error", value: error }] : []
|
|
4868
|
+
]
|
|
4869
|
+
};
|
|
4870
|
+
});
|
|
4871
|
+
};
|
|
4872
|
+
var buildRAGSyncSourcePresentation = (source) => {
|
|
4873
|
+
const provider = typeof source.metadata?.provider === "string" ? source.metadata.provider : undefined;
|
|
4874
|
+
const accountMode = typeof source.metadata?.accountMode === "string" ? source.metadata.accountMode : undefined;
|
|
4875
|
+
const schedule = typeof source.metadata?.schedule === "string" ? source.metadata.schedule : undefined;
|
|
4876
|
+
const lastTrigger = typeof source.metadata?.lastTrigger === "string" ? source.metadata.lastTrigger : undefined;
|
|
4877
|
+
const liveReady = typeof source.metadata?.liveReady === "string" ? source.metadata.liveReady : undefined;
|
|
4878
|
+
return {
|
|
4879
|
+
id: source.id,
|
|
4880
|
+
label: source.label,
|
|
4881
|
+
kind: source.kind,
|
|
4882
|
+
status: source.status,
|
|
4883
|
+
summary: [
|
|
4884
|
+
source.kind,
|
|
4885
|
+
source.status,
|
|
4886
|
+
typeof source.documentCount === "number" ? `${source.documentCount} docs` : "",
|
|
4887
|
+
typeof source.chunkCount === "number" ? `${source.chunkCount} chunks` : "",
|
|
4888
|
+
typeof source.lastSyncDurationMs === "number" ? formatDurationLabel(source.lastSyncDurationMs) : "",
|
|
4889
|
+
typeof source.lastSuccessfulSyncAt === "number" ? `last success ${formatDateLabel(source.lastSuccessfulSyncAt)}` : typeof source.lastSyncedAt === "number" ? `last sync ${formatDateLabel(source.lastSyncedAt)}` : ""
|
|
4890
|
+
].filter(Boolean).join(" \xB7 "),
|
|
4891
|
+
rows: [
|
|
4892
|
+
...source.target ? [{ label: "Target", value: source.target }] : [],
|
|
4893
|
+
...provider ? [{ label: "Provider", value: provider }] : [],
|
|
4894
|
+
...accountMode ? [{ label: "Account mode", value: accountMode }] : [],
|
|
4895
|
+
...schedule ? [{ label: "Schedule", value: schedule }] : [],
|
|
4896
|
+
...lastTrigger ? [{ label: "Last trigger", value: lastTrigger }] : [],
|
|
4897
|
+
...typeof source.lastSuccessfulSyncAt === "number" ? [
|
|
4898
|
+
{
|
|
4899
|
+
label: "Last success",
|
|
4900
|
+
value: formatDateLabel(source.lastSuccessfulSyncAt)
|
|
4901
|
+
}
|
|
4902
|
+
] : [],
|
|
4903
|
+
...typeof source.nextRetryAt === "number" ? [
|
|
4904
|
+
{
|
|
4905
|
+
label: "Next retry",
|
|
4906
|
+
value: formatDateLabel(source.nextRetryAt)
|
|
4907
|
+
}
|
|
4908
|
+
] : [],
|
|
4909
|
+
...source.lastError ? [{ label: "Last error", value: source.lastError }] : []
|
|
4910
|
+
],
|
|
4911
|
+
tags: [
|
|
4912
|
+
provider,
|
|
4913
|
+
accountMode ? `mode ${accountMode}` : undefined,
|
|
4914
|
+
liveReady
|
|
4915
|
+
].filter((value) => Boolean(value)),
|
|
4916
|
+
extendedSummary: source.description ?? liveReady,
|
|
4917
|
+
runs: buildRAGSyncSourceRunPresentations(source)
|
|
4918
|
+
};
|
|
4919
|
+
};
|
|
4920
|
+
var buildRAGSyncSourcePresentations = (sources) => (sources ?? []).map(buildRAGSyncSourcePresentation);
|
|
4845
4921
|
var buildRAGReadinessPresentation = (readiness) => {
|
|
4846
4922
|
if (!readiness) {
|
|
4847
4923
|
return {
|
|
@@ -12262,7 +12338,6 @@ export {
|
|
|
12262
12338
|
geminiEmbeddings,
|
|
12263
12339
|
gemini,
|
|
12264
12340
|
fuseRAGQueryResults,
|
|
12265
|
-
formatRAGTraceValue,
|
|
12266
12341
|
executeDryRunRAGEvaluation,
|
|
12267
12342
|
evaluateRAGCollection,
|
|
12268
12343
|
evaluateRAGAnswerGroundingCase,
|
|
@@ -12322,6 +12397,8 @@ export {
|
|
|
12322
12397
|
buildRAGUpsertInputFromURLs,
|
|
12323
12398
|
buildRAGUpsertInputFromDocuments,
|
|
12324
12399
|
buildRAGUpsertInputFromDirectory,
|
|
12400
|
+
buildRAGSyncSourcePresentations,
|
|
12401
|
+
buildRAGSyncSourcePresentation,
|
|
12325
12402
|
buildRAGSyncOverviewPresentation,
|
|
12326
12403
|
buildRAGStreamProgress,
|
|
12327
12404
|
buildRAGSourceSummaries,
|
|
@@ -12367,5 +12444,5 @@ export {
|
|
|
12367
12444
|
aiChat
|
|
12368
12445
|
};
|
|
12369
12446
|
|
|
12370
|
-
//# debugId=
|
|
12447
|
+
//# debugId=73B9FDA304D27F1A64756E2164756E21
|
|
12371
12448
|
//# sourceMappingURL=index.js.map
|