StreamingMarkdown
Sub classes¶
| Name | Children | Inherits |
|---|---|---|
| AgentMessageView acptui.ui.widgets.blocks A message of the agent, streamed as Markdown. |
Base classes¶
| Name | Children | Inherits |
|---|---|---|
| Markdown textual.widgets._markdown |
⋔ Inheritance diagram¶
graph TD
107846722155648["blocks.StreamingMarkdown"]
107846719929408["_markdown.Markdown"]
107846718477920["widget.Widget"]
107846718489888["dom.DOMNode"]
107846718374032["message_pump.MessagePump"]
137699722799616["builtins.object"]
107846719929408 --> 107846722155648
107846718477920 --> 107846719929408
107846718489888 --> 107846718477920
107846718374032 --> 107846718489888
137699722799616 --> 107846718374032
🛈 DocStrings¶
Bases: Markdown
Markdown that streams appended text, starting only after its initial content is shown.
Markdown renders its initial content in an async mount handler; text streamed
before that finished would be overwritten.
Source code in src/acptui/ui/widgets/blocks.py
append_text
async
¶
finish
async
¶
replace_text
async
¶
sync
async
¶
Show markdown: stream the new part if it extends what is shown, else replace.
Rendering lags behind the session state (several chunks may have been applied before the view exists), so views sync to the full text instead of appending each chunk.