-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Re-add markdown streaming #2029
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
5e885c2
to
ba3f13f
Compare
…t! for boolean checks with formatted messages\n- Avoid false positive by anchoring truncated phrase at line start\n- Accept >=1 'codex' header per turn (multiple answer blocks possible)
925f414
to
3b554c4
Compare
}; | ||
sess.tx_event.send(event).await.ok(); | ||
} | ||
ResponseEvent::ReasoningSummaryPartAdded => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this because we get multiple reasoning sections is a row?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or just because we don't want to track content_part -> Thinking transition?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need a way to affirmatively break between different parts of the summary presently so that we can make sure they get newlines. I also want it so that we can just show thinking headers in the UI, similar to how we show a summarized command view - this will be important for the next part of the UI overhaul.
loop { | ||
let ev = timeout(wait_time, codex.next_event()) | ||
// Allow a bit more time to accommodate async startup work (e.g. config IO, tool discovery) | ||
let ev = timeout(wait_time.max(Duration::from_secs(5)), codex.next_event()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we up the default above?
core lgtm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lfg
Wait for newlines, then render markdown on a line by line basis. Word wrap it for the current terminal size and then spit it out line by line into the UI. Also adds a bunch of tests and fixes some UI regressions.