Repository navigation
fix(qq): 中文长段落按句末标点拆条,单换行归一成空行(#244) - #246
Open
Britneycode wants to merge 1 commit into
Open
Britneycode wants to merge 1 commit into
Britneycode wants to merge 1 commit into
Conversation
Britneycode
added a commit
that referenced
this pull request
Nov 29, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
修复 #244。报告者(v0.19.11)的截图里前三条正常分条,最后一条把「再加浅蓝贝壳连衣裙、蓝彩星芒纱裙,还有一件薄荷蓝泳衣,也有点味」和「都塞进脏衣篓了,能洗吗?」挤在同一段发出去。
根因两处叠加:
\n\n)拆条,而模型那一段用的是单换行 ⇒ 整段一条;splitLongParagraphs的判据是!t.includes(' ')—— 中文没有空格,整条兜底对中文完全失效;t.includes('\n')还会让单换行段跳过。What
。!?;…)拆,一句都超长就按字数硬切[语音]段不动(它有自己的分段语义)splitLength开关:completeQq(QQ 群聊完整发送)时不按长度切,只归一单换行 —— 否则「完整发送」会变成「拆成更多条」Verification
test/issue-244-paragraph-split.mjs(7 组):单换行归一、纯中文硬切、按句号断、本来分好的不动、短句不动、[语音]不动、英文老路径不变契约变更(断言对象随行为变,强度不降)
三条既有假设被真机证据推翻:
qq-outbound-sanitize:「没有空格的长段不硬拆」「带换行的段不动」→ 现在会拆voice-paragraph-split-wire:「没有 [语音] 的文本原样返回」→ 内容不变,但单换行归一成空行smoke-v09:maxChars截断契约保留(超出的段落不发、内容一字不丢),但不再要求「段内容原样」Closes #244