fix: keep streaming markdown live window updating mid-line - #5590
Closed
tonycoder-hub wants to merge 1 commit into
Closed
fix: keep streaming markdown live window updating mid-line#5590tonycoder-hub wants to merge 1 commit into
tonycoder-hub wants to merge 1 commit into
Conversation
MarkdownStream.update() returned early whenever no new *stable* lines had appeared above the live window. Two things were then skipped: - the live window itself was never repainted, so partial text appended to the last rendered line stayed invisible until a new line was completed - on a final update it left the rich Live display running and self.live set Also clamp the stable line count at 0. While fewer lines are rendered than live_window, the negative count sliced lines[num_lines:] from the *end*, so the live window dropped the leading lines of a response that had not been printed above it yet. Co-authored-by: Tony Coder <407243179@qq.com>
|
|
Author
|
Closing as stale — opened on or before 2026-08-17 and still unmerged. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
MarkdownStream.update returned early when no new stable lines were ready, so the live window froze mid-line and a final update with no new lines left the rich Live renderer running. When fewer lines than live_window had rendered, a negative slice also hid the first lines.
Guard only the print-above-window path and clamp the stable line count at 0. Tests: python3 -m pytest tests/basic/test_mdstream.py -q -> 3 passed. Distinct from #4577/#4579 (theming) and #5583-#5589.