@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.
package/dist/ai/rag/ui.js CHANGED
@@ -277,7 +277,11 @@ var buildGroundingChunkExcerpts = (sources, activeChunkId) => {
277
277
  const collectText = (chunkIds) => chunkIds.map((chunkId) => chunkMap.get(chunkId)?.text).filter((text) => typeof text === "string").join(`
278
278
 
279
279
  `);
280
- const orderedWindowIds = [previousChunkId, activeSource.chunkId, nextChunkId].filter((chunkId, index, values) => Boolean(chunkId) && values.indexOf(chunkId) === index);
280
+ const orderedWindowIds = [
281
+ previousChunkId,
282
+ activeSource.chunkId,
283
+ nextChunkId
284
+ ].filter((chunkId, index, values) => Boolean(chunkId) && values.indexOf(chunkId) === index);
281
285
  return {
282
286
  chunkExcerpt: buildExcerpt(activeSource.text, 160),
283
287
  sectionExcerpt: buildExcerpt(sectionSources.map((source) => source.text).join(`
@@ -325,6 +329,8 @@ var buildRAGCitations = (sources) => {
325
329
  unique.set(key, {
326
330
  chunkId: source.chunkId,
327
331
  contextLabel: source.labels?.contextLabel ?? buildContextLabel(source.metadata),
332
+ excerpt: selectPreferredExcerpt(buildGroundingChunkExcerpts(sources, source.chunkId), getContextNumber(source.metadata?.sectionChunkCount)) || buildExcerpt(source.text),
333
+ excerpts: buildGroundingChunkExcerpts(sources, source.chunkId),
328
334
  key,
329
335
  label: buildSourceLabel(source),
330
336
  locatorLabel: source.labels?.locatorLabel ?? buildLocatorLabel(source.metadata, source.source, source.title),
@@ -2194,5 +2200,5 @@ export {
2194
2200
  buildRAGAdminActionPresentation
2195
2201
  };
2196
2202
 
2197
- //# debugId=726F5089BA9C01AA64756E2164756E21
2203
+ //# debugId=62489218E5536C5664756E2164756E21
2198
2204
  //# sourceMappingURL=ui.js.map