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
@@ -286,7 +286,7 @@ func TestInterruptTurnStopsOnlyTargetLeg(t *testing.T) {
|
||||
if !waitIdle(f.o, "web") {
|
||||
t.Fatal("另一路收尾后会话没有回到空闲")
|
||||
}
|
||||
if got := assistantContents(f.history.records()); !slices.Equal(got, []string{"reply-1"}) {
|
||||
t.Fatalf("助手回复 = %v, want [reply-1](另一路继续作答,被取消路不补说明)", got)
|
||||
if got := assistantContents(f.history.records()); !slices.Equal(got, []string{storedParagraph("reply-1")}) {
|
||||
t.Fatalf("助手回复 = %v, want [<p>reply-1</p>](另一路继续作答,被取消路不补说明)", got)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user