9abb3735d2
Consolidate scattered state variables in the 834-line stream_completion_with_tools() function to use the existing StreamingState and IterationState structs from streaming.rs. This eliminates code-path aliasing where state was tracked in multiple places and makes the streaming loop easier to reason about. Changes: - Add assistant_message_added field to StreamingState - Add stream_stop_reason field to IterationState - Replace 8 inline state variables with StreamingState::new() - Replace 7 iteration-local variables with IterationState::new() - All 585 workspace tests pass This is a pure refactor with no behavior changes. The state structs were already defined in streaming.rs but not used in the main streaming loop. Agent: fowler