StreamingParser class

Incremental streaming: two IncrementalOpenUIParser instances, one for the complete lines (stable) and one for the display text (complete lines plus the autoclosed pending line). Previously each push ran two full parses of the whole response; now each push only parses new lines and re-evaluates changed statements.

Constructors

StreamingParser(OpenUILibrary library, {Map<String, Object?> state = const {}, Map<String, Object?> queryData = const {}, Set<String> failedQueries = const {}})

Properties

failedQueries → Set<String>
Statement names whose Query failed (a mutable set the host updates as fetches fail and retry; read on every parse, so a failure that lands mid-stream shows as an error view).
final
hashCode → int
The hash code for this object.
no setterinherited
library → OpenUILibrary
final
queryData → Map<String, Object?>
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
state → Map<String, Object?>
final

Methods

finish() → ParseResult
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
push(String chunk) → ParseResult
Push the next chunk. Complete lines are parsed as-is; the pending (last, unterminated) line is parsed after autoclosing, so a half-written component already renders. Queries and mutations are taken from the complete lines only, so a half-written Query never triggers a tool call with partial parameters.
toString() → String
A string representation of this object.
inherited

Operators

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