Files
Enterprise-Knowledge-Base/internal
wizardchen 5a79a817a1 fix(chunker): heuristic splitter overlap was always zero
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.
2026-05-06 21:16:48 +08:00
..
2025-08-05 15:08:07 +08:00