Console class

The transcript: user messages, streamed responses, tool calls and notices, with a spinner below while a request runs.

Response text is printed a line at a time so Markdown can be styled; the unfinished line is previewed in the live region until it completes.

Constructors

Console(Terminal terminal)

Properties

hashCode → int
The hash code for this object.
no setterinherited
live → LiveRegion
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
terminal → Terminal
final
width → int
Columns available for transcript text.
no setter

Methods

block(String title, {List<String> details = const <String>[], String bullet(String)?}) → void
Prints a block led by a colored ⏺ and followed by indented details, the way tool calls and notices appear.
endTurn() → void
error(String message) → void
gap() → void
Prints an empty line unless the last line printed was empty.
info(List<String> lines) → void
interrupted() → void
interrupting() → void
Shows that the request is being cancelled until it stops.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
print(List<String> lines) → void
Prints permanent lines.
resume() → void
showLive(List<String> lines, {int? cursorRow, int? cursorColumn}) → void
Draws lines in the live region, separated from the transcript by an empty line. cursorRow counts from the first of lines.
startTurn() → void
suspend() → void
Stops drawing the spinner so a menu can use the live region.
text(String chunk) → void
Adds streamed response text.
toolFinished(String name, String title, List<String> details, {required bool isError}) → void
toolStarted(String name, String title, String argument) → void
toString() → String
A string representation of this object.
inherited
userMessage(String text) → void

Operators

operator ==(Object other) → bool
The equality operator.
inherited