Class ChatSegmentParser
- Namespace
- Oscova.Agents.Conversations
- Assembly
- Oscova.Agents.dll
Parses streaming responses into display-ready chat segments.
public class ChatSegmentParser : IToolTrackingObserverInheritance
Implements
Inherited Members
Fields
- OnSegmentChanged
-
Runs when a segment's state, content, or progress changes.
Properties
- Segments
-
Live list of parsed segments. Grows as updates are processed.
Methods
- Complete()
-
Finalize any open segments at the end of a stream pass.
- LastSegmentOfType(ChatSegmentType)
-
Returns the most recently created segment of a given type, or null.
- OnToolCompleted(FunctionCallContent)
-
Marks the matching tool-call segment as completed.
- OnToolFailed(FunctionCallContent)
-
Marks the matching tool-call segment as failed.
- OnToolStarted(FunctionCallContent)
-
Marks the matching tool-call segment as executing.
- Process(AgentResponseUpdate)
-
Feed a streaming update into the parser to produce segments.
- Reset()
-
Clear all segments and reset internal state (for elicitation partitioning).
- StartToolCall(FunctionCallContent)
-
Open or refresh an incomplete tool-call segment before its final arguments are known.