Skip to content

fix: 收口流式 Markdown 闪烁与节奏 - #360

Closed
taekchef wants to merge 1 commit into
mainfrom
codex/stream-markdown-polish
Closed

taekchef wants to merge 1 commit into
mainfrom
codex/stream-markdown-polish

Conversation

@taekchef

Copy link
Copy Markdown
Collaborator

结论

修复回答收尾仍会全体闪一下、流式粗体先露出星号,以及积压追赶偏慢的问题。加载状态词字号已经由 #342 合入并在当前主线保持 16/14 对齐,本 PR 不重复改动。

根因与改动

  • 收尾时立即结束流式会话,会把仍在 200ms 淡入中的短回答瞬间定格,整行亮度一起跳;现在等一帧余量后的 220ms 再结束会话。
  • 聊天流式直接解析未闭合的强调语法,会先显示原始星号;现在只暂扣行尾未闭合的粗体、下划线粗体和删除线,跳过代码块、行内代码与转义符,闭合后直接按样式出现。
  • 原生积压上限 12→24 字/次,收尾节奏 12字/33ms→16字/24ms,淡入 260→200ms;仍保留 3 秒和 240 次硬上限。

验证

  • npm run typecheck:editor
  • npm run test:editor:19/19
  • node script/build_editor.mjs --check
  • swift build
  • swift build --target WeiBeiWebEditorCheck
  • WeiBeiWebEditorCheck:通过
  • 真实浏览器同款渲染器:用户原话短回答逐字流式,rawSyntaxShown=false;收尾前后 top 46→46、height 24→24;17 帧未见整行亮度回落
  • swift test --filter AgentStreamingDisplayPumpTests:本机工具链缺少 XCTest,未进入用例;交由本 PR 远端检查执行

范围

  • 未修改共享核心文件。
  • 未合并、未发布、未安装正式 App。
  • 暂扣只覆盖聊天中可见的行尾强调符号;链接、数学公式和跨行结构继续沿用现有 Milkdown 解析。

完成前等待淡入落定,避免短回答整体亮度突变;暂扣未闭合的行尾强调符号,粗体闭合后直接按样式出现;提高积压追赶与收尾节奏,同时保留有界上限。
@taekchef

Copy link
Copy Markdown
Collaborator Author

流式问题的最终实现已由 #363 合入,并已随 #375 候选完成整体验收;关闭旧草稿,避免恢复旧节奏实现。

@taekchef taekchef closed this Aug 24, 2026
@taekchef
taekchef deleted the codex/stream-markdown-polish branch September 13, 2026 10:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant