@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.
@@ -910,7 +910,11 @@ var buildGroundingChunkExcerpts = (sources, activeChunkId) => {
910
910
  const collectText = (chunkIds) => chunkIds.map((chunkId) => chunkMap.get(chunkId)?.text).filter((text) => typeof text === "string").join(`
911
911
 
912
912
  `);
913
- const orderedWindowIds = [previousChunkId, activeSource.chunkId, nextChunkId].filter((chunkId, index, values) => Boolean(chunkId) && values.indexOf(chunkId) === index);
913
+ const orderedWindowIds = [
914
+ previousChunkId,
915
+ activeSource.chunkId,
916
+ nextChunkId
917
+ ].filter((chunkId, index, values) => Boolean(chunkId) && values.indexOf(chunkId) === index);
914
918
  return {
915
919
  chunkExcerpt: buildExcerpt(activeSource.text, 160),
916
920
  sectionExcerpt: buildExcerpt(sectionSources.map((source) => source.text).join(`
@@ -958,6 +962,8 @@ var buildRAGCitations = (sources) => {
958
962
  unique.set(key, {
959
963
  chunkId: source.chunkId,
960
964
  contextLabel: source.labels?.contextLabel ?? buildContextLabel(source.metadata),
965
+ excerpt: selectPreferredExcerpt(buildGroundingChunkExcerpts(sources, source.chunkId), getContextNumber(source.metadata?.sectionChunkCount)) || buildExcerpt(source.text),
966
+ excerpts: buildGroundingChunkExcerpts(sources, source.chunkId),
961
967
  key,
962
968
  label: buildSourceLabel(source),
963
969
  locatorLabel: source.labels?.locatorLabel ?? buildLocatorLabel(source.metadata, source.source, source.title),
@@ -870,7 +870,11 @@ var buildGroundingChunkExcerpts = (sources, activeChunkId) => {
870
870
  const collectText = (chunkIds) => chunkIds.map((chunkId) => chunkMap.get(chunkId)?.text).filter((text) => typeof text === "string").join(`
871
871
 
872
872
  `);
873
- const orderedWindowIds = [previousChunkId, activeSource.chunkId, nextChunkId].filter((chunkId, index, values) => Boolean(chunkId) && values.indexOf(chunkId) === index);
873
+ const orderedWindowIds = [
874
+ previousChunkId,
875
+ activeSource.chunkId,
876
+ nextChunkId
877
+ ].filter((chunkId, index, values) => Boolean(chunkId) && values.indexOf(chunkId) === index);
874
878
  return {
875
879
  chunkExcerpt: buildExcerpt(activeSource.text, 160),
876
880
  sectionExcerpt: buildExcerpt(sectionSources.map((source) => source.text).join(`
@@ -918,6 +922,8 @@ var buildRAGCitations = (sources) => {
918
922
  unique.set(key, {
919
923
  chunkId: source.chunkId,
920
924
  contextLabel: source.labels?.contextLabel ?? buildContextLabel(source.metadata),
925
+ excerpt: selectPreferredExcerpt(buildGroundingChunkExcerpts(sources, source.chunkId), getContextNumber(source.metadata?.sectionChunkCount)) || buildExcerpt(source.text),
926
+ excerpts: buildGroundingChunkExcerpts(sources, source.chunkId),
921
927
  key,
922
928
  label: buildSourceLabel(source),
923
929
  locatorLabel: source.labels?.locatorLabel ?? buildLocatorLabel(source.metadata, source.source, source.title),
@@ -1913,7 +1913,11 @@ var buildGroundingChunkExcerpts = (sources, activeChunkId) => {
1913
1913
  const collectText = (chunkIds) => chunkIds.map((chunkId) => chunkMap.get(chunkId)?.text).filter((text) => typeof text === "string").join(`
1914
1914
 
1915
1915
  `);
1916
- const orderedWindowIds = [previousChunkId, activeSource.chunkId, nextChunkId].filter((chunkId, index, values) => Boolean(chunkId) && values.indexOf(chunkId) === index);
1916
+ const orderedWindowIds = [
1917
+ previousChunkId,
1918
+ activeSource.chunkId,
1919
+ nextChunkId
1920
+ ].filter((chunkId, index, values) => Boolean(chunkId) && values.indexOf(chunkId) === index);
1917
1921
  return {
1918
1922
  chunkExcerpt: buildExcerpt(activeSource.text, 160),
1919
1923
  sectionExcerpt: buildExcerpt(sectionSources.map((source) => source.text).join(`
@@ -1961,6 +1965,8 @@ var buildRAGCitations = (sources) => {
1961
1965
  unique.set(key, {
1962
1966
  chunkId: source.chunkId,
1963
1967
  contextLabel: source.labels?.contextLabel ?? buildContextLabel(source.metadata),
1968
+ excerpt: selectPreferredExcerpt(buildGroundingChunkExcerpts(sources, source.chunkId), getContextNumber(source.metadata?.sectionChunkCount)) || buildExcerpt(source.text),
1969
+ excerpts: buildGroundingChunkExcerpts(sources, source.chunkId),
1964
1970
  key,
1965
1971
  label: buildSourceLabel(source),
1966
1972
  locatorLabel: source.labels?.locatorLabel ?? buildLocatorLabel(source.metadata, source.source, source.title),
@@ -1055,7 +1055,11 @@ var buildGroundingChunkExcerpts = (sources, activeChunkId) => {
1055
1055
  const collectText = (chunkIds) => chunkIds.map((chunkId) => chunkMap.get(chunkId)?.text).filter((text) => typeof text === "string").join(`
1056
1056
 
1057
1057
  `);
1058
- const orderedWindowIds = [previousChunkId, activeSource.chunkId, nextChunkId].filter((chunkId, index, values) => Boolean(chunkId) && values.indexOf(chunkId) === index);
1058
+ const orderedWindowIds = [
1059
+ previousChunkId,
1060
+ activeSource.chunkId,
1061
+ nextChunkId
1062
+ ].filter((chunkId, index, values) => Boolean(chunkId) && values.indexOf(chunkId) === index);
1059
1063
  return {
1060
1064
  chunkExcerpt: buildExcerpt(activeSource.text, 160),
1061
1065
  sectionExcerpt: buildExcerpt(sectionSources.map((source) => source.text).join(`
@@ -1103,6 +1107,8 @@ var buildRAGCitations = (sources) => {
1103
1107
  unique.set(key, {
1104
1108
  chunkId: source.chunkId,
1105
1109
  contextLabel: source.labels?.contextLabel ?? buildContextLabel(source.metadata),
1110
+ excerpt: selectPreferredExcerpt(buildGroundingChunkExcerpts(sources, source.chunkId), getContextNumber(source.metadata?.sectionChunkCount)) || buildExcerpt(source.text),
1111
+ excerpts: buildGroundingChunkExcerpts(sources, source.chunkId),
1106
1112
  key,
1107
1113
  label: buildSourceLabel(source),
1108
1114
  locatorLabel: source.labels?.locatorLabel ?? buildLocatorLabel(source.metadata, source.source, source.title),
@@ -4311,5 +4317,5 @@ export {
4311
4317
  AIStreamService
4312
4318
  };
4313
4319
 
4314
- //# debugId=CBE86239F7337F8064756E2164756E21
4320
+ //# debugId=66CB3D3B24BE2E6464756E2164756E21
4315
4321
  //# sourceMappingURL=index.js.map