Skip to content

fix: normalize streamed Markdown text - #30

Merged
tiye merged 3 commits into
mainfrom
codex/normalize-markdown-stream-20260824
Aug 23, 2026
Merged

fix: normalize streamed Markdown text#30
tiye merged 3 commits into
mainfrom
codex/normalize-markdown-stream-20260824

Conversation

@tiye

@tiye tiye commented Aug 23, 2026

Copy link
Copy Markdown
Member

Normalizes dynamic chunks from Gemini, OpenRouter, and Anthropic before concatenation and persistence. Existing or archived messages are normalized before Markdown rendering, JSON detection, and copy actions, preventing objects from reaching the Markdown string parser. Respo Markdown input guard is tracked separately in Respo/respo-markdown.calcit PR 33.

Copilot AI lite review requested due to automatic review settings August 23, 2026 17:27

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a normalization layer for streamed / persisted message text so that Markdown rendering and related UI behaviors always receive plain strings, even when upstream providers return dynamic (non-string) chunks.

Changes:

  • Wrap streamed chunk extraction (Anthropic SSE, Gemini, OpenRouter) with a new stream-text helper before concatenation/persistence.
  • Normalize :content / :thinking from existing and archived messages before JSON detection, Markdown rendering, and copy actions.
  • Add stream-text helper function to centralize the coercion/guard behavior.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread calcit.cirru Outdated
@tiye
tiye merged commit f9cfd33 into main Aug 23, 2026
1 check passed
@tiye
tiye deleted the codex/normalize-markdown-stream-20260824 branch August 23, 2026 18:05
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.

2 participants