mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-01 02:05:00 +00:00
style: Fix whitespace and formatting in MarkdownStream class
This commit is contained in:
parent
be82b6bed9
commit
f1bd5cdb52
1 changed files with 4 additions and 4 deletions
|
@ -42,11 +42,11 @@ The end.
|
||||||
|
|
||||||
class MarkdownStream:
|
class MarkdownStream:
|
||||||
"""Streaming markdown renderer that progressively displays content with a live updating window.
|
"""Streaming markdown renderer that progressively displays content with a live updating window.
|
||||||
|
|
||||||
Uses rich.console and rich.live to render markdown content with smooth scrolling and partial updates.
|
Uses rich.console and rich.live to render markdown content with smooth scrolling and partial updates.
|
||||||
Maintains a sliding window of visible content while streaming in new markdown text.
|
Maintains a sliding window of visible content while streaming in new markdown text.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
live = None # Rich Live display instance
|
live = None # Rich Live display instance
|
||||||
when = 0 # Timestamp of last update
|
when = 0 # Timestamp of last update
|
||||||
min_delay = 0.050 # Minimum time between updates (20fps)
|
min_delay = 0.050 # Minimum time between updates (20fps)
|
||||||
|
@ -54,7 +54,7 @@ class MarkdownStream:
|
||||||
|
|
||||||
def __init__(self, mdargs=None):
|
def __init__(self, mdargs=None):
|
||||||
"""Initialize the markdown stream.
|
"""Initialize the markdown stream.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
mdargs (dict, optional): Additional arguments to pass to rich Markdown renderer
|
mdargs (dict, optional): Additional arguments to pass to rich Markdown renderer
|
||||||
"""
|
"""
|
||||||
|
@ -79,7 +79,7 @@ class MarkdownStream:
|
||||||
|
|
||||||
def update(self, text, final=False):
|
def update(self, text, final=False):
|
||||||
"""Update the displayed markdown content.
|
"""Update the displayed markdown content.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
text (str): New markdown text to append
|
text (str): New markdown text to append
|
||||||
final (bool): If True, this is the final update and we should clean up
|
final (bool): If True, this is the final update and we should clean up
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue