Commit graph

2 commits

Author SHA1 Message Date
Austin Schaefer
e1d6a20b3a Keep the writing-report spinner up until the stream's first chunk
Between sending the report prompt and the writer actually starting to
generate, the spinner was already dropped, so the terminal went blank
for however long that gap was. Thread the spinner into
write_text_stream instead and stop it right as the first chunk
arrives, covering the wait with the same "Writing report..." line
rather than clearing it early.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-17 13:21:23 +02:00
Austin Schaefer
f53fcbd937 refactor: extract the streamed-text draining loop into its own module
write_text_stream() in the new stream.rs doesn't touch anything specific
to write_report (topic, findings, the agent) — it just drains a
MultiTurnStreamItem stream, writes each text chunk to a caller-provided
writer, and returns the accumulated string. Pulling it out lets it be
covered by unit tests against a mocked stream and an in-memory writer,
independent of a live model.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-17 12:37:11 +02:00