@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.
@@ -380,7 +380,11 @@ var buildGroundingChunkExcerpts = (sources, activeChunkId) => {
380
380
  const collectText = (chunkIds) => chunkIds.map((chunkId) => chunkMap.get(chunkId)?.text).filter((text) => typeof text === "string").join(`
381
381
 
382
382
  `);
383
- const orderedWindowIds = [previousChunkId, activeSource.chunkId, nextChunkId].filter((chunkId, index, values) => Boolean(chunkId) && values.indexOf(chunkId) === index);
383
+ const orderedWindowIds = [
384
+ previousChunkId,
385
+ activeSource.chunkId,
386
+ nextChunkId
387
+ ].filter((chunkId, index, values) => Boolean(chunkId) && values.indexOf(chunkId) === index);
384
388
  return {
385
389
  chunkExcerpt: buildExcerpt(activeSource.text, 160),
386
390
  sectionExcerpt: buildExcerpt(sectionSources.map((source) => source.text).join(`
@@ -428,6 +432,8 @@ var buildRAGCitations = (sources) => {
428
432
  unique.set(key, {
429
433
  chunkId: source.chunkId,
430
434
  contextLabel: source.labels?.contextLabel ?? buildContextLabel(source.metadata),
435
+ excerpt: selectPreferredExcerpt(buildGroundingChunkExcerpts(sources, source.chunkId), getContextNumber(source.metadata?.sectionChunkCount)) || buildExcerpt(source.text),
436
+ excerpts: buildGroundingChunkExcerpts(sources, source.chunkId),
431
437
  key,
432
438
  label: buildSourceLabel(source),
433
439
  locatorLabel: source.labels?.locatorLabel ?? buildLocatorLabel(source.metadata, source.source, source.title),
@@ -3745,5 +3751,5 @@ export {
3745
3751
  buildRAGAnswerGroundingCaseDifficultyLeaderboard
3746
3752
  };
3747
3753
 
3748
- //# debugId=E6BD1B37FA2B2FD064756E2164756E21
3754
+ //# debugId=052710711C1D68E964756E2164756E21
3749
3755
  //# sourceMappingURL=quality.js.map