pub struct TerminalReporter { /* private fields */ }Expand description
Renders subx_core::core::report channels to stdout/stderr.
Channel-and-suppression matrix (see the machine-readable-output
capability):
| Channel | Stream | Suppressed when |
|---|---|---|
diagnostic | stderr | output mode is json |
warn | stderr | output mode is json |
ai_usage | stdout | output mode is json |
progress | stderr | output mode is json or --quiet |
Messages are written verbatim followed by exactly one \n — no prefix,
symbol, or colour — so a message replacing an eprintln! arrives
byte-identically, and embedded newlines are written as one atomic block.
--quiet silences progress only; diagnostics and warnings survive it.
§Batch progress bar ownership
This reporter is the single owner of the batch progress bar in the
CLI (see expose-core-orchestration-apis). A ProgressEvent::Started
constructs exactly one bar through crate::cli::ui::create_progress_bar
— which force-hides it in JSON mode — and additionally hides it when
enable_progress_bar (read once from the ConfigService at
construction) is false. Advanced sets the position and, when an
item is supplied, the message; Finished ends the bar and clears the
slot (the old “All tasks completed” finish_with_message text is
intentionally dropped — the final rendered frame shows {pos}/{len}).
A Started while a bar is open replaces it rather than nesting. A
Message received while a stream is open becomes the bar’s message
(the parallel batch’s Active: … | Queued: … ticker) instead of a
separate line; with no stream open, messages print as before.
Structured events are processed in every output mode — suppression
happens through the draw target, never by skipping the lifecycle.