applyOverlapAligned searched for the latest boundary in [curEnd-2*overlap, curEnd], but curEnd itself is always one of the boundaries (the bin-packer only flushes at boundary positions). The loop therefore always returned curEnd, producing chunkStart == curEnd and zero overlap regardless of cfg.ChunkOverlap. Exclude curEnd from the search window so an earlier boundary can be picked, restoring the intended overlap behaviour. |
||
|---|---|---|
| .. | ||
| chunker | ||
| docparser | ||
| web_fetch | ||
| web_search | ||