@absolutejs/absolute 0.19.0-beta.608 → 0.19.0-beta.609

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.
@@ -388,7 +388,11 @@ var buildGroundingChunkExcerpts = (sources, activeChunkId) => {
388
388
  const collectText = (chunkIds) => chunkIds.map((chunkId) => chunkMap.get(chunkId)?.text).filter((text) => typeof text === "string").join(`
389
389
 
390
390
  `);
391
- const orderedWindowIds = [previousChunkId, activeSource.chunkId, nextChunkId].filter((chunkId, index, values) => Boolean(chunkId) && values.indexOf(chunkId) === index);
391
+ const orderedWindowIds = [
392
+ previousChunkId,
393
+ activeSource.chunkId,
394
+ nextChunkId
395
+ ].filter((chunkId, index, values) => Boolean(chunkId) && values.indexOf(chunkId) === index);
392
396
  return {
393
397
  chunkExcerpt: buildExcerpt(activeSource.text, 160),
394
398
  sectionExcerpt: buildExcerpt(sectionSources.map((source) => source.text).join(`
@@ -436,6 +440,8 @@ var buildRAGCitations = (sources) => {
436
440
  unique.set(key, {
437
441
  chunkId: source.chunkId,
438
442
  contextLabel: source.labels?.contextLabel ?? buildContextLabel(source.metadata),
443
+ excerpt: selectPreferredExcerpt(buildGroundingChunkExcerpts(sources, source.chunkId), getContextNumber(source.metadata?.sectionChunkCount)) || buildExcerpt(source.text),
444
+ excerpts: buildGroundingChunkExcerpts(sources, source.chunkId),
439
445
  key,
440
446
  label: buildSourceLabel(source),
441
447
  locatorLabel: source.labels?.locatorLabel ?? buildLocatorLabel(source.metadata, source.source, source.title),
@@ -7842,5 +7848,5 @@ export {
7842
7848
  createAIStream
7843
7849
  };
7844
7850
 
7845
- //# debugId=B3B884394C8ABF5264756E2164756E21
7851
+ //# debugId=8E3536F71E27F44564756E2164756E21
7846
7852
  //# sourceMappingURL=index.js.map