Preventing Flash of Incomplete Markdown when streaming AI responses