blocks
Class info¶
Classes¶
| Name | Children | Inherits |
|---|---|---|
| AgentMessageView acptui.ui.widgets.blocks A message of the agent, streamed as Markdown. |
||
| CompactionView acptui.ui.widgets.blocks A context compaction. |
||
| NoticeView acptui.ui.widgets.blocks A notice: info, warning or error. |
||
| PlanView acptui.ui.widgets.blocks The agent's plan (adapted from toad's plan widget: status icons, priority pills). |
||
| SessionMessageView acptui.ui.widgets.blocks A message sent to or received from another session. |
||
| StreamingMarkdown acptui.ui.widgets.blocks Markdown that streams appended text, starting only after its initial content is shown. |
||
| SubagentView acptui.ui.widgets.blocks A subagent session; enter opens its conversation, x cancels its work. |
||
| ThoughtView acptui.ui.widgets.blocks The agent's reasoning, collapsible. |
||
| ToolCallHeader acptui.ui.widgets.blocks The one-line summary of a tool call; enter or click toggles the details. |
||
| ToolCallView acptui.ui.widgets.blocks A tool call: status, kind, title, locations and content. |
||
| UserMessageView acptui.ui.widgets.blocks A message the user sent. |
🛈 DocStrings¶
Conversation blocks: messages, thoughts, tool calls, plans and notices.
COLLAPSED_KINDS
module-attribute
¶
Tool kinds whose content starts collapsed (it is mostly noise).
MAX_TEXT_LINES
module-attribute
¶
Lines of tool output text shown; the rest is cut (with a note).
AgentMessageView
¶
Bases: StreamingMarkdown
A message of the agent, streamed as Markdown.
Source code in src/acptui/ui/widgets/blocks.py
refresh_entry
async
¶
CompactionView
¶
Bases: Static
A context compaction.
Source code in src/acptui/ui/widgets/blocks.py
refresh_entry
¶
Re-render.
Source code in src/acptui/ui/widgets/blocks.py
NoticeView
¶
Bases: Static
A notice: info, warning or error.
Source code in src/acptui/ui/widgets/blocks.py
PlanView
¶
Bases: Static
The agent's plan (adapted from toad's plan widget: status icons, priority pills).
Source code in src/acptui/ui/widgets/blocks.py
refresh_entry
¶
Re-render the plan.
Source code in src/acptui/ui/widgets/blocks.py
SessionMessageView
¶
Bases: Static
A message sent to or received from another session.
Source code in src/acptui/ui/widgets/blocks.py
refresh_entry
¶
Re-render.
Source code in src/acptui/ui/widgets/blocks.py
StreamingMarkdown
¶
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.
Source code in src/acptui/ui/widgets/blocks.py
SubagentView
¶
Bases: Static
A subagent session; enter opens its conversation, x cancels its work.
Source code in src/acptui/ui/widgets/blocks.py
CancelRequested
¶
Bases: Message
The user asked to cancel the subagent's work.
Source code in src/acptui/ui/widgets/blocks.py
Open
¶
Bases: Message
The user wants to see the subagent's conversation.
Source code in src/acptui/ui/widgets/blocks.py
refresh_entry
¶
Re-render.
Source code in src/acptui/ui/widgets/blocks.py
ThoughtView
¶
Bases: Collapsible
The agent's reasoning, collapsible.
Source code in src/acptui/ui/widgets/blocks.py
ToolCallHeader
¶
Bases: Static
The one-line summary of a tool call; enter or click toggles the details.
Source code in src/acptui/ui/widgets/blocks.py
ToolCallView
¶
Bases: Vertical
A tool call: status, kind, title, locations and content.
Source code in src/acptui/ui/widgets/blocks.py
265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 | |
CancelRequested
¶
Bases: Message
The user asked to cancel the tool call.
Source code in src/acptui/ui/widgets/blocks.py
rebuild
async
¶
refresh_entry
async
¶
Update after the tool call changed (re-renders content only if it changed).
Source code in src/acptui/ui/widgets/blocks.py
set_diff_mode
¶
set_diff_mode(mode: DiffViewMode) -> None
UserMessageView
¶
Bases: Static
A message the user sent.
Source code in src/acptui/ui/widgets/blocks.py
make_view
¶
make_view(
entry: Entry, state: SessionState, diff_mode: DiffViewMode, *, expand_thoughts: bool
) -> Widget
The widget for a timeline entry.
Source code in src/acptui/ui/widgets/blocks.py
raw_json
¶
Pretty JSON for raw tool input/output.