Expand description
Streaming tool-call visualization.
Sits between raw model output and the terminal: it detects the DSML
tool-call marker in plain text and inside <think> blocks, suppresses the
raw DSML markup from display, and instead paints compact, human-friendly
tool banners (“$ command”, “Reading file 1:500…”, streamed diff lines
with - /+ prefixes). Executable tool calls are still parsed by
crate::dsml::DsmlParser; this module only rewrites the terminal
projection, never the transcript.
Port of agent_tool_visualizer, agent_dsml_marker_detector, and
agent_stream_renderer from ds4_agent.c.
Structs§
- Collect
Sink - A sink that accumulates everything it is given into a shared buffer.
- Finished
- Snapshot of stream results after generation ends.
- Stream
Renderer - Streaming display state machine for assistant output.
Constants§
- IN_
THINK_ PROHIBITION - Told to the model when it emitted a tool call inside
<think>.
Traits§
- Render
Sink - Destination for rendered output; the UI layer routes this to its renderer.