fix(gateway,channelbridge,turnreply): p 标签半包写入侧规整(修「整条塌成一段」)
裁定(已发安卓):**能修**,走**写入侧规整** —— 不指望模型输出、不动客户端。 - 新增 internal/runtime/turnreply/paragraph.go 的 NormalizeParagraphs: 把未被 <p> 包裹的段落补上 <p>(按空行分段;<action>/<narration> 段也包进 <p>, 与正确形态 <p><action>…</action>…</p> 一致) - **幂等**守门断言:已完全包裹的文本逐字不变(防二次加工) - 落点覆盖 Web 与 IM 两条落库路径(gateway/session_turn_reply.go、channelbridge/turnreply.go、 proactive.go)⇒ 两边共用同一份规整文本 ⇒ **历史一次性变好、两个客户端零改动**、渲染口径不分叉 (测试与变异详见切片报告)
This commit is contained in:
1 parent
d532eb3fcd
commit
5de708a560
17 files changed
+721
-46
No files matched your search
@@ -332,7 +332,7 @@ func TestVoiceTurnPersistsIntoHistoryEndToEnd(t *testing.T) {
|
||||
if m.Platform != history.PlatformWeb {
|
||||
t.Fatalf("用户消息 platform = %q, want %q", m.Platform, history.PlatformWeb)
|
||||
}
|
||||
case m.Role == history.RoleAssistant && m.Content == "语音答复":
|
||||
case m.Role == history.RoleAssistant && m.Content == storedParagraph("语音答复"):
|
||||
assistantOK = true
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user