Skip to content

fix(chat): guard fallback streaming against empty content#357

Open
dancer wants to merge 3 commits intomainfrom
josh/fix-empty-fallback-stream
Open

fix(chat): guard fallback streaming against empty content#357
dancer wants to merge 3 commits intomainfrom
josh/fix-empty-fallback-stream

Conversation

@dancer
Copy link
Copy Markdown
Contributor

@dancer dancer commented Apr 10, 2026

summary

fallback streaming (post+edit) can send empty content to platform APIs that reject it (Telegram requires 1-4096 characters for both sendMessage and editMessageText)

three guards added to fallbackStream:

  • skip intermediate edits when renderer returns empty (e.g. table buffering, LLM warm-up)
  • skip first post when placeholder is null and renderer has no committable content yet
  • skip final edit when accumulated content is empty

closes #276
closes #350

@vercel
Copy link
Copy Markdown
Contributor

vercel bot commented Apr 10, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
chat Ready Ready Preview, Comment, Open in v0 Apr 10, 2026 1:04am
chat-sdk-nextjs-chat Ready Ready Preview, Comment, Open in v0 Apr 10, 2026 1:04am

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant