@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.
@@ -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),
@@ -2163,5 +2169,5 @@ export {
2163
2169
  buildRAGAnswerWorkflowState
2164
2170
  };
2165
2171
 
2166
- //# debugId=856A4FE03AB8B10C64756E2164756E21
2172
+ //# debugId=0430345FAAED098B64756E2164756E21
2167
2173
  //# sourceMappingURL=ui.js.map