Repository navigation
Studio: keep long replies with escaped math streaming smoothly - #16490
danielhanchen merged 3 commits into
Conversation
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Swish! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
…ow runners [skip ci]
|
@codex review |
1 similar comment
|
@codex review |
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Long replies that write math as$x$ made the chat stutter while streaming. Every new piece of text parsed the whole reply again to find that math, so the work grew with the reply. On a 60,000 character reply that parse took about 40 ms each time, far more than every other step of preparing the text.
While a reply streams, finished blocks are now remembered and only the end of the reply is parsed. The finished reply still gets one full parse, so the final text and math look exactly as before. While streaming, a few frames can briefly render math differently from a full parse until the next frame or the final parse.
Streaming parity, merge base vs this branch
Both builds were fed the same scripted 60 section reply (math written as
\$...\$, a$5price in every section). The math renders the same while streaming and once finished: 60 math spans mid-stream and 120 at the end on both sides, no raw\$left, identical rendered text.