mirror of
https://github.com/AstrBotDevs/AstrBot
synced 2026-07-15 17:30:13 +08:00
* feat(kb): add Markdown-aware chunker for structured documents * fix: address review feedback from sourcery-ai and gemini - Clamp max_heading_depth to 1-6 to prevent regex errors - Deduct prefix length when splitting oversized sections - Replace hardcoded "[续]" with configurable continuation_prefix - Skip fenced code blocks when detecting headings - Cap pending size to prevent chunks exceeding chunk_size - Refactor into dataclass + helper methods * fix: handle unmatched fenced code block at EOF * fix: prevent chunks exceeding chunk_size with long heading prefixes * chore: rf --------- Co-authored-by: Soulter <905617992@qq.com>