AgentMessageView
Base classes
| Name |
Children |
Inherits |
StreamingMarkdown acptui.ui.widgets.blocks Markdown that streams appended text, starting only after its initial content is shown. |
|
|
⋔ Inheritance diagram
graph TD
107846719468688["blocks.AgentMessageView"]
107846722155648["blocks.StreamingMarkdown"]
107846719929408["_markdown.Markdown"]
107846718477920["widget.Widget"]
107846718489888["dom.DOMNode"]
107846718374032["message_pump.MessagePump"]
137699722799616["builtins.object"]
107846722155648 --> 107846719468688
107846719929408 --> 107846722155648
107846718477920 --> 107846719929408
107846718489888 --> 107846718477920
107846718374032 --> 107846718489888
137699722799616 --> 107846718374032
🛈 DocStrings
Bases: StreamingMarkdown
A message of the agent, streamed as Markdown.
Source code in src/acptui/ui/widgets/blocks.py
| class AgentMessageView(StreamingMarkdown):
"""A message of the agent, streamed as Markdown."""
DEFAULT_CSS = """
AgentMessageView {
height: auto;
margin: 0 0 1 0;
padding: 0 1;
background: transparent;
}
"""
def __init__(self, entry: MessageEntry, cwd: str) -> None:
super().__init__(_content_markdown(entry.blocks, cwd))
self.entry = entry
self.cwd = cwd
async def refresh_entry(self) -> None:
"""Show the entry's current content (streaming what was appended)."""
await self.sync(_content_markdown(self.entry.blocks, self.cwd))
|
refresh_entry
async
Show the entry's current content (streaming what was appended).
Source code in src/acptui/ui/widgets/blocks.py
| async def refresh_entry(self) -> None:
"""Show the entry's current content (streaming what was appended)."""
await self.sync(_content_markdown(self.entry.blocks, self.cwd))
|
:fa-brands-github: Show source on GitHub