kaboo_workflows.renderers¶
Terminal renderers for streamed agent activity.
kaboo_workflows.renderers ¶
Renderers for displaying agent output.
AnsiRenderer ¶
AnsiRenderer(
*, file=None, separator_width=None, typewriter_delay=0.0
)
Bases: EventRenderer
Renders events using raw ANSI escape codes.
Initialize the AnsiRenderer.
No third-party dependencies. Colour codes are automatically suppressed when stdout is not a TTY (piped / redirected output).
Token and reasoning events are written inline (no trailing newline) so they appear as a continuous stream. A separator line is printed when the mode changes between reasoning and responding, or when the active agent changes.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
file
|
Any | None
|
Output stream (defaults to |
None
|
separator_width
|
int | None
|
Width of separator lines. Defaults to 70 or the current terminal width, whichever is available. |
None
|
typewriter_delay
|
float
|
Seconds to sleep after each printable character
in TOKEN and REASONING events. |
0.0
|
Source code in src/kaboo_workflows/renderers/ansi.py
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 | |