@absolutejs/absolute 0.19.0-beta.422 → 0.19.0-beta.424

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.
@@ -19,7 +19,7 @@ export type RAGDocumentChunk = {
19
19
  embedding?: number[];
20
20
  };
21
21
  export type RAGContentFormat = 'text' | 'markdown' | 'html';
22
- export type RAGChunkingStrategy = 'paragraphs' | 'sentences' | 'fixed';
22
+ export type RAGChunkingStrategy = 'paragraphs' | 'sentences' | 'fixed' | 'source_aware';
23
23
  export type RAGChunkingOptions = {
24
24
  maxChunkLength?: number;
25
25
  chunkOverlap?: number;
@@ -44,6 +44,16 @@ export type RAGPreparedDocument = {
44
44
  normalizedText: string;
45
45
  chunks: RAGDocumentChunk[];
46
46
  };
47
+ export type RAGDocumentFileInput = Omit<RAGIngestDocument, 'text'> & {
48
+ path: string;
49
+ };
50
+ export type RAGDirectoryIngestInput = {
51
+ directory: string;
52
+ recursive?: boolean;
53
+ includeExtensions?: string[];
54
+ baseMetadata?: Record<string, unknown>;
55
+ defaultChunking?: RAGChunkingOptions;
56
+ };
47
57
  export type RAGQueryInput = {
48
58
  queryVector: number[];
49
59
  topK: number;
package/dist/vue/index.js CHANGED
@@ -1868,6 +1868,11 @@ var streamSwapRuntime = () => {
1868
1868
  const consumers = window.__ABS_SLOT_CONSUMERS__;
1869
1869
  const pending = window.__ABS_SLOT_PENDING__;
1870
1870
  const canApplyImmediately = () => window.__ABS_SLOT_HYDRATION_PENDING__ !== true;
1871
+ const isAngularDeferPayload = (payload) => {
1872
+ if (!payload || typeof payload !== "object")
1873
+ return false;
1874
+ return payload.kind === "angular-defer";
1875
+ };
1871
1876
  const resolveHtml = (payload) => {
1872
1877
  if (!payload || typeof payload !== "object") {
1873
1878
  return typeof payload === "string" ? payload : "";
@@ -1891,6 +1896,10 @@ var streamSwapRuntime = () => {
1891
1896
  return;
1892
1897
  }
1893
1898
  }
1899
+ if (isAngularDeferPayload(payload)) {
1900
+ pending[id] = payload;
1901
+ return;
1902
+ }
1894
1903
  const node = document.getElementById(`slot-${id}`);
1895
1904
  if (!node) {
1896
1905
  pending[id] = payload;
@@ -1953,7 +1962,13 @@ var createSlotPatchStatement = (id, payload) => `(window.${STREAMING_RUNTIME_GLO
1953
1962
  var createNonceAttr = (nonce) => nonce ? ` nonce="${nonce}"` : "";
1954
1963
  var createStreamingSlotId = () => `${SLOT_ID_PREFIX}${Math.random().toString(36).slice(2, 10)}`;
1955
1964
  var getStreamingSlotsRuntimeScript = () => getStreamSwapRuntimeScript();
1956
- var renderStreamingSlotsRuntimeTag = (nonce) => `<script${createNonceAttr(nonce)}>${escapeScriptContent(getStreamingSlotsRuntimeScript())}</script>`;
1965
+ var renderStreamingSlotsRuntimeTag = (nonce, runtimePreludeScript) => {
1966
+ const runtimeBody = [
1967
+ runtimePreludeScript?.trim() ? runtimePreludeScript.trim() : "",
1968
+ getStreamingSlotsRuntimeScript()
1969
+ ].filter(Boolean).join(";");
1970
+ return `<script${createNonceAttr(nonce)}>${escapeScriptContent(runtimeBody)}</script>`;
1971
+ };
1957
1972
  var renderStreamingSlotPlaceholder = (id, fallbackHtml = "") => `<div id="${createSlotPlaceholderId(id)}" data-absolute-slot="true">${fallbackHtml}</div>`;
1958
1973
  var renderStreamingSlotPatchTag = (id, payload, nonce) => `<script${createNonceAttr(nonce)}>${escapeScriptContent(createSlotPatchStatement(id, payload))}</script>`;
1959
1974
  var injectHtmlIntoHead = (html, injection) => {
@@ -2258,8 +2273,8 @@ var streamOutOfOrderSlots = ({
2258
2273
  }
2259
2274
  });
2260
2275
  };
2261
- var injectStreamingRuntimeIntoStream = (stream, nonce, runtimePlacement = "head") => {
2262
- const runtimeTag = renderStreamingSlotsRuntimeTag(nonce);
2276
+ var injectStreamingRuntimeIntoStream = (stream, nonce, runtimePlacement = "head", runtimePreludeScript) => {
2277
+ const runtimeTag = renderStreamingSlotsRuntimeTag(nonce, runtimePreludeScript);
2263
2278
  const encoder = new TextEncoder;
2264
2279
  const decoder = new TextDecoder;
2265
2280
  const closingTag = runtimePlacement === "body" ? CLOSING_BODY_TAG : CLOSING_HEAD_TAG;
@@ -2316,6 +2331,7 @@ var appendStreamingSlotPatchesToStream = (stream, slots = [], {
2316
2331
  onError,
2317
2332
  onSlotMetric,
2318
2333
  policy,
2334
+ runtimePreludeScript,
2319
2335
  runtimePlacement = "head"
2320
2336
  } = {}) => {
2321
2337
  const resolvedPolicy = resolveStreamingSlotPolicy(policy);
@@ -2333,7 +2349,7 @@ var appendStreamingSlotPatchesToStream = (stream, slots = [], {
2333
2349
  });
2334
2350
  if (preparedSlots.length === 0)
2335
2351
  return stream;
2336
- const source = injectRuntime ? injectStreamingRuntimeIntoStream(stream, nonce, runtimePlacement) : stream;
2352
+ const source = injectRuntime ? injectStreamingRuntimeIntoStream(stream, nonce, runtimePlacement, runtimePreludeScript) : stream;
2337
2353
  const encoder = new TextEncoder;
2338
2354
  const decoder = new TextDecoder;
2339
2355
  const reader = source.getReader();
@@ -2422,6 +2438,7 @@ var enhanceHtmlResponseWithStreamingSlots = (response, {
2422
2438
  nonce,
2423
2439
  onError,
2424
2440
  runtimePlacement,
2441
+ runtimePreludeScript,
2425
2442
  streamingSlots = [],
2426
2443
  policy
2427
2444
  } = {}) => {
@@ -2432,6 +2449,7 @@ var enhanceHtmlResponseWithStreamingSlots = (response, {
2432
2449
  nonce,
2433
2450
  onError,
2434
2451
  policy,
2452
+ runtimePreludeScript,
2435
2453
  runtimePlacement
2436
2454
  });
2437
2455
  return new Response(body, {
@@ -2783,5 +2801,5 @@ export {
2783
2801
  Image_default as Image
2784
2802
  };
2785
2803
 
2786
- //# debugId=FDC67EF6700E8BCA64756E2164756E21
2804
+ //# debugId=A1B35D5436F10B4264756E2164756E21
2787
2805
  //# sourceMappingURL=index.js.map