refactor(g3-core): extract streaming logic to agent_streaming.rs
Reduce lib.rs complexity by extracting the streaming completion logic: - Extract stream_completion_with_tools (~1080 lines) to agent_streaming.rs - Extract stream_with_retry helper method - Extract parse_diff_stats helper function - Add handle_pre_stream_compaction helper for cleaner pre-stream logic - Add format_tool_output helper for tool output formatting - Remove 3 unused constructor variants: - new_with_readme - new_autonomous_with_readme - new_with_quiet Results: - lib.rs reduced from 2974 to 1791 lines (40% reduction) - Streaming logic cleanly separated into dedicated module - All tests pass, no behavior changes Agent: fowler
This commit is contained in:
1216
crates/g3-core/src/agent_streaming.rs
Normal file
1216
crates/g3-core/src/agent_streaming.rs
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user